Skip to content
Prev Previous commit
Next Next commit
adapter-tests ES module
  • Loading branch information
daffl committed Dec 22, 2023
commit eab04b99411853603da6ad6781b82da40f9b7420
30 changes: 22 additions & 8 deletions packages/adapter-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
"url": "https://github.com/feathersjs/feathers/issues"
},
"engines": {
"node": ">= 12"
"node": ">= 18"
},
"main": "lib/",
"types": "lib/",
"main": "./lib/index.js",
"types": "./types/index.d.ts",
"scripts": {
"prepublish": "npm run compile",
"pack": "npm pack --pack-destination ../generators/test/build",
"compile": "shx rm -rf lib/ && tsc && npm run pack",
"test": "mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
"compile": "npm run compile:cjs && npm run compile:esm && npm run pack",
"test": "mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts",
"compile:esm": "shx rm -rf esm/ && tsc --outDir esm/ --module esnext && shx echo '{ \"type\": \"module\" }' > esm/package.json",
"compile:cjs": "npx shx rm -rf types/ lib/ && tsc && shx echo '{ \"type\": \"commonjs\" }' > lib/package.json"
},
"directories": {
"lib": "lib"
Expand All @@ -44,7 +46,11 @@
"LICENSE",
"README.md",
"src/**",
"lib/**"
"lib/**",
"types/**",
"esm/**",
"*.d.ts",
"*.js"
],
"publishConfig": {
"access": "public"
Expand All @@ -57,5 +63,13 @@
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5"
}
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5",
"module": "./esm/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./lib/index.js",
"types": "./types/index.d.ts"
}
}
}
5 changes: 3 additions & 2 deletions packages/adapter-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"src/**/*.ts"
],
"compilerOptions": {
"outDir": "lib"
"declarationDir": "./types",
"outDir": "lib"
}
}
}