From d9fa442d44cfbade16baf5923678f64136bc62fe Mon Sep 17 00:00:00 2001 From: Igor Zviagintsev Date: Fri, 28 Jul 2023 12:37:22 +0400 Subject: [PATCH] Rename main function and fix some package fails --- makeAutoObservable.ts => index.ts | 10 +++++++--- package.json | 20 +++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) rename makeAutoObservable.ts => index.ts (92%) diff --git a/makeAutoObservable.ts b/index.ts similarity index 92% rename from makeAutoObservable.ts rename to index.ts index d9b3a77..62f9883 100644 --- a/makeAutoObservable.ts +++ b/index.ts @@ -1,7 +1,11 @@ // https://github.com/mobxjs/mobx/discussions/2850#discussioncomment-497321 import { - $mobx, AnnotationsMap, CreateObservableOptions, isObservable, makeObservable + $mobx, + AnnotationsMap, + CreateObservableOptions, + isObservable, + makeObservable } from 'mobx' const annotationsSymbol = Symbol() @@ -10,7 +14,7 @@ const objectPrototype = Object.prototype type NoInfer = [T][T extends any ? 0 : never]; type Annotations = AnnotationsMap; -const makeSimpleAutoObservable = < +const makeAutoObservable = < T extends object & { [annotationsSymbol]?: any }, AdditionalKeys extends PropertyKey = never >( @@ -58,4 +62,4 @@ const makeSimpleAutoObservable = < return makeObservable(target, annotations, options) } -export default makeSimpleAutoObservable +export default makeAutoObservable diff --git a/package.json b/package.json index aa8e249..0164590 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "mobx-store-inheritance", - "version": "1.0.1-0", + "version": "1.0.3", "description": "It is like original makeAutoObservable function which allows inheritance for Mobx stores", - "main": "index.mjs", + "main": "dist/index.js", "scripts": { "build": "./node_modules/.bin/tsc", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"No test no candies\" && exit 1" }, "repository": { "type": "git", @@ -17,6 +17,20 @@ "inheritance", "makeAutoObservable" ], + "files": [ + "src", + "dist/", + "README.md" + ], + "exports": { + ".": { + "default": "./dist/index.js" + } + }, + "module": "./dist/index.js", + "engines": { + "node": ">=14" + }, "author": "urugator, Igor «InoY» Zviagintsev", "license": "ISC", "bugs": {