Skip to content

Commit

Permalink
database adapter es modules
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Dec 22, 2023
1 parent 03ed621 commit 347be8b
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 26 deletions.
25 changes: 19 additions & 6 deletions packages/knex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Feathers SQL service adapter using KnexJS",
"version": "5.0.12",
"homepage": "https://feathersjs.com",
"main": "lib/",
"main": "./lib/index.js",
"keywords": [
"feathers",
"feathers-plugin"
Expand All @@ -27,22 +27,26 @@
"url": "https://github.com/feathersjs/feathers/issues"
},
"engines": {
"node": ">= 14"
"node": ">= 18"
},
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"src/**",
"lib/**",
"types/**",
"esm/**",
"*.d.ts",
"*.js"
],
"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 Down Expand Up @@ -71,5 +75,14 @@
"sqlite3": "^5.1.6",
"typescript": "^5.3.3"
},
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5"
}
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5",
"module": "./esm/index.js",
"types": "./types/index.d.ts",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./lib/index.js",
"types": "./types/index.d.ts"
}
}
}
5 changes: 3 additions & 2 deletions packages/knex/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"
}
}
}
28 changes: 20 additions & 8 deletions packages/memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "An in memory service store",
"version": "5.0.12",
"homepage": "https://github.com/feathersjs/feathers",
"main": "lib/",
"types": "lib/",
"main": "./lib/index.js",
"types": "./types/index.d.ts",
"keywords": [
"feathers",
"feathers-plugin"
Expand All @@ -25,22 +25,26 @@
"url": "https://github.com/feathersjs/feathers/issues"
},
"engines": {
"node": ">= 12"
"node": ">= 18"
},
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"_templates/**",
"src/**",
"lib/**",
"types/**",
"esm/**",
"*.d.ts",
"*.js"
],
"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"
"compile": "npm run compile:cjs && npm run compile:esm && npm run pack",
"test": "mocha --config ../../.mocharc.json --recursive 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"
},
"publishConfig": {
"access": "public"
Expand All @@ -64,5 +68,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/memory/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"
}
}
}
25 changes: 19 additions & 6 deletions packages/mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Feathers MongoDB service adapter",
"version": "5.0.12",
"homepage": "https://feathersjs.com",
"main": "lib/",
"main": "./lib/index.js",
"keywords": [
"feathers",
"feathers-plugin"
Expand All @@ -27,22 +27,26 @@
"url": "https://github.com/feathersjs/feathers/issues"
},
"engines": {
"node": ">= 14"
"node": ">= 18"
},
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"src/**",
"lib/**",
"types/**",
"esm/**",
"*.d.ts",
"*.js"
],
"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 @@ -69,5 +73,14 @@
"shx": "^0.3.4",
"typescript": "^5.3.3"
},
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5"
}
"gitHead": "90caf635aec850550b9d37bea2762af959d9e8d5",
"module": "./esm/index.js",
"types": "./types/index.d.ts",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./lib/index.js",
"types": "./types/index.d.ts"
}
}
}
5 changes: 3 additions & 2 deletions packages/mongodb/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"
}
}
}

0 comments on commit 347be8b

Please sign in to comment.