From b7708aa40fe687e8e2084004417f5fa1f319657e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 14 Sep 2024 07:24:13 +0000 Subject: [PATCH 1/4] Github CI build: __run_3 v8.0.0-alpha.5 [ci skip] --- docs/package.json | 2 +- lerna.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/di/package.json | 6 +- packages/engines/package.json | 2 +- packages/graphql/apollo/package.json | 8 +- packages/graphql/apollo/vitest.config.mts | 10 +- packages/graphql/graphql-ws/package.json | 8 +- packages/graphql/typegraphql/package.json | 2 +- .../graphql/typegraphql/vitest.config.mts | 6 +- packages/orm/adapters-redis/package.json | 10 +- packages/orm/adapters/package.json | 14 +- packages/orm/ioredis/package.json | 6 +- packages/orm/mikro-orm/package.json | 8 +- packages/orm/mongoose/package.json | 12 +- packages/orm/objection/package.json | 12 +- packages/orm/prisma/package.json | 10 +- .../orm/testcontainers-mongo/package.json | 8 +- packages/perf/package.json | 2 +- packages/platform/common/package.json | 2 +- packages/platform/platform-cache/package.json | 10 +- .../platform/platform-exceptions/package.json | 10 +- .../platform/platform-express/package.json | 16 +- packages/platform/platform-koa/package.json | 14 +- .../platform-log-middleware/package.json | 8 +- .../platform-middlewares/package.json | 8 +- .../platform/platform-params/package.json | 12 +- .../platform-response-filter/package.json | 12 +- .../platform/platform-router/package.json | 14 +- .../platform-serverless-http/package.json | 14 +- .../platform-serverless-testing/package.json | 14 +- .../platform/platform-serverless/package.json | 4 +- .../platform/platform-test-sdk/package.json | 2 +- packages/platform/platform-views/package.json | 12 +- packages/security/jwks/package.json | 2 +- .../package.json | 8 +- packages/security/oidc-provider/package.json | 14 +- packages/security/passport/package.json | 4 +- packages/specs/ajv/package.json | 10 +- packages/specs/exceptions/package.json | 4 +- packages/specs/json-mapper/package.json | 6 +- packages/specs/openspec/package.json | 2 +- packages/specs/schema/package.json | 6 +- packages/specs/swagger/package.json | 4 +- packages/third-parties/agenda/package.json | 2 +- packages/third-parties/bullmq/package.json | 2 +- .../components-scan/package.json | 4 +- .../third-parties/event-emitter/package.json | 2 +- .../third-parties/formio-types/package.json | 2 +- packages/third-parties/formio/package.json | 4 +- packages/third-parties/pulse/package.json | 2 +- .../third-parties/schema-formio/package.json | 8 +- .../socketio-testing/package.json | 8 +- packages/third-parties/socketio/package.json | 10 +- packages/third-parties/sse/package.json | 10 +- packages/third-parties/stripe/package.json | 10 +- packages/third-parties/temporal/package.json | 2 +- packages/third-parties/terminus/package.json | 10 +- packages/third-parties/vike/package.json | 4 +- packages/utils/normalize-path/package.json | 2 +- tools/barrels/package.json | 2 +- tools/github-sponsors/package.json | 2 +- tools/integration/package.json | 2 +- tools/typescript/package.json | 2 +- tools/vitest/package.json | 2 +- tools/webpack/package.json | 2 +- yarn.lock | 292 +++++++++--------- 68 files changed, 365 insertions(+), 365 deletions(-) diff --git a/docs/package.json b/docs/package.json index 61d3686067b..d7b9cb9a2ca 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/docs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "description": "Documentation Ts.ED", "private": true, "scripts": { diff --git a/lerna.json b/lerna.json index ce12d562a71..18ff3446e52 100644 --- a/lerna.json +++ b/lerna.json @@ -11,7 +11,7 @@ "packages/utils/*", "docs" ], - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "command": { "bootstrap": { "npmClientArgs": [ diff --git a/package.json b/package.json index c9cb64f1c04..998dcb0366d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/root", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "description": "A TypeScript Framework on top of Express", "private": true, "author": "Romain Lenzotti", diff --git a/packages/core/package.json b/packages/core/package.json index 4896fb20702..2e0c97e72e9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,7 +2,7 @@ "name": "@tsed/core", "description": "Core module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/di/package.json b/packages/di/package.json index 76c833d7f05..c8b899a7282 100644 --- a/packages/di/package.json +++ b/packages/di/package.json @@ -2,7 +2,7 @@ "name": "@tsed/di", "description": "DI module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "lib/esm/index.js", "module": "lib/esm/index.js", @@ -42,9 +42,9 @@ "webpack": "^5.75.0" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", + "@tsed/core": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/engines/package.json b/packages/engines/package.json index adbd673f658..38a4482ee70 100644 --- a/packages/engines/package.json +++ b/packages/engines/package.json @@ -2,7 +2,7 @@ "name": "@tsed/engines", "description": "Template engines library. Provide an API to adding custom engines from decorators.", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/graphql/apollo/package.json b/packages/graphql/apollo/package.json index 0e30f265d75..945b615f29b 100644 --- a/packages/graphql/apollo/package.json +++ b/packages/graphql/apollo/package.json @@ -2,7 +2,7 @@ "name": "@tsed/apollo", "description": "Apollo package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -44,9 +44,9 @@ }, "peerDependencies": { "@apollo/server": ">=4.10.4", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", "graphql": ">16.0.0" } diff --git a/packages/graphql/apollo/vitest.config.mts b/packages/graphql/apollo/vitest.config.mts index d759e817941..1d11c029c94 100644 --- a/packages/graphql/apollo/vitest.config.mts +++ b/packages/graphql/apollo/vitest.config.mts @@ -10,12 +10,12 @@ export default defineConfig( coverage: { ...presets.test.coverage, thresholds: { - statements: 0, - branches: 0, - functions: 0, - lines: 0 + statements: 80.91, + branches: 80.95, + functions: 94.11, + lines: 80.91 } } } } -); +); \ No newline at end of file diff --git a/packages/graphql/graphql-ws/package.json b/packages/graphql/graphql-ws/package.json index b23dbd802de..4bcab7e0a91 100644 --- a/packages/graphql/graphql-ws/package.json +++ b/packages/graphql/graphql-ws/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/graphql-ws", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "description": "An extension to allow GraphQL over WebSockets using graphql-ws protocol", "type": "commonjs", "source": "./src/index.ts", @@ -35,9 +35,9 @@ "typescript": "4.9.5" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", "graphql-ws": ">=5.14.2" } diff --git a/packages/graphql/typegraphql/package.json b/packages/graphql/typegraphql/package.json index 7014e9a3fe1..25c9d58ad2e 100644 --- a/packages/graphql/typegraphql/package.json +++ b/packages/graphql/typegraphql/package.json @@ -2,7 +2,7 @@ "name": "@tsed/typegraphql", "description": "TypeGraphQL package for Ts.ED framework, based on Apollo-server-core and Type-graphql", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/graphql/typegraphql/vitest.config.mts b/packages/graphql/typegraphql/vitest.config.mts index 5c0fcb22ed1..e2b1733b8f9 100644 --- a/packages/graphql/typegraphql/vitest.config.mts +++ b/packages/graphql/typegraphql/vitest.config.mts @@ -10,10 +10,10 @@ export default defineConfig( coverage: { ...presets.test.coverage, thresholds: { - statements: 92.09, - branches: 61.11, + statements: 95.34, + branches: 61.53, functions: 100, - lines: 92.09 + lines: 95.34 } } } diff --git a/packages/orm/adapters-redis/package.json b/packages/orm/adapters-redis/package.json index d70004372cd..2c95050cd3b 100644 --- a/packages/orm/adapters-redis/package.json +++ b/packages/orm/adapters-redis/package.json @@ -2,7 +2,7 @@ "name": "@tsed/adapters-redis", "description": "Redis adapter for Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -36,10 +36,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/adapters": "8.0.0-alpha.4", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/adapters": "8.0.0-alpha.5", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "ioredis": ">=5.2.3", "ioredis-mock": ">=8.2.2", "uuid": "^9.0.1" diff --git a/packages/orm/adapters/package.json b/packages/orm/adapters/package.json index 53339f35aa3..04f2567a2d5 100644 --- a/packages/orm/adapters/package.json +++ b/packages/orm/adapters/package.json @@ -2,7 +2,7 @@ "name": "@tsed/adapters", "description": "Database adapters for Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -47,12 +47,12 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/ajv": "8.0.0-alpha.4", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/ajv": "8.0.0-alpha.5", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/ajv": { diff --git a/packages/orm/ioredis/package.json b/packages/orm/ioredis/package.json index 7264fd54f14..19d2b6423f9 100644 --- a/packages/orm/ioredis/package.json +++ b/packages/orm/ioredis/package.json @@ -2,7 +2,7 @@ "name": "@tsed/ioredis", "description": "IO Redis connection for Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -38,8 +38,8 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "ioredis": ">=5.2.3", "ioredis-mock": ">=8.2.2" } diff --git a/packages/orm/mikro-orm/package.json b/packages/orm/mikro-orm/package.json index 293eae4074f..5245fcd65e8 100644 --- a/packages/orm/mikro-orm/package.json +++ b/packages/orm/mikro-orm/package.json @@ -2,7 +2,7 @@ "name": "@tsed/mikro-orm", "description": "MikroORM package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -45,9 +45,9 @@ }, "peerDependencies": { "@mikro-orm/core": ">=4.5.9", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5" } } diff --git a/packages/orm/mongoose/package.json b/packages/orm/mongoose/package.json index 1ae0f1e0646..8707f5d9e27 100644 --- a/packages/orm/mongoose/package.json +++ b/packages/orm/mongoose/package.json @@ -2,7 +2,7 @@ "name": "@tsed/mongoose", "description": "Mongoose package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "tsed", "mongoose", @@ -49,12 +49,12 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/ajv": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/ajv": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/schema": "8.0.0-alpha.5", "mongoose": ">=6.0.0" } } diff --git a/packages/orm/objection/package.json b/packages/orm/objection/package.json index 0351009a26a..ffe3b46239d 100644 --- a/packages/orm/objection/package.json +++ b/packages/orm/objection/package.json @@ -2,7 +2,7 @@ "name": "@tsed/objection", "description": "Objection.js package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -41,11 +41,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/ajv": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/ajv": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "knex": ">=0.94.0", "objection": ">=2.0.0" }, diff --git a/packages/orm/prisma/package.json b/packages/orm/prisma/package.json index 58c41ccfc22..c1675530c94 100644 --- a/packages/orm/prisma/package.json +++ b/packages/orm/prisma/package.json @@ -2,7 +2,7 @@ "name": "@tsed/prisma", "description": "Generate Ts.ED JsonSchema based on Prisma models", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -57,10 +57,10 @@ }, "peerDependencies": { "@prisma/client": ">=4.0.0", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "keywords": [ "TypeScript", diff --git a/packages/orm/testcontainers-mongo/package.json b/packages/orm/testcontainers-mongo/package.json index e2c13c6913f..ec2bcd08c15 100644 --- a/packages/orm/testcontainers-mongo/package.json +++ b/packages/orm/testcontainers-mongo/package.json @@ -2,7 +2,7 @@ "name": "@tsed/testcontainers-mongo", "description": "A module to test Ts.ED code that use MongoDB as database using Test Containers", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -42,9 +42,9 @@ }, "peerDependencies": { "@testcontainers/mongodb": ">=10.11.0", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "mongodb": ">=6", "testcontainers": ">=10.11.0" } diff --git a/packages/perf/package.json b/packages/perf/package.json index 211607f06ec..577018dfbb1 100644 --- a/packages/perf/package.json +++ b/packages/perf/package.json @@ -2,7 +2,7 @@ "name": "@tsed/perf", "description": "Perf module tool", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "private": true, "source": "./src/index.ts", "main": "lib/esm/index.js", diff --git a/packages/platform/common/package.json b/packages/platform/common/package.json index c6fc1e3d506..9d2c1676d79 100644 --- a/packages/platform/common/package.json +++ b/packages/platform/common/package.json @@ -2,7 +2,7 @@ "name": "@tsed/common", "description": "A TypeScript Framework on top of Express", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/platform/platform-cache/package.json b/packages/platform/platform-cache/package.json index 2b7fa8a122f..578906111e4 100644 --- a/packages/platform/platform-cache/package.json +++ b/packages/platform/platform-cache/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-cache", "description": "Platform cache module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -40,10 +40,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-exceptions/package.json b/packages/platform/platform-exceptions/package.json index 9e3ac041443..ba3b9a7fee3 100644 --- a/packages/platform/platform-exceptions/package.json +++ b/packages/platform/platform-exceptions/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-exceptions", "description": "Platform exceptions module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -37,10 +37,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-express/package.json b/packages/platform/platform-express/package.json index be2af5af86c..0c4dcfa7cf3 100644 --- a/packages/platform/platform-express/package.json +++ b/packages/platform/platform-express/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-express", "description": "A TypeScript Framework on top of Express", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -90,14 +90,14 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/openspec": "8.0.0-alpha.4", - "@tsed/platform-views": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/openspec": "8.0.0-alpha.5", + "@tsed/platform-views": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "@types/multer": "^1.4.5", "body-parser": "^1.19.0", "cross-env": "7.0.3", diff --git a/packages/platform/platform-koa/package.json b/packages/platform/platform-koa/package.json index 72539af2b13..2ac544594af 100644 --- a/packages/platform/platform-koa/package.json +++ b/packages/platform/platform-koa/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-koa", "description": "Koa package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -93,13 +93,13 @@ "tslib": "2.6.1" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/openspec": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/openspec": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "koa": ">=2.13.0", "koa-bodyparser": ">=4.3.0", "koa-compress": ">=5.0.1", diff --git a/packages/platform/platform-log-middleware/package.json b/packages/platform/platform-log-middleware/package.json index d78db73a88f..a8ed66efea4 100644 --- a/packages/platform/platform-log-middleware/package.json +++ b/packages/platform/platform-log-middleware/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-log-middleware", "description": "Log request middleware module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -36,9 +36,9 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/di": "8.0.0-alpha.4", - "@tsed/platform-middlewares": "8.0.0-alpha.4", - "@tsed/platform-params": "8.0.0-alpha.4" + "@tsed/di": "8.0.0-alpha.5", + "@tsed/platform-middlewares": "8.0.0-alpha.5", + "@tsed/platform-params": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/di": { diff --git a/packages/platform/platform-middlewares/package.json b/packages/platform/platform-middlewares/package.json index cb07f92cb49..8c9e280305e 100644 --- a/packages/platform/platform-middlewares/package.json +++ b/packages/platform/platform-middlewares/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-middlewares", "description": "Middlewares module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -36,9 +36,9 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-params/package.json b/packages/platform/platform-params/package.json index 5ba87c707f8..608d71c124f 100644 --- a/packages/platform/platform-params/package.json +++ b/packages/platform/platform-params/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-params", "description": "Params module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -38,11 +38,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-response-filter/package.json b/packages/platform/platform-response-filter/package.json index c486f1187b2..89d6d620705 100644 --- a/packages/platform/platform-response-filter/package.json +++ b/packages/platform/platform-response-filter/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-response-filter", "description": "Platform response filter module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -38,11 +38,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-router/package.json b/packages/platform/platform-router/package.json index bcab793a0fc..b60ba0516db 100644 --- a/packages/platform/platform-router/package.json +++ b/packages/platform/platform-router/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-router", "description": "Router", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -39,12 +39,12 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/platform-params": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/platform-params": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/platform/platform-serverless-http/package.json b/packages/platform/platform-serverless-http/package.json index fdc63cfb174..c69077e04c9 100644 --- a/packages/platform/platform-serverless-http/package.json +++ b/packages/platform/platform-serverless-http/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-serverless-http", "description": "Module to support Serverless HTTP function with Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -76,13 +76,13 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/openspec": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/openspec": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "serverless-http": ">=2.0.0" }, "peerDependenciesMeta": { diff --git a/packages/platform/platform-serverless-testing/package.json b/packages/platform/platform-serverless-testing/package.json index fccfb290544..13640e1c701 100644 --- a/packages/platform/platform-serverless-testing/package.json +++ b/packages/platform/platform-serverless-testing/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-serverless-testing", "description": "Module to test Serverless function with Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -71,12 +71,12 @@ "tslib": "2.6.1" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/openspec": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/openspec": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" } } diff --git a/packages/platform/platform-serverless/package.json b/packages/platform/platform-serverless/package.json index 83e19e4d65d..f7d10bd2433 100644 --- a/packages/platform/platform-serverless/package.json +++ b/packages/platform/platform-serverless/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-serverless", "description": "Platform serverless module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -47,7 +47,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/di": "8.0.0-alpha.4", + "@tsed/di": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", "find-my-way": ">=7.0.0" }, diff --git a/packages/platform/platform-test-sdk/package.json b/packages/platform/platform-test-sdk/package.json index 264ab3c989d..611d401f4b2 100644 --- a/packages/platform/platform-test-sdk/package.json +++ b/packages/platform/platform-test-sdk/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-test-sdk", "description": "Package to test platform adapter integration with Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/platform/platform-views/package.json b/packages/platform/platform-views/package.json index dd56644b9e4..2470b229194 100644 --- a/packages/platform/platform-views/package.json +++ b/packages/platform/platform-views/package.json @@ -2,7 +2,7 @@ "name": "@tsed/platform-views", "description": "Views module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -41,11 +41,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/engines": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/engines": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/security/jwks/package.json b/packages/security/jwks/package.json index d8ed969f423..725e807aafc 100644 --- a/packages/security/jwks/package.json +++ b/packages/security/jwks/package.json @@ -2,7 +2,7 @@ "name": "@tsed/jwks", "description": "Utils to generate jwks pair keys", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json index a9c11c144c1..6dbd16d0927 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json @@ -2,7 +2,7 @@ "name": "@tsed/oidc-provider-plugin-wildcard-redirect-uri", "description": "A plugin to support wildcard in the redirect uri whitelist", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "contributors": [ { "name": "romakita" @@ -45,10 +45,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/oidc-provider": "8.0.0-alpha.4", + "@tsed/oidc-provider": "8.0.0-alpha.5", "oidc-provider": ">=8.0.0" }, "peerDependenciesMeta": { diff --git a/packages/security/oidc-provider/package.json b/packages/security/oidc-provider/package.json index bcfca88b03b..b498191816e 100644 --- a/packages/security/oidc-provider/package.json +++ b/packages/security/oidc-provider/package.json @@ -2,7 +2,7 @@ "name": "@tsed/oidc-provider", "description": "OIDC provider package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "contributors": [ { "name": "romakita" @@ -63,12 +63,12 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/ajv": "8.0.0-alpha.4", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/ajv": "8.0.0-alpha.5", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "oidc-provider": ">=8.0.0" }, "peerDependenciesMeta": { diff --git a/packages/security/passport/package.json b/packages/security/passport/package.json index a6a60cb50ea..5e82a327a28 100644 --- a/packages/security/passport/package.json +++ b/packages/security/passport/package.json @@ -2,7 +2,7 @@ "name": "@tsed/passport", "description": "Passport package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -47,7 +47,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", "passport": ">=0.4.1" }, "peerDependenciesMeta": { diff --git a/packages/specs/ajv/package.json b/packages/specs/ajv/package.json index f2df25ca8d9..24a2a25f5ba 100644 --- a/packages/specs/ajv/package.json +++ b/packages/specs/ajv/package.json @@ -2,7 +2,7 @@ "name": "@tsed/ajv", "description": "AJV package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -40,10 +40,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "ajv": ">=8.9.0", "ajv-errors": ">=3.0.0" }, diff --git a/packages/specs/exceptions/package.json b/packages/specs/exceptions/package.json index 70226cb2cdb..bb8fe9046ee 100644 --- a/packages/specs/exceptions/package.json +++ b/packages/specs/exceptions/package.json @@ -2,7 +2,7 @@ "name": "@tsed/exceptions", "description": "HTTP exceptions module for Ts.ED Framework and other pure Express application", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -36,6 +36,6 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5" } } diff --git a/packages/specs/json-mapper/package.json b/packages/specs/json-mapper/package.json index 41db498ecbd..7fd71ba0b2c 100644 --- a/packages/specs/json-mapper/package.json +++ b/packages/specs/json-mapper/package.json @@ -2,7 +2,7 @@ "name": "@tsed/json-mapper", "description": "Json mapper module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -51,8 +51,8 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/specs/openspec/package.json b/packages/specs/openspec/package.json index 4d6f0ba62cc..2520f838e88 100644 --- a/packages/specs/openspec/package.json +++ b/packages/specs/openspec/package.json @@ -2,7 +2,7 @@ "name": "@tsed/openspec", "description": "OpenSpec2 and OpenSpec3 interfaces declarations for TypeScript application", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/specs/schema/package.json b/packages/specs/schema/package.json index ebc95e17016..9c483a4f2db 100644 --- a/packages/specs/schema/package.json +++ b/packages/specs/schema/package.json @@ -2,7 +2,7 @@ "name": "@tsed/schema", "description": "JsonSchema module for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -61,8 +61,8 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/openspec": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5", + "@tsed/openspec": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/specs/swagger/package.json b/packages/specs/swagger/package.json index e6e92cea521..1f2106712e4 100644 --- a/packages/specs/swagger/package.json +++ b/packages/specs/swagger/package.json @@ -2,7 +2,7 @@ "name": "@tsed/swagger", "description": "Swagger package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -50,7 +50,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4" + "@tsed/common": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/common": { diff --git a/packages/third-parties/agenda/package.json b/packages/third-parties/agenda/package.json index 815544637a3..ddde22d9388 100644 --- a/packages/third-parties/agenda/package.json +++ b/packages/third-parties/agenda/package.json @@ -2,7 +2,7 @@ "name": "@tsed/agenda", "description": "Agenda package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/third-parties/bullmq/package.json b/packages/third-parties/bullmq/package.json index c783002d167..25f04dfe0c2 100644 --- a/packages/third-parties/bullmq/package.json +++ b/packages/third-parties/bullmq/package.json @@ -2,7 +2,7 @@ "name": "@tsed/bullmq", "description": "BullMQ integration for Ts.ED", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "Ts.ED", "BullMQ" diff --git a/packages/third-parties/components-scan/package.json b/packages/third-parties/components-scan/package.json index 708bb60a25c..a1ea02c6e50 100644 --- a/packages/third-parties/components-scan/package.json +++ b/packages/third-parties/components-scan/package.json @@ -2,7 +2,7 @@ "name": "@tsed/components-scan", "description": "Components scan utilities for Ts.ED Framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -37,7 +37,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4" + "@tsed/core": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/core": { diff --git a/packages/third-parties/event-emitter/package.json b/packages/third-parties/event-emitter/package.json index 4f6cf78430b..5cef1c9fb94 100644 --- a/packages/third-parties/event-emitter/package.json +++ b/packages/third-parties/event-emitter/package.json @@ -2,7 +2,7 @@ "name": "@tsed/event-emitter", "description": "EventEmitter package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "contributors": [ { "name": "Oliver Christen" diff --git a/packages/third-parties/formio-types/package.json b/packages/third-parties/formio-types/package.json index 812189b5511..831fed81ac7 100644 --- a/packages/third-parties/formio-types/package.json +++ b/packages/third-parties/formio-types/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/formio-types", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "description": "Formio types definition package for Ts.ED framework", "type": "commonjs", "keywords": [ diff --git a/packages/third-parties/formio/package.json b/packages/third-parties/formio/package.json index bdb1cac5005..39bd2c7af0a 100644 --- a/packages/third-parties/formio/package.json +++ b/packages/third-parties/formio/package.json @@ -2,7 +2,7 @@ "name": "@tsed/formio", "description": "Formio package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "Formio", "Ts.ED", @@ -53,7 +53,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", "express": "^4.17.1", "formio": ">=2.0.0", "lodash": "^4.17.21", diff --git a/packages/third-parties/pulse/package.json b/packages/third-parties/pulse/package.json index be78388deca..2394f41fd3d 100644 --- a/packages/third-parties/pulse/package.json +++ b/packages/third-parties/pulse/package.json @@ -2,7 +2,7 @@ "name": "@tsed/pulse", "description": "@pulsecron/pulse package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/third-parties/schema-formio/package.json b/packages/third-parties/schema-formio/package.json index 014e273be96..6066e1862df 100644 --- a/packages/third-parties/schema-formio/package.json +++ b/packages/third-parties/schema-formio/package.json @@ -2,7 +2,7 @@ "name": "@tsed/schema-formio", "description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -54,9 +54,9 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/core": "8.0.0-alpha.4", - "@tsed/openspec": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/openspec": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "formiojs": ">=4.0.0", "lodash": ">=4.0.0", "moment": ">=2.0.0" diff --git a/packages/third-parties/socketio-testing/package.json b/packages/third-parties/socketio-testing/package.json index 9df6c1d156f..1b6d56db50f 100644 --- a/packages/third-parties/socketio-testing/package.json +++ b/packages/third-parties/socketio-testing/package.json @@ -2,7 +2,7 @@ "name": "@tsed/socketio-testing", "description": "Socket.io testing package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", @@ -33,9 +33,9 @@ "typescript": "4.9.5" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", "socket.io-client": "^4.0.1" } } diff --git a/packages/third-parties/socketio/package.json b/packages/third-parties/socketio/package.json index 6c6617b606f..6d80d877dbe 100644 --- a/packages/third-parties/socketio/package.json +++ b/packages/third-parties/socketio/package.json @@ -2,7 +2,7 @@ "name": "@tsed/socketio", "description": "Socket.io package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "tsed", "socket.io", @@ -52,11 +52,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/platform-middlewares": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/platform-middlewares": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "socket.io": ">=4.0.0" }, "peerDependenciesMeta": { diff --git a/packages/third-parties/sse/package.json b/packages/third-parties/sse/package.json index a87eda5b6b7..b95fb6175db 100644 --- a/packages/third-parties/sse/package.json +++ b/packages/third-parties/sse/package.json @@ -2,7 +2,7 @@ "name": "@tsed/sse", "description": "Server-sent events package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "tsed", "server-sent events", @@ -50,11 +50,11 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/di": "8.0.0-alpha.4", - "@tsed/json-mapper": "8.0.0-alpha.4", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/json-mapper": "8.0.0-alpha.5", "@tsed/logger": ">=6.7.5", - "@tsed/platform-middlewares": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/platform-middlewares": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@tsed/di": { diff --git a/packages/third-parties/stripe/package.json b/packages/third-parties/stripe/package.json index b4a485451b3..964809b43fb 100644 --- a/packages/third-parties/stripe/package.json +++ b/packages/third-parties/stripe/package.json @@ -2,7 +2,7 @@ "name": "@tsed/stripe", "description": "Stripe package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "keywords": [ "Stripe", "Ts.ED", @@ -49,10 +49,10 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/exceptions": "8.0.0-alpha.4", - "@tsed/platform-middlewares": "8.0.0-alpha.4", - "@tsed/platform-params": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4", + "@tsed/exceptions": "8.0.0-alpha.5", + "@tsed/platform-middlewares": "8.0.0-alpha.5", + "@tsed/platform-params": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5", "@types/body-parser": "^1.19.0", "body-parser": "^1.19.0", "stripe": "^9.16.0" diff --git a/packages/third-parties/temporal/package.json b/packages/third-parties/temporal/package.json index bdb12deb9ac..1e69e737211 100644 --- a/packages/third-parties/temporal/package.json +++ b/packages/third-parties/temporal/package.json @@ -2,7 +2,7 @@ "name": "@tsed/temporal", "description": "Temporal.io package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/third-parties/terminus/package.json b/packages/third-parties/terminus/package.json index 95f0306ffdc..c35bab54560 100644 --- a/packages/third-parties/terminus/package.json +++ b/packages/third-parties/terminus/package.json @@ -2,7 +2,7 @@ "name": "@tsed/terminus", "description": "Adds graceful shutdown and Kubernetes readiness / liveness checks for any HTTP applications.", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "author": "Emilien Leroy ", "source": "./src/index.ts", "main": "./lib/cjs/index.js", @@ -41,10 +41,10 @@ }, "peerDependencies": { "@godaddy/terminus": "^4.7.1", - "@tsed/common": "8.0.0-alpha.4", - "@tsed/core": "8.0.0-alpha.4", - "@tsed/di": "8.0.0-alpha.4", - "@tsed/schema": "8.0.0-alpha.4" + "@tsed/common": "8.0.0-alpha.5", + "@tsed/core": "8.0.0-alpha.5", + "@tsed/di": "8.0.0-alpha.5", + "@tsed/schema": "8.0.0-alpha.5" }, "peerDependenciesMeta": { "@godaddy/terminus": { diff --git a/packages/third-parties/vike/package.json b/packages/third-parties/vike/package.json index ff30b99c0e7..74cb061fcf3 100644 --- a/packages/third-parties/vike/package.json +++ b/packages/third-parties/vike/package.json @@ -2,7 +2,7 @@ "name": "@tsed/vike", "description": "Vike package for Ts.ED framework", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "contributors": [ { "name": "romakita" @@ -44,7 +44,7 @@ "vitest": "2.0.4" }, "peerDependencies": { - "@tsed/common": "8.0.0-alpha.4", + "@tsed/common": "8.0.0-alpha.5", "vike": ">=0.4.160", "vite": ">=4" }, diff --git a/packages/utils/normalize-path/package.json b/packages/utils/normalize-path/package.json index c4c707dd08c..3a0af185a34 100644 --- a/packages/utils/normalize-path/package.json +++ b/packages/utils/normalize-path/package.json @@ -2,7 +2,7 @@ "name": "@tsed/normalize-path", "description": "Utils to normalize path", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/tools/barrels/package.json b/tools/barrels/package.json index d67f1d792be..8fd54220704 100644 --- a/tools/barrels/package.json +++ b/tools/barrels/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/barrels", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "bin": "./index.mjs", "type": "module", "dependencies": { diff --git a/tools/github-sponsors/package.json b/tools/github-sponsors/package.json index 7107ae5c24c..206bca313d9 100644 --- a/tools/github-sponsors/package.json +++ b/tools/github-sponsors/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/github-sponsors", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "private": true, "scripts": { "sponsors": "node ./bin/github-sponsors.js" diff --git a/tools/integration/package.json b/tools/integration/package.json index ac6c3839cff..e0e85f9393c 100644 --- a/tools/integration/package.json +++ b/tools/integration/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/integration", "type": "commonjs", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "source": "src/index.ts", "main": "src/index.js", "private": true, diff --git a/tools/typescript/package.json b/tools/typescript/package.json index 131a8549e5e..eca2279fd2c 100644 --- a/tools/typescript/package.json +++ b/tools/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/typescript", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "description": "Util to compile source", "private": true, "type": "module", diff --git a/tools/vitest/package.json b/tools/vitest/package.json index efa97a2bb5e..5807cb32ea0 100644 --- a/tools/vitest/package.json +++ b/tools/vitest/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/vitest", "type": "module", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "private": true, "exports": { ".": "./index.js", diff --git a/tools/webpack/package.json b/tools/webpack/package.json index 4794f2e5874..e7b5561da15 100644 --- a/tools/webpack/package.json +++ b/tools/webpack/package.json @@ -1,6 +1,6 @@ { "name": "@tsed/webpack-config", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "private": true, "main": "webpack.config.js" } diff --git a/yarn.lock b/yarn.lock index a2c7c4dd645..63e1a8edf6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6512,10 +6512,10 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/adapters": 8.0.0-alpha.4 - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/adapters": 8.0.0-alpha.5 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 ioredis: ">=5.2.3" ioredis-mock: ">=8.2.2" uuid: ^9.0.1 @@ -6547,12 +6547,12 @@ __metadata: uuid: "npm:9.0.1" vitest: "npm:2.0.4" peerDependencies: - "@tsed/ajv": 8.0.0-alpha.4 - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/ajv": 8.0.0-alpha.5 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/ajv": optional: false @@ -6606,10 +6606,10 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 ajv: ">=8.9.0" ajv-errors: ">=3.0.0" peerDependenciesMeta: @@ -6646,9 +6646,9 @@ __metadata: vitest: "npm:2.0.4" peerDependencies: "@apollo/server": ">=4.10.4" - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" graphql: ">16.0.0" languageName: unknown @@ -6741,7 +6741,7 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -6784,9 +6784,9 @@ __metadata: vitest: "npm:2.0.4" webpack: "npm:^5.75.0" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -6898,7 +6898,7 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 languageName: unknown linkType: soft @@ -6938,7 +6938,7 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 express: ^4.17.1 formio: ">=2.0.0" lodash: ^4.17.21 @@ -6973,9 +6973,9 @@ __metadata: tslib: "npm:2.6.1" typescript: "npm:4.9.5" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" graphql-ws: ">=5.14.2" languageName: unknown @@ -7015,8 +7015,8 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 ioredis: ">=5.2.3" ioredis-mock: ">=8.2.2" languageName: unknown @@ -7035,8 +7035,8 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7119,9 +7119,9 @@ __metadata: vitest: "npm:2.0.4" peerDependencies: "@mikro-orm/core": ">=4.5.9" - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" languageName: unknown linkType: soft @@ -7146,12 +7146,12 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/ajv": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/ajv": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/schema": 8.0.0-alpha.5 mongoose: ">=6.0.0" languageName: unknown linkType: soft @@ -7223,11 +7223,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/ajv": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/ajv": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 knex: ">=0.94.0" objection: ">=2.0.0" peerDependenciesMeta: @@ -7265,10 +7265,10 @@ __metadata: vitest: "npm:2.0.4" wildcard: "npm:2.0.0" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/oidc-provider": 8.0.0-alpha.4 + "@tsed/oidc-provider": 8.0.0-alpha.5 oidc-provider: ">=8.0.0" peerDependenciesMeta: "@tsed/core": @@ -7309,12 +7309,12 @@ __metadata: uuid: "npm:9.0.1" vitest: "npm:2.0.4" peerDependencies: - "@tsed/ajv": 8.0.0-alpha.4 - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/ajv": 8.0.0-alpha.5 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 oidc-provider: ">=8.0.0" peerDependenciesMeta: "@tsed/ajv": @@ -7366,7 +7366,7 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 passport: ">=0.4.1" peerDependenciesMeta: "@tsed/common": @@ -7405,10 +7405,10 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7436,10 +7436,10 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7484,14 +7484,14 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/openspec": 8.0.0-alpha.4 - "@tsed/platform-views": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/openspec": 8.0.0-alpha.5 + "@tsed/platform-views": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 "@types/multer": ^1.4.5 body-parser: ^1.19.0 cross-env: 7.0.3 @@ -7552,13 +7552,13 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/openspec": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/openspec": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 koa: ">=2.13.0" koa-bodyparser: ">=4.3.0" koa-compress: ">=5.0.1" @@ -7600,9 +7600,9 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/di": 8.0.0-alpha.4 - "@tsed/platform-middlewares": 8.0.0-alpha.4 - "@tsed/platform-params": 8.0.0-alpha.4 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/platform-middlewares": 8.0.0-alpha.5 + "@tsed/platform-params": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/di": optional: false @@ -7627,9 +7627,9 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: true @@ -7656,11 +7656,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7691,11 +7691,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7727,12 +7727,12 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/platform-params": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/platform-params": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7766,13 +7766,13 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/openspec": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/openspec": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 serverless-http: ">=2.0.0" peerDependenciesMeta: "@tsed/common": @@ -7807,13 +7807,13 @@ __metadata: tslib: "npm:2.6.1" typescript: "npm:4.9.5" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/openspec": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/openspec": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 languageName: unknown linkType: soft @@ -7842,7 +7842,7 @@ __metadata: uuid: "npm:^9.0.1" vitest: "npm:2.0.4" peerDependencies: - "@tsed/di": 8.0.0-alpha.4 + "@tsed/di": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" find-my-way: ">=7.0.0" peerDependenciesMeta: @@ -7899,11 +7899,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/engines": 8.0.0-alpha.4 - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/engines": 8.0.0-alpha.5 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -7943,10 +7943,10 @@ __metadata: vitest: "npm:2.0.4" peerDependencies: "@prisma/client": ">=4.0.0" - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 bin: tsed-prisma: lib/cjs/generator.js tsed-prisma-esm: lib/esm/generator.js @@ -8048,9 +8048,9 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/openspec": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/openspec": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 formiojs: ">=4.0.0" lodash: ">=4.0.0" moment: ">=2.0.0" @@ -8094,8 +8094,8 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/core": 8.0.0-alpha.4 - "@tsed/openspec": 8.0.0-alpha.4 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/openspec": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/core": optional: false @@ -8117,9 +8117,9 @@ __metadata: tslib: "npm:2.6.1" typescript: "npm:4.9.5" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 socket.io-client: ^4.0.1 languageName: unknown linkType: soft @@ -8146,11 +8146,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/platform-middlewares": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/platform-middlewares": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 socket.io: ">=4.0.0" peerDependenciesMeta: "@tsed/di": @@ -8184,11 +8184,11 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/di": 8.0.0-alpha.4 - "@tsed/json-mapper": 8.0.0-alpha.4 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/json-mapper": 8.0.0-alpha.5 "@tsed/logger": ">=6.7.5" - "@tsed/platform-middlewares": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/platform-middlewares": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/di": optional: false @@ -8219,10 +8219,10 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/exceptions": 8.0.0-alpha.4 - "@tsed/platform-middlewares": 8.0.0-alpha.4 - "@tsed/platform-params": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/exceptions": 8.0.0-alpha.5 + "@tsed/platform-middlewares": 8.0.0-alpha.5 + "@tsed/platform-params": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 "@types/body-parser": ^1.19.0 body-parser: ^1.19.0 stripe: ^9.16.0 @@ -8264,7 +8264,7 @@ __metadata: typescript: "npm:4.9.5" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 peerDependenciesMeta: "@tsed/common": optional: false @@ -8311,10 +8311,10 @@ __metadata: vitest: "npm:2.0.4" peerDependencies: "@godaddy/terminus": ^4.7.1 - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 - "@tsed/schema": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 + "@tsed/schema": 8.0.0-alpha.5 peerDependenciesMeta: "@godaddy/terminus": optional: false @@ -8345,9 +8345,9 @@ __metadata: typescript: "npm:4.9.5" peerDependencies: "@testcontainers/mongodb": ">=10.11.0" - "@tsed/common": 8.0.0-alpha.4 - "@tsed/core": 8.0.0-alpha.4 - "@tsed/di": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 + "@tsed/core": 8.0.0-alpha.5 + "@tsed/di": 8.0.0-alpha.5 mongodb: ">=6" testcontainers: ">=10.11.0" languageName: unknown @@ -8427,7 +8427,7 @@ __metadata: vite: "npm:5.4.1" vitest: "npm:2.0.4" peerDependencies: - "@tsed/common": 8.0.0-alpha.4 + "@tsed/common": 8.0.0-alpha.5 vike: ">=0.4.160" vite: ">=4" peerDependenciesMeta: From 7fea7fa0e0395d781a964162f8956d51e666c31f Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Wed, 11 Sep 2024 07:38:12 +0200 Subject: [PATCH 2/4] chore: update compilation template --- .../{webpack.config.js => webpack.config.cjs} | 0 .../{webpack.config.js => webpack.config.cjs} | 0 .../{webpack.config.js => webpack.config.cjs} | 0 .../{webpack.config.js => webpack.config.cjs} | 0 .../{webpack.config.js => webpack.config.cjs} | 0 tools/typescript/index.js | 45 +++++++++---------- tools/typescript/swc.node.json | 4 +- tools/typescript/tsconfig.template.cjs.json | 28 ------------ tools/typescript/tsconfig.template.esm.json | 2 +- 9 files changed, 23 insertions(+), 56 deletions(-) rename packages/core/{webpack.config.js => webpack.config.cjs} (100%) rename packages/di/{webpack.config.js => webpack.config.cjs} (100%) rename packages/specs/json-mapper/{webpack.config.js => webpack.config.cjs} (100%) rename packages/specs/schema/{webpack.config.js => webpack.config.cjs} (100%) rename packages/third-parties/schema-formio/{webpack.config.js => webpack.config.cjs} (100%) delete mode 100644 tools/typescript/tsconfig.template.cjs.json diff --git a/packages/core/webpack.config.js b/packages/core/webpack.config.cjs similarity index 100% rename from packages/core/webpack.config.js rename to packages/core/webpack.config.cjs diff --git a/packages/di/webpack.config.js b/packages/di/webpack.config.cjs similarity index 100% rename from packages/di/webpack.config.js rename to packages/di/webpack.config.cjs diff --git a/packages/specs/json-mapper/webpack.config.js b/packages/specs/json-mapper/webpack.config.cjs similarity index 100% rename from packages/specs/json-mapper/webpack.config.js rename to packages/specs/json-mapper/webpack.config.cjs diff --git a/packages/specs/schema/webpack.config.js b/packages/specs/schema/webpack.config.cjs similarity index 100% rename from packages/specs/schema/webpack.config.js rename to packages/specs/schema/webpack.config.cjs diff --git a/packages/third-parties/schema-formio/webpack.config.js b/packages/third-parties/schema-formio/webpack.config.cjs similarity index 100% rename from packages/third-parties/schema-formio/webpack.config.js rename to packages/third-parties/schema-formio/webpack.config.cjs diff --git a/tools/typescript/index.js b/tools/typescript/index.js index 6ac00276635..86d0af8d7ea 100644 --- a/tools/typescript/index.js +++ b/tools/typescript/index.js @@ -2,6 +2,7 @@ import {findPackages, MonoRepo} from "@tsed/monorepo-utils"; import {dirname, join, relative} from "node:path"; import cloneDeep from "lodash/cloneDeep.js"; import omit from "lodash/omit.js"; +import get from "lodash/get.js"; import fs from "fs-extra"; import globby from "globby"; @@ -18,7 +19,6 @@ async function main() { const tsConfigRootPath = join(monoRepo.rootDir, "tsconfig.json"); const tsConfigTemplate = await fs.readJson(join(scriptDir, "./tsconfig.template.json")); - const tsConfigTemplateCjsPath = join(scriptDir, "./tsconfig.template.cjs.json"); const tsConfigTemplateEsmPath = join(scriptDir, "./tsconfig.template.esm.json"); const tsConfigTemplateSpecPath = join(scriptDir, "./tsconfig.template.spec.json"); const tsConfigTemplateSpec = await fs.readJson(tsConfigTemplateSpecPath); @@ -44,7 +44,6 @@ async function main() { const tsConfig = cloneDeep(tsConfigTemplate); const tsConfigPath = join(path, "tsconfig.json"); const tsConfigBuildEsmPath = join(path, "tsconfig.esm.json"); - const tsConfigBuildCjsPath = join(path, "tsconfig.cjs.json"); const tsConfigBuildSpecPath = join(path, "tsconfig.spec.json"); const npmignore = join(path, ".npmignore"); const vitestPath = join(path, "vitest.config.mts"); @@ -73,14 +72,9 @@ async function main() { }); }); - tsConfig.references.push( - { - path: "./tsconfig.cjs.json" - }, - { - path: "./tsconfig.esm.json" - } - ); + tsConfig.references.push({ + path: "./tsconfig.esm.json" + }); if (hasFiles.length) { tsConfig.references.push({ @@ -121,7 +115,6 @@ async function main() { await fs.writeJson(tsConfigPath, tsConfig, {spaces: 2}); await fs.copy(tsConfigTemplateEsmPath, tsConfigBuildEsmPath); - await fs.copy(tsConfigTemplateCjsPath, tsConfigBuildCjsPath); await fs.copy(npmIgnoreTemplatePath, npmignore); tsConfigRoot.references.push({ @@ -173,22 +166,24 @@ async function main() { // pkg.pkg.main = pkg.pkg.main.replace("cjs/", "esm/"); - if (pkg.pkg.exports && !pkg.pkg.exports["."]) { - pkg.pkg.exports = { - ".": { - ...pkg.pkg.exports - } - }; - } + pkg.pkg.type = "module"; + pkg.pkg.source = "./src/index.ts"; + pkg.pkg.main = "./lib/esm/index.js"; + pkg.pkg.module = "./lib/esm/index.js"; + pkg.pkg.typings = "./lib/types/index.d.ts"; + pkg.pkg.exports = { + ".": { + ...omit(get(pkg, 'pkg.exports["."]', {}), ["require"]) + // typings: "./lib/types/index.d.ts", + // default: "./lib/esm/index.js", + // import: "./lib/esm/index.js" + } + }; await fs.writeJson(pkg.path, pkg.pkg, {spaces: 2}); - // try { - // fs.removeSync(join(path, "tsconfig.compile.esm.json")); - // fs.removeSync(join(path, "tsconfig.compile.json")); - // fs.removeSync(join(path, "tsconfig.cjs.json")); - // // fs.removeSync(join(path, "tsconfig.esm.json")); - // } catch { - // } + try { + fs.removeSync(join(path, "tsconfig.cjs.json")); + } catch {} } } diff --git a/tools/typescript/swc.node.json b/tools/typescript/swc.node.json index 1321bf01037..09209e497d6 100644 --- a/tools/typescript/swc.node.json +++ b/tools/typescript/swc.node.json @@ -1,7 +1,7 @@ { "sourceMaps": "inline", "jsc": { - "target": "es2021", + "target": "es2023", "externalHelpers": true, "keepClassNames": true, "parser": { @@ -23,7 +23,7 @@ } }, "module": { - "type": "commonjs", + "type": "es6", "strict": false, "strictMode": true, "lazy": false, diff --git a/tools/typescript/tsconfig.template.cjs.json b/tools/typescript/tsconfig.template.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/tools/typescript/tsconfig.template.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/tools/typescript/tsconfig.template.esm.json b/tools/typescript/tsconfig.template.esm.json index ce32a9e0718..e3b07081667 100644 --- a/tools/typescript/tsconfig.template.esm.json +++ b/tools/typescript/tsconfig.template.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false From ebe57c5a0f360fbd4b8a2655b59a28d8dc2bdb47 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Wed, 11 Sep 2024 09:36:15 +0200 Subject: [PATCH 3/4] fix(prisma): remove commonJs support --- packages/orm/prisma/scripts/backup-index.cjs.js | 9 --------- packages/orm/prisma/scripts/backup-index.d.cts | 1 - packages/orm/prisma/src/cli/prismaGenerator.ts | 15 ++++----------- packages/orm/prisma/src/generator/generateCode.ts | 5 ++--- .../transform/transformFieldToDecorators.ts | 1 - .../src/generator/utils/resolveExtension.ts | 4 +--- 6 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 packages/orm/prisma/scripts/backup-index.cjs.js delete mode 100644 packages/orm/prisma/scripts/backup-index.d.cts diff --git a/packages/orm/prisma/scripts/backup-index.cjs.js b/packages/orm/prisma/scripts/backup-index.cjs.js deleted file mode 100644 index 5b25a20da5c..00000000000 --- a/packages/orm/prisma/scripts/backup-index.cjs.js +++ /dev/null @@ -1,9 +0,0 @@ -const tsed = require("../.schema"); -const path = require("path"); - -module.exports = tsed; - -/** - * Annotation for ncc/zeit - */ -path.join(__dirname, "../.schema"); diff --git a/packages/orm/prisma/scripts/backup-index.d.cts b/packages/orm/prisma/scripts/backup-index.d.cts deleted file mode 100644 index b9a510b0d9e..00000000000 --- a/packages/orm/prisma/scripts/backup-index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from "../.schema.js"; diff --git a/packages/orm/prisma/src/cli/prismaGenerator.ts b/packages/orm/prisma/src/cli/prismaGenerator.ts index 6db53643f77..a7d3f8381be 100644 --- a/packages/orm/prisma/src/cli/prismaGenerator.ts +++ b/packages/orm/prisma/src/cli/prismaGenerator.ts @@ -4,7 +4,6 @@ import fs from "fs-extra"; import path, {join} from "path"; import {generateCode} from "../generator/generateCode.js"; import removeDir from "../generator/utils/removeDir.js"; -import {isCommonjs} from "../generator/utils/sourceType"; function parseStringBoolean(stringBoolean: string | undefined) { return Boolean(stringBoolean ? stringBoolean === "true" : undefined); @@ -38,17 +37,11 @@ export function generate({defaultOutput, packageDir}: GenerateOptions) { }); if (outputDir === defaultOutput) { - await fs.copy(join(packageDir, "scripts", "backup-index.cjs.js"), join(packageDir, "lib", "cjs", "index.js")); await fs.copy(join(packageDir, "scripts", "backup-index.esm.js"), join(packageDir, "lib", "esm", "index.js")); - - if (isCommonjs()) { - await fs.copy(join(packageDir, "scripts", "backup-index.d.cts"), join(packageDir, "lib", "types", "index.d.ts")); - } else { - await fs.copy(join(packageDir, "scripts", "backup-index.d.mts"), join(packageDir, "lib", "types", "index.d.ts")); - await fs.writeJson(`${outputDir}/package.json`, { - type: "module" - }); - } + await fs.copy(join(packageDir, "scripts", "backup-index.d.mts"), join(packageDir, "lib", "types", "index.d.ts")); + await fs.writeJson(`${outputDir}/package.json`, { + type: "module" + }); } return ""; diff --git a/packages/orm/prisma/src/generator/generateCode.ts b/packages/orm/prisma/src/generator/generateCode.ts index 32720f4df41..c5e51122795 100644 --- a/packages/orm/prisma/src/generator/generateCode.ts +++ b/packages/orm/prisma/src/generator/generateCode.ts @@ -8,11 +8,10 @@ import {generateModels} from "./utils/generateModels.js"; import {generatePrismaService} from "./utils/generatePrismaService.js"; import {generateRepositories} from "./utils/generateRepositories.js"; import {saveProject} from "./utils/saveProject.js"; -import {isCommonjs} from "./utils/sourceType.js"; const baseCompilerOptions: CompilerOptions = { - target: isCommonjs() ? ScriptTarget.ES2020 : ScriptTarget.ESNext, - module: isCommonjs() ? ModuleKind.CommonJS : ModuleKind.ESNext, + target: ScriptTarget.ESNext, + module: ModuleKind.ESNext, emitDecoratorMetadata: true, experimentalDecorators: true, esModuleInterop: true diff --git a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts index f4ddf16c146..34c0315b415 100644 --- a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts +++ b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts @@ -4,7 +4,6 @@ import {DmmfModel} from "../domain/DmmfModel.js"; import {ScalarDecorators, ScalarJsClasses} from "../domain/ScalarTsTypes.js"; import {TransformContext} from "../domain/TransformContext.js"; import {isCircularRef} from "../utils/isCircularRef.js"; -import {isEsm} from "../utils/sourceType.js"; function createDecorator(name: string, args: string[]): DecoratorStructure { return { diff --git a/packages/orm/prisma/src/generator/utils/resolveExtension.ts b/packages/orm/prisma/src/generator/utils/resolveExtension.ts index d59ef3afe34..f061f55bcaf 100644 --- a/packages/orm/prisma/src/generator/utils/resolveExtension.ts +++ b/packages/orm/prisma/src/generator/utils/resolveExtension.ts @@ -1,7 +1,5 @@ -import {isEsm} from "./sourceType.js"; - export function resolveExtension(moduleSpecifier: string) { - if (isEsm() && moduleSpecifier.match(/\.\/.*/) && !moduleSpecifier.endsWith(".js")) { + if (moduleSpecifier.match(/\.\/.*/) && !moduleSpecifier.endsWith(".js")) { return `${moduleSpecifier}.js`; } From fb80b02ca27a732fed3bf9b1a25973c21c264e59 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Tue, 17 Sep 2024 08:20:32 +0200 Subject: [PATCH 4/4] chore: remove CJS Support and bump AJV dependency BREAKING CHANGE: CJS isn't supported anymore. You have to migrate your project on ESM syntax. --- .../converters/server-moment-mapper-import.ts | 2 +- .../snippets/graphql/server-configuration.ts | 2 +- docs/tutorials/snippets/passport/server.ts | 2 +- package.json | 2 +- packages/core/package.json | 5 +- packages/core/tsconfig.cjs.json | 28 --- packages/core/tsconfig.esm.json | 2 +- packages/core/tsconfig.json | 3 - packages/di/package.json | 7 +- packages/di/tsconfig.cjs.json | 28 --- packages/di/tsconfig.esm.json | 2 +- packages/di/tsconfig.json | 3 - packages/engines/package.json | 5 +- packages/engines/tsconfig.cjs.json | 28 --- packages/engines/tsconfig.esm.json | 2 +- packages/engines/tsconfig.json | 3 - packages/graphql/apollo/package.json | 5 +- .../src/decorators/injectApolloContext.ts | 2 +- .../src/interfaces/AlterApolloContext.ts | 2 +- .../interfaces/AlterApolloServerPlugins.ts | 2 +- .../apollo/src/interfaces/ApolloSettings.ts | 4 +- packages/graphql/apollo/tsconfig.cjs.json | 28 --- packages/graphql/apollo/tsconfig.esm.json | 2 +- packages/graphql/apollo/tsconfig.json | 3 - packages/graphql/graphql-ws/package.json | 7 +- packages/graphql/graphql-ws/tsconfig.cjs.json | 28 --- packages/graphql/graphql-ws/tsconfig.esm.json | 2 +- packages/graphql/graphql-ws/tsconfig.json | 3 - packages/graphql/typegraphql/package.json | 5 +- .../graphql/typegraphql/test/app/Server.ts | 14 +- .../graphql/typegraphql/tsconfig.cjs.json | 28 --- .../graphql/typegraphql/tsconfig.esm.json | 2 +- packages/graphql/typegraphql/tsconfig.json | 4 +- packages/orm/adapters-redis/package.json | 5 +- packages/orm/adapters-redis/tsconfig.cjs.json | 28 --- packages/orm/adapters-redis/tsconfig.esm.json | 2 +- packages/orm/adapters-redis/tsconfig.json | 3 - packages/orm/adapters/package.json | 5 +- .../adapters/src/adapters/FileSyncAdapter.ts | 2 +- .../orm/adapters/src/adapters/LowDbAdapter.ts | 2 +- .../adapters/src/adapters/MemoryAdapter.ts | 2 +- packages/orm/adapters/tsconfig.cjs.json | 28 --- packages/orm/adapters/tsconfig.esm.json | 2 +- packages/orm/adapters/tsconfig.json | 3 - packages/orm/ioredis/package.json | 5 +- .../src/domain/IORedisConfiguration.ts | 2 +- .../orm/ioredis/src/domain/IORedisStore.ts | 2 +- .../orm/ioredis/src/utils/mockConnections.ts | 2 +- .../src/utils/registerConnectionProvider.ts | 2 +- packages/orm/ioredis/tsconfig.cjs.json | 28 --- packages/orm/ioredis/tsconfig.esm.json | 2 +- packages/orm/ioredis/tsconfig.json | 3 - packages/orm/mikro-orm/package.json | 5 +- packages/orm/mikro-orm/test/helpers/Server.ts | 2 +- packages/orm/mikro-orm/tsconfig.cjs.json | 28 --- packages/orm/mikro-orm/tsconfig.esm.json | 2 +- packages/orm/mikro-orm/tsconfig.json | 3 - packages/orm/mongoose/package.json | 5 +- packages/orm/mongoose/tsconfig.cjs.json | 28 --- packages/orm/mongoose/tsconfig.esm.json | 2 +- packages/orm/mongoose/tsconfig.json | 3 - packages/orm/objection/package.json | 5 +- .../orm/objection/src/utils/createColumns.ts | 8 +- packages/orm/objection/tsconfig.cjs.json | 28 --- packages/orm/objection/tsconfig.esm.json | 2 +- packages/orm/objection/tsconfig.json | 3 - packages/orm/prisma/package.json | 5 +- packages/orm/prisma/src/generator.ts | 2 +- .../__snapshots__/generateEnums.spec.ts.snap | 9 - .../__snapshots__/generateModels.spec.ts.snap | 122 +------------ .../generatePrismaService.spec.ts.snap | 29 +--- .../generateRespositories.spec.ts.snap | 162 +----------------- .../prisma/src/generator/utils/sourceType.ts | 7 - .../snapshots/generate_code/enums/index.ts | 2 +- .../test/snapshots/generate_code/index.ts | 10 +- .../generate_code/interfaces/index.ts | 2 +- .../generate_code/models/PostModel.ts | 4 +- .../generate_code/models/UserModel.ts | 6 +- .../snapshots/generate_code/models/index.ts | 4 +- .../repositories/PostsRepository.ts | 6 +- .../repositories/UsersRepository.ts | 6 +- .../generate_code/repositories/index.ts | 4 +- .../generate_code/services/PrismaService.ts | 2 +- packages/orm/prisma/tsconfig.cjs.json | 28 --- packages/orm/prisma/tsconfig.esm.json | 2 +- packages/orm/prisma/tsconfig.json | 3 - packages/orm/prisma/vitest.config.mts | 4 +- .../orm/testcontainers-mongo/package.json | 7 +- .../testcontainers-mongo/tsconfig.cjs.json | 28 --- .../testcontainers-mongo/tsconfig.esm.json | 2 +- .../orm/testcontainers-mongo/tsconfig.json | 3 - packages/perf/package.json | 5 +- packages/perf/tsconfig.cjs.json | 28 --- packages/perf/tsconfig.esm.json | 2 +- packages/perf/tsconfig.json | 3 - packages/platform/common/package.json | 5 +- .../decorators/multer/multipartFile.spec.ts | 2 +- .../common/src/services/PlatformTest.ts | 2 +- packages/platform/common/tsconfig.cjs.json | 28 --- packages/platform/common/tsconfig.esm.json | 2 +- packages/platform/common/tsconfig.json | 3 - packages/platform/platform-cache/package.json | 5 +- .../src/interfaces/interfaces.ts | 2 +- .../platform/platform-cache/tsconfig.cjs.json | 28 --- .../platform/platform-cache/tsconfig.esm.json | 2 +- .../platform/platform-cache/tsconfig.json | 3 - .../platform/platform-exceptions/package.json | 5 +- .../platform-exceptions/tsconfig.cjs.json | 28 --- .../platform-exceptions/tsconfig.esm.json | 2 +- .../platform-exceptions/tsconfig.json | 3 - .../platform/platform-express/package.json | 5 +- .../platform-express/test/app/Server.ts | 2 +- .../platform-express/tsconfig.cjs.json | 28 --- .../platform-express/tsconfig.esm.json | 2 +- .../platform/platform-express/tsconfig.json | 3 - packages/platform/platform-koa/package.json | 5 +- .../src/services/PlatformKoaHandler.ts | 2 +- .../platform/platform-koa/tsconfig.cjs.json | 28 --- .../platform/platform-koa/tsconfig.esm.json | 2 +- packages/platform/platform-koa/tsconfig.json | 3 - .../platform-log-middleware/package.json | 5 +- .../middlewares/PlatformLogMiddleware.spec.ts | 2 +- .../platform-log-middleware/tsconfig.cjs.json | 28 --- .../platform-log-middleware/tsconfig.esm.json | 2 +- .../platform-log-middleware/tsconfig.json | 3 - .../platform-middlewares/package.json | 5 +- .../platform-middlewares/tsconfig.cjs.json | 28 --- .../platform-middlewares/tsconfig.esm.json | 2 +- .../platform-middlewares/tsconfig.json | 3 - .../platform/platform-params/package.json | 5 +- .../platform-params/tsconfig.cjs.json | 28 --- .../platform-params/tsconfig.esm.json | 2 +- .../platform/platform-params/tsconfig.json | 3 - .../platform-response-filter/package.json | 5 +- .../tsconfig.cjs.json | 28 --- .../tsconfig.esm.json | 2 +- .../platform-response-filter/tsconfig.json | 3 - .../platform/platform-router/package.json | 5 +- .../platform-router/tsconfig.cjs.json | 28 --- .../platform-router/tsconfig.esm.json | 2 +- .../platform/platform-router/tsconfig.json | 3 - .../platform-serverless-http/package.json | 5 +- .../tsconfig.cjs.json | 28 --- .../tsconfig.esm.json | 2 +- .../platform-serverless-http/tsconfig.json | 3 - .../platform-serverless-testing/package.json | 5 +- .../src/PlatformServerlessTest.ts | 2 +- .../tsconfig.cjs.json | 29 ---- .../tsconfig.esm.json | 5 +- .../platform-serverless-testing/tsconfig.json | 3 - .../platform/platform-serverless/package.json | 5 +- .../src/builder/PlatformServerless.ts | 6 +- .../src/builder/PlatformServerlessHandler.ts | 4 +- .../src/domain/ServerlessContext.ts | 4 +- .../src/domain/ServerlessResponseStream.ts | 2 +- .../src/utils/getRequestId.ts | 2 +- .../src/utils/setResponseHeaders.ts | 2 +- .../platform-serverless/tsconfig.cjs.json | 28 --- .../platform-serverless/tsconfig.esm.json | 2 +- .../platform-serverless/tsconfig.json | 3 - .../platform/platform-test-sdk/package.json | 7 +- .../src/tests/testAcceptMime.ts | 1 + .../platform-test-sdk/src/tests/testAuth.ts | 1 + .../src/tests/testBodyParams.ts | 1 + .../platform-test-sdk/src/tests/testCache.ts | 3 +- .../src/tests/testChildrenControllers.ts | 1 + .../src/tests/testCookies.ts | 1 + .../src/tests/testCustom404.ts | 1 + .../src/tests/testDeepQueryParams.ts | 3 +- .../platform-test-sdk/src/tests/testErrors.ts | 1 + .../src/tests/testHandlers.ts | 1 + .../src/tests/testHeaderParams.ts | 1 + .../src/tests/testHeaders.ts | 1 + .../src/tests/testInheritanceController.ts | 1 + .../platform-test-sdk/src/tests/testLocals.ts | 3 +- .../src/tests/testLocation.ts | 1 + .../src/tests/testMiddlewares.ts | 1 + .../platform-test-sdk/src/tests/testModule.ts | 1 + .../platform-test-sdk/src/tests/testMulter.ts | 1 + .../src/tests/testPathParams.ts | 1 + .../src/tests/testQueryParams.ts | 1 + .../src/tests/testRedirect.ts | 1 + .../src/tests/testResponse.ts | 1 + .../src/tests/testResponseFilter.ts | 1 + .../src/tests/testRouting.ts | 1 + .../src/tests/testScopeRequest.ts | 1 + .../src/tests/testSession.ts | 1 + .../src/tests/testStatics.ts | 1 + .../platform-test-sdk/src/tests/testStream.ts | 1 + .../platform-test-sdk/src/tests/testView.ts | 1 + .../platform-test-sdk/tsconfig.cjs.json | 29 ---- .../platform-test-sdk/tsconfig.esm.json | 5 +- .../platform/platform-test-sdk/tsconfig.json | 6 +- packages/platform/platform-views/package.json | 5 +- .../platform/platform-views/tsconfig.cjs.json | 28 --- .../platform/platform-views/tsconfig.esm.json | 2 +- .../platform/platform-views/tsconfig.json | 3 - packages/security/jwks/package.json | 5 +- packages/security/jwks/tsconfig.cjs.json | 28 --- packages/security/jwks/tsconfig.esm.json | 2 +- packages/security/jwks/tsconfig.json | 3 - .../package.json | 5 +- .../tsconfig.cjs.json | 28 --- .../tsconfig.esm.json | 2 +- .../tsconfig.json | 3 - packages/security/oidc-provider/package.json | 5 +- .../src/decorators/interactions.spec.ts | 2 +- .../src/services/OidcInteractionContext.ts | 3 +- .../src/services/OidcProvider.spec.ts | 2 +- .../security/oidc-provider/test/app/Server.ts | 2 +- .../security/oidc-provider/tsconfig.cjs.json | 28 --- .../security/oidc-provider/tsconfig.esm.json | 2 +- packages/security/oidc-provider/tsconfig.json | 3 - packages/security/passport/package.json | 5 +- .../passport/src/PassportModule.spec.ts | 2 +- packages/security/passport/test/app/Server.ts | 2 +- packages/security/passport/tsconfig.cjs.json | 28 --- packages/security/passport/tsconfig.esm.json | 2 +- packages/security/passport/tsconfig.json | 3 - packages/specs/ajv/package.json | 7 +- packages/specs/ajv/src/services/Ajv.ts | 7 +- packages/specs/ajv/src/services/AjvService.ts | 6 +- .../integration/nullable.integration.spec.ts | 6 +- .../validation.integration.spec.ts | 2 +- packages/specs/ajv/tsconfig.cjs.json | 28 --- packages/specs/ajv/tsconfig.esm.json | 2 +- packages/specs/ajv/tsconfig.json | 3 - packages/specs/exceptions/package.json | 5 +- packages/specs/exceptions/tsconfig.cjs.json | 28 --- packages/specs/exceptions/tsconfig.esm.json | 2 +- packages/specs/exceptions/tsconfig.json | 3 - packages/specs/json-mapper/package.json | 8 +- .../src/domain/JsonDeserializer.spec.ts | 6 +- .../src/domain/JsonSerializer.spec.ts | 6 +- .../json-mapper/src/utils/deserialize.ts | 6 +- .../json-mapper/src/utils/serialize.spec.ts | 2 +- .../specs/json-mapper/src/utils/serialize.ts | 6 +- packages/specs/json-mapper/tsconfig.cjs.json | 28 --- packages/specs/json-mapper/tsconfig.esm.json | 2 +- packages/specs/json-mapper/tsconfig.json | 3 - packages/specs/openspec/package.json | 5 +- packages/specs/openspec/tsconfig.cjs.json | 28 --- packages/specs/openspec/tsconfig.esm.json | 2 +- packages/specs/openspec/tsconfig.json | 3 - packages/specs/schema/package.json | 8 +- .../common/exclusiveMinimum.spec.ts | 2 +- .../src/decorators/common/maximum.spec.ts | 2 +- .../src/decorators/common/minLength.spec.ts | 2 +- .../src/decorators/common/minimum.spec.ts | 2 +- .../src/decorators/common/pattern.spec.ts | 2 +- .../specs/schema/src/utils/getJsonSchema.ts | 2 +- packages/specs/schema/tsconfig.cjs.json | 28 --- packages/specs/schema/tsconfig.esm.json | 2 +- packages/specs/schema/tsconfig.json | 3 - packages/specs/schema/tsconfig.spec.json | 2 +- packages/specs/swagger/package.json | 5 +- packages/specs/swagger/tsconfig.cjs.json | 28 --- packages/specs/swagger/tsconfig.esm.json | 2 +- packages/specs/swagger/tsconfig.json | 3 - packages/third-parties/agenda/package.json | 5 +- .../third-parties/agenda/tsconfig.cjs.json | 28 --- .../third-parties/agenda/tsconfig.esm.json | 2 +- packages/third-parties/agenda/tsconfig.json | 3 - packages/third-parties/bullmq/package.json | 5 +- .../bullmq/src/BullMQModule.spec.ts | 2 +- .../third-parties/bullmq/tsconfig.cjs.json | 28 --- .../third-parties/bullmq/tsconfig.esm.json | 2 +- packages/third-parties/bullmq/tsconfig.json | 3 - .../components-scan/package.json | 5 +- .../components-scan/tsconfig.cjs.json | 28 --- .../components-scan/tsconfig.esm.json | 2 +- .../components-scan/tsconfig.json | 3 - .../third-parties/event-emitter/package.json | 5 +- .../src/services/EventEmitterFactory.ts | 2 +- .../event-emitter/test/helpers/Server.ts | 2 +- .../event-emitter/tsconfig.cjs.json | 28 --- .../event-emitter/tsconfig.esm.json | 2 +- .../third-parties/event-emitter/tsconfig.json | 3 - .../third-parties/formio-types/package.json | 7 +- .../formio-types/tsconfig.cjs.json | 28 --- .../formio-types/tsconfig.esm.json | 2 +- .../third-parties/formio-types/tsconfig.json | 3 - packages/third-parties/formio/package.json | 5 +- .../formio/src/services/FormioDatabase.ts | 2 +- .../formio/src/services/FormioService.spec.ts | 2 +- .../third-parties/formio/test/app/Server.ts | 2 +- .../third-parties/formio/tsconfig.cjs.json | 28 --- .../third-parties/formio/tsconfig.esm.json | 2 +- packages/third-parties/formio/tsconfig.json | 3 - packages/third-parties/pulse/package.json | 5 +- .../third-parties/pulse/src/PulseModule.ts | 26 +-- .../pulse/src/decorators/define.ts | 2 +- .../pulse/src/decorators/every.ts | 2 +- .../third-parties/pulse/tsconfig.cjs.json | 28 --- .../third-parties/pulse/tsconfig.esm.json | 2 +- packages/third-parties/pulse/tsconfig.json | 3 - .../third-parties/schema-formio/package.json | 5 +- .../src/utils/getFormioSchema.ts | 26 +-- .../schema-formio/tsconfig.cjs.json | 28 --- .../schema-formio/tsconfig.esm.json | 2 +- .../third-parties/schema-formio/tsconfig.json | 3 - .../socketio-testing/package.json | 5 +- .../socketio-testing/tsconfig.cjs.json | 28 --- .../socketio-testing/tsconfig.esm.json | 2 +- .../socketio-testing/tsconfig.json | 3 - packages/third-parties/socketio/package.json | 5 +- .../third-parties/socketio/tsconfig.cjs.json | 28 --- .../third-parties/socketio/tsconfig.esm.json | 2 +- packages/third-parties/socketio/tsconfig.json | 3 - packages/third-parties/sse/package.json | 5 +- .../sse/src/decorators/eventStream.ts | 2 +- .../sse/src/decorators/eventStreamCtx.ts | 2 +- .../sse/src/domain/EventStreamContext.ts | 2 +- .../interceptors/EventStreamInterceptor.ts | 2 +- .../src/middlewares/EventStreamMiddleware.ts | 2 +- packages/third-parties/sse/tsconfig.cjs.json | 28 --- packages/third-parties/sse/tsconfig.esm.json | 2 +- packages/third-parties/sse/tsconfig.json | 3 - packages/third-parties/sse/tsconfig.spec.json | 6 +- packages/third-parties/stripe/package.json | 5 +- .../WebhookEventMiddleware.spec.ts | 2 +- .../src/middlewares/WebhookEventMiddleware.ts | 2 +- .../stripe/src/services/StripeFactory.spec.ts | 2 +- .../third-parties/stripe/tsconfig.cjs.json | 28 --- .../third-parties/stripe/tsconfig.esm.json | 2 +- packages/third-parties/stripe/tsconfig.json | 3 - packages/third-parties/temporal/package.json | 5 +- .../third-parties/temporal/tsconfig.cjs.json | 28 --- .../third-parties/temporal/tsconfig.esm.json | 2 +- packages/third-parties/temporal/tsconfig.json | 3 - packages/third-parties/terminus/package.json | 5 +- .../third-parties/terminus/test/app/Server.ts | 4 +- .../third-parties/terminus/tsconfig.cjs.json | 28 --- .../third-parties/terminus/tsconfig.esm.json | 2 +- packages/third-parties/terminus/tsconfig.json | 3 - packages/third-parties/vike/package.json | 5 +- packages/third-parties/vike/tsconfig.cjs.json | 28 --- packages/third-parties/vike/tsconfig.esm.json | 2 +- packages/third-parties/vike/tsconfig.json | 3 - packages/utils/normalize-path/package.json | 5 +- .../utils/normalize-path/tsconfig.cjs.json | 28 --- .../utils/normalize-path/tsconfig.esm.json | 2 +- packages/utils/normalize-path/tsconfig.json | 3 - scripts/npm/generate-package.sh | 10 -- tools/integration/package.json | 11 +- tools/integration/tsconfig.cjs.json | 28 --- tools/integration/tsconfig.esm.json | 2 +- tools/integration/tsconfig.json | 3 - tools/typescript/index.js | 7 +- tsconfig.json | 50 +++--- yarn.lock | 39 ++++- 351 files changed, 452 insertions(+), 2530 deletions(-) delete mode 100644 packages/core/tsconfig.cjs.json delete mode 100644 packages/di/tsconfig.cjs.json delete mode 100644 packages/engines/tsconfig.cjs.json delete mode 100644 packages/graphql/apollo/tsconfig.cjs.json delete mode 100644 packages/graphql/graphql-ws/tsconfig.cjs.json delete mode 100644 packages/graphql/typegraphql/tsconfig.cjs.json delete mode 100644 packages/orm/adapters-redis/tsconfig.cjs.json delete mode 100644 packages/orm/adapters/tsconfig.cjs.json delete mode 100644 packages/orm/ioredis/tsconfig.cjs.json delete mode 100644 packages/orm/mikro-orm/tsconfig.cjs.json delete mode 100644 packages/orm/mongoose/tsconfig.cjs.json delete mode 100644 packages/orm/objection/tsconfig.cjs.json delete mode 100644 packages/orm/prisma/src/generator/utils/sourceType.ts delete mode 100644 packages/orm/prisma/tsconfig.cjs.json delete mode 100644 packages/orm/testcontainers-mongo/tsconfig.cjs.json delete mode 100644 packages/perf/tsconfig.cjs.json delete mode 100644 packages/platform/common/tsconfig.cjs.json delete mode 100644 packages/platform/platform-cache/tsconfig.cjs.json delete mode 100644 packages/platform/platform-exceptions/tsconfig.cjs.json delete mode 100644 packages/platform/platform-express/tsconfig.cjs.json delete mode 100644 packages/platform/platform-koa/tsconfig.cjs.json delete mode 100644 packages/platform/platform-log-middleware/tsconfig.cjs.json delete mode 100644 packages/platform/platform-middlewares/tsconfig.cjs.json delete mode 100644 packages/platform/platform-params/tsconfig.cjs.json delete mode 100644 packages/platform/platform-response-filter/tsconfig.cjs.json delete mode 100644 packages/platform/platform-router/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless-http/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless-testing/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless/tsconfig.cjs.json delete mode 100644 packages/platform/platform-test-sdk/tsconfig.cjs.json delete mode 100644 packages/platform/platform-views/tsconfig.cjs.json delete mode 100644 packages/security/jwks/tsconfig.cjs.json delete mode 100644 packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.cjs.json delete mode 100644 packages/security/oidc-provider/tsconfig.cjs.json delete mode 100644 packages/security/passport/tsconfig.cjs.json delete mode 100644 packages/specs/ajv/tsconfig.cjs.json delete mode 100644 packages/specs/exceptions/tsconfig.cjs.json delete mode 100644 packages/specs/json-mapper/tsconfig.cjs.json delete mode 100644 packages/specs/openspec/tsconfig.cjs.json delete mode 100644 packages/specs/schema/tsconfig.cjs.json delete mode 100644 packages/specs/swagger/tsconfig.cjs.json delete mode 100644 packages/third-parties/agenda/tsconfig.cjs.json delete mode 100644 packages/third-parties/bullmq/tsconfig.cjs.json delete mode 100644 packages/third-parties/components-scan/tsconfig.cjs.json delete mode 100644 packages/third-parties/event-emitter/tsconfig.cjs.json delete mode 100644 packages/third-parties/formio-types/tsconfig.cjs.json delete mode 100644 packages/third-parties/formio/tsconfig.cjs.json delete mode 100644 packages/third-parties/pulse/tsconfig.cjs.json delete mode 100644 packages/third-parties/schema-formio/tsconfig.cjs.json delete mode 100644 packages/third-parties/socketio-testing/tsconfig.cjs.json delete mode 100644 packages/third-parties/socketio/tsconfig.cjs.json delete mode 100644 packages/third-parties/sse/tsconfig.cjs.json delete mode 100644 packages/third-parties/stripe/tsconfig.cjs.json delete mode 100644 packages/third-parties/temporal/tsconfig.cjs.json delete mode 100644 packages/third-parties/terminus/tsconfig.cjs.json delete mode 100644 packages/third-parties/vike/tsconfig.cjs.json delete mode 100644 packages/utils/normalize-path/tsconfig.cjs.json delete mode 100644 scripts/npm/generate-package.sh delete mode 100644 tools/integration/tsconfig.cjs.json diff --git a/docs/docs/snippets/converters/server-moment-mapper-import.ts b/docs/docs/snippets/converters/server-moment-mapper-import.ts index ecbcab40bc0..8e2f159165c 100644 --- a/docs/docs/snippets/converters/server-moment-mapper-import.ts +++ b/docs/docs/snippets/converters/server-moment-mapper-import.ts @@ -1,5 +1,5 @@ import {Configuration} from "@tsed/di"; -import "./mappers/MomentMapper"; // just import mapper to be available +import "./mappers/MomentMapper.js"; // just import mapper to be available @Configuration({}) export class Server {} diff --git a/docs/tutorials/snippets/graphql/server-configuration.ts b/docs/tutorials/snippets/graphql/server-configuration.ts index ab67ff1514e..7b099e59855 100644 --- a/docs/tutorials/snippets/graphql/server-configuration.ts +++ b/docs/tutorials/snippets/graphql/server-configuration.ts @@ -1,7 +1,7 @@ import {Configuration} from "@tsed/di"; import "@tsed/platform-express"; import "@tsed/typegraphql"; -import "./resolvers/index"; // barrel file with all resolvers +import "./resolvers/index.js"; // barrel file with all resolvers @Configuration({ typegraphql: { diff --git a/docs/tutorials/snippets/passport/server.ts b/docs/tutorials/snippets/passport/server.ts index ce1f3fd99da..17b286d542c 100644 --- a/docs/tutorials/snippets/passport/server.ts +++ b/docs/tutorials/snippets/passport/server.ts @@ -8,7 +8,7 @@ import session from "express-session"; import methodOverride from "method-override"; // import your protocol. Ts.ED will discover it automatically -import "./protocols/LoginLocalProtocol"; +import "./protocols/LoginLocalProtocol.js"; @Configuration({ passport: { diff --git a/package.json b/package.json index 998dcb0366d..69388fa35e1 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ ], "dependencies": { "@tsed/logger": ">=6.7.5", - "ajv": "8.12.0", + "ajv": "8.17.1", "axios": "1.7.4", "change-case": "4.1.2", "globby": "11.1.0", diff --git a/packages/core/package.json b/packages/core/package.json index 2e0c97e72e9..f2bfd40d957 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,10 +1,10 @@ { "name": "@tsed/core", "description": "Core module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/core.umd.min.js", @@ -13,7 +13,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/core.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/core/tsconfig.cjs.json b/packages/core/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/core/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/core/tsconfig.esm.json b/packages/core/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/core/tsconfig.esm.json +++ b/packages/core/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index d2f0c1fcdbd..ffa3a8cd7e1 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/di/package.json b/packages/di/package.json index c8b899a7282..736ddaf0d7f 100644 --- a/packages/di/package.json +++ b/packages/di/package.json @@ -1,11 +1,11 @@ { "name": "@tsed/di", "description": "DI module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "lib/esm/index.js", - "module": "lib/esm/index.js", + "main": "./lib/esm/index.js", + "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/di.umd.min.js", "exports": { @@ -13,7 +13,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/di.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/di/tsconfig.cjs.json b/packages/di/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/di/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/di/tsconfig.esm.json b/packages/di/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/di/tsconfig.esm.json +++ b/packages/di/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/di/tsconfig.json b/packages/di/tsconfig.json index ea088b4029d..5c1c1046579 100644 --- a/packages/di/tsconfig.json +++ b/packages/di/tsconfig.json @@ -12,9 +12,6 @@ { "path": "../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/engines/package.json b/packages/engines/package.json index 38a4482ee70..9bebce78452 100644 --- a/packages/engines/package.json +++ b/packages/engines/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/engines", "description": "Template engines library. Provide an API to adding custom engines from decorators.", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/engines/tsconfig.cjs.json b/packages/engines/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/engines/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/engines/tsconfig.esm.json b/packages/engines/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/engines/tsconfig.esm.json +++ b/packages/engines/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/engines/tsconfig.json b/packages/engines/tsconfig.json index d2f0c1fcdbd..ffa3a8cd7e1 100644 --- a/packages/engines/tsconfig.json +++ b/packages/engines/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/graphql/apollo/package.json b/packages/graphql/apollo/package.json index 945b615f29b..41fbc656d6b 100644 --- a/packages/graphql/apollo/package.json +++ b/packages/graphql/apollo/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/apollo", "description": "Apollo package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/graphql/apollo/src/decorators/injectApolloContext.ts b/packages/graphql/apollo/src/decorators/injectApolloContext.ts index 42adce68908..530bd56e82c 100644 --- a/packages/graphql/apollo/src/decorators/injectApolloContext.ts +++ b/packages/graphql/apollo/src/decorators/injectApolloContext.ts @@ -1,6 +1,6 @@ import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from "@tsed/core"; import {Inject, InjectContext} from "@tsed/di"; -import {APOLLO_CONTEXT} from "../constants/constants"; +import {APOLLO_CONTEXT} from "../constants/constants.js"; /** * Inject the Apollo context in the decorated property. diff --git a/packages/graphql/apollo/src/interfaces/AlterApolloContext.ts b/packages/graphql/apollo/src/interfaces/AlterApolloContext.ts index bab90bb1f88..6a0301d4e9d 100644 --- a/packages/graphql/apollo/src/interfaces/AlterApolloContext.ts +++ b/packages/graphql/apollo/src/interfaces/AlterApolloContext.ts @@ -1,5 +1,5 @@ import type {PlatformContext} from "@tsed/common"; -import type {ApolloContext} from "./ApolloContext"; +import type {ApolloContext} from "./ApolloContext.js"; export interface AlterApolloContext { $alterApolloContext(context: Context, $ctx: PlatformContext): Context | Promise; diff --git a/packages/graphql/apollo/src/interfaces/AlterApolloServerPlugins.ts b/packages/graphql/apollo/src/interfaces/AlterApolloServerPlugins.ts index 3c577431e72..5fde4d129d1 100644 --- a/packages/graphql/apollo/src/interfaces/AlterApolloServerPlugins.ts +++ b/packages/graphql/apollo/src/interfaces/AlterApolloServerPlugins.ts @@ -1,5 +1,5 @@ import type {ApolloServerPlugin} from "@apollo/server"; -import type {ApolloSettings} from "./ApolloSettings"; +import type {ApolloSettings} from "./ApolloSettings.js"; export interface AlterApolloServerPlugins { $alterApolloServerPlugins( diff --git a/packages/graphql/apollo/src/interfaces/ApolloSettings.ts b/packages/graphql/apollo/src/interfaces/ApolloSettings.ts index 12f61aff473..9793f283519 100644 --- a/packages/graphql/apollo/src/interfaces/ApolloSettings.ts +++ b/packages/graphql/apollo/src/interfaces/ApolloSettings.ts @@ -1,8 +1,8 @@ import type {ApolloServer, ApolloServerOptions, ApolloServerOptionsWithSchema} from "@apollo/server"; import type {GatewayInterface} from "@apollo/server-gateway-interface"; import type {IExecutableSchemaDefinition} from "@graphql-tools/schema"; -import type {GraphQLSchema} from "graphql/index"; -import {ApolloContext} from "./ApolloContext"; +import type {GraphQLSchema} from "graphql/index.js"; +import type {ApolloContext} from "./ApolloContext.js"; export type ApolloMiddlewareOptions = Record; export type ApolloCustomServerCB = (config: ApolloServerOptions) => ApolloServer; diff --git a/packages/graphql/apollo/tsconfig.cjs.json b/packages/graphql/apollo/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/graphql/apollo/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/graphql/apollo/tsconfig.esm.json b/packages/graphql/apollo/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/graphql/apollo/tsconfig.esm.json +++ b/packages/graphql/apollo/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/graphql/apollo/tsconfig.json b/packages/graphql/apollo/tsconfig.json index 2dbe3ec968d..4540f314a24 100644 --- a/packages/graphql/apollo/tsconfig.json +++ b/packages/graphql/apollo/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/graphql/graphql-ws/package.json b/packages/graphql/graphql-ws/package.json index 4bcab7e0a91..f2b8b10e10e 100644 --- a/packages/graphql/graphql-ws/package.json +++ b/packages/graphql/graphql-ws/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/graphql-ws", - "version": "8.0.0-alpha.5", "description": "An extension to allow GraphQL over WebSockets using graphql-ws protocol", - "type": "commonjs", + "type": "module", + "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/graphql/graphql-ws/tsconfig.cjs.json b/packages/graphql/graphql-ws/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/graphql/graphql-ws/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/graphql/graphql-ws/tsconfig.esm.json b/packages/graphql/graphql-ws/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/graphql/graphql-ws/tsconfig.esm.json +++ b/packages/graphql/graphql-ws/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/graphql/graphql-ws/tsconfig.json b/packages/graphql/graphql-ws/tsconfig.json index 250467edb65..a518f91af34 100644 --- a/packages/graphql/graphql-ws/tsconfig.json +++ b/packages/graphql/graphql-ws/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/graphql/typegraphql/package.json b/packages/graphql/typegraphql/package.json index 25c9d58ad2e..10feeacc97a 100644 --- a/packages/graphql/typegraphql/package.json +++ b/packages/graphql/typegraphql/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/typegraphql", "description": "TypeGraphQL package for Ts.ED framework, based on Apollo-server-core and Type-graphql", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/graphql/typegraphql/test/app/Server.ts b/packages/graphql/typegraphql/test/app/Server.ts index 56d20fd76bc..3b8a6f203a3 100644 --- a/packages/graphql/typegraphql/test/app/Server.ts +++ b/packages/graphql/typegraphql/test/app/Server.ts @@ -9,13 +9,13 @@ import {join} from "node:path"; import {buildContext} from "graphql-passport"; import {resolve} from "path"; import {HelloController} from "./controllers/HelloController"; -import {User} from "./graphql/auth/User"; -import "./graphql/index"; -import {AuthResolver} from "./graphql/index"; -import "./protocols/GraphQLProtocol"; -import "./services/RecipeService"; -import "./services/UsersRepository"; -import {pubSub} from "./graphql/pubsub/pubsub"; +import {User} from "./graphql/auth/User.js"; +import "./graphql/index.js"; +import {AuthResolver} from "./graphql/index.js"; +import "./protocols/GraphQLProtocol.js"; +import "./services/RecipeService.js"; +import "./services/UsersRepository.js"; +import {pubSub} from "./graphql/pubsub/pubsub.js"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build const rootCert = join(rootDir, "../.."); diff --git a/packages/graphql/typegraphql/tsconfig.cjs.json b/packages/graphql/typegraphql/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/graphql/typegraphql/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/graphql/typegraphql/tsconfig.esm.json b/packages/graphql/typegraphql/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/graphql/typegraphql/tsconfig.esm.json +++ b/packages/graphql/typegraphql/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/graphql/typegraphql/tsconfig.json b/packages/graphql/typegraphql/tsconfig.json index d670d6d9a3d..bb6118d59c4 100644 --- a/packages/graphql/typegraphql/tsconfig.json +++ b/packages/graphql/typegraphql/tsconfig.json @@ -13,10 +13,10 @@ "path": "../../core/tsconfig.json" }, { - "path": "../apollo/tsconfig.json" + "path": "../../platform/platform-express/tsconfig.json" }, { - "path": "./tsconfig.cjs.json" + "path": "../apollo/tsconfig.json" }, { "path": "./tsconfig.esm.json" diff --git a/packages/orm/adapters-redis/package.json b/packages/orm/adapters-redis/package.json index 2c95050cd3b..0a6eaadb7ec 100644 --- a/packages/orm/adapters-redis/package.json +++ b/packages/orm/adapters-redis/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/adapters-redis", "description": "Redis adapter for Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/adapters-redis/tsconfig.cjs.json b/packages/orm/adapters-redis/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/adapters-redis/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/adapters-redis/tsconfig.esm.json b/packages/orm/adapters-redis/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/adapters-redis/tsconfig.esm.json +++ b/packages/orm/adapters-redis/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/adapters-redis/tsconfig.json b/packages/orm/adapters-redis/tsconfig.json index 74d041ac7dc..d3d9f5fbdd5 100644 --- a/packages/orm/adapters-redis/tsconfig.json +++ b/packages/orm/adapters-redis/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../ioredis/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/adapters/package.json b/packages/orm/adapters/package.json index 04f2567a2d5..cfb5a6e6020 100644 --- a/packages/orm/adapters/package.json +++ b/packages/orm/adapters/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/adapters", "description": "Database adapters for Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/adapters/src/adapters/FileSyncAdapter.ts b/packages/orm/adapters/src/adapters/FileSyncAdapter.ts index 6e6e6b49fe5..6bab65c03ff 100644 --- a/packages/orm/adapters/src/adapters/FileSyncAdapter.ts +++ b/packages/orm/adapters/src/adapters/FileSyncAdapter.ts @@ -2,7 +2,7 @@ import {nameOf} from "@tsed/core"; import {Configuration, Injectable, Opts, ProviderScope, Scope} from "@tsed/di"; import fs from "fs-extra"; import low from "lowdb"; -import FileSync from "lowdb/adapters/FileSync"; +import FileSync from "lowdb/adapters/FileSync.js"; import {dirname} from "path"; import {AdapterConstructorOptions} from "../domain/Adapter.js"; import {AdapterModel, LowDbAdapter} from "./LowDbAdapter.js"; diff --git a/packages/orm/adapters/src/adapters/LowDbAdapter.ts b/packages/orm/adapters/src/adapters/LowDbAdapter.ts index df0573dcfec..f3037b3119e 100644 --- a/packages/orm/adapters/src/adapters/LowDbAdapter.ts +++ b/packages/orm/adapters/src/adapters/LowDbAdapter.ts @@ -1,5 +1,5 @@ import {cleanObject} from "@tsed/core"; -import isMatch from "lodash/isMatch"; +import isMatch from "lodash/isMatch.js"; import low from "lowdb"; import {v4 as uuid} from "uuid"; import {Adapter} from "../domain/Adapter.js"; diff --git a/packages/orm/adapters/src/adapters/MemoryAdapter.ts b/packages/orm/adapters/src/adapters/MemoryAdapter.ts index 1e6c0acb05b..edcf795bacc 100644 --- a/packages/orm/adapters/src/adapters/MemoryAdapter.ts +++ b/packages/orm/adapters/src/adapters/MemoryAdapter.ts @@ -1,6 +1,6 @@ import {Configuration, Injectable, Opts, ProviderScope, Scope} from "@tsed/di"; import low from "lowdb"; -import Memory from "lowdb/adapters/Memory"; +import Memory from "lowdb/adapters/Memory.js"; import {AdapterModel, LowDbAdapter} from "./LowDbAdapter.js"; @Injectable() diff --git a/packages/orm/adapters/tsconfig.cjs.json b/packages/orm/adapters/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/adapters/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/adapters/tsconfig.esm.json b/packages/orm/adapters/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/adapters/tsconfig.esm.json +++ b/packages/orm/adapters/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/adapters/tsconfig.json b/packages/orm/adapters/tsconfig.json index 46ac27e6773..192a26f1c12 100644 --- a/packages/orm/adapters/tsconfig.json +++ b/packages/orm/adapters/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/ioredis/package.json b/packages/orm/ioredis/package.json index 19d2b6423f9..b8c76fd3e29 100644 --- a/packages/orm/ioredis/package.json +++ b/packages/orm/ioredis/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/ioredis", "description": "IO Redis connection for Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/ioredis/src/domain/IORedisConfiguration.ts b/packages/orm/ioredis/src/domain/IORedisConfiguration.ts index 296a6636ddb..9ca3c6f3869 100644 --- a/packages/orm/ioredis/src/domain/IORedisConfiguration.ts +++ b/packages/orm/ioredis/src/domain/IORedisConfiguration.ts @@ -1,5 +1,5 @@ import {TokenProvider} from "@tsed/di"; -import Redis, {Cluster, ClusterOptions, RedisOptions} from "ioredis"; +import {Redis, Cluster, ClusterOptions, RedisOptions} from "ioredis"; export type ClusterConfiguration = {nodes: string[]} & ClusterOptions; diff --git a/packages/orm/ioredis/src/domain/IORedisStore.ts b/packages/orm/ioredis/src/domain/IORedisStore.ts index 3ddf066f691..984976014c6 100644 --- a/packages/orm/ioredis/src/domain/IORedisStore.ts +++ b/packages/orm/ioredis/src/domain/IORedisStore.ts @@ -1,5 +1,5 @@ import type {Config, FactoryConfig, Store} from "cache-manager"; -import Redis, {Cluster, ClusterNode, ClusterOptions, RedisOptions} from "ioredis"; +import {Redis, Cluster, ClusterNode, ClusterOptions, RedisOptions} from "ioredis"; export interface RedisClusterConfig { nodes: ClusterNode[]; diff --git a/packages/orm/ioredis/src/utils/mockConnections.ts b/packages/orm/ioredis/src/utils/mockConnections.ts index ed93b991385..a4bb768a62b 100644 --- a/packages/orm/ioredis/src/utils/mockConnections.ts +++ b/packages/orm/ioredis/src/utils/mockConnections.ts @@ -1,5 +1,5 @@ import {GlobalProviders, TokenProvider} from "@tsed/di"; -import Redis from "ioredis"; +import type {Redis} from "ioredis"; import {IOREDIS_CONNECTIONS} from "./registerConnectionProvider.js"; diff --git a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts index 36a14af11b7..aea07c91991 100644 --- a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts +++ b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts @@ -1,7 +1,7 @@ import {setValue} from "@tsed/core"; import {Configuration, registerProvider, TokenProvider} from "@tsed/di"; import {Logger} from "@tsed/logger"; -import Redis, {Cluster, RedisOptions} from "ioredis"; +import {Redis, Cluster, RedisOptions} from "ioredis"; import {IORedisConfiguration} from "../domain/IORedisConfiguration.js"; import {ioRedisStore} from "../domain/IORedisStore.js"; diff --git a/packages/orm/ioredis/tsconfig.cjs.json b/packages/orm/ioredis/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/ioredis/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/ioredis/tsconfig.esm.json b/packages/orm/ioredis/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/ioredis/tsconfig.esm.json +++ b/packages/orm/ioredis/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/ioredis/tsconfig.json b/packages/orm/ioredis/tsconfig.json index 99f2ccc1a3c..9031f5208ce 100644 --- a/packages/orm/ioredis/tsconfig.json +++ b/packages/orm/ioredis/tsconfig.json @@ -12,9 +12,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/mikro-orm/package.json b/packages/orm/mikro-orm/package.json index 5245fcd65e8..da3d14b3ef5 100644 --- a/packages/orm/mikro-orm/package.json +++ b/packages/orm/mikro-orm/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/mikro-orm", "description": "MikroORM package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/mikro-orm/test/helpers/Server.ts b/packages/orm/mikro-orm/test/helpers/Server.ts index d70cfb189cd..b709d2b9ae1 100644 --- a/packages/orm/mikro-orm/test/helpers/Server.ts +++ b/packages/orm/mikro-orm/test/helpers/Server.ts @@ -5,7 +5,7 @@ import bodyParser from "body-parser"; import compress from "compression"; import cookieParser from "cookie-parser"; import methodOverride from "method-override"; -import "./services/ManagedEventSubscriber"; +import "./services/ManagedEventSubscriber.js"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build diff --git a/packages/orm/mikro-orm/tsconfig.cjs.json b/packages/orm/mikro-orm/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/mikro-orm/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/mikro-orm/tsconfig.esm.json b/packages/orm/mikro-orm/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/mikro-orm/tsconfig.esm.json +++ b/packages/orm/mikro-orm/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/mikro-orm/tsconfig.json b/packages/orm/mikro-orm/tsconfig.json index 3ec1c68049e..0a2598dd586 100644 --- a/packages/orm/mikro-orm/tsconfig.json +++ b/packages/orm/mikro-orm/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../testcontainers-mongo/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/mongoose/package.json b/packages/orm/mongoose/package.json index 8707f5d9e27..74c13220819 100644 --- a/packages/orm/mongoose/package.json +++ b/packages/orm/mongoose/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/mongoose", "description": "Mongoose package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "tsed", @@ -11,14 +11,13 @@ "orm" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/mongoose/tsconfig.cjs.json b/packages/orm/mongoose/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/mongoose/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/mongoose/tsconfig.esm.json b/packages/orm/mongoose/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/mongoose/tsconfig.esm.json +++ b/packages/orm/mongoose/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/mongoose/tsconfig.json b/packages/orm/mongoose/tsconfig.json index 7c0154121de..34650b39c8c 100644 --- a/packages/orm/mongoose/tsconfig.json +++ b/packages/orm/mongoose/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../testcontainers-mongo/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/objection/package.json b/packages/orm/objection/package.json index ffe3b46239d..e6656f8b01d 100644 --- a/packages/orm/objection/package.json +++ b/packages/orm/objection/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/objection", "description": "Objection.js package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/objection/src/utils/createColumns.ts b/packages/orm/objection/src/utils/createColumns.ts index 5e64be85d09..f3a5477da9d 100644 --- a/packages/orm/objection/src/utils/createColumns.ts +++ b/packages/orm/objection/src/utils/createColumns.ts @@ -1,9 +1,9 @@ import {getProperties, JsonEntityStore} from "@tsed/schema"; import {Knex} from "knex"; -import "../components/createBooleanColumn"; -import "../components/createIdColumn"; -import "../components/createNumberColumn"; -import "../components/createStringColumn"; +import "../components/createBooleanColumn.js"; +import "../components/createIdColumn.js"; +import "../components/createNumberColumn.js"; +import "../components/createStringColumn.js"; import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; import {getColumnCtx} from "./getColumnCtx.js"; diff --git a/packages/orm/objection/tsconfig.cjs.json b/packages/orm/objection/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/objection/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/objection/tsconfig.esm.json b/packages/orm/objection/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/objection/tsconfig.esm.json +++ b/packages/orm/objection/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/objection/tsconfig.json b/packages/orm/objection/tsconfig.json index 89178569535..3e021e18ff8 100644 --- a/packages/orm/objection/tsconfig.json +++ b/packages/orm/objection/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/prisma/package.json b/packages/orm/prisma/package.json index c1675530c94..4b89849c86f 100644 --- a/packages/orm/prisma/package.json +++ b/packages/orm/prisma/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/prisma", "description": "Generate Ts.ED JsonSchema based on Prisma models", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/orm/prisma/src/generator.ts b/packages/orm/prisma/src/generator.ts index 2ccb3a72b71..cabb3597c05 100644 --- a/packages/orm/prisma/src/generator.ts +++ b/packages/orm/prisma/src/generator.ts @@ -1,7 +1,7 @@ #!/usr/bin/env ts-node import {generatorHandler} from "@prisma/generator-helper"; import {join} from "path"; -import {generate} from "./cli/prismaGenerator"; +import {generate} from "./cli/prismaGenerator.js"; const rootDir = __dirname; // automatically replaced by tsed tools on build export const defaultOutput = join(rootDir, "..", ".schema"); diff --git a/packages/orm/prisma/src/generator/utils/__snapshots__/generateEnums.spec.ts.snap b/packages/orm/prisma/src/generator/utils/__snapshots__/generateEnums.spec.ts.snap index 68e7f18a370..9b34d7ff71c 100644 --- a/packages/orm/prisma/src/generator/utils/__snapshots__/generateEnums.spec.ts.snap +++ b/packages/orm/prisma/src/generator/utils/__snapshots__/generateEnums.spec.ts.snap @@ -8,12 +8,3 @@ export enum Role { } " `; - -exports[`generateEnums should generate filese 1`] = ` -" -export enum Role { - USER = \\"USER\\", - ADMIN = \\"ADMIN\\" -} -" -`; diff --git a/packages/orm/prisma/src/generator/utils/__snapshots__/generateModels.spec.ts.snap b/packages/orm/prisma/src/generator/utils/__snapshots__/generateModels.spec.ts.snap index d10497cc36c..ed135951e28 100644 --- a/packages/orm/prisma/src/generator/utils/__snapshots__/generateModels.spec.ts.snap +++ b/packages/orm/prisma/src/generator/utils/__snapshots__/generateModels.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`generateModels > should generate models (info) 1`] = ` -"import { Info } from "../client/index"; +"import { Info } from "../client/index.js"; import { Required, Property } from "@tsed/schema"; export class InfoModel implements Info { @@ -18,9 +18,9 @@ export class InfoModel implements Info { `; exports[`generateModels > should generate models (post) 1`] = ` -"import { Post } from "../client/index"; +"import { Post } from "../client/index.js"; import { Integer, Required, Property, Allow } from "@tsed/schema"; -import { UserModel } from "./UserModel"; +import { UserModel } from "./UserModel.js"; export class PostModel implements Post { @Property(Number) @@ -42,10 +42,10 @@ export class PostModel implements Post { `; exports[`generateModels > should generate models (user) 1`] = ` -"import { User } from "../client/index"; +"import { User } from "../client/index.js"; import { Integer, Required, Property, Groups, Format, Email, Description, Allow, Enum, CollectionOf } from "@tsed/schema"; -import { Role } from "../enums/index"; -import { PostModel } from "./PostModel"; +import { Role } from "../enums/index.js"; +import { PostModel } from "./PostModel.js"; export class UserModel implements User { @Property(Number) @@ -109,113 +109,3 @@ export class UserModel implements User { " `; - -exports[`generateModels should generate models (info) 1`] = ` -"import { Info } from \\"../client/index\\"; -import { Required, Property } from \\"@tsed/schema\\"; - -export class InfoModel implements Info { - @Property(String) - @Required() - firstName: string; - - @Property(String) - @Required() - lastName: string; -} - -" -`; - -exports[`generateModels should generate models (post) 1`] = ` -"import { Post } from \\"../client/index\\"; -import { Integer, Required, Property, Allow } from \\"@tsed/schema\\"; -import { UserModel } from \\"./UserModel\\"; - -export class PostModel implements Post { - @Property(Number) - @Integer() - @Required() - id: number; - - @Property(() => UserModel) - @Allow(null) - user: UserModel | null; - - @Property(Number) - @Integer() - @Allow(null) - userId: number | null; -} - -" -`; - -exports[`generateModels should generate models (user) 1`] = ` -"import { User } from \\"../client/index\\"; -import { Integer, Required, Property, Groups, Format, Email, Description, Allow, Enum, CollectionOf } from \\"@tsed/schema\\"; -import { Role } from \\"../enums/index\\"; -import { PostModel } from \\"./PostModel\\"; - -export class UserModel implements User { - @Property(Number) - @Integer() - @Required() - @Groups(\\"!creation\\") - id: number; - - @Property(Date) - @Format(\\"date-time\\") - @Required() - createdAt: Date; - - @Property(String) - @Required() - @Email() - @Description(\\"User email. This email must be unique!\\") - email: string; - - @Property(Number) - @Allow(null) - weight: number | null; - - @Property(Boolean) - @Allow(null) - is18: boolean | null; - - @Property(String) - @Allow(null) - name: string | null; - - @Property(Number) - @Integer() - @Allow(null) - successorId: number | null; - - @Property(() => UserModel) - @Allow(null) - successor: UserModel | null; - - @Property(() => UserModel) - @Allow(null) - predecessor: UserModel | null; - - @Required() - @Enum(Role) - role: Role; - - @CollectionOf(() => PostModel) - @Required() - posts: PostModel[]; - - @CollectionOf(String) - @Required() - keywords: string[]; - - @Property(Object) - @Required() - biography: any; -} - -" -`; diff --git a/packages/orm/prisma/src/generator/utils/__snapshots__/generatePrismaService.spec.ts.snap b/packages/orm/prisma/src/generator/utils/__snapshots__/generatePrismaService.spec.ts.snap index 74d0446da65..d90e729b5c1 100644 --- a/packages/orm/prisma/src/generator/utils/__snapshots__/generatePrismaService.spec.ts.snap +++ b/packages/orm/prisma/src/generator/utils/__snapshots__/generatePrismaService.spec.ts.snap @@ -3,7 +3,7 @@ exports[`generatePrismaService > should generate prisma service 1`] = ` "import { Inject, Injectable, Configuration, OnInit, OnDestroy } from "@tsed/di"; import { Logger } from "@tsed/logger"; -import { PrismaClient } from "../client/index"; +import { PrismaClient } from "../client/index.js"; @Injectable() export class PrismaService extends PrismaClient implements OnInit, OnDestroy { @@ -26,30 +26,3 @@ export class PrismaService extends PrismaClient implements OnInit, OnDestroy { } " `; - -exports[`generatePrismaService should generate prisma service 1`] = ` -"import { Inject, Injectable, Configuration, OnInit, OnDestroy } from \\"@tsed/di\\"; -import { Logger } from \\"@tsed/logger\\"; -import { PrismaClient } from \\"../client/index\\"; - -@Injectable() -export class PrismaService extends PrismaClient implements OnInit, OnDestroy { - @Inject() - protected logger: Logger; - - constructor(@Configuration() settings: Configuration) { - super(settings.get('prisma')); - } - - async $onInit(): Promise { - this.logger.info(\\"Connection to prisma database\\"); - await this.$connect(); - } - - async $onDestroy(): Promise { - this.logger.info(\\"Disconnection from prisma database\\"); - await this.$disconnect(); - } -} -" -`; diff --git a/packages/orm/prisma/src/generator/utils/__snapshots__/generateRespositories.spec.ts.snap b/packages/orm/prisma/src/generator/utils/__snapshots__/generateRespositories.spec.ts.snap index c8b47c3d8e9..9acc63703ac 100644 --- a/packages/orm/prisma/src/generator/utils/__snapshots__/generateRespositories.spec.ts.snap +++ b/packages/orm/prisma/src/generator/utils/__snapshots__/generateRespositories.spec.ts.snap @@ -4,9 +4,9 @@ exports[`generateRepositories > should generate repositories (posts) 1`] = ` "import { isArray } from "@tsed/core"; import { deserialize } from "@tsed/json-mapper"; import { Injectable, Inject } from "@tsed/di"; -import { PrismaService } from "../services/PrismaService"; -import { Prisma, Post } from "../client/index"; -import { PostModel } from "../models/index"; +import { PrismaService } from "../services/PrismaService.js"; +import { Prisma, Post } from "../client/index.js"; +import { PostModel } from "../models/index.js"; @Injectable() export class PostsRepository { @@ -79,159 +79,9 @@ exports[`generateRepositories > should generate repositories (user) 1`] = ` "import { isArray } from "@tsed/core"; import { deserialize } from "@tsed/json-mapper"; import { Injectable, Inject } from "@tsed/di"; -import { PrismaService } from "../services/PrismaService"; -import { Prisma, User } from "../client/index"; -import { UserModel } from "../models/index"; - -@Injectable() -export class UsersRepository { - @Inject() - protected prisma: PrismaService; - - get collection() { - return this.prisma.user - } - - get groupBy() { - return this.collection.groupBy.bind(this.collection) - } - - protected deserialize(obj: null | User | User[]): T { - return deserialize(obj, { type: UserModel, collectionType: isArray(obj) ? Array : undefined }) - } - - async findUnique(args: Prisma.UserFindUniqueArgs): Promise { - const obj = await this.collection.findUnique(args); - return this.deserialize(obj); - } - - async findFirst(args: Prisma.UserFindFirstArgs): Promise { - const obj = await this.collection.findFirst(args); - return this.deserialize(obj); - } - - async findMany(args?: Prisma.UserFindManyArgs): Promise { - const obj = await this.collection.findMany(args); - return this.deserialize(obj); - } - - async create(args: Prisma.UserCreateArgs): Promise { - const obj = await this.collection.create(args); - return this.deserialize(obj); - } - - async update(args: Prisma.UserUpdateArgs): Promise { - const obj = await this.collection.update(args); - return this.deserialize(obj); - } - - async upsert(args: Prisma.UserUpsertArgs): Promise { - const obj = await this.collection.upsert(args); - return this.deserialize(obj); - } - - async delete(args: Prisma.UserDeleteArgs): Promise { - const obj = await this.collection.delete(args); - return this.deserialize(obj); - } - - deleteMany(args: Prisma.UserDeleteManyArgs) { - return this.collection.deleteMany(args) - } - - updateMany(args: Prisma.UserUpdateManyArgs) { - return this.collection.updateMany(args) - } - - aggregate(args: Prisma.UserAggregateArgs) { - return this.collection.aggregate(args) - } -} -" -`; - -exports[`generateRepositories should generate repositories (posts) 1`] = ` -"import { isArray } from \\"@tsed/core\\"; -import { deserialize } from \\"@tsed/json-mapper\\"; -import { Injectable, Inject } from \\"@tsed/di\\"; -import { PrismaService } from \\"../services/PrismaService\\"; -import { Prisma, Post } from \\"../client/index\\"; -import { PostModel } from \\"../models/index\\"; - -@Injectable() -export class PostsRepository { - @Inject() - protected prisma: PrismaService; - - get collection() { - return this.prisma.post - } - - get groupBy() { - return this.collection.groupBy.bind(this.collection) - } - - protected deserialize(obj: null | Post | Post[]): T { - return deserialize(obj, { type: PostModel, collectionType: isArray(obj) ? Array : undefined }) - } - - async findUnique(args: Prisma.PostFindUniqueArgs): Promise { - const obj = await this.collection.findUnique(args); - return this.deserialize(obj); - } - - async findFirst(args: Prisma.PostFindFirstArgs): Promise { - const obj = await this.collection.findFirst(args); - return this.deserialize(obj); - } - - async findMany(args?: Prisma.PostFindManyArgs): Promise { - const obj = await this.collection.findMany(args); - return this.deserialize(obj); - } - - async create(args: Prisma.PostCreateArgs): Promise { - const obj = await this.collection.create(args); - return this.deserialize(obj); - } - - async update(args: Prisma.PostUpdateArgs): Promise { - const obj = await this.collection.update(args); - return this.deserialize(obj); - } - - async upsert(args: Prisma.PostUpsertArgs): Promise { - const obj = await this.collection.upsert(args); - return this.deserialize(obj); - } - - async delete(args: Prisma.PostDeleteArgs): Promise { - const obj = await this.collection.delete(args); - return this.deserialize(obj); - } - - deleteMany(args: Prisma.PostDeleteManyArgs) { - return this.collection.deleteMany(args) - } - - updateMany(args: Prisma.PostUpdateManyArgs) { - return this.collection.updateMany(args) - } - - aggregate(args: Prisma.PostAggregateArgs) { - return this.collection.aggregate(args) - } -} -" -`; - -exports[`generateRepositories should generate repositories (user) 1`] = ` -"import { isArray } from \\"@tsed/core\\"; -import { deserialize } from \\"@tsed/json-mapper\\"; -import { Injectable, Inject } from \\"@tsed/di\\"; -import { PrismaService } from \\"../services/PrismaService\\"; -import { Prisma, User } from \\"../client/index\\"; -import { UserModel } from \\"../models/index\\"; +import { PrismaService } from "../services/PrismaService.js"; +import { Prisma, User } from "../client/index.js"; +import { UserModel } from "../models/index.js"; @Injectable() export class UsersRepository { diff --git a/packages/orm/prisma/src/generator/utils/sourceType.ts b/packages/orm/prisma/src/generator/utils/sourceType.ts deleted file mode 100644 index eecb9beffdd..00000000000 --- a/packages/orm/prisma/src/generator/utils/sourceType.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function isCommonjs() { - return typeof module !== "undefined" && typeof exports !== "undefined"; -} - -export function isEsm() { - return !isCommonjs(); -} diff --git a/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts b/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts index 148ee216f63..c0cec6d56ac 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts @@ -1 +1 @@ -export {Role} from "./Role"; +export {Role} from "./Role.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/index.ts b/packages/orm/prisma/test/snapshots/generate_code/index.ts index 3b37c19dde2..f695efffdbe 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/index.ts @@ -1,5 +1,5 @@ -export * from "./interfaces/index"; -export * from "./enums/index"; -export * from "./models/index"; -export * from "./services/PrismaService"; -export * from "./repositories/index"; +export * from "./interfaces/index.js"; +export * from "./enums/index.js"; +export * from "./models/index.js"; +export * from "./services/PrismaService.js"; +export * from "./repositories/index.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts b/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts index 55bea49090d..4b4fdb3df9b 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts @@ -1,4 +1,4 @@ -import {Prisma} from "../client/index"; +import {Prisma} from "../client/index.js"; declare global { namespace TsED { diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts b/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts index e7c83adc521..341cf20a5b7 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts @@ -1,6 +1,6 @@ -import {Post} from "../client/index"; +import {Post} from "../client/index.js"; import {Integer, Required, Property, Allow} from "@tsed/schema"; -import {UserModel} from "./UserModel"; +import {UserModel} from "./UserModel.js"; export class PostModel implements Post { @Property(Number) diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts b/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts index c77d5b92cf9..ed3cf760eca 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts @@ -1,7 +1,7 @@ -import {User} from "../client/index"; +import {User} from "../client/index.js"; import {Integer, Required, Property, Groups, Format, Email, Description, Allow, Enum, CollectionOf} from "@tsed/schema"; -import {Role} from "../enums/index"; -import {PostModel} from "./PostModel"; +import {Role} from "../enums/index.js"; +import {PostModel} from "./PostModel.js"; export class UserModel implements User { @Property(Number) diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/index.ts b/packages/orm/prisma/test/snapshots/generate_code/models/index.ts index aa50c049b83..280b2c1a4ce 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/index.ts @@ -1,2 +1,2 @@ -export {PostModel} from "./PostModel"; -export {UserModel} from "./UserModel"; +export {PostModel} from "./PostModel.js"; +export {UserModel} from "./UserModel.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts index a42f797cf02..5a34f82341d 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts @@ -1,9 +1,9 @@ import {isArray} from "@tsed/core"; import {deserialize} from "@tsed/json-mapper"; import {Injectable, Inject} from "@tsed/di"; -import {PrismaService} from "../services/PrismaService"; -import {Prisma, Post} from "../client/index"; -import {PostModel} from "../models/index"; +import {PrismaService} from "../services/PrismaService.js"; +import {Prisma, Post} from "../client/index.js"; +import {PostModel} from "../models/index.js"; @Injectable() export class PostsRepository { diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts index 7566942f840..beeac1a433e 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts @@ -1,9 +1,9 @@ import {isArray} from "@tsed/core"; import {deserialize} from "@tsed/json-mapper"; import {Injectable, Inject} from "@tsed/di"; -import {PrismaService} from "../services/PrismaService"; -import {Prisma, User} from "../client/index"; -import {UserModel} from "../models/index"; +import {PrismaService} from "../services/PrismaService.js"; +import {Prisma, User} from "../client/index.js"; +import {UserModel} from "../models/index.js"; @Injectable() export class UsersRepository { diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts index b5023f49f35..8e89e41e144 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts @@ -1,2 +1,2 @@ -export {PostsRepository} from "./PostsRepository"; -export {UsersRepository} from "./UsersRepository"; +export {PostsRepository} from "./PostsRepository.js"; +export {UsersRepository} from "./UsersRepository.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts b/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts index df371b86e60..9bd9278ff11 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts @@ -1,6 +1,6 @@ import {Inject, Injectable, Configuration, OnInit, OnDestroy} from "@tsed/di"; import {Logger} from "@tsed/logger"; -import {PrismaClient} from "../client/index"; +import {PrismaClient} from "../client/index.js"; @Injectable() export class PrismaService extends PrismaClient implements OnInit, OnDestroy { diff --git a/packages/orm/prisma/tsconfig.cjs.json b/packages/orm/prisma/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/prisma/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/prisma/tsconfig.esm.json b/packages/orm/prisma/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/prisma/tsconfig.esm.json +++ b/packages/orm/prisma/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/prisma/tsconfig.json b/packages/orm/prisma/tsconfig.json index 0e0b63ab8f9..b628b0fba04 100644 --- a/packages/orm/prisma/tsconfig.json +++ b/packages/orm/prisma/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/orm/prisma/vitest.config.mts b/packages/orm/prisma/vitest.config.mts index 899d0072341..3a9805f7496 100644 --- a/packages/orm/prisma/vitest.config.mts +++ b/packages/orm/prisma/vitest.config.mts @@ -12,10 +12,10 @@ export default defineConfig( thresholds: { statements: 90.48, branches: 90.56, - functions: 92.85, + functions: 92.59, lines: 90.48 } } } } -); \ No newline at end of file +); diff --git a/packages/orm/testcontainers-mongo/package.json b/packages/orm/testcontainers-mongo/package.json index ec2bcd08c15..e8d166cefde 100644 --- a/packages/orm/testcontainers-mongo/package.json +++ b/packages/orm/testcontainers-mongo/package.json @@ -1,23 +1,22 @@ { "name": "@tsed/testcontainers-mongo", "description": "A module to test Ts.ED code that use MongoDB as database using Test Containers", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" }, "./vitest/setup": { "types": "./lib/types/setup/vi.setup.d.ts", "import": "./lib/esm/setup/vi.setup.js", - "default": "./lib/cjs/setup/vi.setup.js" + "default": "./lib/esm/setup/vi.setup.js" } }, "scripts": { diff --git a/packages/orm/testcontainers-mongo/tsconfig.cjs.json b/packages/orm/testcontainers-mongo/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/orm/testcontainers-mongo/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/orm/testcontainers-mongo/tsconfig.esm.json b/packages/orm/testcontainers-mongo/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/orm/testcontainers-mongo/tsconfig.esm.json +++ b/packages/orm/testcontainers-mongo/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/orm/testcontainers-mongo/tsconfig.json b/packages/orm/testcontainers-mongo/tsconfig.json index 250467edb65..a518f91af34 100644 --- a/packages/orm/testcontainers-mongo/tsconfig.json +++ b/packages/orm/testcontainers-mongo/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/perf/package.json b/packages/perf/package.json index 577018dfbb1..3fd70dc1bac 100644 --- a/packages/perf/package.json +++ b/packages/perf/package.json @@ -1,18 +1,17 @@ { "name": "@tsed/perf", "description": "Perf module tool", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "private": true, "source": "./src/index.ts", - "main": "lib/esm/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/perf/tsconfig.cjs.json b/packages/perf/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/perf/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/perf/tsconfig.esm.json b/packages/perf/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/perf/tsconfig.esm.json +++ b/packages/perf/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/perf/tsconfig.json b/packages/perf/tsconfig.json index 6dc41ab1748..923f7beb46e 100644 --- a/packages/perf/tsconfig.json +++ b/packages/perf/tsconfig.json @@ -9,9 +9,6 @@ { "path": "../core/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/platform/common/package.json b/packages/platform/common/package.json index 9d2c1676d79..63761edb345 100644 --- a/packages/platform/common/package.json +++ b/packages/platform/common/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/common", "description": "A TypeScript Framework on top of Express", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/common/src/decorators/multer/multipartFile.spec.ts b/packages/platform/common/src/decorators/multer/multipartFile.spec.ts index b953d4744c7..18a2a43c0b9 100644 --- a/packages/platform/common/src/decorators/multer/multipartFile.spec.ts +++ b/packages/platform/common/src/decorators/multer/multipartFile.spec.ts @@ -1,7 +1,7 @@ import {descriptorOf, Metadata, Store} from "@tsed/core"; import {ParamTypes} from "@tsed/platform-params"; import {getSpec, JsonParameterStore, Post, SpecTypes} from "@tsed/schema"; -import "../../index"; +import "../../index.js"; import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; import {MultipartFile} from "./multipartFile.js"; diff --git a/packages/platform/common/src/services/PlatformTest.ts b/packages/platform/common/src/services/PlatformTest.ts index f56e70e6131..9d2d61b7fbd 100644 --- a/packages/platform/common/src/services/PlatformTest.ts +++ b/packages/platform/common/src/services/PlatformTest.ts @@ -6,7 +6,7 @@ import {PlatformBuilder} from "../builder/PlatformBuilder.js"; import {PlatformContext, PlatformContextOptions} from "../domain/PlatformContext.js"; import {createInjector} from "../utils/createInjector.js"; import {getConfiguration} from "../utils/getConfiguration.js"; -import {FakeResponse} from "./FakeResponse"; +import {FakeResponse} from "./FakeResponse.js"; import {PlatformAdapter, PlatformBuilderSettings} from "./PlatformAdapter.js"; import {PlatformApplication} from "./PlatformApplication.js"; diff --git a/packages/platform/common/tsconfig.cjs.json b/packages/platform/common/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/common/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/common/tsconfig.esm.json b/packages/platform/common/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/common/tsconfig.esm.json +++ b/packages/platform/common/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/common/tsconfig.json b/packages/platform/common/tsconfig.json index c4932be80ee..4290a72f9c1 100644 --- a/packages/platform/common/tsconfig.json +++ b/packages/platform/common/tsconfig.json @@ -48,9 +48,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-cache/package.json b/packages/platform/platform-cache/package.json index 578906111e4..66a64ddc866 100644 --- a/packages/platform/platform-cache/package.json +++ b/packages/platform/platform-cache/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-cache", "description": "Platform cache module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-cache/src/interfaces/interfaces.ts b/packages/platform/platform-cache/src/interfaces/interfaces.ts index a06f483c10d..f57d088bebd 100644 --- a/packages/platform/platform-cache/src/interfaces/interfaces.ts +++ b/packages/platform/platform-cache/src/interfaces/interfaces.ts @@ -1,6 +1,6 @@ import type {BaseContext} from "@tsed/di"; import type {Cache, CachingConfig, Store} from "cache-manager"; -import type {FactoryStore} from "cache-manager/dist/caching"; +import type {FactoryStore} from "cache-manager/dist/caching.js"; import type {CacheManager} from "../services/PlatformCache.js"; export type PlatformCacheSettings = any, S extends Store = any> = CachingConfig & { diff --git a/packages/platform/platform-cache/tsconfig.cjs.json b/packages/platform/platform-cache/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-cache/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-cache/tsconfig.esm.json b/packages/platform/platform-cache/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-cache/tsconfig.esm.json +++ b/packages/platform/platform-cache/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-cache/tsconfig.json b/packages/platform/platform-cache/tsconfig.json index 0e0b63ab8f9..b628b0fba04 100644 --- a/packages/platform/platform-cache/tsconfig.json +++ b/packages/platform/platform-cache/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-exceptions/package.json b/packages/platform/platform-exceptions/package.json index ba3b9a7fee3..2a3ea4aee2d 100644 --- a/packages/platform/platform-exceptions/package.json +++ b/packages/platform/platform-exceptions/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-exceptions", "description": "Platform exceptions module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-exceptions/tsconfig.cjs.json b/packages/platform/platform-exceptions/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-exceptions/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-exceptions/tsconfig.esm.json b/packages/platform/platform-exceptions/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-exceptions/tsconfig.esm.json +++ b/packages/platform/platform-exceptions/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-exceptions/tsconfig.json b/packages/platform/platform-exceptions/tsconfig.json index 1d616d69652..ec67d9b7059 100644 --- a/packages/platform/platform-exceptions/tsconfig.json +++ b/packages/platform/platform-exceptions/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-express/package.json b/packages/platform/platform-express/package.json index 0c4dcfa7cf3..c58d34a6897 100644 --- a/packages/platform/platform-express/package.json +++ b/packages/platform/platform-express/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-express", "description": "A TypeScript Framework on top of Express", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-express/test/app/Server.ts b/packages/platform/platform-express/test/app/Server.ts index c0dbb709000..93aa1b6ca74 100644 --- a/packages/platform/platform-express/test/app/Server.ts +++ b/packages/platform/platform-express/test/app/Server.ts @@ -5,7 +5,7 @@ import compress from "compression"; import {Application} from "express"; import session from "express-session"; -import "../../src/index"; +import "../../src/index.js"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build export {rootDir}; diff --git a/packages/platform/platform-express/tsconfig.cjs.json b/packages/platform/platform-express/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/platform-express/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-express/tsconfig.esm.json b/packages/platform/platform-express/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-express/tsconfig.esm.json +++ b/packages/platform/platform-express/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-express/tsconfig.json b/packages/platform/platform-express/tsconfig.json index 2dce58b8e5f..1960162bdcd 100644 --- a/packages/platform/platform-express/tsconfig.json +++ b/packages/platform/platform-express/tsconfig.json @@ -30,9 +30,6 @@ { "path": "../platform-test-sdk/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-koa/package.json b/packages/platform/platform-koa/package.json index 2ac544594af..b700be85ab3 100644 --- a/packages/platform/platform-koa/package.json +++ b/packages/platform/platform-koa/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-koa", "description": "Koa package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-koa/src/services/PlatformKoaHandler.ts b/packages/platform/platform-koa/src/services/PlatformKoaHandler.ts index 5b5227f9726..e749f8b6d0e 100644 --- a/packages/platform/platform-koa/src/services/PlatformKoaHandler.ts +++ b/packages/platform/platform-koa/src/services/PlatformKoaHandler.ts @@ -1,5 +1,5 @@ import {PlatformContext, PlatformHandler, PlatformParamsCallback} from "@tsed/common"; -import "./PlatformKoaRequest"; +import "./PlatformKoaRequest.js"; export class PlatformKoaHandler extends PlatformHandler { onRequest(handler: PlatformParamsCallback, $ctx: PlatformContext) { diff --git a/packages/platform/platform-koa/tsconfig.cjs.json b/packages/platform/platform-koa/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/platform-koa/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-koa/tsconfig.esm.json b/packages/platform/platform-koa/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-koa/tsconfig.esm.json +++ b/packages/platform/platform-koa/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-koa/tsconfig.json b/packages/platform/platform-koa/tsconfig.json index 7168f330c22..f9f49d347c8 100644 --- a/packages/platform/platform-koa/tsconfig.json +++ b/packages/platform/platform-koa/tsconfig.json @@ -27,9 +27,6 @@ { "path": "../platform-test-sdk/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-log-middleware/package.json b/packages/platform/platform-log-middleware/package.json index a8ed66efea4..5d7db462919 100644 --- a/packages/platform/platform-log-middleware/package.json +++ b/packages/platform/platform-log-middleware/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-log-middleware", "description": "Log request middleware module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts index eeb13ff5bc8..185cd424ea9 100644 --- a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts +++ b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts @@ -1,6 +1,6 @@ import {PlatformHandlerMetadata, PlatformTest} from "@tsed/common"; import {PlatformLogMiddleware} from "./PlatformLogMiddleware.js"; -import "../domain/PlatformLogMiddlewareSettings"; +import "../domain/PlatformLogMiddlewareSettings.js"; async function createMiddlewareFixture({statusCode = 200, error}: {statusCode?: number; error?: any} = {}) { const middleware = await PlatformTest.invoke(PlatformLogMiddleware); diff --git a/packages/platform/platform-log-middleware/tsconfig.cjs.json b/packages/platform/platform-log-middleware/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-log-middleware/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-log-middleware/tsconfig.esm.json b/packages/platform/platform-log-middleware/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-log-middleware/tsconfig.esm.json +++ b/packages/platform/platform-log-middleware/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-log-middleware/tsconfig.json b/packages/platform/platform-log-middleware/tsconfig.json index 7ffd1d30a41..d548a61b586 100644 --- a/packages/platform/platform-log-middleware/tsconfig.json +++ b/packages/platform/platform-log-middleware/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../platform-params/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-middlewares/package.json b/packages/platform/platform-middlewares/package.json index 8c9e280305e..3151131693c 100644 --- a/packages/platform/platform-middlewares/package.json +++ b/packages/platform/platform-middlewares/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-middlewares", "description": "Middlewares module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-middlewares/tsconfig.cjs.json b/packages/platform/platform-middlewares/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-middlewares/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-middlewares/tsconfig.esm.json b/packages/platform/platform-middlewares/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-middlewares/tsconfig.esm.json +++ b/packages/platform/platform-middlewares/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-middlewares/tsconfig.json b/packages/platform/platform-middlewares/tsconfig.json index f8d3bb7cbaf..3de218e3d21 100644 --- a/packages/platform/platform-middlewares/tsconfig.json +++ b/packages/platform/platform-middlewares/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-params/package.json b/packages/platform/platform-params/package.json index 608d71c124f..49ce8bf17b0 100644 --- a/packages/platform/platform-params/package.json +++ b/packages/platform/platform-params/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-params", "description": "Params module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-params/tsconfig.cjs.json b/packages/platform/platform-params/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-params/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-params/tsconfig.esm.json b/packages/platform/platform-params/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-params/tsconfig.esm.json +++ b/packages/platform/platform-params/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-params/tsconfig.json b/packages/platform/platform-params/tsconfig.json index 4f799e60509..8a0257534da 100644 --- a/packages/platform/platform-params/tsconfig.json +++ b/packages/platform/platform-params/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-response-filter/package.json b/packages/platform/platform-response-filter/package.json index 89d6d620705..1b86d74f526 100644 --- a/packages/platform/platform-response-filter/package.json +++ b/packages/platform/platform-response-filter/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-response-filter", "description": "Platform response filter module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-response-filter/tsconfig.cjs.json b/packages/platform/platform-response-filter/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-response-filter/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-response-filter/tsconfig.esm.json b/packages/platform/platform-response-filter/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-response-filter/tsconfig.esm.json +++ b/packages/platform/platform-response-filter/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-response-filter/tsconfig.json b/packages/platform/platform-response-filter/tsconfig.json index 4f799e60509..8a0257534da 100644 --- a/packages/platform/platform-response-filter/tsconfig.json +++ b/packages/platform/platform-response-filter/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-router/package.json b/packages/platform/platform-router/package.json index b60ba0516db..12e30ee5c8c 100644 --- a/packages/platform/platform-router/package.json +++ b/packages/platform/platform-router/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-router", "description": "Router", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-router/tsconfig.cjs.json b/packages/platform/platform-router/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/platform/platform-router/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-router/tsconfig.esm.json b/packages/platform/platform-router/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-router/tsconfig.esm.json +++ b/packages/platform/platform-router/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-router/tsconfig.json b/packages/platform/platform-router/tsconfig.json index 62ca727e4be..172d3e8f3f1 100644 --- a/packages/platform/platform-router/tsconfig.json +++ b/packages/platform/platform-router/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-serverless-http/package.json b/packages/platform/platform-serverless-http/package.json index c69077e04c9..1727037f4f8 100644 --- a/packages/platform/platform-serverless-http/package.json +++ b/packages/platform/platform-serverless-http/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-serverless-http", "description": "Module to support Serverless HTTP function with Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-serverless-http/tsconfig.cjs.json b/packages/platform/platform-serverless-http/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/platform-serverless-http/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-serverless-http/tsconfig.esm.json b/packages/platform/platform-serverless-http/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-serverless-http/tsconfig.esm.json +++ b/packages/platform/platform-serverless-http/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-serverless-http/tsconfig.json b/packages/platform/platform-serverless-http/tsconfig.json index 4f86d5f0b4d..e258b18ea5e 100644 --- a/packages/platform/platform-serverless-http/tsconfig.json +++ b/packages/platform/platform-serverless-http/tsconfig.json @@ -27,9 +27,6 @@ { "path": "../platform-serverless-testing/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-serverless-testing/package.json b/packages/platform/platform-serverless-testing/package.json index 13640e1c701..5a828691690 100644 --- a/packages/platform/platform-serverless-testing/package.json +++ b/packages/platform/platform-serverless-testing/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-serverless-testing", "description": "Module to test Serverless function with Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts b/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts index 02b1fe227b5..7ef46be931b 100644 --- a/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts +++ b/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts @@ -1,6 +1,6 @@ import {DITest} from "@tsed/di"; import {APIGatewayEventDefaultAuthorizerContext, APIGatewayProxyEventBase, APIGatewayProxyHandler} from "aws-lambda"; -import {APIGatewayProxyResult} from "aws-lambda/trigger/api-gateway-proxy"; +import {APIGatewayProxyResult} from "aws-lambda/trigger/api-gateway-proxy.js"; import {createFakeEvent} from "./createFakeEvent.js"; import {createFakeContext} from "./createFakeContext.js"; import {nameOf, Type} from "@tsed/core"; diff --git a/packages/platform/platform-serverless-testing/tsconfig.cjs.json b/packages/platform/platform-serverless-testing/tsconfig.cjs.json deleted file mode 100644 index 85004279084..00000000000 --- a/packages/platform/platform-serverless-testing/tsconfig.cjs.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false, - "types": ["vite/client", "vitest/globals"] - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-serverless-testing/tsconfig.esm.json b/packages/platform/platform-serverless-testing/tsconfig.esm.json index e3528a4ae89..e3b07081667 100644 --- a/packages/platform/platform-serverless-testing/tsconfig.esm.json +++ b/packages/platform/platform-serverless-testing/tsconfig.esm.json @@ -6,11 +6,10 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, - "noEmit": false, - "types": ["vite/client", "vitest/globals"] + "noEmit": false }, "include": ["src", "src/**/*.json"], "exclude": [ diff --git a/packages/platform/platform-serverless-testing/tsconfig.json b/packages/platform/platform-serverless-testing/tsconfig.json index 53a208d714e..a3a43a97241 100644 --- a/packages/platform/platform-serverless-testing/tsconfig.json +++ b/packages/platform/platform-serverless-testing/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/platform/platform-serverless/package.json b/packages/platform/platform-serverless/package.json index f7d10bd2433..d2beb503b53 100644 --- a/packages/platform/platform-serverless/package.json +++ b/packages/platform/platform-serverless/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-serverless", "description": "Platform serverless module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerless.ts b/packages/platform/platform-serverless/src/builder/PlatformServerless.ts index 9a16c64fa35..63242eb607d 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerless.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerless.ts @@ -3,11 +3,11 @@ import {createContainer, InjectorService, setLoggerConfiguration} from "@tsed/di import {$log, Logger} from "@tsed/logger"; import {getOperationsRoutes, JsonEntityStore} from "@tsed/schema"; import type {Handler} from "aws-lambda"; -import type {Context} from "aws-lambda/handler"; +import type {Context} from "aws-lambda/handler.js"; import type {HTTPMethod, Instance} from "find-my-way"; import {ServerlessContext} from "../domain/ServerlessContext.js"; -import type {ServerlessEvent} from "../domain/ServerlessEvent"; -import {type RequestHandler, ServerlessResponseStream} from "../domain/ServerlessResponseStream"; +import type {ServerlessEvent} from "../domain/ServerlessEvent.js"; +import {type RequestHandler, ServerlessResponseStream} from "../domain/ServerlessResponseStream.js"; import {getRequestId} from "../utils/getRequestId.js"; import {PlatformServerlessHandler} from "./PlatformServerlessHandler.js"; diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts index 3bf208d9f0b..87290a3c1cc 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts @@ -5,8 +5,8 @@ import type {PlatformExceptions} from "@tsed/platform-exceptions"; import {DeserializerPipe, PlatformParams, ValidationPipe} from "@tsed/platform-params"; import {pipeline} from "node:stream/promises"; import {ServerlessContext} from "../domain/ServerlessContext.js"; -import type {ServerlessEvent} from "../domain/ServerlessEvent"; -import {ServerlessResponseStream} from "../domain/ServerlessResponseStream"; +import type {ServerlessEvent} from "../domain/ServerlessEvent.js"; +import {ServerlessResponseStream} from "../domain/ServerlessResponseStream.js"; import {setResponseHeaders} from "../utils/setResponseHeaders.js"; @Injectable({ diff --git a/packages/platform/platform-serverless/src/domain/ServerlessContext.ts b/packages/platform/platform-serverless/src/domain/ServerlessContext.ts index cdcd8daf213..e8024463043 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessContext.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessContext.ts @@ -1,9 +1,9 @@ import {DIContext, DIContextOptions} from "@tsed/di"; import {JsonEntityStore} from "@tsed/schema"; -import {type APIGatewayProxyEvent, APIGatewayTokenAuthorizerEvent, Context} from "aws-lambda"; +import {type APIGatewayProxyEvent, Context} from "aws-lambda"; import {ServerlessRequest} from "./ServerlessRequest.js"; import {ServerlessResponse} from "./ServerlessResponse.js"; -import type {ServerlessResponseStream} from "./ServerlessResponseStream"; +import type {ServerlessResponseStream} from "./ServerlessResponseStream.js"; export interface ServerlessContextOptions extends DIContextOptions { event: Event; diff --git a/packages/platform/platform-serverless/src/domain/ServerlessResponseStream.ts b/packages/platform/platform-serverless/src/domain/ServerlessResponseStream.ts index d2f712e9963..d7ddbf2b881 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessResponseStream.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessResponseStream.ts @@ -1,6 +1,6 @@ import type {APIGatewayProxyEventV2, Callback, Context, Handler} from "aws-lambda"; import {Stream} from "node:stream"; -import {isInAWS} from "../utils/isInAWS"; +import {isInAWS} from "../utils/isInAWS.js"; export type ServerlessResponseMeta = {statusCode: number; headers: Record}; diff --git a/packages/platform/platform-serverless/src/utils/getRequestId.ts b/packages/platform/platform-serverless/src/utils/getRequestId.ts index 450c445011a..d5836c3f0bd 100644 --- a/packages/platform/platform-serverless/src/utils/getRequestId.ts +++ b/packages/platform/platform-serverless/src/utils/getRequestId.ts @@ -1,6 +1,6 @@ import {Context} from "aws-lambda"; import {v4} from "uuid"; -import type {ServerlessEvent} from "../domain/ServerlessEvent"; +import type {ServerlessEvent} from "../domain/ServerlessEvent.js"; export function getRequestId(event: ServerlessEvent, context: Context) { if ("headers" in event && event.headers["x-request-id"]) { diff --git a/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts b/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts index 45922646605..6e439b29f7e 100644 --- a/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts +++ b/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts @@ -1,6 +1,6 @@ import {JsonHeader, JsonOperation} from "@tsed/schema"; import {ServerlessContext} from "../domain/ServerlessContext.js"; -import type {ServerlessEvent} from "../domain/ServerlessEvent"; +import type {ServerlessEvent} from "../domain/ServerlessEvent.js"; import {HeaderValue} from "../domain/ServerlessResponse.js"; function mergeHeaders(specHeaders: Record, headers: Record) { diff --git a/packages/platform/platform-serverless/tsconfig.cjs.json b/packages/platform/platform-serverless/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/platform-serverless/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-serverless/tsconfig.esm.json b/packages/platform/platform-serverless/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-serverless/tsconfig.esm.json +++ b/packages/platform/platform-serverless/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-serverless/tsconfig.json b/packages/platform/platform-serverless/tsconfig.json index b9908f8edba..d2305cea985 100644 --- a/packages/platform/platform-serverless/tsconfig.json +++ b/packages/platform/platform-serverless/tsconfig.json @@ -30,9 +30,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/platform/platform-test-sdk/package.json b/packages/platform/platform-test-sdk/package.json index 611d401f4b2..27e7ce1810f 100644 --- a/packages/platform/platform-test-sdk/package.json +++ b/packages/platform/platform-test-sdk/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-test-sdk", "description": "Package to test platform adapter integration with Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, @@ -40,7 +39,7 @@ "@tsed/platform-views": "workspace:*", "@tsed/schema": "workspace:*", "@tsed/swagger": "workspace:*", - "ajv": "^8.12.0", + "ajv": "^8.17.1", "axios": "1.7.4", "read-pkg-up": "7.0.1" }, diff --git a/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts b/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts index adb3642a24d..9cd198c6ea9 100644 --- a/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts +++ b/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts @@ -1,6 +1,7 @@ import {AcceptMime, Controller, Get, HeaderParams, PlatformTest, Post} from "@tsed/common"; import {ContentType} from "@tsed/schema"; import SuperTest from "supertest"; +import {afterAll, beforeAll, describe, expect, it} from "vitest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; @Controller("/accept-mime") diff --git a/packages/platform/platform-test-sdk/src/tests/testAuth.ts b/packages/platform/platform-test-sdk/src/tests/testAuth.ts index 3da4433975c..292cac8a795 100644 --- a/packages/platform/platform-test-sdk/src/tests/testAuth.ts +++ b/packages/platform/platform-test-sdk/src/tests/testAuth.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Context, Controller, Get, Inject, Injectable, Middleware, PlatformTest, Post, Req, UseAuth} from "@tsed/common"; import {useDecorators} from "@tsed/core"; import {BadRequest, Forbidden, Unauthorized} from "@tsed/exceptions"; diff --git a/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts b/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts index 7306f4d7fd9..efc94ef8a33 100644 --- a/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts @@ -1,4 +1,5 @@ import "@tsed/ajv"; +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {BodyParams, Context, Controller, HeaderParams, PlatformTest, RawBodyParams} from "@tsed/common"; import { Post, diff --git a/packages/platform/platform-test-sdk/src/tests/testCache.ts b/packages/platform/platform-test-sdk/src/tests/testCache.ts index 92a3ac5b0bf..50df8f3ec97 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCache.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCache.ts @@ -1,7 +1,8 @@ import {Controller, Get, Head, Inject, PathParams, PlatformTest, Post, QueryParams} from "@tsed/common"; -import {UseCache, PlatformCache} from "@tsed/platform-cache"; +import {PlatformCache, UseCache} from "@tsed/platform-cache"; import {Property} from "@tsed/schema"; import SuperTest from "supertest"; +import {describe, expect, it, beforeEach, afterEach} from "vitest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; let increment = 0; diff --git a/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts b/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts index d72d16c03aa..f215d851680 100644 --- a/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts +++ b/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts @@ -1,3 +1,4 @@ +import {expect, beforeEach, afterEach, describe, it} from "vitest"; import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testCookies.ts b/packages/platform/platform-test-sdk/src/tests/testCookies.ts index 5c1cd7b110c..c5db89aea2c 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCookies.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCookies.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {Controller, CookiesParams, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testCustom404.ts b/packages/platform/platform-test-sdk/src/tests/testCustom404.ts index 8bcd23dc307..c2ace90f802 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCustom404.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCustom404.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts b/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts index 010e3a259d6..39db7ed3d88 100644 --- a/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts @@ -1,8 +1,9 @@ import "@tsed/ajv"; import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; -import {Default, GenericOf, Generics, Maximum, Minimum, Property, Required} from "@tsed/schema"; +import {Default, GenericOf, Generics, Maximum, Minimum, Property} from "@tsed/schema"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; +import {expect, beforeAll, afterAll, describe, it} from "vitest"; class FindQuery { @Property() diff --git a/packages/platform/platform-test-sdk/src/tests/testErrors.ts b/packages/platform/platform-test-sdk/src/tests/testErrors.ts index 5f892a6e796..e0727ce7d85 100644 --- a/packages/platform/platform-test-sdk/src/tests/testErrors.ts +++ b/packages/platform/platform-test-sdk/src/tests/testErrors.ts @@ -1,4 +1,5 @@ import "@tsed/ajv"; +import {expect, beforeAll, afterAll, it} from "vitest"; import {BodyParams, Controller, Err, Get, Middleware, PlatformTest, Post, UseAfter} from "@tsed/common"; import {Env} from "@tsed/core"; import {BadRequest, InternalServerError} from "@tsed/exceptions"; diff --git a/packages/platform/platform-test-sdk/src/tests/testHandlers.ts b/packages/platform/platform-test-sdk/src/tests/testHandlers.ts index 219aa2577b7..f4030dae7d2 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHandlers.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHandlers.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {Context, Controller, Get, PathParams, PlatformTest} from "@tsed/common"; import {Property, Required, Title} from "@tsed/schema"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts b/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts index 6d6fcd55f0d..e57aa905032 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Context, Controller, Get, HeaderParams, Locals, Middleware, PlatformTest, Post, Req, Use} from "@tsed/common"; import {Enum, Required} from "@tsed/schema"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/src/tests/testHeaders.ts b/packages/platform/platform-test-sdk/src/tests/testHeaders.ts index c1ec0b0a769..b6baf9049d3 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHeaders.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHeaders.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {BodyParams, Controller, Get, PlatformResponse, PlatformTest, Res} from "@tsed/common"; import {Returns} from "@tsed/schema"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts b/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts index 2bf7751e3a5..269fbfcf40c 100644 --- a/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts +++ b/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {BodyParams, Controller, Get, Middleware, PathParams, PlatformTest, Post, QueryParams, UseAuth} from "@tsed/common"; import {NotFound} from "@tsed/exceptions"; import {Description, MaxLength, MinLength, Property, Returns, Summary} from "@tsed/schema"; diff --git a/packages/platform/platform-test-sdk/src/tests/testLocals.ts b/packages/platform/platform-test-sdk/src/tests/testLocals.ts index d347cf8245d..9e3fb523bb9 100644 --- a/packages/platform/platform-test-sdk/src/tests/testLocals.ts +++ b/packages/platform/platform-test-sdk/src/tests/testLocals.ts @@ -1,4 +1,5 @@ -import {Context, Controller, Get, Locals, Middleware, Next, PlatformContext, PlatformTest, Req, Request, Res, Use} from "@tsed/common"; +import {expect, beforeAll, afterAll, describe, it} from "vitest"; +import {Context, Controller, Get, Locals, Middleware, PlatformContext, PlatformTest, Req, Use} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testLocation.ts b/packages/platform/platform-test-sdk/src/tests/testLocation.ts index a9999a48497..ac8086a78c6 100644 --- a/packages/platform/platform-test-sdk/src/tests/testLocation.ts +++ b/packages/platform/platform-test-sdk/src/tests/testLocation.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {Location} from "@tsed/schema"; diff --git a/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts b/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts index d14abccfa5d..32b6b8fb90a 100644 --- a/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts +++ b/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import "@tsed/ajv"; import { Context, diff --git a/packages/platform/platform-test-sdk/src/tests/testModule.ts b/packages/platform/platform-test-sdk/src/tests/testModule.ts index 0927d6042ea..2751cbc1e9d 100644 --- a/packages/platform/platform-test-sdk/src/tests/testModule.ts +++ b/packages/platform/platform-test-sdk/src/tests/testModule.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testMulter.ts b/packages/platform/platform-test-sdk/src/tests/testMulter.ts index 19617f98396..9709fa28380 100644 --- a/packages/platform/platform-test-sdk/src/tests/testMulter.ts +++ b/packages/platform/platform-test-sdk/src/tests/testMulter.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it, vi} from "vitest"; import {BodyParams, Controller, MulterOptions, MultipartFile, PlatformMulterFile, PlatformTest} from "@tsed/common"; import {CollectionOf, Post, Property, Required, Status} from "@tsed/schema"; import multer, {FileFilterCallback} from "multer"; diff --git a/packages/platform/platform-test-sdk/src/tests/testPathParams.ts b/packages/platform/platform-test-sdk/src/tests/testPathParams.ts index 8ca54ff7229..cfa4c55cbfa 100644 --- a/packages/platform/platform-test-sdk/src/tests/testPathParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testPathParams.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {Context, Controller, Get, PathParams, PlatformTest, Post} from "@tsed/common"; import {Pattern} from "@tsed/schema"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts b/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts index 4f3476ef6b4..84e4a7a4c3b 100644 --- a/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import "@tsed/ajv"; import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; import {Maximum, Minimum, Required} from "@tsed/schema"; diff --git a/packages/platform/platform-test-sdk/src/tests/testRedirect.ts b/packages/platform/platform-test-sdk/src/tests/testRedirect.ts index 22f8100154c..e2341ed1ea7 100644 --- a/packages/platform/platform-test-sdk/src/tests/testRedirect.ts +++ b/packages/platform/platform-test-sdk/src/tests/testRedirect.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, it} from "vitest"; import {Context, Controller, Get, Location, PlatformTest, Redirect} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testResponse.ts b/packages/platform/platform-test-sdk/src/tests/testResponse.ts index 7c4e1edd58b..fb7ce73c800 100644 --- a/packages/platform/platform-test-sdk/src/tests/testResponse.ts +++ b/packages/platform/platform-test-sdk/src/tests/testResponse.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Context, Controller, Get, getContext, PathParams, PlatformResponse, PlatformTest, Post, Res} from "@tsed/common"; import {CollectionOf, Enum, ForwardGroups, Groups, Ignore, Name, Property, Required, Returns, Status} from "@tsed/schema"; import axios from "axios"; diff --git a/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts b/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts index 8aaa70f2fb8..a00a55b9d66 100644 --- a/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts +++ b/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Controller, Get, PlatformContext, PlatformTest, ResponseFilter, ResponseFilterMethods} from "@tsed/common"; import {Property, Returns} from "@tsed/schema"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/src/tests/testRouting.ts b/packages/platform/platform-test-sdk/src/tests/testRouting.ts index 533c3275e82..119ac07681a 100644 --- a/packages/platform/platform-test-sdk/src/tests/testRouting.ts +++ b/packages/platform/platform-test-sdk/src/tests/testRouting.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, afterEach, it, vi} from "vitest"; import {Controller, Get, PlatformTest, Put} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts b/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts index 441a846ccd1..97eab03ffdd 100644 --- a/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts +++ b/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Controller, Get, PathParams, PlatformTest, ProviderScope, Scope, Service} from "@tsed/common"; import SuperTest from "supertest"; import {PlatformTestingSdkOpts} from "../interfaces/index.js"; diff --git a/packages/platform/platform-test-sdk/src/tests/testSession.ts b/packages/platform/platform-test-sdk/src/tests/testSession.ts index 6bb45daf685..d18edaa354b 100644 --- a/packages/platform/platform-test-sdk/src/tests/testSession.ts +++ b/packages/platform/platform-test-sdk/src/tests/testSession.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {BodyParams, Constant, Controller, Get, PlatformTest, Post, Req, Session} from "@tsed/common"; import {NotFound} from "@tsed/exceptions"; import {Allow, Email, Ignore, MinLength, Property, Required, Returns} from "@tsed/schema"; diff --git a/packages/platform/platform-test-sdk/src/tests/testStatics.ts b/packages/platform/platform-test-sdk/src/tests/testStatics.ts index 4dd8a2df810..49a98934054 100644 --- a/packages/platform/platform-test-sdk/src/tests/testStatics.ts +++ b/packages/platform/platform-test-sdk/src/tests/testStatics.ts @@ -1,3 +1,4 @@ +import {expect, beforeEach, afterEach, it} from "vitest"; import {Controller, PlatformTest} from "@tsed/common"; import {getValue} from "@tsed/core"; import {Configuration} from "@tsed/di"; diff --git a/packages/platform/platform-test-sdk/src/tests/testStream.ts b/packages/platform/platform-test-sdk/src/tests/testStream.ts index 7c1cb153038..3adbcbaf38b 100644 --- a/packages/platform/platform-test-sdk/src/tests/testStream.ts +++ b/packages/platform/platform-test-sdk/src/tests/testStream.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Controller, Get, PlatformTest} from "@tsed/common"; import {ContentType} from "@tsed/schema"; import {createReadStream} from "fs"; diff --git a/packages/platform/platform-test-sdk/src/tests/testView.ts b/packages/platform/platform-test-sdk/src/tests/testView.ts index e2de0b39d52..aa8c3a2c5f8 100644 --- a/packages/platform/platform-test-sdk/src/tests/testView.ts +++ b/packages/platform/platform-test-sdk/src/tests/testView.ts @@ -1,3 +1,4 @@ +import {expect, beforeAll, afterAll, describe, it} from "vitest"; import {Controller, Get, Locals, Middleware, PlatformTest, UseBefore} from "@tsed/common"; import {EOL} from "os"; import SuperTest from "supertest"; diff --git a/packages/platform/platform-test-sdk/tsconfig.cjs.json b/packages/platform/platform-test-sdk/tsconfig.cjs.json deleted file mode 100644 index 85004279084..00000000000 --- a/packages/platform/platform-test-sdk/tsconfig.cjs.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false, - "types": ["vite/client", "vitest/globals"] - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-test-sdk/tsconfig.esm.json b/packages/platform/platform-test-sdk/tsconfig.esm.json index e3528a4ae89..e3b07081667 100644 --- a/packages/platform/platform-test-sdk/tsconfig.esm.json +++ b/packages/platform/platform-test-sdk/tsconfig.esm.json @@ -6,11 +6,10 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, - "noEmit": false, - "types": ["vite/client", "vitest/globals"] + "noEmit": false }, "include": ["src", "src/**/*.json"], "exclude": [ diff --git a/packages/platform/platform-test-sdk/tsconfig.json b/packages/platform/platform-test-sdk/tsconfig.json index 14041cf1b89..f295c5c13fa 100644 --- a/packages/platform/platform-test-sdk/tsconfig.json +++ b/packages/platform/platform-test-sdk/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", - "noEmit": true, - "types": ["vite/client", "vitest/globals"] + "noEmit": true }, "include": [], "references": [ @@ -40,9 +39,6 @@ { "path": "../../specs/swagger/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/platform/platform-views/package.json b/packages/platform/platform-views/package.json index 2470b229194..880b423c2e1 100644 --- a/packages/platform/platform-views/package.json +++ b/packages/platform/platform-views/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/platform-views", "description": "Views module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/platform/platform-views/tsconfig.cjs.json b/packages/platform/platform-views/tsconfig.cjs.json deleted file mode 100644 index ab4caf25857..00000000000 --- a/packages/platform/platform-views/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/platform/platform-views/tsconfig.esm.json b/packages/platform/platform-views/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/platform/platform-views/tsconfig.esm.json +++ b/packages/platform/platform-views/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/platform/platform-views/tsconfig.json b/packages/platform/platform-views/tsconfig.json index 98103bc9ab6..669937d0475 100644 --- a/packages/platform/platform-views/tsconfig.json +++ b/packages/platform/platform-views/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/security/jwks/package.json b/packages/security/jwks/package.json index 725e807aafc..47eb81aaf26 100644 --- a/packages/security/jwks/package.json +++ b/packages/security/jwks/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/jwks", "description": "Utils to generate jwks pair keys", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/security/jwks/tsconfig.cjs.json b/packages/security/jwks/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/security/jwks/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/security/jwks/tsconfig.esm.json b/packages/security/jwks/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/security/jwks/tsconfig.esm.json +++ b/packages/security/jwks/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/security/jwks/tsconfig.json b/packages/security/jwks/tsconfig.json index d2f0c1fcdbd..ffa3a8cd7e1 100644 --- a/packages/security/jwks/tsconfig.json +++ b/packages/security/jwks/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json index 6dbd16d0927..95ca864ac4c 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/oidc-provider-plugin-wildcard-redirect-uri", "description": "A plugin to support wildcard in the redirect uri whitelist", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "contributors": [ { @@ -9,14 +9,13 @@ } ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.cjs.json b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.json b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.json index 2bf9a0a5895..e809eaf26cc 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.json +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../oidc-provider/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/security/oidc-provider/package.json b/packages/security/oidc-provider/package.json index b498191816e..c48f319d8de 100644 --- a/packages/security/oidc-provider/package.json +++ b/packages/security/oidc-provider/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/oidc-provider", "description": "OIDC provider package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "contributors": [ { @@ -15,14 +15,13 @@ } ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/security/oidc-provider/src/decorators/interactions.spec.ts b/packages/security/oidc-provider/src/decorators/interactions.spec.ts index 1f4683fedb9..32b61e26771 100644 --- a/packages/security/oidc-provider/src/decorators/interactions.spec.ts +++ b/packages/security/oidc-provider/src/decorators/interactions.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import "../../test/app/controllers/oidc/InteractionsCtrl"; +import "../../test/app/controllers/oidc/InteractionsCtrl.js"; describe("@Interactions", () => { beforeEach(() => diff --git a/packages/security/oidc-provider/src/services/OidcInteractionContext.ts b/packages/security/oidc-provider/src/services/OidcInteractionContext.ts index c894034a1a4..bb5e8420002 100644 --- a/packages/security/oidc-provider/src/services/OidcInteractionContext.ts +++ b/packages/security/oidc-provider/src/services/OidcInteractionContext.ts @@ -21,7 +21,8 @@ import {OidcInteractionPromptProps} from "../domain/OidcInteractionPromptProps.j import {debug} from "../utils/debug.js"; import {OidcInteractions} from "./OidcInteractions.js"; import {OidcProvider} from "./OidcProvider.js"; -import omit from "lodash/omit"; +import omit from "lodash/omit.js"; + @Injectable() export class OidcInteractionContext { @Constant("env") diff --git a/packages/security/oidc-provider/src/services/OidcProvider.spec.ts b/packages/security/oidc-provider/src/services/OidcProvider.spec.ts index 655e93a95c2..d812ad22dc3 100644 --- a/packages/security/oidc-provider/src/services/OidcProvider.spec.ts +++ b/packages/security/oidc-provider/src/services/OidcProvider.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest, runInContext} from "@tsed/common"; import {Env} from "@tsed/core"; -import "../../test/app/controllers/oidc/InteractionsCtrl"; +import "../../test/app/controllers/oidc/InteractionsCtrl.js"; import {OidcProvider} from "./OidcProvider.js"; describe("OidcProvider", () => { diff --git a/packages/security/oidc-provider/test/app/Server.ts b/packages/security/oidc-provider/test/app/Server.ts index c26426294dc..f7da9fbb390 100644 --- a/packages/security/oidc-provider/test/app/Server.ts +++ b/packages/security/oidc-provider/test/app/Server.ts @@ -1,6 +1,6 @@ import {FileSyncAdapter} from "@tsed/adapters"; import "@tsed/ajv"; -import "../../src/index"; +import "../../src/index.js"; import {Constant, PlatformApplication} from "@tsed/common"; import {Configuration, Inject} from "@tsed/di"; import "@tsed/oidc-provider"; diff --git a/packages/security/oidc-provider/tsconfig.cjs.json b/packages/security/oidc-provider/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/security/oidc-provider/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/security/oidc-provider/tsconfig.esm.json b/packages/security/oidc-provider/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/security/oidc-provider/tsconfig.esm.json +++ b/packages/security/oidc-provider/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/security/oidc-provider/tsconfig.json b/packages/security/oidc-provider/tsconfig.json index e5df0edc10d..59dd9ac6636 100644 --- a/packages/security/oidc-provider/tsconfig.json +++ b/packages/security/oidc-provider/tsconfig.json @@ -33,9 +33,6 @@ { "path": "../../orm/adapters/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/security/passport/package.json b/packages/security/passport/package.json index 5e82a327a28..b0e3a87a970 100644 --- a/packages/security/passport/package.json +++ b/packages/security/passport/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/passport", "description": "Passport package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/security/passport/src/PassportModule.spec.ts b/packages/security/passport/src/PassportModule.spec.ts index cfdf0615558..906b6b52ceb 100644 --- a/packages/security/passport/src/PassportModule.spec.ts +++ b/packages/security/passport/src/PassportModule.spec.ts @@ -1,5 +1,5 @@ import {PlatformApplication, PlatformTest} from "@tsed/common"; -import "../src/index"; +import "../src/index.js"; import {PassportModule} from "./PassportModule.js"; import Passport from "passport"; diff --git a/packages/security/passport/test/app/Server.ts b/packages/security/passport/test/app/Server.ts index b4aecd6acfd..609ca39fbf0 100644 --- a/packages/security/passport/test/app/Server.ts +++ b/packages/security/passport/test/app/Server.ts @@ -9,7 +9,7 @@ import cookieParser from "cookie-parser"; import methodOverride from "method-override"; import {AuthCtrl} from "./controllers/rest/auth/AuthCtrl.js"; import {Account} from "./models/Account.js"; -import "./protocols/LoginLocalProtocol"; +import "./protocols/LoginLocalProtocol.js"; import session from "express-session"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build diff --git a/packages/security/passport/tsconfig.cjs.json b/packages/security/passport/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/security/passport/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/security/passport/tsconfig.esm.json b/packages/security/passport/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/security/passport/tsconfig.esm.json +++ b/packages/security/passport/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/security/passport/tsconfig.json b/packages/security/passport/tsconfig.json index 3406084ab6d..811afe76b90 100644 --- a/packages/security/passport/tsconfig.json +++ b/packages/security/passport/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../platform/platform-router/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/specs/ajv/package.json b/packages/specs/ajv/package.json index 24a2a25f5ba..98c192980db 100644 --- a/packages/specs/ajv/package.json +++ b/packages/specs/ajv/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/ajv", "description": "AJV package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, @@ -34,7 +33,7 @@ "@tsed/exceptions": "workspace:*", "@tsed/schema": "workspace:*", "@tsed/typescript": "workspace:*", - "ajv": "8.12.0", + "ajv": "^8.17.1", "eslint": "^8.57.0", "typescript": "4.9.5", "vitest": "2.0.4" diff --git a/packages/specs/ajv/src/services/Ajv.ts b/packages/specs/ajv/src/services/Ajv.ts index 8bff37f1b75..67cef24c810 100644 --- a/packages/specs/ajv/src/services/Ajv.ts +++ b/packages/specs/ajv/src/services/Ajv.ts @@ -1,6 +1,6 @@ import {cleanObject} from "@tsed/core"; import {Configuration, InjectorService, ProviderScope, registerProvider} from "@tsed/di"; -import Ajv, {Format, KeywordDefinition, Options, Vocabulary} from "ajv"; +import {Ajv, Format, KeywordDefinition, Options, Vocabulary} from "ajv"; import AjvErrors from "ajv-errors"; import AjvFormats from "ajv-formats"; import {FormatsMethods} from "../interfaces/FormatsMethods.js"; @@ -53,6 +53,7 @@ function getFormats(injector: InjectorService): {name: string; options: Format}[ } registerProvider({ + // @ts-ignore provide: Ajv, deps: [Configuration, InjectorService], scope: ProviderScope.SINGLETON, @@ -68,11 +69,13 @@ registerProvider({ ...props }; + // @ts-ignore const ajv = new Ajv(options); // add support for custom error messages + // @ts-ignore AjvErrors(ajv); - + // @ts-ignore AjvFormats(ajv as any); getFormats(injector).forEach(({name, options}) => { diff --git a/packages/specs/ajv/src/services/AjvService.ts b/packages/specs/ajv/src/services/AjvService.ts index 7bb334c3a44..977f62d092f 100644 --- a/packages/specs/ajv/src/services/AjvService.ts +++ b/packages/specs/ajv/src/services/AjvService.ts @@ -1,12 +1,12 @@ import {deepClone, getValue, nameOf, prototypeOf, setValue, Type} from "@tsed/core"; import {Constant, Inject, Injectable} from "@tsed/di"; import {getJsonSchema, JsonEntityStore, JsonSchema, JsonSchemaObject} from "@tsed/schema"; -import Ajv, {ErrorObject} from "ajv"; +import {Ajv, ErrorObject} from "ajv"; import {AjvValidationError} from "../errors/AjvValidationError.js"; import {AjvErrorObject, ErrorFormatter} from "../interfaces/IAjvSettings.js"; import {defaultErrorFormatter} from "../utils/defaultErrorFormatter.js"; import {getPath} from "../utils/getPath.js"; -import "./Ajv"; +import "./Ajv.js"; export interface AjvValidateOptions extends Record { schema?: JsonSchema | Partial; @@ -24,7 +24,7 @@ export class AjvService { @Constant("ajv.returnsCoercedValues") protected returnsCoercedValues: boolean; - @Inject() + @Inject(Ajv) protected ajv: Ajv; async validate(value: any, options: AjvValidateOptions | JsonSchema): Promise { diff --git a/packages/specs/ajv/test/integration/nullable.integration.spec.ts b/packages/specs/ajv/test/integration/nullable.integration.spec.ts index db025e09a76..dccca25e7cb 100644 --- a/packages/specs/ajv/test/integration/nullable.integration.spec.ts +++ b/packages/specs/ajv/test/integration/nullable.integration.spec.ts @@ -1,7 +1,7 @@ -import "../../src/index"; -import {BodyParams, ParamTypes, ParamValidationError, PlatformTest, Post, QueryParams, UseParam, ValidationPipe} from "@tsed/common"; +import "../../src/index.js"; +import {BodyParams, ParamValidationError, PlatformTest, ValidationPipe} from "@tsed/common"; import {BadRequest} from "@tsed/exceptions"; -import {CollectionOf, getJsonSchema, JsonParameterStore, MinLength, Nullable, Property, Required, Schema, string} from "@tsed/schema"; +import {CollectionOf, JsonParameterStore, Nullable, Property} from "@tsed/schema"; async function validate(value: any, metadata: any) { const pipe: ValidationPipe = await PlatformTest.invoke(ValidationPipe); diff --git a/packages/specs/ajv/test/integration/validation.integration.spec.ts b/packages/specs/ajv/test/integration/validation.integration.spec.ts index cdd14e54d75..7067e10616d 100644 --- a/packages/specs/ajv/test/integration/validation.integration.spec.ts +++ b/packages/specs/ajv/test/integration/validation.integration.spec.ts @@ -1,4 +1,4 @@ -import "../../src/index"; +import "../../src/index.js"; import {BodyParams, ParamTypes, ParamValidationError, PlatformTest, Post, QueryParams, UseParam, ValidationPipe} from "@tsed/common"; import {BadRequest} from "@tsed/exceptions"; import {getJsonSchema, JsonParameterStore, MinLength, Property, Required, Schema} from "@tsed/schema"; diff --git a/packages/specs/ajv/tsconfig.cjs.json b/packages/specs/ajv/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/ajv/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/ajv/tsconfig.esm.json b/packages/specs/ajv/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/ajv/tsconfig.esm.json +++ b/packages/specs/ajv/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/ajv/tsconfig.json b/packages/specs/ajv/tsconfig.json index 5224fb66c32..9330fb88cd8 100644 --- a/packages/specs/ajv/tsconfig.json +++ b/packages/specs/ajv/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/specs/exceptions/package.json b/packages/specs/exceptions/package.json index bb8fe9046ee..e81af7b9a59 100644 --- a/packages/specs/exceptions/package.json +++ b/packages/specs/exceptions/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/exceptions", "description": "HTTP exceptions module for Ts.ED Framework and other pure Express application", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/specs/exceptions/tsconfig.cjs.json b/packages/specs/exceptions/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/exceptions/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/exceptions/tsconfig.esm.json b/packages/specs/exceptions/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/exceptions/tsconfig.esm.json +++ b/packages/specs/exceptions/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/exceptions/tsconfig.json b/packages/specs/exceptions/tsconfig.json index 9c04b75ffca..7862822cf7b 100644 --- a/packages/specs/exceptions/tsconfig.json +++ b/packages/specs/exceptions/tsconfig.json @@ -9,9 +9,6 @@ { "path": "../../core/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/specs/json-mapper/package.json b/packages/specs/json-mapper/package.json index 7fd71ba0b2c..20e84e05259 100644 --- a/packages/specs/json-mapper/package.json +++ b/packages/specs/json-mapper/package.json @@ -1,10 +1,10 @@ { "name": "@tsed/json-mapper", "description": "Json mapper module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/json-mapper.umd.min.js", @@ -13,7 +13,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/json-mapper.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, @@ -48,7 +47,8 @@ "@tsed/typescript": "workspace:*", "eslint": "^8.57.0", "typescript": "4.9.5", - "vitest": "2.0.4" + "vitest": "2.0.4", + "webpack": "^5.75.0" }, "peerDependencies": { "@tsed/core": "8.0.0-alpha.5", diff --git a/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts b/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts index dbb558e3206..d023b538729 100644 --- a/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts +++ b/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts @@ -25,9 +25,9 @@ import { } from "@tsed/schema"; import {Post} from "../../test/helpers/Post.js"; import {User} from "../../test/helpers/User.js"; -import "../components/DateMapper"; -import "../components/PrimitiveMapper"; -import "../components/SymbolMapper"; +import "../components/DateMapper.js"; +import "../components/PrimitiveMapper.js"; +import "../components/SymbolMapper.js"; import {OnDeserialize} from "../decorators/onDeserialize.js"; import {JsonDeserializer} from "./JsonDeserializer.js"; import {JsonMapperSettings} from "./JsonMapperSettings.js"; diff --git a/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts b/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts index 1a9f72612fb..8e158c372f2 100644 --- a/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts +++ b/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts @@ -21,9 +21,9 @@ import {snakeCase} from "change-case"; import {parse} from "querystring"; import {Post} from "../../test/helpers/Post.js"; import {User} from "../../test/helpers/User.js"; -import "../components/DateMapper"; -import "../components/PrimitiveMapper"; -import "../components/SymbolMapper"; +import "../components/DateMapper.js"; +import "../components/PrimitiveMapper.js"; +import "../components/SymbolMapper.js"; import {OnDeserialize} from "../decorators/onDeserialize.js"; import {OnSerialize} from "../decorators/onSerialize.js"; import {deserialize} from "../utils/deserialize.js"; diff --git a/packages/specs/json-mapper/src/utils/deserialize.ts b/packages/specs/json-mapper/src/utils/deserialize.ts index bda468c79a1..894d74c16d9 100644 --- a/packages/specs/json-mapper/src/utils/deserialize.ts +++ b/packages/specs/json-mapper/src/utils/deserialize.ts @@ -1,6 +1,6 @@ -import "../components/DateMapper"; -import "../components/PrimitiveMapper"; -import "../components/SymbolMapper"; +import "../components/DateMapper.js"; +import "../components/PrimitiveMapper.js"; +import "../components/SymbolMapper.js"; import {JsonDeserializer} from "../domain/JsonDeserializer.js"; import {JsonDeserializerOptions} from "../domain/JsonDeserializerOptions.js"; diff --git a/packages/specs/json-mapper/src/utils/serialize.spec.ts b/packages/specs/json-mapper/src/utils/serialize.spec.ts index 635b92e77a1..a60df3eb6a4 100644 --- a/packages/specs/json-mapper/src/utils/serialize.spec.ts +++ b/packages/specs/json-mapper/src/utils/serialize.spec.ts @@ -1,5 +1,5 @@ -import "../components/PrimitiveMapper"; import {Property} from "@tsed/schema"; +import "../components/PrimitiveMapper.js"; import {serialize} from "./serialize.js"; describe("serialize()", () => { diff --git a/packages/specs/json-mapper/src/utils/serialize.ts b/packages/specs/json-mapper/src/utils/serialize.ts index 8b476ecc3ef..c666b4c62d3 100644 --- a/packages/specs/json-mapper/src/utils/serialize.ts +++ b/packages/specs/json-mapper/src/utils/serialize.ts @@ -1,6 +1,6 @@ -import "../components/DateMapper"; -import "../components/PrimitiveMapper"; -import "../components/SymbolMapper"; +import "../components/DateMapper.js"; +import "../components/PrimitiveMapper.js"; +import "../components/SymbolMapper.js"; import {JsonSerializer} from "../domain/JsonSerializer.js"; import {JsonSerializerOptions} from "../domain/JsonSerializerOptions.js"; diff --git a/packages/specs/json-mapper/tsconfig.cjs.json b/packages/specs/json-mapper/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/json-mapper/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/json-mapper/tsconfig.esm.json b/packages/specs/json-mapper/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/json-mapper/tsconfig.esm.json +++ b/packages/specs/json-mapper/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/json-mapper/tsconfig.json b/packages/specs/json-mapper/tsconfig.json index bbccf38aa14..7a7f8e06530 100644 --- a/packages/specs/json-mapper/tsconfig.json +++ b/packages/specs/json-mapper/tsconfig.json @@ -12,9 +12,6 @@ { "path": "../schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/specs/openspec/package.json b/packages/specs/openspec/package.json index 2520f838e88..4436b4300eb 100644 --- a/packages/specs/openspec/package.json +++ b/packages/specs/openspec/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/openspec", "description": "OpenSpec2 and OpenSpec3 interfaces declarations for TypeScript application", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/specs/openspec/tsconfig.cjs.json b/packages/specs/openspec/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/openspec/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/openspec/tsconfig.esm.json b/packages/specs/openspec/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/openspec/tsconfig.esm.json +++ b/packages/specs/openspec/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/openspec/tsconfig.json b/packages/specs/openspec/tsconfig.json index 85b162f8ee8..7529eb44635 100644 --- a/packages/specs/openspec/tsconfig.json +++ b/packages/specs/openspec/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/specs/schema/package.json b/packages/specs/schema/package.json index 9c483a4f2db..918544ce54b 100644 --- a/packages/specs/schema/package.json +++ b/packages/specs/schema/package.json @@ -1,10 +1,10 @@ { "name": "@tsed/schema", "description": "JsonSchema module for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/schema.umd.min.js", @@ -13,7 +13,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/schema.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, @@ -58,7 +57,8 @@ "eslint": "^8.57.0", "picomatch-browser": "^2.2.6", "typescript": "4.9.5", - "vitest": "2.0.4" + "vitest": "2.0.4", + "webpack": "^5.75.0" }, "peerDependencies": { "@tsed/core": "8.0.0-alpha.5", diff --git a/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts b/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts index af668d922e6..dd18793bb7b 100644 --- a/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts +++ b/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts @@ -1,6 +1,6 @@ import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; import {ExclusiveMinimum} from "./exclusiveMinimum.js"; -import "../../index"; +import "../../index.js"; describe("@ExclusiveMinimum", () => { it("should declare exclusiveMinimum value", () => { diff --git a/packages/specs/schema/src/decorators/common/maximum.spec.ts b/packages/specs/schema/src/decorators/common/maximum.spec.ts index 451afed734f..d276be32dce 100644 --- a/packages/specs/schema/src/decorators/common/maximum.spec.ts +++ b/packages/specs/schema/src/decorators/common/maximum.spec.ts @@ -1,6 +1,6 @@ import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; import {CollectionOf} from "../collections/collectionOf.js"; -import "../../index"; +import "../../index.js"; import {Max} from "./maximum.js"; describe("@Maximum", () => { diff --git a/packages/specs/schema/src/decorators/common/minLength.spec.ts b/packages/specs/schema/src/decorators/common/minLength.spec.ts index f7191cbe9e9..3fb6336fb4d 100644 --- a/packages/specs/schema/src/decorators/common/minLength.spec.ts +++ b/packages/specs/schema/src/decorators/common/minLength.spec.ts @@ -1,4 +1,4 @@ -import "../../index"; +import "../../index.js"; import {validateModel} from "../../../test/helpers/validateModel.js"; import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; import {getJsonSchema} from "../../utils/getJsonSchema.js"; diff --git a/packages/specs/schema/src/decorators/common/minimum.spec.ts b/packages/specs/schema/src/decorators/common/minimum.spec.ts index ec2aa9a0940..767eee429f8 100644 --- a/packages/specs/schema/src/decorators/common/minimum.spec.ts +++ b/packages/specs/schema/src/decorators/common/minimum.spec.ts @@ -1,7 +1,7 @@ import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; import {CollectionOf} from "../collections/collectionOf.js"; import {Min} from "./minimum.js"; -import "../../index"; +import "../../index.js"; describe("@Minimum", () => { it("should declare minimum value", () => { diff --git a/packages/specs/schema/src/decorators/common/pattern.spec.ts b/packages/specs/schema/src/decorators/common/pattern.spec.ts index 00bb8f0573a..168b90303d0 100644 --- a/packages/specs/schema/src/decorators/common/pattern.spec.ts +++ b/packages/specs/schema/src/decorators/common/pattern.spec.ts @@ -1,6 +1,6 @@ import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; import {Pattern} from "./pattern.js"; -import "../../index"; +import "../../index.js"; describe("@Pattern", () => { it("should declare pattern value", () => { diff --git a/packages/specs/schema/src/utils/getJsonSchema.ts b/packages/specs/schema/src/utils/getJsonSchema.ts index f0396aeef95..a9475f2f8ba 100644 --- a/packages/specs/schema/src/utils/getJsonSchema.ts +++ b/packages/specs/schema/src/utils/getJsonSchema.ts @@ -1,5 +1,5 @@ import {getValue, Type} from "@tsed/core"; -import "../components/index"; +import "../components/index.js"; import type {JsonEntityStore} from "../domain/JsonEntityStore.js"; import {SpecTypes} from "../domain/SpecTypes.js"; import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; diff --git a/packages/specs/schema/tsconfig.cjs.json b/packages/specs/schema/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/schema/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/schema/tsconfig.esm.json b/packages/specs/schema/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/schema/tsconfig.esm.json +++ b/packages/specs/schema/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/schema/tsconfig.json b/packages/specs/schema/tsconfig.json index c5fa94bd64b..232a0d3ea1e 100644 --- a/packages/specs/schema/tsconfig.json +++ b/packages/specs/schema/tsconfig.json @@ -12,9 +12,6 @@ { "path": "../openspec/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/specs/schema/tsconfig.spec.json b/packages/specs/schema/tsconfig.spec.json index ebaeec25491..b268f367ea3 100644 --- a/packages/specs/schema/tsconfig.spec.json +++ b/packages/specs/schema/tsconfig.spec.json @@ -31,6 +31,6 @@ }, "types": ["vite/client", "vitest/globals"] }, - "include": ["src/**/*.spec.ts", "test/**/*.spec.ts", "vitest.config.mts", "vite.config.mts", "vitest.setup.mts"], + "include": ["src/**/*.spec.ts", "test/**/*.spec.ts", "vitest.config.mts"], "exclude": ["node_modules", "test", "lib", "benchmark", "coverage"] } diff --git a/packages/specs/swagger/package.json b/packages/specs/swagger/package.json index 1f2106712e4..790477e8387 100644 --- a/packages/specs/swagger/package.json +++ b/packages/specs/swagger/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/swagger", "description": "Swagger package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/specs/swagger/tsconfig.cjs.json b/packages/specs/swagger/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/specs/swagger/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/specs/swagger/tsconfig.esm.json b/packages/specs/swagger/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/specs/swagger/tsconfig.esm.json +++ b/packages/specs/swagger/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/specs/swagger/tsconfig.json b/packages/specs/swagger/tsconfig.json index 84b06b95fbe..832e5d70107 100644 --- a/packages/specs/swagger/tsconfig.json +++ b/packages/specs/swagger/tsconfig.json @@ -27,9 +27,6 @@ { "path": "../../utils/normalize-path/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/agenda/package.json b/packages/third-parties/agenda/package.json index ddde22d9388..27499e9ee5d 100644 --- a/packages/third-parties/agenda/package.json +++ b/packages/third-parties/agenda/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/agenda", "description": "Agenda package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/agenda/tsconfig.cjs.json b/packages/third-parties/agenda/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/agenda/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/agenda/tsconfig.esm.json b/packages/third-parties/agenda/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/agenda/tsconfig.esm.json +++ b/packages/third-parties/agenda/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/agenda/tsconfig.json b/packages/third-parties/agenda/tsconfig.json index 2dbe3ec968d..4540f314a24 100644 --- a/packages/third-parties/agenda/tsconfig.json +++ b/packages/third-parties/agenda/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/bullmq/package.json b/packages/third-parties/bullmq/package.json index 25f04dfe0c2..f89ce6c1684 100644 --- a/packages/third-parties/bullmq/package.json +++ b/packages/third-parties/bullmq/package.json @@ -1,21 +1,20 @@ { "name": "@tsed/bullmq", "description": "BullMQ integration for Ts.ED", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "Ts.ED", "BullMQ" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/bullmq/src/BullMQModule.spec.ts b/packages/third-parties/bullmq/src/BullMQModule.spec.ts index 1f58b6bb271..759f3ae65d5 100644 --- a/packages/third-parties/bullmq/src/BullMQModule.spec.ts +++ b/packages/third-parties/bullmq/src/BullMQModule.spec.ts @@ -3,7 +3,7 @@ import {catchAsyncError} from "@tsed/core"; import {Queue, Worker} from "bullmq"; import {anything, instance, mock, verify, when} from "ts-mockito"; -import "./BullMQModule"; +import "./BullMQModule.js"; import {BullMQModule} from "./BullMQModule.js"; import {type BullMQConfig} from "./config/config.js"; import {JobMethods} from "./contracts/index.js"; diff --git a/packages/third-parties/bullmq/tsconfig.cjs.json b/packages/third-parties/bullmq/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/bullmq/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/bullmq/tsconfig.esm.json b/packages/third-parties/bullmq/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/bullmq/tsconfig.esm.json +++ b/packages/third-parties/bullmq/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/bullmq/tsconfig.json b/packages/third-parties/bullmq/tsconfig.json index 89ec5fbddca..3f1a761d34b 100644 --- a/packages/third-parties/bullmq/tsconfig.json +++ b/packages/third-parties/bullmq/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/components-scan/package.json b/packages/third-parties/components-scan/package.json index a1ea02c6e50..0910d361cda 100644 --- a/packages/third-parties/components-scan/package.json +++ b/packages/third-parties/components-scan/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/components-scan", "description": "Components scan utilities for Ts.ED Framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/components-scan/tsconfig.cjs.json b/packages/third-parties/components-scan/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/components-scan/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/components-scan/tsconfig.esm.json b/packages/third-parties/components-scan/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/components-scan/tsconfig.esm.json +++ b/packages/third-parties/components-scan/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/components-scan/tsconfig.json b/packages/third-parties/components-scan/tsconfig.json index b2db1cddcf2..5c4ed14eb23 100644 --- a/packages/third-parties/components-scan/tsconfig.json +++ b/packages/third-parties/components-scan/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../utils/normalize-path/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/event-emitter/package.json b/packages/third-parties/event-emitter/package.json index 5cef1c9fb94..cad95e8868c 100644 --- a/packages/third-parties/event-emitter/package.json +++ b/packages/third-parties/event-emitter/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/event-emitter", "description": "EventEmitter package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "contributors": [ { @@ -9,7 +9,7 @@ } ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/event-emitter.umd.min.js", @@ -18,7 +18,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/event-emitter.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/event-emitter/src/services/EventEmitterFactory.ts b/packages/third-parties/event-emitter/src/services/EventEmitterFactory.ts index fe7eddaabd4..785ca51f069 100644 --- a/packages/third-parties/event-emitter/src/services/EventEmitterFactory.ts +++ b/packages/third-parties/event-emitter/src/services/EventEmitterFactory.ts @@ -1,6 +1,6 @@ import {Configuration, registerProvider} from "@tsed/di"; import type {ConstructorOptions} from "eventemitter2"; -import EventEmitter2 from "eventemitter2"; +import {EventEmitter2} from "eventemitter2"; export const EventEmitterService = EventEmitter2; export type EventEmitterService = EventEmitter2; diff --git a/packages/third-parties/event-emitter/test/helpers/Server.ts b/packages/third-parties/event-emitter/test/helpers/Server.ts index 3d33e4a5d62..8c62033fca8 100644 --- a/packages/third-parties/event-emitter/test/helpers/Server.ts +++ b/packages/third-parties/event-emitter/test/helpers/Server.ts @@ -5,7 +5,7 @@ import compress from "compression"; import cookieParser from "cookie-parser"; import methodOverride from "method-override"; import "@tsed/platform-express"; -import "../../src/EventEmitterModule"; +import "../../src/EventEmitterModule.js"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build diff --git a/packages/third-parties/event-emitter/tsconfig.cjs.json b/packages/third-parties/event-emitter/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/event-emitter/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/event-emitter/tsconfig.esm.json b/packages/third-parties/event-emitter/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/event-emitter/tsconfig.esm.json +++ b/packages/third-parties/event-emitter/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/event-emitter/tsconfig.json b/packages/third-parties/event-emitter/tsconfig.json index 2dbe3ec968d..4540f314a24 100644 --- a/packages/third-parties/event-emitter/tsconfig.json +++ b/packages/third-parties/event-emitter/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/formio-types/package.json b/packages/third-parties/formio-types/package.json index 831fed81ac7..887fac22ffb 100644 --- a/packages/third-parties/formio-types/package.json +++ b/packages/third-parties/formio-types/package.json @@ -1,8 +1,8 @@ { "name": "@tsed/formio-types", - "version": "8.0.0-alpha.5", "description": "Formio types definition package for Ts.ED framework", - "type": "commonjs", + "type": "module", + "version": "8.0.0-alpha.5", "keywords": [ "Formio", "Ts.ED", @@ -12,14 +12,13 @@ "express" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/formio-types/tsconfig.cjs.json b/packages/third-parties/formio-types/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/formio-types/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/formio-types/tsconfig.esm.json b/packages/third-parties/formio-types/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/formio-types/tsconfig.esm.json +++ b/packages/third-parties/formio-types/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/formio-types/tsconfig.json b/packages/third-parties/formio-types/tsconfig.json index 85b162f8ee8..7529eb44635 100644 --- a/packages/third-parties/formio-types/tsconfig.json +++ b/packages/third-parties/formio-types/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/third-parties/formio/package.json b/packages/third-parties/formio/package.json index 39bd2c7af0a..bebaeb4e7b1 100644 --- a/packages/third-parties/formio/package.json +++ b/packages/third-parties/formio/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/formio", "description": "Formio package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "Formio", @@ -12,14 +12,13 @@ "express" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/formio/src/services/FormioDatabase.ts b/packages/third-parties/formio/src/services/FormioDatabase.ts index 4c26d957b20..6a1356be703 100644 --- a/packages/third-parties/formio/src/services/FormioDatabase.ts +++ b/packages/third-parties/formio/src/services/FormioDatabase.ts @@ -2,7 +2,7 @@ import {isArray, isObject, isString, toMap as tMap} from "@tsed/core"; import {Inject, Injectable} from "@tsed/di"; import {MongooseDocument, MongooseModel} from "@tsed/mongoose"; import type {FilterQuery} from "mongoose"; -import omit from "lodash/omit"; +import omit from "lodash/omit.js"; import {FormioAction, FormioActionItem, FormioForm, FormioRole, FormioSubmission, FormioToken} from "@tsed/formio-types"; import {FormioMapper} from "../builder/FormioMapper.js"; import {isMongoId} from "../utils/isMongoId.js"; diff --git a/packages/third-parties/formio/src/services/FormioService.spec.ts b/packages/third-parties/formio/src/services/FormioService.spec.ts index 75248a0652f..230663eb602 100644 --- a/packages/third-parties/formio/src/services/FormioService.spec.ts +++ b/packages/third-parties/formio/src/services/FormioService.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import "../components/AlterAudit"; +import "../components/AlterAudit.js"; import {AlterAudit} from "../components/AlterAudit.js"; import {FormioHooksService} from "./FormioHooksService.js"; import {FormioService} from "./FormioService.js"; diff --git a/packages/third-parties/formio/test/app/Server.ts b/packages/third-parties/formio/test/app/Server.ts index df06d0a6721..45d262ff21b 100644 --- a/packages/third-parties/formio/test/app/Server.ts +++ b/packages/third-parties/formio/test/app/Server.ts @@ -9,7 +9,7 @@ import compress from "compression"; import cookieParser from "cookie-parser"; import session from "express-session"; import methodOverride from "method-override"; -import "../../src"; +import "../../src/index.js"; import template from "../template/project.json"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build diff --git a/packages/third-parties/formio/tsconfig.cjs.json b/packages/third-parties/formio/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/formio/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/formio/tsconfig.esm.json b/packages/third-parties/formio/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/formio/tsconfig.esm.json +++ b/packages/third-parties/formio/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/formio/tsconfig.json b/packages/third-parties/formio/tsconfig.json index ac80f8124da..735ba47c4a6 100644 --- a/packages/third-parties/formio/tsconfig.json +++ b/packages/third-parties/formio/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../utils/normalize-path/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/pulse/package.json b/packages/third-parties/pulse/package.json index 2394f41fd3d..5891f00ed29 100644 --- a/packages/third-parties/pulse/package.json +++ b/packages/third-parties/pulse/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/pulse", "description": "@pulsecron/pulse package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/pulse/src/PulseModule.ts b/packages/third-parties/pulse/src/PulseModule.ts index 5c67bb6f057..de8403eb90a 100644 --- a/packages/third-parties/pulse/src/PulseModule.ts +++ b/packages/third-parties/pulse/src/PulseModule.ts @@ -3,8 +3,8 @@ import {Constant, Inject, InjectorService, Module, Provider} from "@tsed/di"; import {Job, Processor, DefineOptions, JobAttributesData} from "@pulsecron/pulse"; import {v4 as uuid} from "uuid"; import {PROVIDER_TYPE_PULSE} from "./constants/constants.js"; -import {PulseStore} from "./interfaces/PulseStore"; -import {PulseService} from "./services/PulseFactory"; +import {PulseStore} from "./interfaces/PulseStore.js"; +import {PulseService} from "./services/PulseFactory.js"; @Module() export class PulseModule implements OnDestroy, AfterListen { @@ -77,17 +77,21 @@ export class PulseModule implements OnDestroy, AfterListen { } define(name: string, processor: Processor, options?: DefineOptions) { - return this.pulse.define(name, (job: Job, ...rest) => { - const $ctx = new DIContext({ - injector: this.injector, - id: uuid(), - logger: this.injector.logger - }); + return this.pulse.define( + name, + (job: Job, ...rest) => { + const $ctx = new DIContext({ + injector: this.injector, + id: uuid(), + logger: this.injector.logger + }); - $ctx.set("job", job); + $ctx.set("job", job); - return runInContext($ctx, () => processor(job, ...rest)); - }, options); + return runInContext($ctx, () => processor(job, ...rest)); + }, + options + ); } every(interval: string, name: string, data?: any, options?: any) { diff --git a/packages/third-parties/pulse/src/decorators/define.ts b/packages/third-parties/pulse/src/decorators/define.ts index 84689a01d53..3bdf74e077a 100644 --- a/packages/third-parties/pulse/src/decorators/define.ts +++ b/packages/third-parties/pulse/src/decorators/define.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {PulseStore, DefineOptions} from "../interfaces/PulseStore"; +import {PulseStore, DefineOptions} from "../interfaces/PulseStore.js"; export function Define(options: DefineOptions = {}): MethodDecorator { return (target: any, propertyKey: string) => { diff --git a/packages/third-parties/pulse/src/decorators/every.ts b/packages/third-parties/pulse/src/decorators/every.ts index fccfb3bda97..290bdd09e98 100644 --- a/packages/third-parties/pulse/src/decorators/every.ts +++ b/packages/third-parties/pulse/src/decorators/every.ts @@ -1,6 +1,6 @@ import {Store, useDecorators} from "@tsed/core"; import {Define} from "./define.js"; -import {PulseStore, EveryOptions} from "../interfaces/PulseStore"; +import {PulseStore, EveryOptions} from "../interfaces/PulseStore.js"; export function Every(interval: string, options: EveryOptions = {}): MethodDecorator { return useDecorators(Define(options), (target: any, propertyKey: string) => { diff --git a/packages/third-parties/pulse/tsconfig.cjs.json b/packages/third-parties/pulse/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/pulse/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/pulse/tsconfig.esm.json b/packages/third-parties/pulse/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/pulse/tsconfig.esm.json +++ b/packages/third-parties/pulse/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/pulse/tsconfig.json b/packages/third-parties/pulse/tsconfig.json index 2dbe3ec968d..4540f314a24 100644 --- a/packages/third-parties/pulse/tsconfig.json +++ b/packages/third-parties/pulse/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/schema-formio/package.json b/packages/third-parties/schema-formio/package.json index 6066e1862df..4ec1aef7855 100644 --- a/packages/third-parties/schema-formio/package.json +++ b/packages/third-parties/schema-formio/package.json @@ -1,10 +1,10 @@ { "name": "@tsed/schema-formio", "description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "browser": "./lib/browser/schema-formio.umd.min.js", @@ -13,7 +13,6 @@ "types": "./lib/types/index.d.ts", "browser": "./lib/browser/schema-formio.umd.min.js", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts b/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts index fc1f2bf567d..ddb6d09e34b 100644 --- a/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts +++ b/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts @@ -4,19 +4,19 @@ import {FormioForm} from "@tsed/formio-types"; import {execMapper} from "../registries/FormioMappersContainer.js"; import {FormsContainer} from "../registries/FormsContainer.js"; import {paramCase} from "change-case"; -import "../components/anyToComponent"; -import "../components/arrayToComponent"; -import "../components/booleanToComponent"; -import "../components/dateToComponent"; -import "../components/defaultToComponent"; -import "../components/enumToComponent"; -import "../components/mapToComponent"; -import "../components/nestedToComponent"; -import "../components/numberToComponent"; -import "../components/objectToEditGrid"; -import "../components/panelToComponent"; -import "../components/propertiesToComponents"; -import "../components/stringToComponent"; +import "../components/anyToComponent.js"; +import "../components/arrayToComponent.js"; +import "../components/booleanToComponent.js"; +import "../components/dateToComponent.js"; +import "../components/defaultToComponent.js"; +import "../components/enumToComponent.js"; +import "../components/mapToComponent.js"; +import "../components/nestedToComponent.js"; +import "../components/numberToComponent.js"; +import "../components/objectToEditGrid.js"; +import "../components/panelToComponent.js"; +import "../components/propertiesToComponents.js"; +import "../components/stringToComponent.js"; export async function getFormioSchema( model: string | any | undefined, diff --git a/packages/third-parties/schema-formio/tsconfig.cjs.json b/packages/third-parties/schema-formio/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/schema-formio/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/schema-formio/tsconfig.esm.json b/packages/third-parties/schema-formio/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/schema-formio/tsconfig.esm.json +++ b/packages/third-parties/schema-formio/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/schema-formio/tsconfig.json b/packages/third-parties/schema-formio/tsconfig.json index 08748acb934..7c7c590b346 100644 --- a/packages/third-parties/schema-formio/tsconfig.json +++ b/packages/third-parties/schema-formio/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../formio-types/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/socketio-testing/package.json b/packages/third-parties/socketio-testing/package.json index 1b6d56db50f..f740ddf49b0 100644 --- a/packages/third-parties/socketio-testing/package.json +++ b/packages/third-parties/socketio-testing/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/socketio-testing", "description": "Socket.io testing package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/socketio-testing/tsconfig.cjs.json b/packages/third-parties/socketio-testing/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/socketio-testing/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/socketio-testing/tsconfig.esm.json b/packages/third-parties/socketio-testing/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/socketio-testing/tsconfig.esm.json +++ b/packages/third-parties/socketio-testing/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/socketio-testing/tsconfig.json b/packages/third-parties/socketio-testing/tsconfig.json index 250467edb65..a518f91af34 100644 --- a/packages/third-parties/socketio-testing/tsconfig.json +++ b/packages/third-parties/socketio-testing/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" } diff --git a/packages/third-parties/socketio/package.json b/packages/third-parties/socketio/package.json index 6d80d877dbe..e98e587e5a1 100644 --- a/packages/third-parties/socketio/package.json +++ b/packages/third-parties/socketio/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/socketio", "description": "Socket.io package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "tsed", @@ -11,14 +11,13 @@ "realtime" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/socketio/tsconfig.cjs.json b/packages/third-parties/socketio/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/socketio/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/socketio/tsconfig.esm.json b/packages/third-parties/socketio/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/socketio/tsconfig.esm.json +++ b/packages/third-parties/socketio/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/socketio/tsconfig.json b/packages/third-parties/socketio/tsconfig.json index 033124cc77f..5b691cff932 100644 --- a/packages/third-parties/socketio/tsconfig.json +++ b/packages/third-parties/socketio/tsconfig.json @@ -30,9 +30,6 @@ { "path": "../socketio-testing/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/sse/package.json b/packages/third-parties/sse/package.json index b95fb6175db..f470b0fc7c3 100644 --- a/packages/third-parties/sse/package.json +++ b/packages/third-parties/sse/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/sse", "description": "Server-sent events package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "tsed", @@ -11,14 +11,13 @@ "realtime" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/sse/src/decorators/eventStream.ts b/packages/third-parties/sse/src/decorators/eventStream.ts index 2c4256f624b..67f6fd1805f 100644 --- a/packages/third-parties/sse/src/decorators/eventStream.ts +++ b/packages/third-parties/sse/src/decorators/eventStream.ts @@ -1,7 +1,7 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Use} from "@tsed/platform-middlewares"; import {Header, AcceptMime} from "@tsed/schema"; -import {EventStreamMiddleware} from "../middlewares/EventStreamMiddleware"; +import {EventStreamMiddleware} from "../middlewares/EventStreamMiddleware.js"; export interface EventStreamOpts { headers?: Record; diff --git a/packages/third-parties/sse/src/decorators/eventStreamCtx.ts b/packages/third-parties/sse/src/decorators/eventStreamCtx.ts index a38eac5fa36..74a8cf9bd8d 100644 --- a/packages/third-parties/sse/src/decorators/eventStreamCtx.ts +++ b/packages/third-parties/sse/src/decorators/eventStreamCtx.ts @@ -1,5 +1,5 @@ import {Context} from "@tsed/platform-params"; -import type {EventStreamContext} from "../domain/EventStreamContext"; +import type {EventStreamContext} from "../domain/EventStreamContext.js"; export type EventStreamCtx = EventStreamContext; diff --git a/packages/third-parties/sse/src/domain/EventStreamContext.ts b/packages/third-parties/sse/src/domain/EventStreamContext.ts index 6e2bd2dedf6..bd00ecc7c14 100644 --- a/packages/third-parties/sse/src/domain/EventStreamContext.ts +++ b/packages/third-parties/sse/src/domain/EventStreamContext.ts @@ -3,7 +3,7 @@ import {isBoolean, isDate, isNumber, isString} from "@tsed/core"; import {PlatformResponseFilter} from "@tsed/platform-response-filter"; import type {EventEmitter} from "events"; import type {Observable} from "rxjs"; -import type {EventStreamOpts} from "../decorators/eventStream"; +import type {EventStreamOpts} from "../decorators/eventStream.js"; export type EventStreamContextOptions = { $ctx: PlatformContext; diff --git a/packages/third-parties/sse/src/interceptors/EventStreamInterceptor.ts b/packages/third-parties/sse/src/interceptors/EventStreamInterceptor.ts index de90cdf1a23..ebabc40f211 100644 --- a/packages/third-parties/sse/src/interceptors/EventStreamInterceptor.ts +++ b/packages/third-parties/sse/src/interceptors/EventStreamInterceptor.ts @@ -4,7 +4,7 @@ import {isStream, isObservable} from "@tsed/core"; import type {InterceptorContext, InterceptorMethods} from "@tsed/di"; import {Injectable} from "@tsed/di"; import type {Observable} from "rxjs"; -import {EventStreamContext} from "../domain/EventStreamContext"; +import {EventStreamContext} from "../domain/EventStreamContext.js"; @Injectable() export class EventStreamInterceptor implements InterceptorMethods { diff --git a/packages/third-parties/sse/src/middlewares/EventStreamMiddleware.ts b/packages/third-parties/sse/src/middlewares/EventStreamMiddleware.ts index dd2be85eb4e..f18c46f9073 100644 --- a/packages/third-parties/sse/src/middlewares/EventStreamMiddleware.ts +++ b/packages/third-parties/sse/src/middlewares/EventStreamMiddleware.ts @@ -1,6 +1,6 @@ import {Context, PlatformContext} from "@tsed/common"; import {Middleware} from "@tsed/platform-middlewares"; -import {EventStreamContext} from "../domain/EventStreamContext"; +import {EventStreamContext} from "../domain/EventStreamContext.js"; @Middleware() export class EventStreamMiddleware { diff --git a/packages/third-parties/sse/tsconfig.cjs.json b/packages/third-parties/sse/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/sse/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/sse/tsconfig.esm.json b/packages/third-parties/sse/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/sse/tsconfig.esm.json +++ b/packages/third-parties/sse/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/sse/tsconfig.json b/packages/third-parties/sse/tsconfig.json index 033124cc77f..5b691cff932 100644 --- a/packages/third-parties/sse/tsconfig.json +++ b/packages/third-parties/sse/tsconfig.json @@ -30,9 +30,6 @@ { "path": "../socketio-testing/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/sse/tsconfig.spec.json b/packages/third-parties/sse/tsconfig.spec.json index 72ed09f60ce..b2e248f2c69 100644 --- a/packages/third-parties/sse/tsconfig.spec.json +++ b/packages/third-parties/sse/tsconfig.spec.json @@ -27,11 +27,11 @@ "@tsed/platform-cache": ["../../platform/platform-cache/src"], "@tsed/swagger": ["../../specs/swagger/src"], "@tsed/platform-test-sdk": ["../../platform/platform-test-sdk/src"], - "@tsed/platform-koa": ["../../platform/platform-koa/src"], - "@tsed/platform-express": ["../../platform/platform-express/src"] + "@tsed/platform-express": ["../../platform/platform-express/src"], + "@tsed/platform-koa": ["../../platform/platform-koa/src"] }, "types": ["vite/client", "vitest/globals"] }, - "include": ["src/**/*.spec.ts", "test/**/*.spec.ts"], + "include": ["src/**/*.spec.ts", "test/**/*.spec.ts", "vitest.config.mts"], "exclude": ["node_modules", "test", "lib", "benchmark", "coverage"] } diff --git a/packages/third-parties/stripe/package.json b/packages/third-parties/stripe/package.json index 964809b43fb..50771ea516d 100644 --- a/packages/third-parties/stripe/package.json +++ b/packages/third-parties/stripe/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/stripe", "description": "Stripe package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "keywords": [ "Stripe", @@ -13,14 +13,13 @@ "koa" ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts index ce1c8588721..8b8582e37d7 100644 --- a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts +++ b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata, PlatformTest} from "@tsed/common"; import {catchError} from "@tsed/core"; -import "../index"; +import "../index.js"; import {Stripe} from "stripe"; import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants.js"; import {WebhookEventMiddleware} from "./WebhookEventMiddleware.js"; diff --git a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts index d8a9c52b73b..a9afb8bdda9 100644 --- a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts +++ b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts @@ -4,7 +4,7 @@ import {Constant, Inject} from "@tsed/di"; import {BadRequest, InternalServerError} from "@tsed/exceptions"; import {Stripe} from "stripe"; import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants.js"; -import "../services/StripeFactory"; +import "../services/StripeFactory.js"; export interface WebhookEventOptions { secret: string; diff --git a/packages/third-parties/stripe/src/services/StripeFactory.spec.ts b/packages/third-parties/stripe/src/services/StripeFactory.spec.ts index 9ee9e1eca83..230d34d0265 100644 --- a/packages/third-parties/stripe/src/services/StripeFactory.spec.ts +++ b/packages/third-parties/stripe/src/services/StripeFactory.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import "../index"; +import "../index.js"; import {Stripe} from "stripe"; describe("StripeFactory", () => { diff --git a/packages/third-parties/stripe/tsconfig.cjs.json b/packages/third-parties/stripe/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/stripe/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/stripe/tsconfig.esm.json b/packages/third-parties/stripe/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/stripe/tsconfig.esm.json +++ b/packages/third-parties/stripe/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/stripe/tsconfig.json b/packages/third-parties/stripe/tsconfig.json index 182d1be2631..762a5d04129 100644 --- a/packages/third-parties/stripe/tsconfig.json +++ b/packages/third-parties/stripe/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/temporal/package.json b/packages/third-parties/temporal/package.json index 1e69e737211..1a0af992a30 100644 --- a/packages/third-parties/temporal/package.json +++ b/packages/third-parties/temporal/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/temporal", "description": "Temporal.io package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/temporal/tsconfig.cjs.json b/packages/third-parties/temporal/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/temporal/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/temporal/tsconfig.esm.json b/packages/third-parties/temporal/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/temporal/tsconfig.esm.json +++ b/packages/third-parties/temporal/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/temporal/tsconfig.json b/packages/third-parties/temporal/tsconfig.json index 2dbe3ec968d..4540f314a24 100644 --- a/packages/third-parties/temporal/tsconfig.json +++ b/packages/third-parties/temporal/tsconfig.json @@ -15,9 +15,6 @@ { "path": "../../di/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/terminus/package.json b/packages/third-parties/terminus/package.json index c35bab54560..bf092b89ac9 100644 --- a/packages/third-parties/terminus/package.json +++ b/packages/third-parties/terminus/package.json @@ -1,18 +1,17 @@ { "name": "@tsed/terminus", "description": "Adds graceful shutdown and Kubernetes readiness / liveness checks for any HTTP applications.", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "author": "Emilien Leroy ", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/terminus/test/app/Server.ts b/packages/third-parties/terminus/test/app/Server.ts index 9536fe8db11..3e3e2852df9 100644 --- a/packages/third-parties/terminus/test/app/Server.ts +++ b/packages/third-parties/terminus/test/app/Server.ts @@ -5,8 +5,8 @@ import "@tsed/terminus"; import bodyParser from "body-parser"; import cookieParser from "cookie-parser"; import {Application} from "express"; -import "./services/MongoClient"; -import "./services/RedisClient"; +import "./services/MongoClient.js"; +import "./services/RedisClient.js"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build export {rootDir}; diff --git a/packages/third-parties/terminus/tsconfig.cjs.json b/packages/third-parties/terminus/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/terminus/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/terminus/tsconfig.esm.json b/packages/third-parties/terminus/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/terminus/tsconfig.esm.json +++ b/packages/third-parties/terminus/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/terminus/tsconfig.json b/packages/third-parties/terminus/tsconfig.json index 89ec5fbddca..3f1a761d34b 100644 --- a/packages/third-parties/terminus/tsconfig.json +++ b/packages/third-parties/terminus/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/schema/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/third-parties/vike/package.json b/packages/third-parties/vike/package.json index 74cb061fcf3..43521173b4a 100644 --- a/packages/third-parties/vike/package.json +++ b/packages/third-parties/vike/package.json @@ -1,7 +1,7 @@ { "name": "@tsed/vike", "description": "Vike package for Ts.ED framework", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "contributors": [ { @@ -9,14 +9,13 @@ } ], "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/third-parties/vike/tsconfig.cjs.json b/packages/third-parties/vike/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/third-parties/vike/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/vike/tsconfig.esm.json b/packages/third-parties/vike/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/third-parties/vike/tsconfig.esm.json +++ b/packages/third-parties/vike/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/third-parties/vike/tsconfig.json b/packages/third-parties/vike/tsconfig.json index 7b438b2d2e1..0450d79f186 100644 --- a/packages/third-parties/vike/tsconfig.json +++ b/packages/third-parties/vike/tsconfig.json @@ -18,9 +18,6 @@ { "path": "../../specs/exceptions/tsconfig.json" }, - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/packages/utils/normalize-path/package.json b/packages/utils/normalize-path/package.json index 3a0af185a34..715b1585697 100644 --- a/packages/utils/normalize-path/package.json +++ b/packages/utils/normalize-path/package.json @@ -1,17 +1,16 @@ { "name": "@tsed/normalize-path", "description": "Utils to normalize path", - "type": "commonjs", + "type": "module", "version": "8.0.0-alpha.5", "source": "./src/index.ts", - "main": "./lib/cjs/index.js", + "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", "typings": "./lib/types/index.d.ts", "exports": { ".": { "types": "./lib/types/index.d.ts", "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", "default": "./lib/cjs/index.js" } }, diff --git a/packages/utils/normalize-path/tsconfig.cjs.json b/packages/utils/normalize-path/tsconfig.cjs.json deleted file mode 100644 index 7f23b116d2b..00000000000 --- a/packages/utils/normalize-path/tsconfig.cjs.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "@tsed/typescript/tsconfig.node.json", - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "moduleResolution": "Node16", - "rootDir": "src", - "outDir": "./lib/cjs", - "declaration": true, - "declarationDir": "./lib/types", - "composite": true, - "noEmit": false - }, - "include": ["src", "src/**/*.json"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "**/__mock__/**", - "webpack.config.js" - ] -} diff --git a/packages/utils/normalize-path/tsconfig.esm.json b/packages/utils/normalize-path/tsconfig.esm.json index ce32a9e0718..e3b07081667 100644 --- a/packages/utils/normalize-path/tsconfig.esm.json +++ b/packages/utils/normalize-path/tsconfig.esm.json @@ -6,7 +6,7 @@ "moduleResolution": "nodenext", "rootDir": "src", "outDir": "./lib/esm", - "declarationDir": "./lib/types-esm", + "declarationDir": "./lib/types", "declaration": true, "composite": true, "noEmit": false diff --git a/packages/utils/normalize-path/tsconfig.json b/packages/utils/normalize-path/tsconfig.json index d2f0c1fcdbd..ffa3a8cd7e1 100644 --- a/packages/utils/normalize-path/tsconfig.json +++ b/packages/utils/normalize-path/tsconfig.json @@ -6,9 +6,6 @@ }, "include": [], "references": [ - { - "path": "./tsconfig.cjs.json" - }, { "path": "./tsconfig.esm.json" }, diff --git a/scripts/npm/generate-package.sh b/scripts/npm/generate-package.sh deleted file mode 100644 index dcd64e1148c..00000000000 --- a/scripts/npm/generate-package.sh +++ /dev/null @@ -1,10 +0,0 @@ -cat >./lib/cjs/package.json <./lib/esm/package.json <