|
10 | 10 | "node": ">=16"
|
11 | 11 | },
|
12 | 12 | "files": [
|
13 |
| - "src" |
| 13 | + "lib", |
| 14 | + "src", |
| 15 | + "LICENSE", |
| 16 | + "README.md" |
14 | 17 | ],
|
| 18 | + "publishConfig": { |
| 19 | + "access": "public" |
| 20 | + }, |
| 21 | + "main": "./lib/cjs/index.js", |
| 22 | + "module": "./lib/esm/index.js", |
| 23 | + "types": "./lib/types/index.d.ts", |
| 24 | + "exports": { |
| 25 | + "types": "./lib/types/index.d.ts", |
| 26 | + "require": "./lib/cjs/index.js", |
| 27 | + "import": "./lib/esm/index.js" |
| 28 | + }, |
15 | 29 | "scripts": {
|
16 | 30 | "prepublishOnly": "pnpm build",
|
17 |
| - "build": "tsc --build --verbose", |
| 31 | + "build": "tsc --build --verbose tsconfig.all.json", |
| 32 | + "postbuild": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", |
18 | 33 | "lint": "eslint --max-warnings 0 .",
|
19 | 34 | "lint:fix": "eslint --fix .",
|
20 | 35 | "format": "prettier --check src test",
|
21 | 36 | "format:fix": "prettier --write src test",
|
22 |
| - "test": "mocha test/*" |
| 37 | + "test": "mocha test/* && pnpm test:exports", |
| 38 | + "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs" |
23 | 39 | },
|
24 | 40 | "peerDependencies": {
|
25 | 41 | "@solana/web3.js": "^1.95.5"
|
|
40 | 56 | "eslint-plugin-require-extensions": "^0.1.1",
|
41 | 57 | "mocha": "^11.0.1",
|
42 | 58 | "prettier": "^3.4.2",
|
| 59 | + "shx": "^0.3.4", |
43 | 60 | "typescript": "^5.7.2",
|
44 | 61 | "start-server-and-test": "^2.0.8",
|
45 | 62 | "ts-node": "^10.9.2",
|
|
0 commit comments