diff --git a/README.md b/README.md index 2a58d97..b1ab53a 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,14 @@ Dependency injection container (DIC), [PSR-11][2] inspired. ## Requirements * node: 16 - * [chubbyts/chubbyts-dic-types][3]: ^1.1.1 + * [chubbyts/chubbyts-dic-types][3]: ^1.2.1 ## Installation Through [NPM](https://www.npmjs.com) as [@chubbyts/chubbyts-dic][1]. ```ts -npm i @chubbyts/chubbyts-dic@^1.1.1 +npm i @chubbyts/chubbyts-dic@^1.2.0 ``` ## Usage diff --git a/build.js b/build.js new file mode 120000 index 0000000..5ef468d --- /dev/null +++ b/build.js @@ -0,0 +1 @@ +node_modules/@chubbyts/chubbyts-packaging/build.js \ No newline at end of file diff --git a/package.json b/package.json index 3b43350..df3571f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "@chubbyts/chubbyts-dic", - "version": "1.1.1", + "type": "module", + "version": "1.2.0", "description": "Dependency injection container (DIC), PSR-11 inspired.", "keywords": [ "chubbyts", @@ -14,14 +15,14 @@ "license": "MIT", "repository": "chubbyts/chubbyts-dic", "scripts": { + "build": "node ./build.js", "cs-fix": "prettier --write src tests", "cs": "prettier --check src tests", + "infection": "stryker run", "lint-fix": "eslint src tests --fix", "lint": "eslint src tests", - "test": "jest", - "infection": "stryker run", - "build": "rm -Rf dist && tsc", - "prepare": "npm run build" + "prepare": "npm run build", + "test": "jest" }, "jest": { "preset": "ts-jest", @@ -44,18 +45,27 @@ "files": [ "dist" ], + "exports": { + "./*": { + "types": "./*.d.ts", + "require": "./*.cjs", + "import": "./*.mjs", + "default": "./*.mjs" + } + }, "engines": { "node": ">=16" }, "dependencies": { - "@chubbyts/chubbyts-dic-types": "^1.1.1" + "@chubbyts/chubbyts-dic-types": "^1.2.1" }, "devDependencies": { - "@chubbyts/chubbyts-eslint": "^1.1.2", - "@stryker-mutator/core": "^7.1.0", - "@stryker-mutator/jest-runner": "^7.1.0", + "@chubbyts/chubbyts-eslint": "^2.0.3", + "@chubbyts/chubbyts-packaging": "^2.0.4", + "@stryker-mutator/core": "^7.1.1", + "@stryker-mutator/jest-runner": "^7.1.1", "@types/jest": "^29.5.3", - "@types/node": "^20.4.1", + "@types/node": "^20.4.5", "jest": "^29.6.1", "prettier": "^3.0.0", "ts-jest": "^29.1.1", diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 120000 index 0000000..6bb8085 --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1 @@ +node_modules/@chubbyts/chubbyts-packaging/tsconfig.cjs.json \ No newline at end of file diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 120000 index 0000000..7e43d74 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1 @@ +node_modules/@chubbyts/chubbyts-packaging/tsconfig.esm.json \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 619956e..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "target": "es2019", - "module": "commonjs", - "outDir": "dist", - "strict": true, - "declaration": true - }, - "include": ["src"] -} diff --git a/tsconfig.json b/tsconfig.json new file mode 120000 index 0000000..960dc3d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1 @@ +node_modules/@chubbyts/chubbyts-packaging/tsconfig.json \ No newline at end of file diff --git a/tsconfig.types.json b/tsconfig.types.json new file mode 120000 index 0000000..aee4f8e --- /dev/null +++ b/tsconfig.types.json @@ -0,0 +1 @@ +node_modules/@chubbyts/chubbyts-packaging/tsconfig.types.json \ No newline at end of file