|
2 | 2 | "name": "permitio", |
3 | 3 | "version": "2.5.2", |
4 | 4 | "description": "Node.js client library for the Permit.io full-stack permissions platform", |
| 5 | + "type": "commonjs", |
5 | 6 | "main": "build/main/index.js", |
6 | 7 | "typings": "build/main/index.d.ts", |
7 | | - "module": "build/module/index.js", |
8 | | - "repository": "https://github.com/permitio/permit-node", |
| 8 | + "module": "build/module/index.mjs", |
| 9 | + "exports": { |
| 10 | + ".": { |
| 11 | + "types": "./build/module/index.d.ts", |
| 12 | + "import": "./build/module/index.mjs", |
| 13 | + "require": "./build/main/index.js" |
| 14 | + }, |
| 15 | + "./build/main/*": "./build/main/*", |
| 16 | + "./build/module/*": "./build/module/*" |
| 17 | + }, |
| 18 | + "repository": { |
| 19 | + "type": "git", |
| 20 | + "url": "git+https://github.com/permitio/permit-node.git" |
| 21 | + }, |
9 | 22 | "license": "MIT", |
10 | 23 | "keywords": [], |
11 | 24 | "scripts": { |
12 | 25 | "build": "run-p build:*", |
13 | 26 | "build:main": "tsc -p tsconfig.json", |
14 | | - "build:module": "tsc -p tsconfig.module.json", |
| 27 | + "build:module": "tsc -p tsconfig.module.json && yarn rename:esm", |
15 | 28 | "fix": "run-s fix:*", |
16 | 29 | "fix:prettier": "prettier --config .prettierrc \"src/**/*.{ts,css,less,scss,js}\" --write", |
17 | 30 | "fix:lint": "eslint src --ext .ts --fix", |
|
33 | 46 | "docs": "typedoc", |
34 | 47 | "docs:watch": "typedoc --watch", |
35 | 48 | "version": "2.5.2", |
| 49 | + "rename:esm": "/bin/zsh ./scripts/rename-mjs.sh", |
36 | 50 | "reset-hard": "git clean -dfx && git reset --hard && yarn", |
37 | 51 | "prepare": "npm run build && husky install", |
38 | 52 | "prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish", |
|
119 | 133 | "exclude": [ |
120 | 134 | "**/*.spec.js" |
121 | 135 | ] |
122 | | - } |
| 136 | + }, |
| 137 | + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" |
123 | 138 | } |
0 commit comments