Skip to content

Commit d9fa442

Browse files
author
Igor Zviagintsev
committed
Rename main function and fix some package fails
1 parent 35a0f3b commit d9fa442

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

makeAutoObservable.ts index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// https://github.com/mobxjs/mobx/discussions/2850#discussioncomment-497321
22

33
import {
4-
$mobx, AnnotationsMap, CreateObservableOptions, isObservable, makeObservable
4+
$mobx,
5+
AnnotationsMap,
6+
CreateObservableOptions,
7+
isObservable,
8+
makeObservable
59
} from 'mobx'
610

711
const annotationsSymbol = Symbol()
@@ -10,7 +14,7 @@ const objectPrototype = Object.prototype
1014
type NoInfer<T> = [T][T extends any ? 0 : never];
1115
type Annotations<T extends Object = Object, U extends PropertyKey = never> = AnnotationsMap<T, U>;
1216

13-
const makeSimpleAutoObservable = <
17+
const makeAutoObservable = <
1418
T extends object & { [annotationsSymbol]?: any },
1519
AdditionalKeys extends PropertyKey = never
1620
>(
@@ -58,4 +62,4 @@ const makeSimpleAutoObservable = <
5862
return makeObservable(target, annotations, options)
5963
}
6064

61-
export default makeSimpleAutoObservable
65+
export default makeAutoObservable

package.json

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "mobx-store-inheritance",
3-
"version": "1.0.1-0",
3+
"version": "1.0.3",
44
"description": "It is like original makeAutoObservable function which allows inheritance for Mobx stores",
5-
"main": "index.mjs",
5+
"main": "dist/index.js",
66
"scripts": {
77
"build": "./node_modules/.bin/tsc",
8-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"test": "echo \"No test no candies\" && exit 1"
99
},
1010
"repository": {
1111
"type": "git",
@@ -17,6 +17,20 @@
1717
"inheritance",
1818
"makeAutoObservable"
1919
],
20+
"files": [
21+
"src",
22+
"dist/",
23+
"README.md"
24+
],
25+
"exports": {
26+
".": {
27+
"default": "./dist/index.js"
28+
}
29+
},
30+
"module": "./dist/index.js",
31+
"engines": {
32+
"node": ">=14"
33+
},
2034
"author": "urugator, Igor «InoY» Zviagintsev",
2135
"license": "ISC",
2236
"bugs": {

0 commit comments

Comments
 (0)