From b45585b405e1069f20e265b9d5b85e4560e32b47 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Sun, 19 Mar 2023 19:34:27 +0100 Subject: [PATCH] ci: use references in tsconfig --- .eslintignore | 2 + .eslintrc.js | 3 + .github/workflows/build.yml | 52 ++--- jest.config.js | 4 +- package.json | 11 +- packages/core/.eslintignore | 13 ++ packages/core/.eslintrc.js | 1 + packages/core/jest.config.js | 2 +- packages/core/package.json | 17 +- ...fig.compile.esm.json => tsconfig.cjs.json} | 17 +- packages/core/tsconfig.compile.json | 9 - .../tsconfig.esm.json} | 11 +- packages/core/tsconfig.json | 18 ++ packages/di/.eslintignore | 13 ++ packages/di/.eslintrc.js | 1 + packages/di/jest.config.js | 2 +- packages/di/package.json | 16 +- packages/di/tsconfig.cjs.json | 36 ++++ packages/di/tsconfig.compile.json | 22 --- packages/di/tsconfig.esm.json | 36 ++++ packages/di/tsconfig.json | 18 ++ packages/engines/.eslintignore | 13 ++ packages/engines/.eslintrc.js | 1 + packages/engines/package.json | 16 +- .../tsconfig.cjs.json} | 17 +- packages/engines/tsconfig.compile.json | 22 --- .../tsconfig.esm.json} | 11 +- packages/engines/tsconfig.json | 18 ++ packages/graphql/apollo/.eslintignore | 13 ++ packages/graphql/apollo/.eslintrc.js | 1 + packages/graphql/apollo/jest.config.js | 2 +- packages/graphql/apollo/package.json | 16 +- packages/graphql/apollo/tsconfig.cjs.json | 39 ++++ .../graphql/apollo/tsconfig.compile.esm.json | 12 -- packages/graphql/apollo/tsconfig.compile.json | 9 - packages/graphql/apollo/tsconfig.esm.json | 39 ++++ packages/graphql/apollo/tsconfig.json | 18 ++ packages/graphql/typegraphql/.eslintignore | 13 ++ packages/graphql/typegraphql/.eslintrc.js | 1 + packages/graphql/typegraphql/jest.config.js | 6 +- packages/graphql/typegraphql/package.json | 20 +- .../graphql/typegraphql/tsconfig.cjs.json | 39 ++++ .../typegraphql/tsconfig.compile.esm.json | 12 -- .../graphql/typegraphql/tsconfig.compile.json | 9 - .../graphql/typegraphql/tsconfig.esm.json | 39 ++++ packages/graphql/typegraphql/tsconfig.json | 18 ++ packages/orm/adapters-redis/.eslintignore | 13 ++ packages/orm/adapters-redis/.eslintrc.js | 1 + packages/orm/adapters-redis/jest.config.js | 2 +- packages/orm/adapters-redis/package.json | 16 +- packages/orm/adapters-redis/tsconfig.cjs.json | 45 +++++ .../adapters-redis/tsconfig.compile.esm.json | 12 -- .../orm/adapters-redis/tsconfig.compile.json | 9 - packages/orm/adapters-redis/tsconfig.esm.json | 45 +++++ packages/orm/adapters-redis/tsconfig.json | 18 ++ packages/orm/adapters/.eslintignore | 13 ++ packages/orm/adapters/.eslintrc.js | 1 + packages/orm/adapters/jest.config.js | 6 +- packages/orm/adapters/package.json | 16 +- packages/orm/adapters/tsconfig.cjs.json | 48 +++++ .../orm/adapters/tsconfig.compile.esm.json | 12 -- packages/orm/adapters/tsconfig.compile.json | 9 - packages/orm/adapters/tsconfig.esm.json | 48 +++++ packages/orm/adapters/tsconfig.json | 18 ++ packages/orm/ioredis/.eslintignore | 13 ++ packages/orm/ioredis/.eslintrc.js | 1 + packages/orm/ioredis/jest.config.js | 2 +- packages/orm/ioredis/package.json | 16 +- packages/orm/ioredis/tsconfig.cjs.json | 36 ++++ .../orm/ioredis/tsconfig.compile.esm.json | 12 -- packages/orm/ioredis/tsconfig.compile.json | 9 - packages/orm/ioredis/tsconfig.esm.json | 36 ++++ packages/orm/ioredis/tsconfig.json | 18 ++ packages/orm/mikro-orm/.eslintignore | 13 ++ packages/orm/mikro-orm/.eslintrc.js | 1 + packages/orm/mikro-orm/jest.config.js | 3 +- packages/orm/mikro-orm/package.json | 16 +- packages/orm/mikro-orm/tsconfig.cjs.json | 48 +++++ .../orm/mikro-orm/tsconfig.compile.esm.json | 12 -- packages/orm/mikro-orm/tsconfig.compile.json | 8 - packages/orm/mikro-orm/tsconfig.esm.json | 48 +++++ packages/orm/mikro-orm/tsconfig.json | 18 ++ packages/orm/mongoose/.eslintignore | 13 ++ packages/orm/mongoose/.eslintrc.js | 1 + packages/orm/mongoose/jest.config.js | 6 +- packages/orm/mongoose/package.json | 16 +- packages/orm/mongoose/tsconfig.cjs.json | 45 +++++ .../orm/mongoose/tsconfig.compile.esm.json | 13 -- packages/orm/mongoose/tsconfig.compile.json | 10 - packages/orm/mongoose/tsconfig.esm.json | 45 +++++ packages/orm/mongoose/tsconfig.json | 18 ++ packages/orm/objection/.eslintignore | 13 ++ packages/orm/objection/.eslintrc.js | 1 + packages/orm/objection/jest.config.js | 6 +- packages/orm/objection/package.json | 16 +- packages/orm/objection/tsconfig.cjs.json | 45 +++++ .../orm/objection/tsconfig.compile.esm.json | 12 -- packages/orm/objection/tsconfig.compile.json | 9 - packages/orm/objection/tsconfig.esm.json | 45 +++++ packages/orm/objection/tsconfig.json | 18 ++ packages/orm/prisma/.eslintignore | 13 ++ packages/orm/prisma/.eslintrc.js | 1 + packages/orm/prisma/jest.config.js | 2 +- packages/orm/prisma/package.json | 16 +- packages/orm/prisma/tsconfig.cjs.json | 42 ++++ packages/orm/prisma/tsconfig.compile.esm.json | 25 --- packages/orm/prisma/tsconfig.compile.json | 22 --- packages/orm/prisma/tsconfig.esm.json | 42 ++++ packages/orm/prisma/tsconfig.json | 18 ++ packages/orm/testing-mongoose/.eslintignore | 13 ++ packages/orm/testing-mongoose/.eslintrc.js | 1 + packages/orm/testing-mongoose/package.json | 14 +- .../orm/testing-mongoose/tsconfig.cjs.json | 39 ++++ .../tsconfig.compile.esm.json | 12 -- .../testing-mongoose/tsconfig.compile.json | 9 - .../orm/testing-mongoose/tsconfig.esm.json | 39 ++++ packages/orm/testing-mongoose/tsconfig.json | 18 ++ packages/orm/typeorm/.eslintignore | 13 ++ packages/orm/typeorm/.eslintrc.js | 1 + packages/orm/typeorm/jest.config.js | 6 +- packages/orm/typeorm/package.json | 16 +- packages/orm/typeorm/tsconfig.cjs.json | 42 ++++ .../orm/typeorm/tsconfig.compile.esm.json | 12 -- packages/orm/typeorm/tsconfig.compile.json | 8 - packages/orm/typeorm/tsconfig.esm.json | 42 ++++ packages/orm/typeorm/tsconfig.json | 18 ++ packages/perf/.eslintignore | 13 ++ packages/perf/.eslintrc.js | 1 + packages/perf/package.json | 15 +- packages/perf/tsconfig.cjs.json | 33 ++++ packages/perf/tsconfig.compile.esm.json | 12 -- packages/perf/tsconfig.compile.json | 9 - packages/perf/tsconfig.esm.json | 33 ++++ packages/perf/tsconfig.json | 18 ++ packages/platform/common/.eslintignore | 13 ++ packages/platform/common/.eslintrc.js | 1 + packages/platform/common/jest.config.js | 6 +- packages/platform/common/package.json | 21 +- packages/platform/common/tsconfig.cjs.json | 69 +++++++ .../platform/common/tsconfig.compile.esm.json | 13 -- .../platform/common/tsconfig.compile.json | 10 - packages/platform/common/tsconfig.esm.json | 69 +++++++ packages/platform/common/tsconfig.json | 18 ++ packages/platform/platform-aws/jest.config.js | 14 -- .../platform/platform-cache/.eslintignore | 13 ++ packages/platform/platform-cache/.eslintrc.js | 1 + .../platform/platform-cache/jest.config.js | 6 +- packages/platform/platform-cache/package.json | 16 +- .../platform/platform-cache/tsconfig.cjs.json | 42 ++++ .../platform-cache/tsconfig.compile.esm.json | 12 -- .../platform-cache/tsconfig.compile.json | 9 - .../platform/platform-cache/tsconfig.esm.json | 42 ++++ .../platform/platform-cache/tsconfig.json | 18 ++ .../platform-exceptions/.eslintignore | 13 ++ .../platform/platform-exceptions/.eslintrc.js | 1 + .../platform-exceptions/jest.config.js | 2 +- .../platform/platform-exceptions/package.json | 16 +- .../platform-exceptions/tsconfig.cjs.json | 42 ++++ .../tsconfig.compile.esm.json | 12 -- .../platform-exceptions/tsconfig.compile.json | 9 - .../platform-exceptions/tsconfig.esm.json | 42 ++++ .../platform-exceptions/tsconfig.json | 18 ++ .../platform/platform-express/.eslintignore | 13 ++ .../platform/platform-express/.eslintrc.js | 1 + .../platform/platform-express/jest.config.js | 6 +- .../platform/platform-express/package.json | 20 +- .../platform-express/tsconfig.cjs.json | 54 +++++ .../tsconfig.compile.esm.json | 12 -- .../platform-express/tsconfig.compile.json | 9 - .../platform-express/tsconfig.esm.json | 54 +++++ .../platform/platform-express/tsconfig.json | 18 ++ packages/platform/platform-koa/.eslintignore | 13 ++ packages/platform/platform-koa/.eslintrc.js | 1 + packages/platform/platform-koa/jest.config.js | 6 +- packages/platform/platform-koa/package.json | 18 +- .../platform/platform-koa/tsconfig.cjs.json | 51 +++++ .../platform-koa/tsconfig.compile.esm.json | 12 -- .../platform-koa/tsconfig.compile.json | 9 - .../platform/platform-koa/tsconfig.esm.json | 51 +++++ packages/platform/platform-koa/tsconfig.json | 18 ++ .../platform-log-middleware/.eslintignore | 13 ++ .../platform-log-middleware/.eslintrc.js | 1 + .../platform-log-middleware/jest.config.js | 2 +- .../platform-log-middleware/package.json | 16 +- .../platform-log-middleware/tsconfig.cjs.json | 39 ++++ .../tsconfig.compile.esm.json | 13 -- .../tsconfig.compile.json | 10 - .../platform-log-middleware/tsconfig.esm.json | 39 ++++ .../platform-log-middleware/tsconfig.json | 18 ++ .../platform-middlewares/.eslintignore | 13 ++ .../platform-middlewares/.eslintrc.js | 1 + .../platform-middlewares/jest.config.js | 2 +- .../platform-middlewares/package.json | 16 +- .../platform-middlewares/tsconfig.cjs.json | 39 ++++ .../tsconfig.compile.esm.json | 12 -- .../tsconfig.compile.json | 9 - .../platform-middlewares/tsconfig.esm.json | 39 ++++ .../platform-middlewares/tsconfig.json | 18 ++ .../platform/platform-params/.eslintignore | 13 ++ .../platform/platform-params/.eslintrc.js | 1 + .../platform/platform-params/jest.config.js | 2 +- .../platform/platform-params/package.json | 16 +- .../platform-params/tsconfig.cjs.json | 45 +++++ .../platform-params/tsconfig.compile.esm.json | 12 -- .../platform-params/tsconfig.compile.json | 9 - .../platform-params/tsconfig.esm.json | 45 +++++ .../platform/platform-params/tsconfig.json | 18 ++ .../platform-response-filter/.eslintignore | 13 ++ .../platform-response-filter/.eslintrc.js | 1 + .../platform-response-filter/jest.config.js | 2 +- .../platform-response-filter/package.json | 16 +- .../tsconfig.cjs.json | 45 +++++ .../tsconfig.compile.esm.json | 12 -- .../tsconfig.compile.json | 9 - .../tsconfig.esm.json | 45 +++++ .../platform-response-filter/tsconfig.json | 18 ++ .../platform/platform-router/.eslintignore | 13 ++ .../platform/platform-router/.eslintrc.js | 1 + .../platform/platform-router/jest.config.js | 6 +- .../platform/platform-router/package.json | 16 +- .../platform-router/tsconfig.cjs.json | 48 +++++ .../platform-router/tsconfig.compile.esm.json | 12 -- .../platform-router/tsconfig.compile.json | 9 - .../platform-router/tsconfig.esm.json | 48 +++++ .../platform/platform-router/tsconfig.json | 18 ++ .../platform-serverless-http/.eslintignore | 13 ++ .../platform-serverless-http/.eslintrc.js | 1 + .../platform-serverless-http/jest.config.js | 6 +- .../platform-serverless-http/package.json | 16 +- .../tsconfig.cjs.json | 51 +++++ .../tsconfig.compile.esm.json | 12 -- .../tsconfig.compile.json | 9 - .../tsconfig.esm.json | 51 +++++ .../platform-serverless-http/tsconfig.json | 18 ++ .../platform-serverless-testing/.eslintignore | 13 ++ .../platform-serverless-testing/.eslintrc.js | 1 + .../platform-serverless-testing/package.json | 14 +- .../tsconfig.cjs.json | 48 +++++ .../tsconfig.compile.esm.json | 12 -- .../tsconfig.compile.json | 9 - .../tsconfig.esm.json | 48 +++++ .../platform-serverless-testing/tsconfig.json | 18 ++ .../platform-serverless/.eslintignore | 13 ++ .../platform/platform-serverless/.eslintrc.js | 1 + .../platform-serverless/jest.config.js | 6 +- .../platform/platform-serverless/package.json | 16 +- .../platform-serverless/tsconfig.cjs.json | 54 +++++ .../tsconfig.compile.esm.json | 12 -- .../platform-serverless/tsconfig.compile.json | 9 - .../platform-serverless/tsconfig.esm.json | 54 +++++ .../platform-serverless/tsconfig.json | 18 ++ .../platform/platform-test-sdk/.eslintignore | 13 ++ .../platform/platform-test-sdk/.eslintrc.js | 1 + .../platform/platform-test-sdk/package.json | 17 +- .../platform-test-sdk/src/tests/testMulter.ts | 3 + .../platform-test-sdk/tsconfig.cjs.json | 63 ++++++ .../tsconfig.compile.esm.json | 12 -- .../platform-test-sdk/tsconfig.compile.json | 9 - .../platform-test-sdk/tsconfig.esm.json | 63 ++++++ .../platform/platform-test-sdk/tsconfig.json | 18 ++ .../platform/platform-views/.eslintignore | 13 ++ packages/platform/platform-views/.eslintrc.js | 1 + .../platform/platform-views/jest.config.js | 2 +- packages/platform/platform-views/package.json | 16 +- .../platform/platform-views/tsconfig.cjs.json | 45 +++++ .../platform-views/tsconfig.compile.esm.json | 12 -- .../platform-views/tsconfig.compile.json | 9 - .../platform/platform-views/tsconfig.esm.json | 45 +++++ .../platform/platform-views/tsconfig.json | 18 ++ packages/security/jwks/.eslintignore | 13 ++ packages/security/jwks/.eslintrc.js | 1 + packages/security/jwks/jest.config.js | 2 +- packages/security/jwks/package.json | 17 +- packages/security/jwks/tsconfig.cjs.json | 29 +++ .../security/jwks/tsconfig.compile.esm.json | 12 -- packages/security/jwks/tsconfig.compile.json | 9 - .../jwks/tsconfig.esm.json} | 14 +- packages/security/jwks/tsconfig.json | 18 ++ packages/security/jwks/tsconfig.tsbuildinfo | 1 + packages/security/oidc-provider/.eslintignore | 13 ++ packages/security/oidc-provider/.eslintrc.js | 1 + .../security/oidc-provider/jest.config.js | 6 +- packages/security/oidc-provider/package.json | 19 +- .../security/oidc-provider/tsconfig.cjs.json | 57 ++++++ .../oidc-provider/tsconfig.compile.esm.json | 12 -- .../oidc-provider/tsconfig.compile.json | 9 - .../security/oidc-provider/tsconfig.esm.json | 57 ++++++ packages/security/oidc-provider/tsconfig.json | 18 ++ packages/security/passport/.eslintignore | 13 ++ packages/security/passport/.eslintrc.js | 1 + packages/security/passport/jest.config.js | 6 +- packages/security/passport/package.json | 16 +- packages/security/passport/tsconfig.cjs.json | 42 ++++ .../passport/tsconfig.compile.esm.json | 12 -- .../security/passport/tsconfig.compile.json | 9 - packages/security/passport/tsconfig.esm.json | 42 ++++ packages/security/passport/tsconfig.json | 18 ++ packages/specs/ajv/.eslintignore | 13 ++ packages/specs/ajv/.eslintrc.js | 1 + packages/specs/ajv/jest.config.js | 6 +- packages/specs/ajv/package.json | 16 +- packages/specs/ajv/tsconfig.cjs.json | 42 ++++ packages/specs/ajv/tsconfig.compile.esm.json | 12 -- packages/specs/ajv/tsconfig.compile.json | 9 - packages/specs/ajv/tsconfig.esm.json | 42 ++++ packages/specs/ajv/tsconfig.json | 18 ++ packages/specs/exceptions/.eslintignore | 13 ++ packages/specs/exceptions/.eslintrc.js | 1 + packages/specs/exceptions/jest.config.js | 2 +- packages/specs/exceptions/package.json | 20 +- packages/specs/exceptions/tsconfig.cjs.json | 33 ++++ .../exceptions/tsconfig.compile.esm.json | 12 -- .../specs/exceptions/tsconfig.compile.json | 9 - packages/specs/exceptions/tsconfig.esm.json | 33 ++++ packages/specs/exceptions/tsconfig.json | 18 ++ packages/specs/json-mapper/.eslintignore | 13 ++ packages/specs/json-mapper/.eslintrc.js | 1 + packages/specs/json-mapper/coverage.json | 2 +- packages/specs/json-mapper/jest.config.js | 6 +- packages/specs/json-mapper/package.json | 16 +- packages/specs/json-mapper/tsconfig.cjs.json | 36 ++++ .../specs/json-mapper/tsconfig.compile.json | 21 -- packages/specs/json-mapper/tsconfig.esm.json | 36 ++++ packages/specs/json-mapper/tsconfig.json | 18 ++ packages/specs/openspec/.eslintignore | 13 ++ packages/specs/openspec/.eslintrc.js | 1 + packages/specs/openspec/package.json | 17 +- packages/specs/openspec/tsconfig.cjs.json | 29 +++ .../specs/openspec/tsconfig.compile.esm.json | 12 -- packages/specs/openspec/tsconfig.compile.json | 9 - .../openspec/tsconfig.esm.json} | 14 +- packages/specs/openspec/tsconfig.json | 18 ++ packages/specs/openspec/tsconfig.tsbuildinfo | 1 + packages/specs/schema/.eslintignore | 13 ++ packages/specs/schema/.eslintrc.js | 1 + packages/specs/schema/coverage.json | 8 +- packages/specs/schema/jest.config.js | 6 +- packages/specs/schema/package.json | 16 +- packages/specs/schema/tsconfig.cjs.json | 36 ++++ packages/specs/schema/tsconfig.compile.json | 22 --- packages/specs/schema/tsconfig.esm.json | 36 ++++ packages/specs/schema/tsconfig.json | 18 ++ packages/specs/swagger/.eslintignore | 13 ++ packages/specs/swagger/.eslintrc.js | 1 + packages/specs/swagger/jest.config.js | 6 +- packages/specs/swagger/package.json | 18 +- packages/specs/swagger/tsconfig.cjs.json | 51 +++++ .../specs/swagger/tsconfig.compile.esm.json | 24 --- packages/specs/swagger/tsconfig.compile.json | 9 - packages/specs/swagger/tsconfig.esm.json | 51 +++++ packages/specs/swagger/tsconfig.json | 18 ++ packages/third-parties/agenda/.eslintignore | 13 ++ packages/third-parties/agenda/.eslintrc.js | 1 + packages/third-parties/agenda/jest.config.js | 2 +- packages/third-parties/agenda/package.json | 16 +- .../third-parties/agenda/tsconfig.cjs.json | 39 ++++ .../agenda/tsconfig.compile.esm.json | 12 -- .../agenda/tsconfig.compile.json | 9 - .../third-parties/agenda/tsconfig.esm.json | 39 ++++ packages/third-parties/agenda/tsconfig.json | 18 ++ .../components-scan/.eslintignore | 13 ++ .../components-scan/.eslintrc.js | 1 + .../components-scan/jest.config.js | 2 +- .../components-scan/package.json | 16 +- .../components-scan/tsconfig.cjs.json | 39 ++++ .../components-scan/tsconfig.compile.esm.json | 12 -- .../components-scan/tsconfig.compile.json | 9 - .../components-scan/tsconfig.esm.json | 39 ++++ .../components-scan/tsconfig.json | 18 ++ .../third-parties/event-emitter/.eslintignore | 13 ++ .../third-parties/event-emitter/.eslintrc.js | 1 + .../event-emitter/jest.config.js | 3 +- .../third-parties/event-emitter/package.json | 16 +- .../event-emitter/tsconfig.cjs.json | 39 ++++ .../event-emitter/tsconfig.compile.esm.json | 12 -- .../event-emitter/tsconfig.compile.json | 9 - .../event-emitter/tsconfig.esm.json | 39 ++++ .../third-parties/event-emitter/tsconfig.json | 18 ++ .../third-parties/formio-types/.eslintignore | 13 ++ .../third-parties/formio-types/.eslintrc.js | 1 + .../third-parties/formio-types/package.json | 17 +- .../formio-types/tsconfig.cjs.json | 29 +++ .../formio-types/tsconfig.compile.esm.json | 12 -- .../formio-types/tsconfig.compile.json | 9 - .../formio-types/tsconfig.esm.json | 29 +++ .../third-parties/formio-types/tsconfig.json | 18 ++ .../formio-types/tsconfig.tsbuildinfo | 1 + packages/third-parties/formio/.eslintignore | 13 ++ packages/third-parties/formio/.eslintrc.js | 1 + packages/third-parties/formio/jest.config.js | 5 +- packages/third-parties/formio/package.json | 18 +- .../third-parties/formio/tsconfig.cjs.json | 48 +++++ .../formio/tsconfig.compile.esm.json | 12 -- .../formio/tsconfig.compile.json | 9 - .../third-parties/formio/tsconfig.esm.json | 48 +++++ packages/third-parties/formio/tsconfig.json | 18 ++ .../third-parties/schema-formio/.eslintignore | 13 ++ .../third-parties/schema-formio/.eslintrc.js | 1 + .../schema-formio/jest.config.js | 6 +- .../third-parties/schema-formio/package.json | 16 +- .../schema-formio/tsconfig.cjs.json | 42 ++++ .../schema-formio/tsconfig.compile.json | 21 -- .../schema-formio/tsconfig.esm.json | 42 ++++ .../third-parties/schema-formio/tsconfig.json | 18 ++ .../socketio-testing/.eslintignore | 13 ++ .../socketio-testing/.eslintrc.js | 1 + .../socketio-testing/package.json | 17 +- .../socketio-testing/tsconfig.cjs.json | 39 ++++ .../tsconfig.compile.esm.json | 12 -- .../socketio-testing/tsconfig.compile.json | 9 - .../socketio-testing/tsconfig.esm.json | 39 ++++ .../socketio-testing/tsconfig.json | 18 ++ packages/third-parties/socketio/.eslintignore | 13 ++ packages/third-parties/socketio/.eslintrc.js | 1 + .../third-parties/socketio/jest.config.js | 7 +- packages/third-parties/socketio/package.json | 19 +- .../third-parties/socketio/tsconfig.cjs.json | 54 +++++ .../socketio/tsconfig.compile.esm.json | 12 -- .../socketio/tsconfig.compile.json | 9 - .../third-parties/socketio/tsconfig.esm.json | 54 +++++ packages/third-parties/socketio/tsconfig.json | 18 ++ packages/third-parties/stripe/.eslintignore | 13 ++ packages/third-parties/stripe/.eslintrc.js | 1 + packages/third-parties/stripe/jest.config.js | 7 +- packages/third-parties/stripe/package.json | 16 +- .../third-parties/stripe/tsconfig.cjs.json | 48 +++++ .../stripe/tsconfig.compile.esm.json | 12 -- .../stripe/tsconfig.compile.json | 9 - .../third-parties/stripe/tsconfig.esm.json | 48 +++++ packages/third-parties/stripe/tsconfig.json | 18 ++ packages/third-parties/terminus/.eslintignore | 13 ++ packages/third-parties/terminus/.eslintrc.js | 1 + .../third-parties/terminus/jest.config.js | 3 +- packages/third-parties/terminus/package.json | 18 +- .../third-parties/terminus/tsconfig.cjs.json | 42 ++++ .../terminus/tsconfig.compile.esm.json | 12 -- .../terminus/tsconfig.compile.json | 9 - .../third-parties/terminus/tsconfig.esm.json | 42 ++++ packages/third-parties/terminus/tsconfig.json | 18 ++ .../vite-ssr-plugin/.eslintignore | 13 ++ .../vite-ssr-plugin/.eslintrc.js | 1 + .../vite-ssr-plugin/jest.config.js | 2 +- .../vite-ssr-plugin/package.json | 16 +- .../vite-ssr-plugin/tsconfig.cjs.json | 42 ++++ .../vite-ssr-plugin/tsconfig.compile.esm.json | 12 -- .../vite-ssr-plugin/tsconfig.compile.json | 9 - .../vite-ssr-plugin/tsconfig.esm.json | 42 ++++ .../vite-ssr-plugin/tsconfig.json | 18 ++ packages/utils/normalize-path/.eslintignore | 13 ++ packages/utils/normalize-path/.eslintrc.js | 1 + packages/utils/normalize-path/jest.config.js | 2 +- packages/utils/normalize-path/package.json | 16 +- .../utils/normalize-path/tsconfig.cjs.json | 29 +++ .../normalize-path/tsconfig.compile.esm.json | 12 -- .../normalize-path/tsconfig.compile.json | 9 - .../utils/normalize-path/tsconfig.esm.json | 29 +++ packages/utils/normalize-path/tsconfig.json | 18 ++ .../utils/normalize-path/tsconfig.tsbuildinfo | 1 + tools/eslint/eslint.template.js | 1 + tools/eslint/eslintignore.template | 13 ++ tools/eslint/index.js | 38 ++++ .eslintrc => tools/eslint/node.js | 31 ++- tools/eslint/package.json | 15 ++ tools/integration/package.json | 10 +- tools/integration/tsconfig.cjs.json | 57 ++++++ tools/integration/tsconfig.compile.esm.json | 12 -- tools/integration/tsconfig.compile.json | 9 - tools/integration/tsconfig.esm.json | 57 ++++++ tools/integration/tsconfig.json | 18 ++ tools/jest/jest.config.js | 95 +++------ tools/mocha/mocha.config.js | 8 +- tools/typescript/index.js | 89 +++++++++ tools/typescript/package.json | 18 ++ .../typescript/tsconfig.node.json | 13 +- tools/typescript/tsconfig.template.cjs.json | 29 +++ tools/typescript/tsconfig.template.esm.json | 29 +++ tools/typescript/tsconfig.template.json | 18 ++ tools/webpack/webpack.config.js | 2 +- tsconfig.compile.json | 12 -- tsconfig.json | 184 ++++++++++++++++-- yarn.lock | 21 +- 481 files changed, 7189 insertions(+), 1715 deletions(-) create mode 100644 .eslintrc.js create mode 100644 packages/core/.eslintignore create mode 100644 packages/core/.eslintrc.js rename packages/core/{tsconfig.compile.esm.json => tsconfig.cjs.json} (53%) delete mode 100644 packages/core/tsconfig.compile.json rename packages/{specs/json-mapper/tsconfig.compile.esm.json => core/tsconfig.esm.json} (62%) create mode 100644 packages/core/tsconfig.json create mode 100644 packages/di/.eslintignore create mode 100644 packages/di/.eslintrc.js create mode 100644 packages/di/tsconfig.cjs.json delete mode 100644 packages/di/tsconfig.compile.json create mode 100644 packages/di/tsconfig.esm.json create mode 100644 packages/di/tsconfig.json create mode 100644 packages/engines/.eslintignore create mode 100644 packages/engines/.eslintrc.js rename packages/{specs/schema/tsconfig.compile.esm.json => engines/tsconfig.cjs.json} (53%) delete mode 100644 packages/engines/tsconfig.compile.json rename packages/{third-parties/schema-formio/tsconfig.compile.esm.json => engines/tsconfig.esm.json} (62%) create mode 100644 packages/engines/tsconfig.json create mode 100644 packages/graphql/apollo/.eslintignore create mode 100644 packages/graphql/apollo/.eslintrc.js create mode 100644 packages/graphql/apollo/tsconfig.cjs.json delete mode 100644 packages/graphql/apollo/tsconfig.compile.esm.json delete mode 100644 packages/graphql/apollo/tsconfig.compile.json create mode 100644 packages/graphql/apollo/tsconfig.esm.json create mode 100644 packages/graphql/apollo/tsconfig.json create mode 100644 packages/graphql/typegraphql/.eslintignore create mode 100644 packages/graphql/typegraphql/.eslintrc.js create mode 100644 packages/graphql/typegraphql/tsconfig.cjs.json delete mode 100644 packages/graphql/typegraphql/tsconfig.compile.esm.json delete mode 100644 packages/graphql/typegraphql/tsconfig.compile.json create mode 100644 packages/graphql/typegraphql/tsconfig.esm.json create mode 100644 packages/graphql/typegraphql/tsconfig.json create mode 100644 packages/orm/adapters-redis/.eslintignore create mode 100644 packages/orm/adapters-redis/.eslintrc.js create mode 100644 packages/orm/adapters-redis/tsconfig.cjs.json delete mode 100644 packages/orm/adapters-redis/tsconfig.compile.esm.json delete mode 100644 packages/orm/adapters-redis/tsconfig.compile.json create mode 100644 packages/orm/adapters-redis/tsconfig.esm.json create mode 100644 packages/orm/adapters-redis/tsconfig.json create mode 100644 packages/orm/adapters/.eslintignore create mode 100644 packages/orm/adapters/.eslintrc.js create mode 100644 packages/orm/adapters/tsconfig.cjs.json delete mode 100644 packages/orm/adapters/tsconfig.compile.esm.json delete mode 100644 packages/orm/adapters/tsconfig.compile.json create mode 100644 packages/orm/adapters/tsconfig.esm.json create mode 100644 packages/orm/adapters/tsconfig.json create mode 100644 packages/orm/ioredis/.eslintignore create mode 100644 packages/orm/ioredis/.eslintrc.js create mode 100644 packages/orm/ioredis/tsconfig.cjs.json delete mode 100644 packages/orm/ioredis/tsconfig.compile.esm.json delete mode 100644 packages/orm/ioredis/tsconfig.compile.json create mode 100644 packages/orm/ioredis/tsconfig.esm.json create mode 100644 packages/orm/ioredis/tsconfig.json create mode 100644 packages/orm/mikro-orm/.eslintignore create mode 100644 packages/orm/mikro-orm/.eslintrc.js create mode 100644 packages/orm/mikro-orm/tsconfig.cjs.json delete mode 100644 packages/orm/mikro-orm/tsconfig.compile.esm.json delete mode 100644 packages/orm/mikro-orm/tsconfig.compile.json create mode 100644 packages/orm/mikro-orm/tsconfig.esm.json create mode 100644 packages/orm/mikro-orm/tsconfig.json create mode 100644 packages/orm/mongoose/.eslintignore create mode 100644 packages/orm/mongoose/.eslintrc.js create mode 100644 packages/orm/mongoose/tsconfig.cjs.json delete mode 100644 packages/orm/mongoose/tsconfig.compile.esm.json delete mode 100644 packages/orm/mongoose/tsconfig.compile.json create mode 100644 packages/orm/mongoose/tsconfig.esm.json create mode 100644 packages/orm/mongoose/tsconfig.json create mode 100644 packages/orm/objection/.eslintignore create mode 100644 packages/orm/objection/.eslintrc.js create mode 100644 packages/orm/objection/tsconfig.cjs.json delete mode 100644 packages/orm/objection/tsconfig.compile.esm.json delete mode 100644 packages/orm/objection/tsconfig.compile.json create mode 100644 packages/orm/objection/tsconfig.esm.json create mode 100644 packages/orm/objection/tsconfig.json create mode 100644 packages/orm/prisma/.eslintignore create mode 100644 packages/orm/prisma/.eslintrc.js create mode 100644 packages/orm/prisma/tsconfig.cjs.json delete mode 100644 packages/orm/prisma/tsconfig.compile.esm.json delete mode 100644 packages/orm/prisma/tsconfig.compile.json create mode 100644 packages/orm/prisma/tsconfig.esm.json create mode 100644 packages/orm/prisma/tsconfig.json create mode 100644 packages/orm/testing-mongoose/.eslintignore create mode 100644 packages/orm/testing-mongoose/.eslintrc.js create mode 100644 packages/orm/testing-mongoose/tsconfig.cjs.json delete mode 100644 packages/orm/testing-mongoose/tsconfig.compile.esm.json delete mode 100644 packages/orm/testing-mongoose/tsconfig.compile.json create mode 100644 packages/orm/testing-mongoose/tsconfig.esm.json create mode 100644 packages/orm/testing-mongoose/tsconfig.json create mode 100644 packages/orm/typeorm/.eslintignore create mode 100644 packages/orm/typeorm/.eslintrc.js create mode 100644 packages/orm/typeorm/tsconfig.cjs.json delete mode 100644 packages/orm/typeorm/tsconfig.compile.esm.json delete mode 100644 packages/orm/typeorm/tsconfig.compile.json create mode 100644 packages/orm/typeorm/tsconfig.esm.json create mode 100644 packages/orm/typeorm/tsconfig.json create mode 100644 packages/perf/.eslintignore create mode 100644 packages/perf/.eslintrc.js create mode 100644 packages/perf/tsconfig.cjs.json delete mode 100644 packages/perf/tsconfig.compile.esm.json delete mode 100644 packages/perf/tsconfig.compile.json create mode 100644 packages/perf/tsconfig.esm.json create mode 100644 packages/perf/tsconfig.json create mode 100644 packages/platform/common/.eslintignore create mode 100644 packages/platform/common/.eslintrc.js create mode 100644 packages/platform/common/tsconfig.cjs.json delete mode 100644 packages/platform/common/tsconfig.compile.esm.json delete mode 100644 packages/platform/common/tsconfig.compile.json create mode 100644 packages/platform/common/tsconfig.esm.json create mode 100644 packages/platform/common/tsconfig.json delete mode 100644 packages/platform/platform-aws/jest.config.js create mode 100644 packages/platform/platform-cache/.eslintignore create mode 100644 packages/platform/platform-cache/.eslintrc.js create mode 100644 packages/platform/platform-cache/tsconfig.cjs.json delete mode 100644 packages/platform/platform-cache/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-cache/tsconfig.compile.json create mode 100644 packages/platform/platform-cache/tsconfig.esm.json create mode 100644 packages/platform/platform-cache/tsconfig.json create mode 100644 packages/platform/platform-exceptions/.eslintignore create mode 100644 packages/platform/platform-exceptions/.eslintrc.js create mode 100644 packages/platform/platform-exceptions/tsconfig.cjs.json delete mode 100644 packages/platform/platform-exceptions/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-exceptions/tsconfig.compile.json create mode 100644 packages/platform/platform-exceptions/tsconfig.esm.json create mode 100644 packages/platform/platform-exceptions/tsconfig.json create mode 100644 packages/platform/platform-express/.eslintignore create mode 100644 packages/platform/platform-express/.eslintrc.js create mode 100644 packages/platform/platform-express/tsconfig.cjs.json delete mode 100644 packages/platform/platform-express/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-express/tsconfig.compile.json create mode 100644 packages/platform/platform-express/tsconfig.esm.json create mode 100644 packages/platform/platform-express/tsconfig.json create mode 100644 packages/platform/platform-koa/.eslintignore create mode 100644 packages/platform/platform-koa/.eslintrc.js create mode 100644 packages/platform/platform-koa/tsconfig.cjs.json delete mode 100644 packages/platform/platform-koa/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-koa/tsconfig.compile.json create mode 100644 packages/platform/platform-koa/tsconfig.esm.json create mode 100644 packages/platform/platform-koa/tsconfig.json create mode 100644 packages/platform/platform-log-middleware/.eslintignore create mode 100644 packages/platform/platform-log-middleware/.eslintrc.js create mode 100644 packages/platform/platform-log-middleware/tsconfig.cjs.json delete mode 100644 packages/platform/platform-log-middleware/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-log-middleware/tsconfig.compile.json create mode 100644 packages/platform/platform-log-middleware/tsconfig.esm.json create mode 100644 packages/platform/platform-log-middleware/tsconfig.json create mode 100644 packages/platform/platform-middlewares/.eslintignore create mode 100644 packages/platform/platform-middlewares/.eslintrc.js create mode 100644 packages/platform/platform-middlewares/tsconfig.cjs.json delete mode 100644 packages/platform/platform-middlewares/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-middlewares/tsconfig.compile.json create mode 100644 packages/platform/platform-middlewares/tsconfig.esm.json create mode 100644 packages/platform/platform-middlewares/tsconfig.json create mode 100644 packages/platform/platform-params/.eslintignore create mode 100644 packages/platform/platform-params/.eslintrc.js create mode 100644 packages/platform/platform-params/tsconfig.cjs.json delete mode 100644 packages/platform/platform-params/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-params/tsconfig.compile.json create mode 100644 packages/platform/platform-params/tsconfig.esm.json create mode 100644 packages/platform/platform-params/tsconfig.json create mode 100644 packages/platform/platform-response-filter/.eslintignore create mode 100644 packages/platform/platform-response-filter/.eslintrc.js create mode 100644 packages/platform/platform-response-filter/tsconfig.cjs.json delete mode 100644 packages/platform/platform-response-filter/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-response-filter/tsconfig.compile.json create mode 100644 packages/platform/platform-response-filter/tsconfig.esm.json create mode 100644 packages/platform/platform-response-filter/tsconfig.json create mode 100644 packages/platform/platform-router/.eslintignore create mode 100644 packages/platform/platform-router/.eslintrc.js create mode 100644 packages/platform/platform-router/tsconfig.cjs.json delete mode 100644 packages/platform/platform-router/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-router/tsconfig.compile.json create mode 100644 packages/platform/platform-router/tsconfig.esm.json create mode 100644 packages/platform/platform-router/tsconfig.json create mode 100644 packages/platform/platform-serverless-http/.eslintignore create mode 100644 packages/platform/platform-serverless-http/.eslintrc.js create mode 100644 packages/platform/platform-serverless-http/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless-http/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-serverless-http/tsconfig.compile.json create mode 100644 packages/platform/platform-serverless-http/tsconfig.esm.json create mode 100644 packages/platform/platform-serverless-http/tsconfig.json create mode 100644 packages/platform/platform-serverless-testing/.eslintignore create mode 100644 packages/platform/platform-serverless-testing/.eslintrc.js create mode 100644 packages/platform/platform-serverless-testing/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless-testing/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-serverless-testing/tsconfig.compile.json create mode 100644 packages/platform/platform-serverless-testing/tsconfig.esm.json create mode 100644 packages/platform/platform-serverless-testing/tsconfig.json create mode 100644 packages/platform/platform-serverless/.eslintignore create mode 100644 packages/platform/platform-serverless/.eslintrc.js create mode 100644 packages/platform/platform-serverless/tsconfig.cjs.json delete mode 100644 packages/platform/platform-serverless/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-serverless/tsconfig.compile.json create mode 100644 packages/platform/platform-serverless/tsconfig.esm.json create mode 100644 packages/platform/platform-serverless/tsconfig.json create mode 100644 packages/platform/platform-test-sdk/.eslintignore create mode 100644 packages/platform/platform-test-sdk/.eslintrc.js create mode 100644 packages/platform/platform-test-sdk/tsconfig.cjs.json delete mode 100644 packages/platform/platform-test-sdk/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-test-sdk/tsconfig.compile.json create mode 100644 packages/platform/platform-test-sdk/tsconfig.esm.json create mode 100644 packages/platform/platform-test-sdk/tsconfig.json create mode 100644 packages/platform/platform-views/.eslintignore create mode 100644 packages/platform/platform-views/.eslintrc.js create mode 100644 packages/platform/platform-views/tsconfig.cjs.json delete mode 100644 packages/platform/platform-views/tsconfig.compile.esm.json delete mode 100644 packages/platform/platform-views/tsconfig.compile.json create mode 100644 packages/platform/platform-views/tsconfig.esm.json create mode 100644 packages/platform/platform-views/tsconfig.json create mode 100644 packages/security/jwks/.eslintignore create mode 100644 packages/security/jwks/.eslintrc.js create mode 100644 packages/security/jwks/tsconfig.cjs.json delete mode 100644 packages/security/jwks/tsconfig.compile.esm.json delete mode 100644 packages/security/jwks/tsconfig.compile.json rename packages/{engines/tsconfig.compile.esm.json => security/jwks/tsconfig.esm.json} (57%) create mode 100644 packages/security/jwks/tsconfig.json create mode 100644 packages/security/jwks/tsconfig.tsbuildinfo create mode 100644 packages/security/oidc-provider/.eslintignore create mode 100644 packages/security/oidc-provider/.eslintrc.js create mode 100644 packages/security/oidc-provider/tsconfig.cjs.json delete mode 100644 packages/security/oidc-provider/tsconfig.compile.esm.json delete mode 100644 packages/security/oidc-provider/tsconfig.compile.json create mode 100644 packages/security/oidc-provider/tsconfig.esm.json create mode 100644 packages/security/oidc-provider/tsconfig.json create mode 100644 packages/security/passport/.eslintignore create mode 100644 packages/security/passport/.eslintrc.js create mode 100644 packages/security/passport/tsconfig.cjs.json delete mode 100644 packages/security/passport/tsconfig.compile.esm.json delete mode 100644 packages/security/passport/tsconfig.compile.json create mode 100644 packages/security/passport/tsconfig.esm.json create mode 100644 packages/security/passport/tsconfig.json create mode 100644 packages/specs/ajv/.eslintignore create mode 100644 packages/specs/ajv/.eslintrc.js create mode 100644 packages/specs/ajv/tsconfig.cjs.json delete mode 100644 packages/specs/ajv/tsconfig.compile.esm.json delete mode 100644 packages/specs/ajv/tsconfig.compile.json create mode 100644 packages/specs/ajv/tsconfig.esm.json create mode 100644 packages/specs/ajv/tsconfig.json create mode 100644 packages/specs/exceptions/.eslintignore create mode 100644 packages/specs/exceptions/.eslintrc.js create mode 100644 packages/specs/exceptions/tsconfig.cjs.json delete mode 100644 packages/specs/exceptions/tsconfig.compile.esm.json delete mode 100644 packages/specs/exceptions/tsconfig.compile.json create mode 100644 packages/specs/exceptions/tsconfig.esm.json create mode 100644 packages/specs/exceptions/tsconfig.json create mode 100644 packages/specs/json-mapper/.eslintignore create mode 100644 packages/specs/json-mapper/.eslintrc.js create mode 100644 packages/specs/json-mapper/tsconfig.cjs.json delete mode 100644 packages/specs/json-mapper/tsconfig.compile.json create mode 100644 packages/specs/json-mapper/tsconfig.esm.json create mode 100644 packages/specs/json-mapper/tsconfig.json create mode 100644 packages/specs/openspec/.eslintignore create mode 100644 packages/specs/openspec/.eslintrc.js create mode 100644 packages/specs/openspec/tsconfig.cjs.json delete mode 100644 packages/specs/openspec/tsconfig.compile.esm.json delete mode 100644 packages/specs/openspec/tsconfig.compile.json rename packages/{di/tsconfig.compile.esm.json => specs/openspec/tsconfig.esm.json} (57%) create mode 100644 packages/specs/openspec/tsconfig.json create mode 100644 packages/specs/openspec/tsconfig.tsbuildinfo create mode 100644 packages/specs/schema/.eslintignore create mode 100644 packages/specs/schema/.eslintrc.js create mode 100644 packages/specs/schema/tsconfig.cjs.json delete mode 100644 packages/specs/schema/tsconfig.compile.json create mode 100644 packages/specs/schema/tsconfig.esm.json create mode 100644 packages/specs/schema/tsconfig.json create mode 100644 packages/specs/swagger/.eslintignore create mode 100644 packages/specs/swagger/.eslintrc.js create mode 100644 packages/specs/swagger/tsconfig.cjs.json delete mode 100644 packages/specs/swagger/tsconfig.compile.esm.json delete mode 100644 packages/specs/swagger/tsconfig.compile.json create mode 100644 packages/specs/swagger/tsconfig.esm.json create mode 100644 packages/specs/swagger/tsconfig.json create mode 100644 packages/third-parties/agenda/.eslintignore create mode 100644 packages/third-parties/agenda/.eslintrc.js create mode 100644 packages/third-parties/agenda/tsconfig.cjs.json delete mode 100644 packages/third-parties/agenda/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/agenda/tsconfig.compile.json create mode 100644 packages/third-parties/agenda/tsconfig.esm.json create mode 100644 packages/third-parties/agenda/tsconfig.json create mode 100644 packages/third-parties/components-scan/.eslintignore create mode 100644 packages/third-parties/components-scan/.eslintrc.js create mode 100644 packages/third-parties/components-scan/tsconfig.cjs.json delete mode 100644 packages/third-parties/components-scan/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/components-scan/tsconfig.compile.json create mode 100644 packages/third-parties/components-scan/tsconfig.esm.json create mode 100644 packages/third-parties/components-scan/tsconfig.json create mode 100644 packages/third-parties/event-emitter/.eslintignore create mode 100644 packages/third-parties/event-emitter/.eslintrc.js create mode 100644 packages/third-parties/event-emitter/tsconfig.cjs.json delete mode 100644 packages/third-parties/event-emitter/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/event-emitter/tsconfig.compile.json create mode 100644 packages/third-parties/event-emitter/tsconfig.esm.json create mode 100644 packages/third-parties/event-emitter/tsconfig.json create mode 100644 packages/third-parties/formio-types/.eslintignore create mode 100644 packages/third-parties/formio-types/.eslintrc.js create mode 100644 packages/third-parties/formio-types/tsconfig.cjs.json delete mode 100644 packages/third-parties/formio-types/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/formio-types/tsconfig.compile.json create mode 100644 packages/third-parties/formio-types/tsconfig.esm.json create mode 100644 packages/third-parties/formio-types/tsconfig.json create mode 100644 packages/third-parties/formio-types/tsconfig.tsbuildinfo create mode 100644 packages/third-parties/formio/.eslintignore create mode 100644 packages/third-parties/formio/.eslintrc.js create mode 100644 packages/third-parties/formio/tsconfig.cjs.json delete mode 100644 packages/third-parties/formio/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/formio/tsconfig.compile.json create mode 100644 packages/third-parties/formio/tsconfig.esm.json create mode 100644 packages/third-parties/formio/tsconfig.json create mode 100644 packages/third-parties/schema-formio/.eslintignore create mode 100644 packages/third-parties/schema-formio/.eslintrc.js create mode 100644 packages/third-parties/schema-formio/tsconfig.cjs.json delete mode 100644 packages/third-parties/schema-formio/tsconfig.compile.json create mode 100644 packages/third-parties/schema-formio/tsconfig.esm.json create mode 100644 packages/third-parties/schema-formio/tsconfig.json create mode 100644 packages/third-parties/socketio-testing/.eslintignore create mode 100644 packages/third-parties/socketio-testing/.eslintrc.js create mode 100644 packages/third-parties/socketio-testing/tsconfig.cjs.json delete mode 100644 packages/third-parties/socketio-testing/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/socketio-testing/tsconfig.compile.json create mode 100644 packages/third-parties/socketio-testing/tsconfig.esm.json create mode 100644 packages/third-parties/socketio-testing/tsconfig.json create mode 100644 packages/third-parties/socketio/.eslintignore create mode 100644 packages/third-parties/socketio/.eslintrc.js create mode 100644 packages/third-parties/socketio/tsconfig.cjs.json delete mode 100644 packages/third-parties/socketio/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/socketio/tsconfig.compile.json create mode 100644 packages/third-parties/socketio/tsconfig.esm.json create mode 100644 packages/third-parties/socketio/tsconfig.json create mode 100644 packages/third-parties/stripe/.eslintignore create mode 100644 packages/third-parties/stripe/.eslintrc.js create mode 100644 packages/third-parties/stripe/tsconfig.cjs.json delete mode 100644 packages/third-parties/stripe/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/stripe/tsconfig.compile.json create mode 100644 packages/third-parties/stripe/tsconfig.esm.json create mode 100644 packages/third-parties/stripe/tsconfig.json create mode 100644 packages/third-parties/terminus/.eslintignore create mode 100644 packages/third-parties/terminus/.eslintrc.js create mode 100644 packages/third-parties/terminus/tsconfig.cjs.json delete mode 100644 packages/third-parties/terminus/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/terminus/tsconfig.compile.json create mode 100644 packages/third-parties/terminus/tsconfig.esm.json create mode 100644 packages/third-parties/terminus/tsconfig.json create mode 100644 packages/third-parties/vite-ssr-plugin/.eslintignore create mode 100644 packages/third-parties/vite-ssr-plugin/.eslintrc.js create mode 100644 packages/third-parties/vite-ssr-plugin/tsconfig.cjs.json delete mode 100644 packages/third-parties/vite-ssr-plugin/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/vite-ssr-plugin/tsconfig.compile.json create mode 100644 packages/third-parties/vite-ssr-plugin/tsconfig.esm.json create mode 100644 packages/third-parties/vite-ssr-plugin/tsconfig.json create mode 100644 packages/utils/normalize-path/.eslintignore create mode 100644 packages/utils/normalize-path/.eslintrc.js create mode 100644 packages/utils/normalize-path/tsconfig.cjs.json delete mode 100644 packages/utils/normalize-path/tsconfig.compile.esm.json delete mode 100644 packages/utils/normalize-path/tsconfig.compile.json create mode 100644 packages/utils/normalize-path/tsconfig.esm.json create mode 100644 packages/utils/normalize-path/tsconfig.json create mode 100644 packages/utils/normalize-path/tsconfig.tsbuildinfo create mode 100644 tools/eslint/eslint.template.js create mode 100644 tools/eslint/eslintignore.template create mode 100644 tools/eslint/index.js rename .eslintrc => tools/eslint/node.js (71%) create mode 100644 tools/eslint/package.json create mode 100644 tools/integration/tsconfig.cjs.json delete mode 100644 tools/integration/tsconfig.compile.esm.json delete mode 100644 tools/integration/tsconfig.compile.json create mode 100644 tools/integration/tsconfig.esm.json create mode 100644 tools/integration/tsconfig.json create mode 100644 tools/typescript/index.js create mode 100644 tools/typescript/package.json rename tsconfig.base.json => tools/typescript/tsconfig.node.json (76%) create mode 100644 tools/typescript/tsconfig.template.cjs.json create mode 100644 tools/typescript/tsconfig.template.esm.json create mode 100644 tools/typescript/tsconfig.template.json delete mode 100644 tsconfig.compile.json diff --git a/.eslintignore b/.eslintignore index c8bc82b5326..1bfcab790dd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,3 +10,5 @@ docs-references *.lock benchmarks.* **/generated + +*/**/*.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..e95a622f998 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + ...require("@tsed/eslint/node.js") +}; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 578bffa6f2d..23472f5d199 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,10 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn build + env: + FORCE_COLOR: true - name: Run test run: yarn test:integration env: @@ -76,6 +80,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:core --since origin/production @@ -96,6 +102,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:specs --since origin/production @@ -116,6 +124,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:platform --since origin/production @@ -136,6 +146,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:orm --since origin/production @@ -156,6 +168,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:graphql --since origin/production @@ -176,6 +190,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:security --since origin/production @@ -196,6 +212,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:third-parties --since origin/production @@ -216,43 +234,15 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --frozen-lockfile --network-timeout 500000 --ignore-engines + - name: Run build + run: yarn tsc --build - name: Run test run: yarn test:formio --since origin/production - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: yarn install --frozen-lockfile --network-timeout 500000 - - name: Run build - run: yarn build - deploy-packages: runs-on: ubuntu-latest needs: - [ - lint, - test-core, - test-specs, - test-platform, - test-integration, - test-orm, - test-security, - test-graphql, - test-third-parties, - test-formio, - build - ] + [lint, test-core, test-specs, test-platform, test-integration, test-orm, test-security, test-graphql, test-third-parties, test-formio] if: github.event_name != 'pull_request' && contains(' refs/heads/production refs/heads/alpha diff --git a/jest.config.js b/jest.config.js index f787baabbd9..440ba4cb027 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,10 @@ +const jestConfig = require("@tsed/jest-config"); + // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "root"), + ...jestConfig, coverageThreshold: { global: { statements: 99.26, diff --git a/package.json b/package.json index 01745733996..b3886010144 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,9 @@ "postinstall": "node tools/yarn/postinstall.js && cd docs && yarn install && cd .. && node ./tools/github-sponsors/bin/github-sponsors.js", "configure": "monorepo ci configure", "clean": "monorepo clean workspace", - "test": "yarn clean && yarn test:lint && yarn test:core && yarn test:specs && yarn test:platform && yarn test:integration && yarn test:graphql && yarn test:orm && yarn test:security && yarn test:formio && yarn test:third-parties", - "test:lint": "eslint '**/*.{ts,js}'", - "test:lint:fix": "yarn test:lint --fix", + "test": "yarn test:lint && yarn test:core && yarn test:specs && yarn test:platform && yarn test:integration && yarn test:graphql && yarn test:orm && yarn test:security && yarn test:formio && yarn test:third-parties", + "test:lint": "lerna run lint", + "test:lint:fix": "lerna run lint:fix", "test:core": "lerna run test --scope \"@tsed/{core,di,common,engines,normalize-path}\" --stream --concurrency 2", "test:platform": "lerna run test --ignore \"@tsed/platform-{express,koa}\" --scope \"@tsed/platform-*\" --stream --concurrency 2", "test:integration": "lerna run test --scope \"@tsed/platform-{express,koa}\" --stream --concurrency 2", @@ -42,6 +42,8 @@ "coverage": "merge-istanbul --out coverage/coverage-final.json \"**/packages/**/coverage/coverage-final.json\" && nyc report --reporter text --reporter html --reporter lcov -t coverage --report-dir coverage", "coveralls": "nyc report --reporter=text-lcov | coveralls", "build": "monorepo build --verbose", + "build:references": "node ./tools/typescript", + "build:eslint": "node ./tools/eslint", "sync:packages": "monorepo sync packages", "api:build": "lerna run build && tsdoc", "docs:install": "sh ./scripts/docs/install.sh", @@ -161,9 +163,8 @@ "supertest": "6.2.2", "ts-jest": "^29.0.3", "ts-node": "10.8.1", - "tsconfig-paths": "4.1.2", "tslib": "2.4.0", - "typescript": "^4.7.4", + "typescript": "4.9.5", "ts-loader": "^9.4.2", "html-webpack-plugin": "5.5.0", "webpack": "^5.75.0", diff --git a/packages/core/.eslintignore b/packages/core/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/core/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/core/.eslintrc.js b/packages/core/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/core/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/core/jest.config.js b/packages/core/jest.config.js index feec2fd3f94..f6df5141812 100644 --- a/packages/core/jest.config.js +++ b/packages/core/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "core"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/core/package.json b/packages/core/package.json index c82c879cb3d..9b309502c4d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -16,17 +16,22 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser", + "build": "yarn barrels && yarn build:ts && yarn run build:browser", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\"", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", "build:browser": "webpack", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "reflect-metadata": "^0.1.13", "tslib": "2.4.0" }, - "devDependencies": {}, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/core/tsconfig.compile.esm.json b/packages/core/tsconfig.cjs.json similarity index 53% rename from packages/core/tsconfig.compile.esm.json rename to packages/core/tsconfig.cjs.json index 9d550456a31..290e454aeca 100644 --- a/packages/core/tsconfig.compile.esm.json +++ b/packages/core/tsconfig.cjs.json @@ -1,15 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", - "target": "esnext", - "module": "esnext", + "module": "commonjs", "rootDir": "src", - "outDir": "./lib/esm", + "outDir": "./lib/cjs", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, - "include": ["src"], + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -21,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", + "**/__mock__/**", "webpack.config.js" - ] + ], + "references": [] } diff --git a/packages/core/tsconfig.compile.json b/packages/core/tsconfig.compile.json deleted file mode 100644 index e080fe1dc1f..00000000000 --- a/packages/core/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts", "jest.config.js", "webpack.config.js"] -} diff --git a/packages/specs/json-mapper/tsconfig.compile.esm.json b/packages/core/tsconfig.esm.json similarity index 62% rename from packages/specs/json-mapper/tsconfig.compile.esm.json rename to packages/core/tsconfig.esm.json index c83068e53ad..89f93d97c26 100644 --- a/packages/specs/json-mapper/tsconfig.compile.esm.json +++ b/packages/core/tsconfig.esm.json @@ -1,13 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", "module": "ES2020", "rootDir": "src", "outDir": "./lib/esm", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -19,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", + "**/__mock__/**", "webpack.config.js" - ] + ], + "references": [] } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/di/.eslintignore b/packages/di/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/di/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/di/.eslintrc.js b/packages/di/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/di/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/di/jest.config.js b/packages/di/jest.config.js index e819c3dc717..f6df5141812 100644 --- a/packages/di/jest.config.js +++ b/packages/di/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "di"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/di/package.json b/packages/di/package.json index b22c8fae88f..0a8908649b8 100644 --- a/packages/di/package.json +++ b/packages/di/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 -u" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 -u", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -26,7 +27,10 @@ "devDependencies": { "@tsed/core": "7.18.2", "@tsed/logger": ">=6.2.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -44,4 +48,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/di/tsconfig.cjs.json b/packages/di/tsconfig.cjs.json new file mode 100644 index 00000000000..ca187cdb4d5 --- /dev/null +++ b/packages/di/tsconfig.cjs.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../core" + }, + { + "path": "../specs/schema" + } + ] +} diff --git a/packages/di/tsconfig.compile.json b/packages/di/tsconfig.compile.json deleted file mode 100644 index e08f02d3ee8..00000000000 --- a/packages/di/tsconfig.compile.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "**/__mock__/**" - ] -} diff --git a/packages/di/tsconfig.esm.json b/packages/di/tsconfig.esm.json new file mode 100644 index 00000000000..d3ff57636c5 --- /dev/null +++ b/packages/di/tsconfig.esm.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../core" + }, + { + "path": "../specs/schema" + } + ] +} diff --git a/packages/di/tsconfig.json b/packages/di/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/di/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/engines/.eslintignore b/packages/engines/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/engines/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/engines/.eslintrc.js b/packages/engines/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/engines/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/engines/package.json b/packages/engines/package.json index 403e22869d2..850cb63963c 100644 --- a/packages/engines/package.json +++ b/packages/engines/package.json @@ -13,11 +13,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test nyc mocha --timeout 15000" + "test": "cross-env NODE_ENV=test nyc mocha --timeout 15000", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "private": false, "dependencies": { @@ -81,7 +82,10 @@ "velocityjs": "^2.0.1", "vue-pronto": "^2.4.0", "walrus": "^0.10.1", - "whiskers": "^0.4.0" + "whiskers": "^0.4.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "keywords": [ "TypeScript", @@ -90,4 +94,4 @@ "view" ], "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/specs/schema/tsconfig.compile.esm.json b/packages/engines/tsconfig.cjs.json similarity index 53% rename from packages/specs/schema/tsconfig.compile.esm.json rename to packages/engines/tsconfig.cjs.json index 9d550456a31..290e454aeca 100644 --- a/packages/specs/schema/tsconfig.compile.esm.json +++ b/packages/engines/tsconfig.cjs.json @@ -1,15 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", - "target": "esnext", - "module": "esnext", + "module": "commonjs", "rootDir": "src", - "outDir": "./lib/esm", + "outDir": "./lib/cjs", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, - "include": ["src"], + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -21,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", + "**/__mock__/**", "webpack.config.js" - ] + ], + "references": [] } diff --git a/packages/engines/tsconfig.compile.json b/packages/engines/tsconfig.compile.json deleted file mode 100644 index e08f02d3ee8..00000000000 --- a/packages/engines/tsconfig.compile.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "**/__mock__/**" - ] -} diff --git a/packages/third-parties/schema-formio/tsconfig.compile.esm.json b/packages/engines/tsconfig.esm.json similarity index 62% rename from packages/third-parties/schema-formio/tsconfig.compile.esm.json rename to packages/engines/tsconfig.esm.json index c83068e53ad..89f93d97c26 100644 --- a/packages/third-parties/schema-formio/tsconfig.compile.esm.json +++ b/packages/engines/tsconfig.esm.json @@ -1,13 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", "module": "ES2020", "rootDir": "src", "outDir": "./lib/esm", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -19,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", + "**/__mock__/**", "webpack.config.js" - ] + ], + "references": [] } diff --git a/packages/engines/tsconfig.json b/packages/engines/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/engines/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/graphql/apollo/.eslintignore b/packages/graphql/apollo/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/graphql/apollo/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/graphql/apollo/.eslintrc.js b/packages/graphql/apollo/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/graphql/apollo/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/graphql/apollo/jest.config.js b/packages/graphql/apollo/jest.config.js index 40406f619da..01596694c81 100644 --- a/packages/graphql/apollo/jest.config.js +++ b/packages/graphql/apollo/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "apollo"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 100, diff --git a/packages/graphql/apollo/package.json b/packages/graphql/apollo/package.json index 0e121a4e62d..a21b8682b7a 100644 --- a/packages/graphql/apollo/package.json +++ b/packages/graphql/apollo/package.json @@ -13,11 +13,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -35,7 +36,10 @@ "apollo-server-express": "^3.4.0", "apollo-server-koa": "^3.4.0", "apollo-server-testing": "^2.25.2", - "graphql": "15.7.2" + "graphql": "15.7.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -47,4 +51,4 @@ "apollo-server-core": ">=3.0.0", "graphql": ">15.0.0" } -} \ No newline at end of file +} diff --git a/packages/graphql/apollo/tsconfig.cjs.json b/packages/graphql/apollo/tsconfig.cjs.json new file mode 100644 index 00000000000..8e8739d1a14 --- /dev/null +++ b/packages/graphql/apollo/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/graphql/apollo/tsconfig.compile.esm.json b/packages/graphql/apollo/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/graphql/apollo/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/graphql/apollo/tsconfig.compile.json b/packages/graphql/apollo/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/graphql/apollo/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/graphql/apollo/tsconfig.esm.json b/packages/graphql/apollo/tsconfig.esm.json new file mode 100644 index 00000000000..257d09cb6e0 --- /dev/null +++ b/packages/graphql/apollo/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/graphql/apollo/tsconfig.json b/packages/graphql/apollo/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/graphql/apollo/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/graphql/typegraphql/.eslintignore b/packages/graphql/typegraphql/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/graphql/typegraphql/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/graphql/typegraphql/.eslintrc.js b/packages/graphql/typegraphql/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/graphql/typegraphql/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/graphql/typegraphql/jest.config.js b/packages/graphql/typegraphql/jest.config.js index 3a6537c7d20..e2dc3ed110d 100644 --- a/packages/graphql/typegraphql/jest.config.js +++ b/packages/graphql/typegraphql/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "typegraphql"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/typegraphql": "/src/index.ts" + }, coverageThreshold: { global: { statements: 100, diff --git a/packages/graphql/typegraphql/package.json b/packages/graphql/typegraphql/package.json index 99c116fd50c..f9e924f902c 100644 --- a/packages/graphql/typegraphql/package.json +++ b/packages/graphql/typegraphql/package.json @@ -14,13 +14,14 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start:express": "ts-node -r tsconfig-paths/register test/app/index.express.ts", - "start:koa": "ts-node -r tsconfig-paths/register test/app/index.koa.ts", - "test": "cross-env NODE_ENV=test jest" + "start:express": "ts-node test/app/index.express.ts", + "start:koa": "ts-node test/app/index.koa.ts", + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/apollo": "7.18.2", @@ -32,7 +33,10 @@ "@types/graphql": "^14.5.0", "class-validator": "~0.14.0", "graphql-passport": "0.6.3", - "type-graphql": "^1.1.1" + "type-graphql": "^1.1.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "apollo-datasource": ">=3.0.0", @@ -41,4 +45,4 @@ "graphql": ">=15.0.0", "type-graphql": ">=1.0.0" } -} \ No newline at end of file +} diff --git a/packages/graphql/typegraphql/tsconfig.cjs.json b/packages/graphql/typegraphql/tsconfig.cjs.json new file mode 100644 index 00000000000..e752610a7f6 --- /dev/null +++ b/packages/graphql/typegraphql/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../apollo" + } + ] +} diff --git a/packages/graphql/typegraphql/tsconfig.compile.esm.json b/packages/graphql/typegraphql/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/graphql/typegraphql/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/graphql/typegraphql/tsconfig.compile.json b/packages/graphql/typegraphql/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/graphql/typegraphql/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/graphql/typegraphql/tsconfig.esm.json b/packages/graphql/typegraphql/tsconfig.esm.json new file mode 100644 index 00000000000..10454399f2f --- /dev/null +++ b/packages/graphql/typegraphql/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../apollo" + } + ] +} diff --git a/packages/graphql/typegraphql/tsconfig.json b/packages/graphql/typegraphql/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/graphql/typegraphql/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/adapters-redis/.eslintignore b/packages/orm/adapters-redis/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/adapters-redis/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/adapters-redis/.eslintrc.js b/packages/orm/adapters-redis/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/adapters-redis/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/adapters-redis/jest.config.js b/packages/orm/adapters-redis/jest.config.js index 05f01b5ade9..e420f7a03e0 100644 --- a/packages/orm/adapters-redis/jest.config.js +++ b/packages/orm/adapters-redis/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "adapters-redis"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 70, diff --git a/packages/orm/adapters-redis/package.json b/packages/orm/adapters-redis/package.json index 61f1c544d9e..9260feb779e 100644 --- a/packages/orm/adapters-redis/package.json +++ b/packages/orm/adapters-redis/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest" + "test": "cross-env NODE_ENV=test yarn jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/adapters": "7.18.2", @@ -26,7 +27,10 @@ "tslib": "2.4.0" }, "devDependencies": { - "@tsed/core": "7.18.2" + "@tsed/core": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/adapters": "^7.18.2", @@ -37,4 +41,4 @@ "ioredis-mock": ">=8.2.2", "uuid": "8.3.2" } -} \ No newline at end of file +} diff --git a/packages/orm/adapters-redis/tsconfig.cjs.json b/packages/orm/adapters-redis/tsconfig.cjs.json new file mode 100644 index 00000000000..6ef5296738c --- /dev/null +++ b/packages/orm/adapters-redis/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../adapters" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../ioredis" + } + ] +} diff --git a/packages/orm/adapters-redis/tsconfig.compile.esm.json b/packages/orm/adapters-redis/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/adapters-redis/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/adapters-redis/tsconfig.compile.json b/packages/orm/adapters-redis/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/orm/adapters-redis/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/adapters-redis/tsconfig.esm.json b/packages/orm/adapters-redis/tsconfig.esm.json new file mode 100644 index 00000000000..fda59b32096 --- /dev/null +++ b/packages/orm/adapters-redis/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../adapters" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../ioredis" + } + ] +} diff --git a/packages/orm/adapters-redis/tsconfig.json b/packages/orm/adapters-redis/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/adapters-redis/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/adapters/.eslintignore b/packages/orm/adapters/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/adapters/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/adapters/.eslintrc.js b/packages/orm/adapters/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/adapters/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/adapters/jest.config.js b/packages/orm/adapters/jest.config.js index c0ead2f6b26..f106ba42e84 100644 --- a/packages/orm/adapters/jest.config.js +++ b/packages/orm/adapters/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "adapters"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/adapters": "/src/index.ts" + }, coverageThreshold: { global: { branches: 70, diff --git a/packages/orm/adapters/package.json b/packages/orm/adapters/package.json index 6a81711c7a8..250d4132832 100644 --- a/packages/orm/adapters/package.json +++ b/packages/orm/adapters/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest" + "test": "cross-env NODE_ENV=test yarn jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@types/lowdb": "1.0.11", @@ -37,7 +38,10 @@ "@tsed/di": "7.18.2", "@tsed/json-mapper": "7.18.2", "@tsed/schema": "7.18.2", - "@types/fs-extra": "9.0.13" + "@types/fs-extra": "9.0.13", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/ajv": "^7.18.2", @@ -67,4 +71,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/orm/adapters/tsconfig.cjs.json b/packages/orm/adapters/tsconfig.cjs.json new file mode 100644 index 00000000000..c1ad3256e7f --- /dev/null +++ b/packages/orm/adapters/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/adapters/tsconfig.compile.esm.json b/packages/orm/adapters/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/adapters/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/adapters/tsconfig.compile.json b/packages/orm/adapters/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/orm/adapters/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/adapters/tsconfig.esm.json b/packages/orm/adapters/tsconfig.esm.json new file mode 100644 index 00000000000..423820b75ef --- /dev/null +++ b/packages/orm/adapters/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/adapters/tsconfig.json b/packages/orm/adapters/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/adapters/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/ioredis/.eslintignore b/packages/orm/ioredis/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/ioredis/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/ioredis/.eslintrc.js b/packages/orm/ioredis/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/ioredis/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/ioredis/jest.config.js b/packages/orm/ioredis/jest.config.js index 05f01b5ade9..e420f7a03e0 100644 --- a/packages/orm/ioredis/jest.config.js +++ b/packages/orm/ioredis/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "adapters-redis"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 70, diff --git a/packages/orm/ioredis/package.json b/packages/orm/ioredis/package.json index 7d71ec976bd..282c5fcf0a2 100644 --- a/packages/orm/ioredis/package.json +++ b/packages/orm/ioredis/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest" + "test": "cross-env NODE_ENV=test yarn jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -28,7 +29,10 @@ "@tsed/di": "7.18.2", "@types/ioredis-mock": "^5.6.0", "ioredis": "5.2.3", - "ioredis-mock": "8.2.2" + "ioredis-mock": "8.2.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -36,4 +40,4 @@ "ioredis": ">=5.2.3", "ioredis-mock": ">=8.2.2" } -} \ No newline at end of file +} diff --git a/packages/orm/ioredis/tsconfig.cjs.json b/packages/orm/ioredis/tsconfig.cjs.json new file mode 100644 index 00000000000..77bc7d8530f --- /dev/null +++ b/packages/orm/ioredis/tsconfig.cjs.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/orm/ioredis/tsconfig.compile.esm.json b/packages/orm/ioredis/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/ioredis/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/ioredis/tsconfig.compile.json b/packages/orm/ioredis/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/orm/ioredis/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/ioredis/tsconfig.esm.json b/packages/orm/ioredis/tsconfig.esm.json new file mode 100644 index 00000000000..b18d0cf8dfe --- /dev/null +++ b/packages/orm/ioredis/tsconfig.esm.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/orm/ioredis/tsconfig.json b/packages/orm/ioredis/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/ioredis/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/mikro-orm/.eslintignore b/packages/orm/mikro-orm/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/mikro-orm/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/mikro-orm/.eslintrc.js b/packages/orm/mikro-orm/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/mikro-orm/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/mikro-orm/jest.config.js b/packages/orm/mikro-orm/jest.config.js index cf8f8c7684c..631dc39d119 100644 --- a/packages/orm/mikro-orm/jest.config.js +++ b/packages/orm/mikro-orm/jest.config.js @@ -2,7 +2,8 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "mikro-orm"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], coverageThreshold: { global: { branches: 95.83, diff --git a/packages/orm/mikro-orm/package.json b/packages/orm/mikro-orm/package.json index ee691fb283b..ae1a8fc21ce 100644 --- a/packages/orm/mikro-orm/package.json +++ b/packages/orm/mikro-orm/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -33,7 +34,10 @@ "@tsed/logger": ">=6.1.1", "@tsed/schema": "7.18.2", "@tsed/testing-mongoose": "7.18.2", - "ts-mockito": "^2.6.1" + "ts-mockito": "^2.6.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@mikro-orm/core": ">=4.5.9", @@ -42,4 +46,4 @@ "@tsed/di": "^7.18.2", "@tsed/logger": ">=6.2.2" } -} \ No newline at end of file +} diff --git a/packages/orm/mikro-orm/tsconfig.cjs.json b/packages/orm/mikro-orm/tsconfig.cjs.json new file mode 100644 index 00000000000..d9ff9b2e86a --- /dev/null +++ b/packages/orm/mikro-orm/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../testing-mongoose" + } + ] +} diff --git a/packages/orm/mikro-orm/tsconfig.compile.esm.json b/packages/orm/mikro-orm/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/mikro-orm/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/mikro-orm/tsconfig.compile.json b/packages/orm/mikro-orm/tsconfig.compile.json deleted file mode 100644 index 21186c76b60..00000000000 --- a/packages/orm/mikro-orm/tsconfig.compile.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/mikro-orm/tsconfig.esm.json b/packages/orm/mikro-orm/tsconfig.esm.json new file mode 100644 index 00000000000..df6502860ca --- /dev/null +++ b/packages/orm/mikro-orm/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../testing-mongoose" + } + ] +} diff --git a/packages/orm/mikro-orm/tsconfig.json b/packages/orm/mikro-orm/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/mikro-orm/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/mongoose/.eslintignore b/packages/orm/mongoose/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/mongoose/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/mongoose/.eslintrc.js b/packages/orm/mongoose/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/mongoose/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/mongoose/jest.config.js b/packages/orm/mongoose/jest.config.js index 14a4c2b2da1..f21b68a2e4c 100644 --- a/packages/orm/mongoose/jest.config.js +++ b/packages/orm/mongoose/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "mongoose"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/mongoose": "/src/index.ts" + }, coverageThreshold: { global: { statements: 99.5, diff --git a/packages/orm/mongoose/package.json b/packages/orm/mongoose/package.json index 5a38649534d..06e2da45b21 100644 --- a/packages/orm/mongoose/package.json +++ b/packages/orm/mongoose/package.json @@ -21,11 +21,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest" + "test": "cross-env NODE_ENV=test yarn jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "change-case": "4.1.2", @@ -38,7 +39,10 @@ "@tsed/json-mapper": "7.18.2", "@tsed/logger": ">=6.2.2", "@tsed/schema": "7.18.2", - "mongoose": "6.5.1" + "mongoose": "6.5.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/ajv": "^7.18.2", @@ -49,4 +53,4 @@ "@tsed/schema": "^7.18.2", "mongoose": ">=6.0.0" } -} \ No newline at end of file +} diff --git a/packages/orm/mongoose/tsconfig.cjs.json b/packages/orm/mongoose/tsconfig.cjs.json new file mode 100644 index 00000000000..3764d86173b --- /dev/null +++ b/packages/orm/mongoose/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/mongoose/tsconfig.compile.esm.json b/packages/orm/mongoose/tsconfig.compile.esm.json deleted file mode 100644 index 72e2d8576fb..00000000000 --- a/packages/orm/mongoose/tsconfig.compile.esm.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/mongoose/tsconfig.compile.json b/packages/orm/mongoose/tsconfig.compile.json deleted file mode 100644 index 89d1bcb93b1..00000000000 --- a/packages/orm/mongoose/tsconfig.compile.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/mongoose/tsconfig.esm.json b/packages/orm/mongoose/tsconfig.esm.json new file mode 100644 index 00000000000..008f0b6e797 --- /dev/null +++ b/packages/orm/mongoose/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/mongoose/tsconfig.json b/packages/orm/mongoose/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/mongoose/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/objection/.eslintignore b/packages/orm/objection/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/objection/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/objection/.eslintrc.js b/packages/orm/objection/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/objection/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/objection/jest.config.js b/packages/orm/objection/jest.config.js index ad2e454dbc5..7f0696e99a1 100644 --- a/packages/orm/objection/jest.config.js +++ b/packages/orm/objection/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "objection"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/objection": "/src/index.ts" + }, coverageThreshold: { global: { branches: 68.75, diff --git a/packages/orm/objection/package.json b/packages/orm/objection/package.json index 0e7f1c3e731..b0def5807f6 100644 --- a/packages/orm/objection/package.json +++ b/packages/orm/objection/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest" + "test": "cross-env NODE_ENV=test yarn jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -31,7 +32,10 @@ "@tsed/schema": "7.18.2", "knex": "^2.4.0", "objection": "^2.2.15", - "sqlite3": "^5.0.2" + "sqlite3": "^5.0.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/ajv": "^7.18.2", @@ -65,4 +69,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/orm/objection/tsconfig.cjs.json b/packages/orm/objection/tsconfig.cjs.json new file mode 100644 index 00000000000..3764d86173b --- /dev/null +++ b/packages/orm/objection/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/objection/tsconfig.compile.esm.json b/packages/orm/objection/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/objection/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/objection/tsconfig.compile.json b/packages/orm/objection/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/orm/objection/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/objection/tsconfig.esm.json b/packages/orm/objection/tsconfig.esm.json new file mode 100644 index 00000000000..008f0b6e797 --- /dev/null +++ b/packages/orm/objection/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/objection/tsconfig.json b/packages/orm/objection/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/objection/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/prisma/.eslintignore b/packages/orm/prisma/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/prisma/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/prisma/.eslintrc.js b/packages/orm/prisma/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/prisma/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/prisma/jest.config.js b/packages/orm/prisma/jest.config.js index 78f0ce61128..251cc11f016 100644 --- a/packages/orm/prisma/jest.config.js +++ b/packages/orm/prisma/jest.config.js @@ -4,7 +4,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "prisma"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/orm/prisma/package.json b/packages/orm/prisma/package.json index 6bbcf341992..94b51e40d4e 100644 --- a/packages/orm/prisma/package.json +++ b/packages/orm/prisma/package.json @@ -16,12 +16,13 @@ "tsed-prisma": "lib/cjs/generator.js" }, "scripts": { - "build": "rm -rf lib && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "rm -rf lib && yarn build:ts", "test": "cross-env NODE_ENV=test yarn jest", "generate:postgres": "cd test/postgres && prisma -v && prisma generate", - "generate:mongo": "cd test/mongo && prisma -v && prisma generate" + "generate:mongo": "cd test/mongo && prisma -v && prisma generate", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "private": false, "dependencies": { @@ -41,7 +42,10 @@ "@tsed/schema": "7.18.2", "@types/change-case": "^2.3.1", "@types/pluralize": "0.0.29", - "prisma": "^4.0.0" + "prisma": "^4.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@prisma/client": ">=4.0.0", @@ -61,4 +65,4 @@ "tsed", "prisma" ] -} \ No newline at end of file +} diff --git a/packages/orm/prisma/tsconfig.cjs.json b/packages/orm/prisma/tsconfig.cjs.json new file mode 100644 index 00000000000..cdf6ef64835 --- /dev/null +++ b/packages/orm/prisma/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/prisma/tsconfig.compile.esm.json b/packages/orm/prisma/tsconfig.compile.esm.json deleted file mode 100644 index 4d797e85361..00000000000 --- a/packages/orm/prisma/tsconfig.compile.esm.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "include": ["src"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "scripts" - ] -} diff --git a/packages/orm/prisma/tsconfig.compile.json b/packages/orm/prisma/tsconfig.compile.json deleted file mode 100644 index 0af62b2e55b..00000000000 --- a/packages/orm/prisma/tsconfig.compile.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "scripts" - ] -} diff --git a/packages/orm/prisma/tsconfig.esm.json b/packages/orm/prisma/tsconfig.esm.json new file mode 100644 index 00000000000..f6b898f8a4d --- /dev/null +++ b/packages/orm/prisma/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/prisma/tsconfig.json b/packages/orm/prisma/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/prisma/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/testing-mongoose/.eslintignore b/packages/orm/testing-mongoose/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/testing-mongoose/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/testing-mongoose/.eslintrc.js b/packages/orm/testing-mongoose/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/testing-mongoose/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/testing-mongoose/package.json b/packages/orm/testing-mongoose/package.json index e722292fc52..3297799f7f7 100644 --- a/packages/orm/testing-mongoose/package.json +++ b/packages/orm/testing-mongoose/package.json @@ -14,9 +14,10 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json" + "build": "yarn build:ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "mongodb-memory-server": "^8.0.2", @@ -26,7 +27,10 @@ "devDependencies": { "@tsed/common": "7.18.2", "@tsed/core": "7.18.2", - "@tsed/mongoose": "7.18.2" + "@tsed/mongoose": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -34,4 +38,4 @@ "@tsed/mongoose": "^7.18.2", "mongoose": "^6.1.7" } -} \ No newline at end of file +} diff --git a/packages/orm/testing-mongoose/tsconfig.cjs.json b/packages/orm/testing-mongoose/tsconfig.cjs.json new file mode 100644 index 00000000000..adf84ef8fc3 --- /dev/null +++ b/packages/orm/testing-mongoose/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../mongoose" + } + ] +} diff --git a/packages/orm/testing-mongoose/tsconfig.compile.esm.json b/packages/orm/testing-mongoose/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/testing-mongoose/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/testing-mongoose/tsconfig.compile.json b/packages/orm/testing-mongoose/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/orm/testing-mongoose/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/testing-mongoose/tsconfig.esm.json b/packages/orm/testing-mongoose/tsconfig.esm.json new file mode 100644 index 00000000000..e2b1fe1e64e --- /dev/null +++ b/packages/orm/testing-mongoose/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../mongoose" + } + ] +} diff --git a/packages/orm/testing-mongoose/tsconfig.json b/packages/orm/testing-mongoose/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/testing-mongoose/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/orm/typeorm/.eslintignore b/packages/orm/typeorm/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/orm/typeorm/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/orm/typeorm/.eslintrc.js b/packages/orm/typeorm/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/orm/typeorm/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/orm/typeorm/jest.config.js b/packages/orm/typeorm/jest.config.js index 21d0fc08bf9..528a547513a 100644 --- a/packages/orm/typeorm/jest.config.js +++ b/packages/orm/typeorm/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "typeorm"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/typeorm": "/src/index.ts" + }, coverageThreshold: { global: { statements: 96.49, diff --git a/packages/orm/typeorm/package.json b/packages/orm/typeorm/package.json index 12af1f3c39a..51c2623611f 100644 --- a/packages/orm/typeorm/package.json +++ b/packages/orm/typeorm/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -28,7 +29,10 @@ "@tsed/di": "7.18.2", "@tsed/json-mapper": "7.18.2", "@tsed/schema": "7.18.2", - "typeorm": "^0.2.45" + "typeorm": "^0.2.45", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -37,4 +41,4 @@ "@tsed/schema": "^7.18.2", "typeorm": "^0.2.26" } -} \ No newline at end of file +} diff --git a/packages/orm/typeorm/tsconfig.cjs.json b/packages/orm/typeorm/tsconfig.cjs.json new file mode 100644 index 00000000000..cdf6ef64835 --- /dev/null +++ b/packages/orm/typeorm/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/typeorm/tsconfig.compile.esm.json b/packages/orm/typeorm/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/orm/typeorm/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/typeorm/tsconfig.compile.json b/packages/orm/typeorm/tsconfig.compile.json deleted file mode 100644 index 21186c76b60..00000000000 --- a/packages/orm/typeorm/tsconfig.compile.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/orm/typeorm/tsconfig.esm.json b/packages/orm/typeorm/tsconfig.esm.json new file mode 100644 index 00000000000..f6b898f8a4d --- /dev/null +++ b/packages/orm/typeorm/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/orm/typeorm/tsconfig.json b/packages/orm/typeorm/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/orm/typeorm/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/perf/.eslintignore b/packages/perf/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/perf/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/perf/.eslintrc.js b/packages/perf/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/perf/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/perf/package.json b/packages/perf/package.json index ef2886efb31..21bce15670f 100644 --- a/packages/perf/package.json +++ b/packages/perf/package.json @@ -14,15 +14,20 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json" + "build": "yarn build:ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/core": "7.18.2", "chalk": "^4.1.0", "tslib": "2.4.0" }, - "devDependencies": {}, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/perf/tsconfig.cjs.json b/packages/perf/tsconfig.cjs.json new file mode 100644 index 00000000000..17b8f8e89fe --- /dev/null +++ b/packages/perf/tsconfig.cjs.json @@ -0,0 +1,33 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../core" + } + ] +} diff --git a/packages/perf/tsconfig.compile.esm.json b/packages/perf/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/perf/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/perf/tsconfig.compile.json b/packages/perf/tsconfig.compile.json deleted file mode 100644 index c12abdc86b9..00000000000 --- a/packages/perf/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts"] -} diff --git a/packages/perf/tsconfig.esm.json b/packages/perf/tsconfig.esm.json new file mode 100644 index 00000000000..3cb2e947c82 --- /dev/null +++ b/packages/perf/tsconfig.esm.json @@ -0,0 +1,33 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../core" + } + ] +} diff --git a/packages/perf/tsconfig.json b/packages/perf/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/perf/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/common/.eslintignore b/packages/platform/common/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/common/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/common/.eslintrc.js b/packages/platform/common/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/common/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/common/jest.config.js b/packages/platform/common/jest.config.js index 6b2bba6434b..d7015719e24 100644 --- a/packages/platform/common/jest.config.js +++ b/packages/platform/common/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "common"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "^@tsed/common$": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/common/package.json b/packages/platform/common/package.json index 9e2dc613ce1..7a4c1d5cee7 100644 --- a/packages/platform/common/package.json +++ b/packages/platform/common/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\" -e \"getConfiguration\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "Express", @@ -73,7 +74,6 @@ "@tsed/json-mapper": "7.18.2", "@tsed/logger": ">=6.2.2", "@tsed/logger-file": ">=6.2.2", - "@tsed/perf": "7.18.2", "@tsed/platform-exceptions": "7.18.2", "@tsed/platform-log-middleware": "7.18.2", "@tsed/platform-middlewares": "7.18.2", @@ -87,6 +87,12 @@ "tslib": "2.4.0", "uuid": "8.3.2" }, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "@tsed/components-scan": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": { "@tsed/logger": ">=6.2.2", "@tsed/logger-file": ">=6.2.2" @@ -98,6 +104,5 @@ "@tsed/logger-file": { "optional": false } - }, - "devDependencies": {} -} \ No newline at end of file + } +} diff --git a/packages/platform/common/tsconfig.cjs.json b/packages/platform/common/tsconfig.cjs.json new file mode 100644 index 00000000000..ab61e99dccd --- /dev/null +++ b/packages/platform/common/tsconfig.cjs.json @@ -0,0 +1,69 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../third-parties/components-scan" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-exceptions" + }, + { + "path": "../platform-log-middleware" + }, + { + "path": "../platform-middlewares" + }, + { + "path": "../platform-params" + }, + { + "path": "../platform-response-filter" + }, + { + "path": "../platform-router" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/common/tsconfig.compile.esm.json b/packages/platform/common/tsconfig.compile.esm.json deleted file mode 100644 index 72e2d8576fb..00000000000 --- a/packages/platform/common/tsconfig.compile.esm.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/common/tsconfig.compile.json b/packages/platform/common/tsconfig.compile.json deleted file mode 100644 index 89d1bcb93b1..00000000000 --- a/packages/platform/common/tsconfig.compile.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/common/tsconfig.esm.json b/packages/platform/common/tsconfig.esm.json new file mode 100644 index 00000000000..2033f0dffea --- /dev/null +++ b/packages/platform/common/tsconfig.esm.json @@ -0,0 +1,69 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../third-parties/components-scan" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-exceptions" + }, + { + "path": "../platform-log-middleware" + }, + { + "path": "../platform-middlewares" + }, + { + "path": "../platform-params" + }, + { + "path": "../platform-response-filter" + }, + { + "path": "../platform-router" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/common/tsconfig.json b/packages/platform/common/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/common/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-aws/jest.config.js b/packages/platform/platform-aws/jest.config.js deleted file mode 100644 index 102e5387aa8..00000000000 --- a/packages/platform/platform-aws/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -// For a detailed explanation regarding each configuration property, visit: -// https://jestjs.io/docs/en/configuration.html - -module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-aws"), - coverageThreshold: { - global: { - statements: 100, - branches: 25, - functions: 100, - lines: 100 - } - } -}; diff --git a/packages/platform/platform-cache/.eslintignore b/packages/platform/platform-cache/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-cache/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-cache/.eslintrc.js b/packages/platform/platform-cache/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-cache/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-cache/jest.config.js b/packages/platform/platform-cache/jest.config.js index c9a80fb17f5..c454996e77e 100644 --- a/packages/platform/platform-cache/jest.config.js +++ b/packages/platform/platform-cache/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-cache"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/platform-cache": "/src/index.ts" + }, coverageThreshold: { global: { branches: 94.12, diff --git a/packages/platform/platform-cache/package.json b/packages/platform/platform-cache/package.json index f2a7b3324a3..bc0baf6149c 100644 --- a/packages/platform/platform-cache/package.json +++ b/packages/platform/platform-cache/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", - "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"" + "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "cache-manager": "^5.1.3", @@ -30,7 +31,10 @@ "@tsed/di": "7.18.2", "@tsed/json-mapper": "7.18.2", "@tsed/schema": "7.18.2", - "@types/micromatch": "^4.0.1" + "@types/micromatch": "^4.0.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -52,4 +56,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-cache/tsconfig.cjs.json b/packages/platform/platform-cache/tsconfig.cjs.json new file mode 100644 index 00000000000..cdf6ef64835 --- /dev/null +++ b/packages/platform/platform-cache/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-cache/tsconfig.compile.esm.json b/packages/platform/platform-cache/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-cache/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-cache/tsconfig.compile.json b/packages/platform/platform-cache/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-cache/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-cache/tsconfig.esm.json b/packages/platform/platform-cache/tsconfig.esm.json new file mode 100644 index 00000000000..f6b898f8a4d --- /dev/null +++ b/packages/platform/platform-cache/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-cache/tsconfig.json b/packages/platform/platform-cache/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-cache/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-exceptions/.eslintignore b/packages/platform/platform-exceptions/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-exceptions/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-exceptions/.eslintrc.js b/packages/platform/platform-exceptions/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-exceptions/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-exceptions/jest.config.js b/packages/platform/platform-exceptions/jest.config.js index 854485ce765..b75084a3bfc 100644 --- a/packages/platform/platform-exceptions/jest.config.js +++ b/packages/platform/platform-exceptions/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-exceptions"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 100, diff --git a/packages/platform/platform-exceptions/package.json b/packages/platform/platform-exceptions/package.json index a15ed92b291..0374707447d 100644 --- a/packages/platform/platform-exceptions/package.json +++ b/packages/platform/platform-exceptions/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -27,7 +28,10 @@ "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -49,4 +53,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-exceptions/tsconfig.cjs.json b/packages/platform/platform-exceptions/tsconfig.cjs.json new file mode 100644 index 00000000000..df7165cbce8 --- /dev/null +++ b/packages/platform/platform-exceptions/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-exceptions/tsconfig.compile.esm.json b/packages/platform/platform-exceptions/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-exceptions/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-exceptions/tsconfig.compile.json b/packages/platform/platform-exceptions/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-exceptions/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-exceptions/tsconfig.esm.json b/packages/platform/platform-exceptions/tsconfig.esm.json new file mode 100644 index 00000000000..200ca08cfe7 --- /dev/null +++ b/packages/platform/platform-exceptions/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-exceptions/tsconfig.json b/packages/platform/platform-exceptions/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-exceptions/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-express/.eslintignore b/packages/platform/platform-express/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-express/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-express/.eslintrc.js b/packages/platform/platform-express/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-express/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-express/jest.config.js b/packages/platform/platform-express/jest.config.js index 9559b98f045..46fc2a604f1 100644 --- a/packages/platform/platform-express/jest.config.js +++ b/packages/platform/platform-express/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-express"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "^@tsed/platform-express$": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/platform-express/package.json b/packages/platform/platform-express/package.json index c80fb3a317e..c0228172d82 100644 --- a/packages/platform/platform-express/package.json +++ b/packages/platform/platform-express/package.json @@ -14,13 +14,14 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "start:emulate": "ts-node -r tsconfig-paths/register test/app/emulate.ts", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --testTimeout 10000" + "start": "ts-node test/app/index.ts", + "start:emulate": "ts-node test/app/emulate.ts", + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --testTimeout 10000", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "Express", @@ -79,7 +80,10 @@ "cookie-parser": "1.4.6", "cors": "2.8.5", "express-session": "1.17.2", - "method-override": "3.0.0" + "method-override": "3.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -120,4 +124,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-express/tsconfig.cjs.json b/packages/platform/platform-express/tsconfig.cjs.json new file mode 100644 index 00000000000..0ecba4c40aa --- /dev/null +++ b/packages/platform/platform-express/tsconfig.cjs.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-test-sdk" + } + ] +} diff --git a/packages/platform/platform-express/tsconfig.compile.esm.json b/packages/platform/platform-express/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-express/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-express/tsconfig.compile.json b/packages/platform/platform-express/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-express/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-express/tsconfig.esm.json b/packages/platform/platform-express/tsconfig.esm.json new file mode 100644 index 00000000000..d4e59fba273 --- /dev/null +++ b/packages/platform/platform-express/tsconfig.esm.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-test-sdk" + } + ] +} diff --git a/packages/platform/platform-express/tsconfig.json b/packages/platform/platform-express/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-express/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-koa/.eslintignore b/packages/platform/platform-koa/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-koa/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-koa/.eslintrc.js b/packages/platform/platform-koa/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-koa/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-koa/jest.config.js b/packages/platform/platform-koa/jest.config.js index 5bc845bc8e3..6080b544e0c 100644 --- a/packages/platform/platform-koa/jest.config.js +++ b/packages/platform/platform-koa/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-koa"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "^@tsed/platform-koa$": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/platform-koa/package.json b/packages/platform/platform-koa/package.json index f04f390cb59..95fcbc3078c 100644 --- a/packages/platform/platform-koa/package.json +++ b/packages/platform/platform-koa/package.json @@ -14,12 +14,13 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --testTimeout 10000" + "start": "ts-node test/app/index.ts", + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --testTimeout 10000", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "Koa", @@ -75,7 +76,10 @@ "koa-compress": "5.1.0", "koa-override": "3.0.0", "koa-qs": "^3.0.0", - "koa-session": "6.2.0" + "koa-session": "6.2.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "dependencies": { "@koa/router": "^10.1.1", @@ -126,4 +130,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-koa/tsconfig.cjs.json b/packages/platform/platform-koa/tsconfig.cjs.json new file mode 100644 index 00000000000..a208c24fe4b --- /dev/null +++ b/packages/platform/platform-koa/tsconfig.cjs.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-test-sdk" + } + ] +} diff --git a/packages/platform/platform-koa/tsconfig.compile.esm.json b/packages/platform/platform-koa/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-koa/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-koa/tsconfig.compile.json b/packages/platform/platform-koa/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-koa/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-koa/tsconfig.esm.json b/packages/platform/platform-koa/tsconfig.esm.json new file mode 100644 index 00000000000..6e1e20e6e2e --- /dev/null +++ b/packages/platform/platform-koa/tsconfig.esm.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-test-sdk" + } + ] +} diff --git a/packages/platform/platform-koa/tsconfig.json b/packages/platform/platform-koa/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-koa/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-log-middleware/.eslintignore b/packages/platform/platform-log-middleware/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-log-middleware/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-log-middleware/.eslintrc.js b/packages/platform/platform-log-middleware/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-log-middleware/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-log-middleware/jest.config.js b/packages/platform/platform-log-middleware/jest.config.js index 135eb2fde92..d13e01be865 100644 --- a/packages/platform/platform-log-middleware/jest.config.js +++ b/packages/platform/platform-log-middleware/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-serverless"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 64.29, diff --git a/packages/platform/platform-log-middleware/package.json b/packages/platform/platform-log-middleware/package.json index 970aed2fb9d..bd30cffae02 100644 --- a/packages/platform/platform-log-middleware/package.json +++ b/packages/platform/platform-log-middleware/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -26,7 +27,10 @@ "devDependencies": { "@tsed/di": "7.18.2", "@tsed/platform-middlewares": "7.18.2", - "@tsed/platform-params": "7.18.2" + "@tsed/platform-params": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/di": "^7.18.2", @@ -44,4 +48,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-log-middleware/tsconfig.cjs.json b/packages/platform/platform-log-middleware/tsconfig.cjs.json new file mode 100644 index 00000000000..2e8ffe6f3f0 --- /dev/null +++ b/packages/platform/platform-log-middleware/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../platform-middlewares" + }, + { + "path": "../platform-params" + } + ] +} diff --git a/packages/platform/platform-log-middleware/tsconfig.compile.esm.json b/packages/platform/platform-log-middleware/tsconfig.compile.esm.json deleted file mode 100644 index 72e2d8576fb..00000000000 --- a/packages/platform/platform-log-middleware/tsconfig.compile.esm.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-log-middleware/tsconfig.compile.json b/packages/platform/platform-log-middleware/tsconfig.compile.json deleted file mode 100644 index 89d1bcb93b1..00000000000 --- a/packages/platform/platform-log-middleware/tsconfig.compile.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-log-middleware/tsconfig.esm.json b/packages/platform/platform-log-middleware/tsconfig.esm.json new file mode 100644 index 00000000000..10e9a921729 --- /dev/null +++ b/packages/platform/platform-log-middleware/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../platform-middlewares" + }, + { + "path": "../platform-params" + } + ] +} diff --git a/packages/platform/platform-log-middleware/tsconfig.json b/packages/platform/platform-log-middleware/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-log-middleware/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-middlewares/.eslintignore b/packages/platform/platform-middlewares/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-middlewares/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-middlewares/.eslintrc.js b/packages/platform/platform-middlewares/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-middlewares/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-middlewares/jest.config.js b/packages/platform/platform-middlewares/jest.config.js index 79ef1dfbd16..53ed608959f 100644 --- a/packages/platform/platform-middlewares/jest.config.js +++ b/packages/platform/platform-middlewares/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-middlewares"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 100, diff --git a/packages/platform/platform-middlewares/package.json b/packages/platform/platform-middlewares/package.json index 2f8f14ae48a..626ecac8bbd 100644 --- a/packages/platform/platform-middlewares/package.json +++ b/packages/platform/platform-middlewares/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -26,7 +27,10 @@ "devDependencies": { "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -44,4 +48,4 @@ "optional": true } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-middlewares/tsconfig.cjs.json b/packages/platform/platform-middlewares/tsconfig.cjs.json new file mode 100644 index 00000000000..a326bef267e --- /dev/null +++ b/packages/platform/platform-middlewares/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-middlewares/tsconfig.compile.esm.json b/packages/platform/platform-middlewares/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-middlewares/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-middlewares/tsconfig.compile.json b/packages/platform/platform-middlewares/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-middlewares/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-middlewares/tsconfig.esm.json b/packages/platform/platform-middlewares/tsconfig.esm.json new file mode 100644 index 00000000000..1577b855bc3 --- /dev/null +++ b/packages/platform/platform-middlewares/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-middlewares/tsconfig.json b/packages/platform/platform-middlewares/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-middlewares/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-params/.eslintignore b/packages/platform/platform-params/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-params/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-params/.eslintrc.js b/packages/platform/platform-params/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-params/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-params/jest.config.js b/packages/platform/platform-params/jest.config.js index dbd377e989a..0c1d76d6dc7 100644 --- a/packages/platform/platform-params/jest.config.js +++ b/packages/platform/platform-params/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-params"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 89.89, diff --git a/packages/platform/platform-params/package.json b/packages/platform/platform-params/package.json index 881ac6c7fa3..4f592922a7f 100644 --- a/packages/platform/platform-params/package.json +++ b/packages/platform/platform-params/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -28,7 +29,10 @@ "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", "@tsed/json-mapper": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -54,4 +58,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-params/tsconfig.cjs.json b/packages/platform/platform-params/tsconfig.cjs.json new file mode 100644 index 00000000000..99b0b6c26de --- /dev/null +++ b/packages/platform/platform-params/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-params/tsconfig.compile.esm.json b/packages/platform/platform-params/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-params/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-params/tsconfig.compile.json b/packages/platform/platform-params/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-params/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-params/tsconfig.esm.json b/packages/platform/platform-params/tsconfig.esm.json new file mode 100644 index 00000000000..27009d9ed8a --- /dev/null +++ b/packages/platform/platform-params/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-params/tsconfig.json b/packages/platform/platform-params/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-params/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-response-filter/.eslintignore b/packages/platform/platform-response-filter/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-response-filter/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-response-filter/.eslintrc.js b/packages/platform/platform-response-filter/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-response-filter/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-response-filter/jest.config.js b/packages/platform/platform-response-filter/jest.config.js index 0ab611d022c..f6df5141812 100644 --- a/packages/platform/platform-response-filter/jest.config.js +++ b/packages/platform/platform-response-filter/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-response-filter"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/platform-response-filter/package.json b/packages/platform/platform-response-filter/package.json index 623efecb5f5..48f14c7e40e 100644 --- a/packages/platform/platform-response-filter/package.json +++ b/packages/platform/platform-response-filter/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -28,7 +29,10 @@ "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", "@tsed/json-mapper": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -54,4 +58,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-response-filter/tsconfig.cjs.json b/packages/platform/platform-response-filter/tsconfig.cjs.json new file mode 100644 index 00000000000..99b0b6c26de --- /dev/null +++ b/packages/platform/platform-response-filter/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-response-filter/tsconfig.compile.esm.json b/packages/platform/platform-response-filter/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-response-filter/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-response-filter/tsconfig.compile.json b/packages/platform/platform-response-filter/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-response-filter/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-response-filter/tsconfig.esm.json b/packages/platform/platform-response-filter/tsconfig.esm.json new file mode 100644 index 00000000000..27009d9ed8a --- /dev/null +++ b/packages/platform/platform-response-filter/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-response-filter/tsconfig.json b/packages/platform/platform-response-filter/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-response-filter/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-router/.eslintignore b/packages/platform/platform-router/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-router/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-router/.eslintrc.js b/packages/platform/platform-router/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-router/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-router/jest.config.js b/packages/platform/platform-router/jest.config.js index cf870008dec..ce77497f1d4 100644 --- a/packages/platform/platform-router/jest.config.js +++ b/packages/platform/platform-router/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-router"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/platform-router": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/platform-router/package.json b/packages/platform/platform-router/package.json index 42005626bca..3a4b59bb803 100644 --- a/packages/platform/platform-router/package.json +++ b/packages/platform/platform-router/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -29,7 +30,10 @@ "@tsed/exceptions": "7.18.2", "@tsed/json-mapper": "7.18.2", "@tsed/platform-params": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -59,4 +63,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-router/tsconfig.cjs.json b/packages/platform/platform-router/tsconfig.cjs.json new file mode 100644 index 00000000000..9b1b0a8b7d4 --- /dev/null +++ b/packages/platform/platform-router/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-params" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-router/tsconfig.compile.esm.json b/packages/platform/platform-router/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-router/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-router/tsconfig.compile.json b/packages/platform/platform-router/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-router/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-router/tsconfig.esm.json b/packages/platform/platform-router/tsconfig.esm.json new file mode 100644 index 00000000000..c23b2566191 --- /dev/null +++ b/packages/platform/platform-router/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-params" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-router/tsconfig.json b/packages/platform/platform-router/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-router/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-serverless-http/.eslintignore b/packages/platform/platform-serverless-http/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-serverless-http/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-serverless-http/.eslintrc.js b/packages/platform/platform-serverless-http/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-serverless-http/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-serverless-http/jest.config.js b/packages/platform/platform-serverless-http/jest.config.js index 8fac7179644..18b30e5d098 100644 --- a/packages/platform/platform-serverless-http/jest.config.js +++ b/packages/platform/platform-serverless-http/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-serverless-http"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/platform-serverless-http": "/src/index.ts" + }, coverageThreshold: { global: { branches: 100, diff --git a/packages/platform/platform-serverless-http/package.json b/packages/platform/platform-serverless-http/package.json index 0fe109a6e6e..ac072ede447 100644 --- a/packages/platform/platform-serverless-http/package.json +++ b/packages/platform/platform-serverless-http/package.json @@ -13,11 +13,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "private": false, "keywords": [ @@ -66,7 +67,10 @@ "@tsed/di": "7.18.2", "@tsed/platform-serverless-testing": "7.18.2", "aws-lambda": "^1.0.7", - "serverless-http": "^2.7.0" + "serverless-http": "^2.7.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -102,4 +106,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-serverless-http/tsconfig.cjs.json b/packages/platform/platform-serverless-http/tsconfig.cjs.json new file mode 100644 index 00000000000..8acccf59275 --- /dev/null +++ b/packages/platform/platform-serverless-http/tsconfig.cjs.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-serverless-testing" + } + ] +} diff --git a/packages/platform/platform-serverless-http/tsconfig.compile.esm.json b/packages/platform/platform-serverless-http/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-serverless-http/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless-http/tsconfig.compile.json b/packages/platform/platform-serverless-http/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-serverless-http/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless-http/tsconfig.esm.json b/packages/platform/platform-serverless-http/tsconfig.esm.json new file mode 100644 index 00000000000..000d55b0a7a --- /dev/null +++ b/packages/platform/platform-serverless-http/tsconfig.esm.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../platform-serverless-testing" + } + ] +} diff --git a/packages/platform/platform-serverless-http/tsconfig.json b/packages/platform/platform-serverless-http/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-serverless-http/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-serverless-testing/.eslintignore b/packages/platform/platform-serverless-testing/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-serverless-testing/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-serverless-testing/.eslintrc.js b/packages/platform/platform-serverless-testing/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-serverless-testing/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-serverless-testing/package.json b/packages/platform/platform-serverless-testing/package.json index d526fb5fc21..b1a4ad3f0a2 100644 --- a/packages/platform/platform-serverless-testing/package.json +++ b/packages/platform/platform-serverless-testing/package.json @@ -13,9 +13,10 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json" + "build": "yarn build:ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "private": false, "keywords": [ @@ -59,7 +60,10 @@ "@tsed/common": "7.18.2", "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "dependencies": { "aws-lambda": "^1.0.7", @@ -74,4 +78,4 @@ "@tsed/openspec": "^7.18.2", "@tsed/schema": "^7.18.2" } -} \ No newline at end of file +} diff --git a/packages/platform/platform-serverless-testing/tsconfig.cjs.json b/packages/platform/platform-serverless-testing/tsconfig.cjs.json new file mode 100644 index 00000000000..8a468f99b50 --- /dev/null +++ b/packages/platform/platform-serverless-testing/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-serverless-testing/tsconfig.compile.esm.json b/packages/platform/platform-serverless-testing/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-serverless-testing/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless-testing/tsconfig.compile.json b/packages/platform/platform-serverless-testing/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-serverless-testing/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless-testing/tsconfig.esm.json b/packages/platform/platform-serverless-testing/tsconfig.esm.json new file mode 100644 index 00000000000..0d0ce14786b --- /dev/null +++ b/packages/platform/platform-serverless-testing/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-serverless-testing/tsconfig.json b/packages/platform/platform-serverless-testing/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-serverless-testing/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-serverless/.eslintignore b/packages/platform/platform-serverless/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-serverless/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-serverless/.eslintrc.js b/packages/platform/platform-serverless/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-serverless/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-serverless/jest.config.js b/packages/platform/platform-serverless/jest.config.js index 1e8a1fe2861..2e406d60907 100644 --- a/packages/platform/platform-serverless/jest.config.js +++ b/packages/platform/platform-serverless/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-serverless"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "^@tsed/platform-serverless$": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/platform/platform-serverless/package.json b/packages/platform/platform-serverless/package.json index ff34a4a4f48..949b3d4b806 100644 --- a/packages/platform/platform-serverless/package.json +++ b/packages/platform/platform-serverless/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/core": "7.18.2", @@ -37,7 +38,10 @@ "@types/aws-lambda": "^8.10.83", "@types/encodeurl": "^1.0.0", "@types/mime": "^3.0.1", - "find-my-way": "^7.0.0" + "find-my-way": "^7.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/di": "^7.18.2", @@ -54,4 +58,4 @@ "optional": true } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-serverless/tsconfig.cjs.json b/packages/platform/platform-serverless/tsconfig.cjs.json new file mode 100644 index 00000000000..52226c4878f --- /dev/null +++ b/packages/platform/platform-serverless/tsconfig.cjs.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../platform-serverless-testing" + }, + { + "path": "../../core" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-exceptions" + }, + { + "path": "../platform-params" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-serverless/tsconfig.compile.esm.json b/packages/platform/platform-serverless/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-serverless/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless/tsconfig.compile.json b/packages/platform/platform-serverless/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-serverless/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-serverless/tsconfig.esm.json b/packages/platform/platform-serverless/tsconfig.esm.json new file mode 100644 index 00000000000..56fa5318b3e --- /dev/null +++ b/packages/platform/platform-serverless/tsconfig.esm.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../platform-serverless-testing" + }, + { + "path": "../../core" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-exceptions" + }, + { + "path": "../platform-params" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-serverless/tsconfig.json b/packages/platform/platform-serverless/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-serverless/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-test-sdk/.eslintignore b/packages/platform/platform-test-sdk/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-test-sdk/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-test-sdk/.eslintrc.js b/packages/platform/platform-test-sdk/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-test-sdk/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-test-sdk/package.json b/packages/platform/platform-test-sdk/package.json index f52a36dff27..2eebe39b0d1 100644 --- a/packages/platform/platform-test-sdk/package.json +++ b/packages/platform/platform-test-sdk/package.json @@ -14,10 +14,11 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", - "barrels": "yarn barrelsby --delete -d ./src -d ./src/interfaces -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"" + "build": "yarn barrels && yarn build:ts", + "barrels": "yarn barrelsby --delete -d ./src -d ./src/interfaces -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "Ts.ED", @@ -42,6 +43,10 @@ "ajv": "^8.12.0", "axios": "^1.3.0" }, - "devDependencies": {}, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/platform/platform-test-sdk/src/tests/testMulter.ts b/packages/platform/platform-test-sdk/src/tests/testMulter.ts index abe2a577a48..3ce217edbef 100644 --- a/packages/platform/platform-test-sdk/src/tests/testMulter.ts +++ b/packages/platform/platform-test-sdk/src/tests/testMulter.ts @@ -74,6 +74,9 @@ export function testMulter(options: PlatformTestingSdkOpts) { beforeAll( PlatformTest.bootstrap(options.server, { ...options, + logger: { + level: "info" + }, mount: { "/rest": [TestMulterController] } diff --git a/packages/platform/platform-test-sdk/tsconfig.cjs.json b/packages/platform/platform-test-sdk/tsconfig.cjs.json new file mode 100644 index 00000000000..517451d2316 --- /dev/null +++ b/packages/platform/platform-test-sdk/tsconfig.cjs.json @@ -0,0 +1,63 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-cache" + }, + { + "path": "../platform-params" + }, + { + "path": "../platform-router" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../specs/swagger" + } + ] +} diff --git a/packages/platform/platform-test-sdk/tsconfig.compile.esm.json b/packages/platform/platform-test-sdk/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-test-sdk/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-test-sdk/tsconfig.compile.json b/packages/platform/platform-test-sdk/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-test-sdk/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-test-sdk/tsconfig.esm.json b/packages/platform/platform-test-sdk/tsconfig.esm.json new file mode 100644 index 00000000000..29843820256 --- /dev/null +++ b/packages/platform/platform-test-sdk/tsconfig.esm.json @@ -0,0 +1,63 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../platform-cache" + }, + { + "path": "../platform-params" + }, + { + "path": "../platform-router" + }, + { + "path": "../platform-views" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../specs/swagger" + } + ] +} diff --git a/packages/platform/platform-test-sdk/tsconfig.json b/packages/platform/platform-test-sdk/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-test-sdk/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/platform/platform-views/.eslintignore b/packages/platform/platform-views/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/platform/platform-views/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/platform/platform-views/.eslintrc.js b/packages/platform/platform-views/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/platform/platform-views/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/platform/platform-views/jest.config.js b/packages/platform/platform-views/jest.config.js index 4b439d93f21..947e58f582f 100644 --- a/packages/platform/platform-views/jest.config.js +++ b/packages/platform/platform-views/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-views"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 100, diff --git a/packages/platform/platform-views/package.json b/packages/platform/platform-views/package.json index 287ba5cbab5..e207917fa5a 100644 --- a/packages/platform/platform-views/package.json +++ b/packages/platform/platform-views/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/engines": "7.18.2", @@ -31,7 +32,10 @@ "@tsed/engines": "7.18.2", "@tsed/exceptions": "7.18.2", "@tsed/schema": "7.18.2", - "@types/ejs": "3.1.1" + "@types/ejs": "3.1.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -54,4 +58,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/platform/platform-views/tsconfig.cjs.json b/packages/platform/platform-views/tsconfig.cjs.json new file mode 100644 index 00000000000..236ee5d824c --- /dev/null +++ b/packages/platform/platform-views/tsconfig.cjs.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../engines" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-views/tsconfig.compile.esm.json b/packages/platform/platform-views/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/platform/platform-views/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-views/tsconfig.compile.json b/packages/platform/platform-views/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/platform/platform-views/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/platform/platform-views/tsconfig.esm.json b/packages/platform/platform-views/tsconfig.esm.json new file mode 100644 index 00000000000..0755e70c049 --- /dev/null +++ b/packages/platform/platform-views/tsconfig.esm.json @@ -0,0 +1,45 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../engines" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/platform/platform-views/tsconfig.json b/packages/platform/platform-views/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/platform/platform-views/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/security/jwks/.eslintignore b/packages/security/jwks/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/security/jwks/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/security/jwks/.eslintrc.js b/packages/security/jwks/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/security/jwks/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/security/jwks/jest.config.js b/packages/security/jwks/jest.config.js index a4f9dc5d5c6..1a8344f67c2 100644 --- a/packages/security/jwks/jest.config.js +++ b/packages/security/jwks/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "jwk"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 100, diff --git a/packages/security/jwks/package.json b/packages/security/jwks/package.json index e1293d97af6..ce19a5398c4 100644 --- a/packages/security/jwks/package.json +++ b/packages/security/jwks/package.json @@ -13,17 +13,22 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn build:ts", "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts" + "start": "ts-node test/app/index.ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "fs-extra": "^10.0.1", "jose2": "npm:jose@^2.0.4", "tslib": "2.4.0" }, - "devDependencies": {}, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/security/jwks/tsconfig.cjs.json b/packages/security/jwks/tsconfig.cjs.json new file mode 100644 index 00000000000..290e454aeca --- /dev/null +++ b/packages/security/jwks/tsconfig.cjs.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/security/jwks/tsconfig.compile.esm.json b/packages/security/jwks/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/security/jwks/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/security/jwks/tsconfig.compile.json b/packages/security/jwks/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/security/jwks/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/engines/tsconfig.compile.esm.json b/packages/security/jwks/tsconfig.esm.json similarity index 57% rename from packages/engines/tsconfig.compile.esm.json rename to packages/security/jwks/tsconfig.esm.json index 6d867e9be89..89f93d97c26 100644 --- a/packages/engines/tsconfig.compile.esm.json +++ b/packages/security/jwks/tsconfig.esm.json @@ -1,14 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", "module": "ES2020", "rootDir": "src", "outDir": "./lib/esm", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, - "include": ["src"], + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -20,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", - "**/__mock__/**" - ] + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] } diff --git a/packages/security/jwks/tsconfig.json b/packages/security/jwks/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/security/jwks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/security/jwks/tsconfig.tsbuildinfo b/packages/security/jwks/tsconfig.tsbuildinfo new file mode 100644 index 00000000000..ed65d323f6d --- /dev/null +++ b/packages/security/jwks/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../../../node_modules/jose2/types/index.d.ts","./src/getJwks.ts","./src/index.ts","./src/__mocks__/generated/keys.json"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"712ba0d43b44d144dfd01593f61af6e2e21cfae83e834d297643e7973e55ed61","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"4cd4cff679c9b3d9239fd7bf70293ca4594583767526916af8e5d5a47d0219c7","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","94a6d863f5e8bc6765a25a256fdb74ba3fa7adf1ce5a140ef273d20afb348340",{"version":"3817a571cab8207c7371f47c6ead40146ac43c178835e1a6df7636ec9a86e8fe","signature":"8c55d5938ee8cb8331bb28b1c9d61d74c77aef4a3116a77fe8def346cdc7df8d"},"1bc6cb33a19422c0f7bcc29766bfd7e16108a4b09e869a964f4162c95d0bf081","660a5275c42060a299611598001825dc90134162d40ad3969216e605d3fa2711"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"newLine":1,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","preserveConstEnums":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"suppressImplicitAnyIndexErrors":false,"target":99},"fileIdsList":[[63,90,97],[47,90],[50,90],[51,56,90],[52,62,63,70,79,89,90],[52,53,62,70,90],[54,90],[55,56,63,71,90],[56,79,86,90],[57,59,62,70,90],[58,90],[59,60,90],[61,62,90],[62,90],[62,63,64,79,89,90],[62,63,64,79,90],[90],[65,70,79,89,90],[62,63,65,66,70,79,86,89,90],[65,67,79,86,89,90],[47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],[62,68,90],[69,89,90],[59,62,70,79,90],[71,90],[72,90],[50,73,90],[74,88,90,94],[75,90],[76,90],[62,77,90],[77,78,90,92],[62,79,80,81,90],[79,81,90],[79,80,90],[82,90],[83,90],[62,84,85,90],[84,85,90],[56,70,79,86,90],[87,90],[70,88,90],[51,65,76,89,90],[56,90],[79,90,91],[90,92],[90,93],[51,56,62,64,73,79,89,90,92,94],[79,90,95],[56,90,97],[46,72,90,98,99],[46,90,99,100],[99]],"referencedMap":[[98,1],[47,2],[48,2],[50,3],[51,4],[52,5],[53,6],[54,7],[55,8],[56,9],[57,10],[58,11],[59,12],[60,12],[61,13],[62,14],[63,15],[64,16],[49,17],[96,17],[65,18],[66,19],[67,20],[97,21],[68,22],[69,23],[70,24],[71,25],[72,26],[73,27],[74,28],[75,29],[76,30],[77,31],[78,32],[79,33],[81,34],[80,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[93,47],[94,48],[95,49],[99,50],[46,17],[10,17],[9,17],[2,17],[11,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[3,17],[4,17],[22,17],[19,17],[20,17],[21,17],[23,17],[24,17],[25,17],[5,17],[26,17],[27,17],[28,17],[29,17],[6,17],[30,17],[31,17],[32,17],[33,17],[7,17],[34,17],[39,17],[40,17],[35,17],[36,17],[37,17],[38,17],[8,17],[44,17],[41,17],[42,17],[43,17],[1,17],[45,17],[102,17],[100,51],[101,52]],"exportedModulesMap":[[98,1],[47,2],[48,2],[50,3],[51,4],[52,5],[53,6],[54,7],[55,8],[56,9],[57,10],[58,11],[59,12],[60,12],[61,13],[62,14],[63,15],[64,16],[49,17],[96,17],[65,18],[66,19],[67,20],[97,21],[68,22],[69,23],[70,24],[71,25],[72,26],[73,27],[74,28],[75,29],[76,30],[77,31],[78,32],[79,33],[81,34],[80,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[93,47],[94,48],[95,49],[99,50],[46,17],[10,17],[9,17],[2,17],[11,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[3,17],[4,17],[22,17],[19,17],[20,17],[21,17],[23,17],[24,17],[25,17],[5,17],[26,17],[27,17],[28,17],[29,17],[6,17],[30,17],[31,17],[32,17],[33,17],[7,17],[34,17],[39,17],[40,17],[35,17],[36,17],[37,17],[38,17],[8,17],[44,17],[41,17],[42,17],[43,17],[1,17],[45,17],[102,17],[100,53],[101,52]],"semanticDiagnosticsPerFile":[98,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,49,96,65,66,67,97,68,69,70,71,72,73,74,75,76,77,78,79,81,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,99,46,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,8,44,41,42,43,1,45,102,100,101]},"version":"4.7.4"} \ No newline at end of file diff --git a/packages/security/oidc-provider/.eslintignore b/packages/security/oidc-provider/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/security/oidc-provider/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/security/oidc-provider/.eslintrc.js b/packages/security/oidc-provider/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/security/oidc-provider/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/security/oidc-provider/jest.config.js b/packages/security/oidc-provider/jest.config.js index 2f9b6024343..6327b9f3e4b 100644 --- a/packages/security/oidc-provider/jest.config.js +++ b/packages/security/oidc-provider/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "oidc-provider"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/oidc-provider": "/src/index.ts" + }, coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/security/oidc-provider/package.json b/packages/security/oidc-provider/package.json index 4b644087dda..24826cefe36 100644 --- a/packages/security/oidc-provider/package.json +++ b/packages/security/oidc-provider/package.json @@ -22,12 +22,13 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", + "build": "yarn barrels && yarn build:ts", + "start": "ts-node test/app/index.ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/adapters": "7.18.2", @@ -43,11 +44,15 @@ "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", + "@tsed/jwks": "7.18.2", "@types/lowdb": "1.0.11", "@types/oidc-provider": "^7.1.1", "@types/uuid": "8.3.4", "lowdb": "3.0.0", - "oidc-provider": "7.11.1" + "oidc-provider": "7.11.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/ajv": "^7.18.2", @@ -78,4 +83,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/security/oidc-provider/tsconfig.cjs.json b/packages/security/oidc-provider/tsconfig.cjs.json new file mode 100644 index 00000000000..f2c04a9262f --- /dev/null +++ b/packages/security/oidc-provider/tsconfig.cjs.json @@ -0,0 +1,57 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../jwks" + }, + { + "path": "../../orm/adapters" + } + ] +} diff --git a/packages/security/oidc-provider/tsconfig.compile.esm.json b/packages/security/oidc-provider/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/security/oidc-provider/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/security/oidc-provider/tsconfig.compile.json b/packages/security/oidc-provider/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/security/oidc-provider/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/security/oidc-provider/tsconfig.esm.json b/packages/security/oidc-provider/tsconfig.esm.json new file mode 100644 index 00000000000..eb6b3c0f51c --- /dev/null +++ b/packages/security/oidc-provider/tsconfig.esm.json @@ -0,0 +1,57 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/ajv" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../specs/exceptions" + }, + { + "path": "../jwks" + }, + { + "path": "../../orm/adapters" + } + ] +} diff --git a/packages/security/oidc-provider/tsconfig.json b/packages/security/oidc-provider/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/security/oidc-provider/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/security/passport/.eslintignore b/packages/security/passport/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/security/passport/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/security/passport/.eslintrc.js b/packages/security/passport/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/security/passport/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/security/passport/jest.config.js b/packages/security/passport/jest.config.js index 668ae84485c..66dfdc6d603 100644 --- a/packages/security/passport/jest.config.js +++ b/packages/security/passport/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "passport"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/passport": "/src/index.ts" + }, coverageThreshold: { global: { statements: 99.36, diff --git a/packages/security/passport/package.json b/packages/security/passport/package.json index 836a38db93e..aebd613c083 100644 --- a/packages/security/passport/package.json +++ b/packages/security/passport/package.json @@ -14,12 +14,13 @@ }, "scripts": { "clean": "rm -rf lib", - "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn clean && yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", - "start": "ts-node src/index.ts" + "start": "ts-node src/index.ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -36,7 +37,10 @@ "passport": "0.5.2", "passport-http": "0.3.0", "passport-local": "1.0.0", - "passport-strategy": "1.0.0" + "passport-strategy": "1.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -47,4 +51,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/security/passport/tsconfig.cjs.json b/packages/security/passport/tsconfig.cjs.json new file mode 100644 index 00000000000..f5004e6f1b3 --- /dev/null +++ b/packages/security/passport/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../platform/platform-router" + } + ] +} diff --git a/packages/security/passport/tsconfig.compile.esm.json b/packages/security/passport/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/security/passport/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/security/passport/tsconfig.compile.json b/packages/security/passport/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/security/passport/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/security/passport/tsconfig.esm.json b/packages/security/passport/tsconfig.esm.json new file mode 100644 index 00000000000..fa5e9c8cc5a --- /dev/null +++ b/packages/security/passport/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../platform/platform-router" + } + ] +} diff --git a/packages/security/passport/tsconfig.json b/packages/security/passport/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/security/passport/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/ajv/.eslintignore b/packages/specs/ajv/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/ajv/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/ajv/.eslintrc.js b/packages/specs/ajv/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/ajv/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/ajv/jest.config.js b/packages/specs/ajv/jest.config.js index 2999e47ceb5..eabf77f7777 100644 --- a/packages/specs/ajv/jest.config.js +++ b/packages/specs/ajv/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "ajv"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/ajv": "/src/index.ts" + }, coverageThreshold: { global: { branches: 85.18, diff --git a/packages/specs/ajv/package.json b/packages/specs/ajv/package.json index 1d97462f509..5357ce3d359 100644 --- a/packages/specs/ajv/package.json +++ b/packages/specs/ajv/package.json @@ -13,11 +13,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "ajv-errors": "3.0.0", @@ -29,7 +30,10 @@ "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", "@tsed/schema": "7.18.2", - "ajv": "8.11.0" + "ajv": "8.11.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -53,4 +57,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/specs/ajv/tsconfig.cjs.json b/packages/specs/ajv/tsconfig.cjs.json new file mode 100644 index 00000000000..e630a6a3e8a --- /dev/null +++ b/packages/specs/ajv/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../exceptions" + }, + { + "path": "../schema" + } + ] +} diff --git a/packages/specs/ajv/tsconfig.compile.esm.json b/packages/specs/ajv/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/specs/ajv/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/ajv/tsconfig.compile.json b/packages/specs/ajv/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/specs/ajv/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/ajv/tsconfig.esm.json b/packages/specs/ajv/tsconfig.esm.json new file mode 100644 index 00000000000..2fd13635c42 --- /dev/null +++ b/packages/specs/ajv/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../exceptions" + }, + { + "path": "../schema" + } + ] +} diff --git a/packages/specs/ajv/tsconfig.json b/packages/specs/ajv/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/ajv/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/exceptions/.eslintignore b/packages/specs/exceptions/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/exceptions/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/exceptions/.eslintrc.js b/packages/specs/exceptions/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/exceptions/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/exceptions/jest.config.js b/packages/specs/exceptions/jest.config.js index 5ef47cfa6bd..a9f8a83ce38 100644 --- a/packages/specs/exceptions/jest.config.js +++ b/packages/specs/exceptions/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "exceptions"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 85.18, diff --git a/packages/specs/exceptions/package.json b/packages/specs/exceptions/package.json index 0ec2e5cc09c..93c723ae81f 100644 --- a/packages/specs/exceptions/package.json +++ b/packages/specs/exceptions/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "change-case": "4.1.2", @@ -26,7 +27,12 @@ "tslib": "2.4.0" }, "devDependencies": { - "@types/statuses": "2.0.0" + "@types/statuses": "2.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, - "peerDependencies": {} -} \ No newline at end of file + "peerDependencies": { + "@tsed/core": "7.18.2" + } +} diff --git a/packages/specs/exceptions/tsconfig.cjs.json b/packages/specs/exceptions/tsconfig.cjs.json new file mode 100644 index 00000000000..7d95a40278e --- /dev/null +++ b/packages/specs/exceptions/tsconfig.cjs.json @@ -0,0 +1,33 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + } + ] +} diff --git a/packages/specs/exceptions/tsconfig.compile.esm.json b/packages/specs/exceptions/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/specs/exceptions/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/exceptions/tsconfig.compile.json b/packages/specs/exceptions/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/specs/exceptions/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/exceptions/tsconfig.esm.json b/packages/specs/exceptions/tsconfig.esm.json new file mode 100644 index 00000000000..93910342700 --- /dev/null +++ b/packages/specs/exceptions/tsconfig.esm.json @@ -0,0 +1,33 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + } + ] +} diff --git a/packages/specs/exceptions/tsconfig.json b/packages/specs/exceptions/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/exceptions/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/json-mapper/.eslintignore b/packages/specs/json-mapper/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/json-mapper/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/json-mapper/.eslintrc.js b/packages/specs/json-mapper/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/json-mapper/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/json-mapper/coverage.json b/packages/specs/json-mapper/coverage.json index 3555e15c1e5..3d98746dcb1 100644 --- a/packages/specs/json-mapper/coverage.json +++ b/packages/specs/json-mapper/coverage.json @@ -1,6 +1,6 @@ { "statements": 100, - "branches": 94.48, + "branches": 94.07, "functions": 100, "lines": 100 } diff --git a/packages/specs/json-mapper/jest.config.js b/packages/specs/json-mapper/jest.config.js index 15ac4e3782a..9aca517a5b0 100644 --- a/packages/specs/json-mapper/jest.config.js +++ b/packages/specs/json-mapper/jest.config.js @@ -2,8 +2,12 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "json-mapper"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], coverageThreshold: { global: require("./coverage.json") + }, + moduleNameMapper: { + "@tsed/json-mapper": "/src/index.ts" } }; diff --git a/packages/specs/json-mapper/package.json b/packages/specs/json-mapper/package.json index 7634a079898..4df507e8b5e 100644 --- a/packages/specs/json-mapper/package.json +++ b/packages/specs/json-mapper/package.json @@ -17,12 +17,13 @@ }, "scripts": { "clean": "rm -rf lib", - "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser", "build:browser": "webpack", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "TypeScript", @@ -41,7 +42,10 @@ }, "devDependencies": { "@tsed/core": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -55,4 +59,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/specs/json-mapper/tsconfig.cjs.json b/packages/specs/json-mapper/tsconfig.cjs.json new file mode 100644 index 00000000000..83c817c4dd8 --- /dev/null +++ b/packages/specs/json-mapper/tsconfig.cjs.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../schema" + } + ] +} diff --git a/packages/specs/json-mapper/tsconfig.compile.json b/packages/specs/json-mapper/tsconfig.compile.json deleted file mode 100644 index 36a526336bc..00000000000 --- a/packages/specs/json-mapper/tsconfig.compile.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "webpack.config.js" - ] -} diff --git a/packages/specs/json-mapper/tsconfig.esm.json b/packages/specs/json-mapper/tsconfig.esm.json new file mode 100644 index 00000000000..3c78c7704ff --- /dev/null +++ b/packages/specs/json-mapper/tsconfig.esm.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../schema" + } + ] +} diff --git a/packages/specs/json-mapper/tsconfig.json b/packages/specs/json-mapper/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/json-mapper/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/openspec/.eslintignore b/packages/specs/openspec/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/openspec/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/openspec/.eslintrc.js b/packages/specs/openspec/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/openspec/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/openspec/package.json b/packages/specs/openspec/package.json index 2ced427400f..e2034d91ea7 100644 --- a/packages/specs/openspec/package.json +++ b/packages/specs/openspec/package.json @@ -14,10 +14,11 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", - "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\"" + "build": "yarn barrels && yarn build:ts", + "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\"", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "TypeScript", @@ -30,6 +31,10 @@ "JsonSchema" ], "dependencies": {}, - "devDependencies": {}, + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/specs/openspec/tsconfig.cjs.json b/packages/specs/openspec/tsconfig.cjs.json new file mode 100644 index 00000000000..290e454aeca --- /dev/null +++ b/packages/specs/openspec/tsconfig.cjs.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/specs/openspec/tsconfig.compile.esm.json b/packages/specs/openspec/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/specs/openspec/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/openspec/tsconfig.compile.json b/packages/specs/openspec/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/specs/openspec/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/di/tsconfig.compile.esm.json b/packages/specs/openspec/tsconfig.esm.json similarity index 57% rename from packages/di/tsconfig.compile.esm.json rename to packages/specs/openspec/tsconfig.esm.json index 6d867e9be89..89f93d97c26 100644 --- a/packages/di/tsconfig.compile.esm.json +++ b/packages/specs/openspec/tsconfig.esm.json @@ -1,14 +1,16 @@ { - "extends": "./tsconfig.compile.json", + "extends": "@tsed/typescript/tsconfig.node.json", "compilerOptions": { "baseUrl": ".", "module": "ES2020", "rootDir": "src", "outDir": "./lib/esm", "declaration": true, - "declarationDir": "./lib/types" + "declarationDir": "./lib/types", + "composite": true, + "noEmit": false }, - "include": ["src"], + "include": ["src", "src/**/*.json"], "exclude": [ "node_modules", "test", @@ -20,6 +22,8 @@ "**/*.spec.ts", "keys", "jest.config.js", - "**/__mock__/**" - ] + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] } diff --git a/packages/specs/openspec/tsconfig.json b/packages/specs/openspec/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/openspec/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/openspec/tsconfig.tsbuildinfo b/packages/specs/openspec/tsconfig.tsbuildinfo new file mode 100644 index 00000000000..e217f2b6bbd --- /dev/null +++ b/packages/specs/openspec/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","./src/common/OpenSpecExternalDocs.ts","./src/common/OpenSpecHash.ts","./src/common/OpenSpecInfo.ts","./src/common/OpenSpecRef.ts","./src/common/OpenSpecTypes.ts","./src/common/OpenSpecJsonSchema.ts","./src/common/OpenSpecPath.ts","./src/common/OpenSpecSecurity.ts","./src/common/OpenSpecTag.ts","./src/common/OpenSpecVersions.ts","./src/common/OpenSpecXML.ts","./src/openspec2/OS2Schema.ts","./src/openspec2/OS2Header.ts","./src/openspec2/OS2Parameter.ts","./src/openspec2/OS2Response.ts","./src/openspec2/OS2Operation.ts","./src/openspec2/OS2Paths.ts","./src/openspec2/OS2Security.ts","./src/openspec2/OpenSpec2.ts","./src/openspec3/OS3Example.ts","./src/openspec3/OS3Schema.ts","./src/openspec3/OS3Header.ts","./src/openspec3/OS3Encoding.ts","./src/openspec3/OS3MediaType.ts","./src/openspec3/OS3Parameter.ts","./src/openspec3/OS3RequestBody.ts","./src/openspec3/OS3Server.ts","./src/openspec3/OS3Link.ts","./src/openspec3/OS3Response.ts","./src/openspec3/OS3Operation.ts","./src/openspec3/OS3Paths.ts","./src/openspec3/OS3Callbacks.ts","./src/openspec3/OS3Flows.ts","./src/openspec3/OS3Security.ts","./src/openspec3/OS3Components.ts","./src/openspec3/OpenSpec3.ts","./src/index.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e",{"version":"f362b60e4ed609e729f75ab9ffface4eb92bfb9144d1efca9f4c0094f0e11f0f","signature":"b5e36d59d2002e90829cddc990643ce48ce37325f6c07ba2c8d0122c30dd1236"},{"version":"460d2f07e5766555e9e772d74cd41a856df9482db03f890e3344d7341b7e4065","signature":"4e7d4500c07cb35f5c1a244946e8783569eec908aedd63ae193a9ec4d246b182"},{"version":"0931554fcd914b6dfc2ac89ba4db6aecffe571582d714bd8a7a862b81d708019","signature":"9a4580cdf9253c6f075fce8fe6a70f9c8dae4dc7093f603dc80a1d10e3289bd4"},{"version":"1a1d5fe7be79f1244cd280ed2cb9b7d333910e0d90fc83d35abe52de207eb32d","signature":"89cfe09f097afa9722d3a6a4e8a8444572c73b19a497e296513f15ac1390a4c9"},{"version":"b591100f89c761122f595cafdce0e6caa2d30713f76fdb63df6e0ad552702cf2","signature":"841f4c8d92b3d4b2ab0af5dc94075a566236b5dd0773e82dcdcd4ff3810da913"},{"version":"32414d2c451eb1636263d47a6cb27df3982bb562d19ca18185b13e2ce90f9acb","signature":"d17d45d2b60890a5c3f199188d60b1214b58e6ea8607b965541a7ce978ca16e1"},{"version":"48ea1931743804b3eb36cfa3f65a9d16836797853ee1bf81c1a472d354226082","signature":"61e34e4162cdc2d56027d84fa71049f9a27ff90615c0b4a0e5d898404c3da885"},{"version":"f49daffc03657c68b2b7f9f15700c4d56aa685cbf7c4a7cbde558aa81ee9ce03","signature":"f7f6e5b63e09793865f876ff2971b4e6f8d5a9071c1f39bd1de7bb88ff52d1d2"},{"version":"24195c70f32c371ec6826120e6799c4e305540b010304999a82015ee80715faa","signature":"664331db0d893f6494420b86affd928d343ea4f96db92fb65c96b763523c5ea6"},{"version":"36ac533b5fad213ff2ec878906dec3c8cf540b7fab54042728caa5862823a7f8","signature":"4890fbcf426bf18aaf3b50fe1903f3ee556834b71c698643d7971b77713ee3b7"},{"version":"dbc8d702c37bf22fd20004773c20d20c1e8d6c34d90c7389a26e8c77ad3cc234","signature":"cbb5fc40b97b9d73fa349216ed9eab02f385a88022dbb4d9b07e4ff42231a47b"},{"version":"1ab5495e0d63e298fcb0ee0e6c484358b29f4cd686cf46ce07a1bfc709c2aba7","signature":"8f3d69ba63cac212fcb24285edd41a1944a5d5f61bd2630449982be5225cf7eb"},{"version":"2275a90a824f56d60642d00e93a9691d614d12d7af6ea4fd8a71558abf542146","signature":"f41861ffc1f1b33fc27599e3141bc8b4593554d7310e567dc548b7e36de05f41"},{"version":"e19c0d108c185e6c33c610da885444c29f130b0d0a4073aeaaea677f9857cab7","signature":"c63f9a70ebdaf13cc8480e8775021771e94cf793f4f855e6a50f469603b81eda"},{"version":"02f8ad36726d9d4aebad4b0bbd35ac8354e4283ad17b612a8e4413e4890d91a9","signature":"756038e4e668fb3858936c2016b4b286d6722e4b3a8a493670afbf22b4e04f50"},{"version":"6139b74c042d4e26986246a7bb1fcf7f1a6672b1c3cac2521959531af2d49875","signature":"1a18865f1724c834e41478b783d2f4c5c27bdf9201076b26d6e983eabdd9f8e8"},{"version":"9636819dc713ef4b98b42ab33e85dc9ad66abe2c7beea2b9a6db9b1091a33ce7","signature":"4242da2d66e56451263d1ff090d3297f940f4a71fdb690ceee51155df188f37c"},{"version":"9ce515c77d47b4141c86be5fdadb26779484cd60f25f6a4ad9a9696435d31f8d","signature":"9fb78ac25f2ec3b0fda70b7afcd72433de3e1f4f10bc749f61d05f0229881fa2"},{"version":"bd37dd3291b7fa8ba3168009e08e63be688296da335ff0a0ddcd01aaa0d46d1e","signature":"ef464b6f95a0446b91eea9508625982904abd6aea87a76a5c92b23c4cf1c4caf"},{"version":"0b8627deb505ba05fcbb789121d91cd76f98c3423651a2d1b6857d0ece32a84f","signature":"df01da36059ba6ccb814710e0445f91cab5f9bb8f158b154784d12d895c4246c"},{"version":"9b3600759ec8abe3b9681d6b915b7967b3caec0ab9b9b2369f085a814a1c474e","signature":"1e23c3dd26f8df4624e4f276fa2567b80a081eb1bea86e31db363083243ed191"},{"version":"c8521b63268b92a49697db75c4a81d0eb88149b303b334fe31c8bbb3f17ff5e0","signature":"6037ef231eeaa4577873cd8c2f3e1f5cd24268e9ee82c99bab92c0e6997336e2"},{"version":"51506f091afbbf9d1ec4e69dc52bd57e1cff5379de269bfc51377305eb97ec81","signature":"01db4055bbf9cbd6a00b2be03655374fedd9d2fada93da8c29e89340ec5e52a3"},{"version":"ad349a0a7ef5e401578378cf840cc74d72b7644ef62da291bd5fa7f5ab7f9b39","signature":"b6958ce389a4d4b61eb87f5af985d0801156ebfb485a09c9519b5b479cbff0fd"},{"version":"07276a820a9584ee935fa7aebfb6ef93657e404288c075f30dbec8051dc4f69e","signature":"761d86895522c45e8bd6e598eba4bcdd55a7c303c10bcd37872a027265dc1248"},{"version":"a63c941088f0be8cd06bcb1a9cf6037d1fc8f0e274872c7f4297e3b31307f8e6","signature":"750c9f248b3d89bad3668c3f74e78cd23eee5d0471bb51a93489b1d32d05db98"},{"version":"06efe1d25219573c2ab570e138931175c2fe3e5aedec2bd03e0af42666c6d7b5","signature":"c08467f371be7c7cbad24eb2cf8294d8eb7b04e2f164d7407d3c4c4fe7f2eef3"},{"version":"fd8fc8672039dbebf2d97e32365fef568e90914f19214b8a4319904936882097","signature":"7fabd60062d2394e8ff85cbf0d14ca4006ffd1f434fd6798905eda309ed7113b"},{"version":"31e1a291eecb213a301e7114525f4b3490390b77c317b27f3332b6bb06376733","signature":"7178835e62eca77c3386aad1dea62f5c870115cdd935f42fa893ceca6cd4556f"},{"version":"ea0d2041c48799593ded0a2198e2582af9f3f6cec58762ad51bc862aee36fb6a","signature":"9adbfa30fcf12cd8405ab01e19c8054e338b6bafcc0518a604982bf8db038ab7"},{"version":"0d45a4941530bacf33439679a8d3769c6756ef810962443f38016f770267f274","signature":"726d8e693ca7083de90a95f2a9d1b8637bfe6f7ebdf4e906f46d49aad2328c91"},{"version":"772940ff83a2fc4e5e21703333ba092fee8a94de8884123a70da106015c78677","signature":"033dccd21b006e548dd6527358cc91233f2beb23bca7f7687d80f87561fb1227"},{"version":"79108f6b771c7acab674f74abf8e615188bfbed2e53de2ccd8452501bc517c5c","signature":"d832e79727fa3f8d02dbb69623fb41bfc1f325bc4906fa1dff46eaab820fad30"},{"version":"5478cf026f8cb71f9d8672a16aeb492db8c83d84dce5a7eb5c3a0d32e4954ae9","signature":"94f6bd2da39b44333b5113e199b38f3ea5e81a0a1c32b0d388d55c077098a1ba"},{"version":"302c6a7d7ae02cecb53ceb31b09458a54d7ff26c5bad40ef4f11625f9a30dd45","signature":"aa79219d0b2bcac558d7d6778a045e9dca30ee9313b988eb5331d7a5dad5adec"},{"version":"d72f92e4185fb9b10e646645801cd83a4fd85f207d51b85007cd27b65ae8b217","signature":"8dc7d91ddff74beb5e34e1ef97a5341967cb552edf09b8e19101a845e62808e5"},{"version":"ed503d3242dd685d408fe7644067b7ebcc969feacada7d14626407ae6acf3a0a","signature":"1543d95526122a7bb5f4f9154a2643bc9eeb0d5d91227f4f5c7fbe5c44f6b60a"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"newLine":1,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","preserveConstEnums":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"suppressImplicitAnyIndexErrors":false,"target":99},"fileIdsList":[[45],[45,47,49,50],[45,47],[45,46],[45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81],[45,57],[45,46,47,49,53,59,60],[45,50,57],[45,49,52,59,61],[45,47,57,58],[45,46,49,51,56],[45,46,47,48,53,54,57,59,60,62,63],[45,47,66,76],[45,47,65,66,67,70,71,73,74,77,79],[45,47,67],[45,46,49,66],[45,47,72],[45,47,49,65,66,68],[45,46,47,53,66,70,71,72,74,77],[45,47,49,65,66,69],[45,49,52,66,70,72,75],[45,47,49,66,67,69,73],[45,78],[45,46,47,48,53,54,66,72,76,80],[47,49,50],[47],[46],[46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81],[57],[46,47,49,53,59,60],[50,57],[49,52,59,61],[47,57,58],[46,49,51,56],[46,47,48,53,54,57,59,60,62,63],[47,66,76],[47,65,66,67,70,71,73,74,77,79],[47,67],[46,49,66],[47,72],[47,49,65,66,68],[46,47,53,66,70,71,72,74,77],[47,49,65,66,69],[49,52,66,70,72,75],[47,49,66,67,69,73],[78],[46,47,48,53,54,66,72,76,80]],"referencedMap":[[46,1],[47,1],[48,1],[51,2],[52,1],[49,1],[53,3],[54,4],[50,1],[55,1],[56,1],[82,5],[58,6],[61,7],[59,8],[62,9],[60,10],[57,11],[63,3],[64,12],[77,13],[80,14],[68,15],[65,1],[78,1],[67,16],[73,17],[69,18],[75,19],[70,20],[76,21],[71,20],[74,22],[66,11],[79,23],[72,3],[81,24]],"exportedModulesMap":[[51,25],[53,26],[54,27],[82,28],[58,29],[61,30],[59,31],[62,32],[60,33],[57,34],[63,26],[64,35],[77,36],[80,37],[68,38],[67,39],[73,40],[69,41],[75,42],[70,43],[76,44],[71,43],[74,45],[66,34],[79,46],[72,26],[81,47]],"semanticDiagnosticsPerFile":[45,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,8,44,41,42,43,1,46,47,48,51,52,49,53,54,50,55,56,82,58,61,59,62,60,57,63,64,77,80,68,65,78,67,73,69,75,70,76,71,74,66,79,72,81]},"version":"4.7.4"} \ No newline at end of file diff --git a/packages/specs/schema/.eslintignore b/packages/specs/schema/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/schema/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/schema/.eslintrc.js b/packages/specs/schema/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/schema/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/schema/coverage.json b/packages/specs/schema/coverage.json index 4d349b4bb93..68edd64ad64 100644 --- a/packages/specs/schema/coverage.json +++ b/packages/specs/schema/coverage.json @@ -1,6 +1,6 @@ { - "statements": 98.8, - "branches": 91.4, - "functions": 99.58, - "lines": 98.89 + "statements": 98.85, + "branches": 91.8, + "functions": 99.59, + "lines": 98.93 } diff --git a/packages/specs/schema/jest.config.js b/packages/specs/schema/jest.config.js index eb6bea6ffc6..670910af3f4 100644 --- a/packages/specs/schema/jest.config.js +++ b/packages/specs/schema/jest.config.js @@ -2,9 +2,13 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "schema"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], coverageThreshold: { global: require("./coverage.json") }, + moduleNameMapper: { + "@tsed/schema": "/src/index.ts" + }, setupFiles: ["./test/helpers/setup.ts"] }; diff --git a/packages/specs/schema/package.json b/packages/specs/schema/package.json index 11358c886fb..7ea8216be7e 100644 --- a/packages/specs/schema/package.json +++ b/packages/specs/schema/package.json @@ -17,12 +17,13 @@ }, "scripts": { "clean": "rm -rf lib", - "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser", "build:browser": "webpack", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "TypeScript", @@ -51,7 +52,10 @@ "@types/json-schema": "7.0.11", "@types/picomatch": "2.3.0", "@types/statuses": "2.0.0", - "picomatch-browser": "https://github.com/silverwind/picomatch#ee6ebcc5570a8846d81610c11ebb92a9e199b145" + "picomatch-browser": "https://github.com/silverwind/picomatch#ee6ebcc5570a8846d81610c11ebb92a9e199b145", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -65,4 +69,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/specs/schema/tsconfig.cjs.json b/packages/specs/schema/tsconfig.cjs.json new file mode 100644 index 00000000000..ffc2d9369f9 --- /dev/null +++ b/packages/specs/schema/tsconfig.cjs.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../openspec" + } + ] +} diff --git a/packages/specs/schema/tsconfig.compile.json b/packages/specs/schema/tsconfig.compile.json deleted file mode 100644 index 493c7990d91..00000000000 --- a/packages/specs/schema/tsconfig.compile.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "include": ["src"], - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "webpack.config.js" - ] -} diff --git a/packages/specs/schema/tsconfig.esm.json b/packages/specs/schema/tsconfig.esm.json new file mode 100644 index 00000000000..4d0403c9fa2 --- /dev/null +++ b/packages/specs/schema/tsconfig.esm.json @@ -0,0 +1,36 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../openspec" + } + ] +} diff --git a/packages/specs/schema/tsconfig.json b/packages/specs/schema/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/schema/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/specs/swagger/.eslintignore b/packages/specs/swagger/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/specs/swagger/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/specs/swagger/.eslintrc.js b/packages/specs/swagger/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/specs/swagger/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/specs/swagger/jest.config.js b/packages/specs/swagger/jest.config.js index 3177ed8069d..f8ee65f6ea5 100644 --- a/packages/specs/swagger/jest.config.js +++ b/packages/specs/swagger/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "swagger"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/swagger": "/src/index.ts" + }, coverageThreshold: { global: { statements: 100, diff --git a/packages/specs/swagger/package.json b/packages/specs/swagger/package.json index ce494eda65a..e377c080906 100644 --- a/packages/specs/swagger/package.json +++ b/packages/specs/swagger/package.json @@ -15,12 +15,13 @@ }, "scripts": { "clean": "rm -rf lib", - "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs && cp -r ./views ./lib/views", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn clean && yarn barrels && yarn build:ts && cp -r ./views ./lib/views", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "start": "ts-node test/app/index.ts", + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/normalize-path": "7.18.2", @@ -37,7 +38,10 @@ "@tsed/json-mapper": "7.18.2", "@tsed/openspec": "7.18.2", "@tsed/schema": "7.18.2", - "@types/swagger-ui-dist": ">=3.30.1" + "@types/swagger-ui-dist": ">=3.30.1", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2" @@ -47,4 +51,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/specs/swagger/tsconfig.cjs.json b/packages/specs/swagger/tsconfig.cjs.json new file mode 100644 index 00000000000..36772dbe0aa --- /dev/null +++ b/packages/specs/swagger/tsconfig.cjs.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../json-mapper" + }, + { + "path": "../openspec" + }, + { + "path": "../schema" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/specs/swagger/tsconfig.compile.esm.json b/packages/specs/swagger/tsconfig.compile.esm.json deleted file mode 100644 index 6a0ac006d6f..00000000000 --- a/packages/specs/swagger/tsconfig.compile.esm.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "views", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js" - ] -} diff --git a/packages/specs/swagger/tsconfig.compile.json b/packages/specs/swagger/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/specs/swagger/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/specs/swagger/tsconfig.esm.json b/packages/specs/swagger/tsconfig.esm.json new file mode 100644 index 00000000000..cca6b6e3734 --- /dev/null +++ b/packages/specs/swagger/tsconfig.esm.json @@ -0,0 +1,51 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../json-mapper" + }, + { + "path": "../openspec" + }, + { + "path": "../schema" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/specs/swagger/tsconfig.json b/packages/specs/swagger/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/specs/swagger/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/agenda/.eslintignore b/packages/third-parties/agenda/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/agenda/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/agenda/.eslintrc.js b/packages/third-parties/agenda/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/agenda/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/agenda/jest.config.js b/packages/third-parties/agenda/jest.config.js index 725681e05fb..621aec6424b 100644 --- a/packages/third-parties/agenda/jest.config.js +++ b/packages/third-parties/agenda/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "agenda"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { statements: 96.96, diff --git a/packages/third-parties/agenda/package.json b/packages/third-parties/agenda/package.json index e22db2b0dd2..69097ab35c5 100644 --- a/packages/third-parties/agenda/package.json +++ b/packages/third-parties/agenda/package.json @@ -13,11 +13,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --runInBand" + "test": "cross-env NODE_ENV=test yarn jest --runInBand", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "contributors": [ { @@ -32,9 +33,12 @@ "@tsed/common": "7.18.2", "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", - "agenda": "^4.1.3" + "agenda": "^4.1.3", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "agenda": "^4.1.3" } -} \ No newline at end of file +} diff --git a/packages/third-parties/agenda/tsconfig.cjs.json b/packages/third-parties/agenda/tsconfig.cjs.json new file mode 100644 index 00000000000..8e8739d1a14 --- /dev/null +++ b/packages/third-parties/agenda/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/agenda/tsconfig.compile.esm.json b/packages/third-parties/agenda/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/agenda/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/agenda/tsconfig.compile.json b/packages/third-parties/agenda/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/agenda/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/agenda/tsconfig.esm.json b/packages/third-parties/agenda/tsconfig.esm.json new file mode 100644 index 00000000000..257d09cb6e0 --- /dev/null +++ b/packages/third-parties/agenda/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/agenda/tsconfig.json b/packages/third-parties/agenda/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/agenda/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/components-scan/.eslintignore b/packages/third-parties/components-scan/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/components-scan/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/components-scan/.eslintrc.js b/packages/third-parties/components-scan/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/components-scan/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/components-scan/jest.config.js b/packages/third-parties/components-scan/jest.config.js index 8c232696e7b..46d4a7208bb 100644 --- a/packages/third-parties/components-scan/jest.config.js +++ b/packages/third-parties/components-scan/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "platform-serverless"), + ...require("@tsed/jest-config"), coverageThreshold: { global: { branches: 71.05, diff --git a/packages/third-parties/components-scan/package.json b/packages/third-parties/components-scan/package.json index edb33d6f9fa..bb4cc57c25d 100644 --- a/packages/third-parties/components-scan/package.json +++ b/packages/third-parties/components-scan/package.json @@ -14,11 +14,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/normalize-path": "7.18.2", @@ -27,7 +28,10 @@ }, "devDependencies": { "@tsed/core": "7.18.2", - "@tsed/di": "7.18.2" + "@tsed/di": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": ">=7.9.0" @@ -37,4 +41,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/components-scan/tsconfig.cjs.json b/packages/third-parties/components-scan/tsconfig.cjs.json new file mode 100644 index 00000000000..3280294b290 --- /dev/null +++ b/packages/third-parties/components-scan/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/third-parties/components-scan/tsconfig.compile.esm.json b/packages/third-parties/components-scan/tsconfig.compile.esm.json deleted file mode 100644 index 5ae6e654ea1..00000000000 --- a/packages/third-parties/components-scan/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": "./", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/components-scan/tsconfig.compile.json b/packages/third-parties/components-scan/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/components-scan/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/components-scan/tsconfig.esm.json b/packages/third-parties/components-scan/tsconfig.esm.json new file mode 100644 index 00000000000..883e6703d95 --- /dev/null +++ b/packages/third-parties/components-scan/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/third-parties/components-scan/tsconfig.json b/packages/third-parties/components-scan/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/components-scan/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/event-emitter/.eslintignore b/packages/third-parties/event-emitter/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/event-emitter/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/event-emitter/.eslintrc.js b/packages/third-parties/event-emitter/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/event-emitter/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/event-emitter/jest.config.js b/packages/third-parties/event-emitter/jest.config.js index 4c599a89c2a..8f333e3c49b 100644 --- a/packages/third-parties/event-emitter/jest.config.js +++ b/packages/third-parties/event-emitter/jest.config.js @@ -2,7 +2,8 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "event-emitter"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], coverageThreshold: { global: { statements: 100, diff --git a/packages/third-parties/event-emitter/package.json b/packages/third-parties/event-emitter/package.json index 56a5fc426f3..b5af6e5b5a2 100644 --- a/packages/third-parties/event-emitter/package.json +++ b/packages/third-parties/event-emitter/package.json @@ -18,11 +18,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -32,9 +33,12 @@ "@tsed/common": "7.18.2", "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", - "eventemitter2": "^6.4.4" + "eventemitter2": "^6.4.4", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "eventemitter2": "^6.4.4" } -} \ No newline at end of file +} diff --git a/packages/third-parties/event-emitter/tsconfig.cjs.json b/packages/third-parties/event-emitter/tsconfig.cjs.json new file mode 100644 index 00000000000..8e8739d1a14 --- /dev/null +++ b/packages/third-parties/event-emitter/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/event-emitter/tsconfig.compile.esm.json b/packages/third-parties/event-emitter/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/event-emitter/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/event-emitter/tsconfig.compile.json b/packages/third-parties/event-emitter/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/event-emitter/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/event-emitter/tsconfig.esm.json b/packages/third-parties/event-emitter/tsconfig.esm.json new file mode 100644 index 00000000000..257d09cb6e0 --- /dev/null +++ b/packages/third-parties/event-emitter/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/event-emitter/tsconfig.json b/packages/third-parties/event-emitter/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/event-emitter/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/formio-types/.eslintignore b/packages/third-parties/formio-types/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/formio-types/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/formio-types/.eslintrc.js b/packages/third-parties/formio-types/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/formio-types/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/formio-types/package.json b/packages/third-parties/formio-types/package.json index c5d77e246ac..f026b1c394f 100644 --- a/packages/third-parties/formio-types/package.json +++ b/packages/third-parties/formio-types/package.json @@ -22,11 +22,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts" + "start": "ts-node test/app/index.ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -34,5 +35,9 @@ "peerDependencies": { "formiojs": ">=4.0.0" }, - "devDependencies": {} -} \ No newline at end of file + "devDependencies": { + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" + } +} diff --git a/packages/third-parties/formio-types/tsconfig.cjs.json b/packages/third-parties/formio-types/tsconfig.cjs.json new file mode 100644 index 00000000000..290e454aeca --- /dev/null +++ b/packages/third-parties/formio-types/tsconfig.cjs.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/third-parties/formio-types/tsconfig.compile.esm.json b/packages/third-parties/formio-types/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/formio-types/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/formio-types/tsconfig.compile.json b/packages/third-parties/formio-types/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/formio-types/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/formio-types/tsconfig.esm.json b/packages/third-parties/formio-types/tsconfig.esm.json new file mode 100644 index 00000000000..89f93d97c26 --- /dev/null +++ b/packages/third-parties/formio-types/tsconfig.esm.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/third-parties/formio-types/tsconfig.json b/packages/third-parties/formio-types/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/formio-types/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/formio-types/tsconfig.tsbuildinfo b/packages/third-parties/formio-types/tsconfig.tsbuildinfo new file mode 100644 index 00000000000..847de074956 --- /dev/null +++ b/packages/third-parties/formio-types/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","./src/domain/FormioAccess.ts","./src/domain/FormioAction.ts","./src/domain/FormioActionInfo.ts","./src/domain/FormioActionItem.ts","./src/domain/FormioPermission.ts","./src/domain/FormioForm.ts","../../../node_modules/formiojs/types/components/schema.d.ts","../../../node_modules/formiojs/types/eventEmitter.d.ts","../../../node_modules/formiojs/types/element.d.ts","../../../node_modules/formiojs/types/components/_classes/component/component.d.ts","../../../node_modules/formiojs/types/components/_classes/componentmodal/componentmodal.d.ts","../../../node_modules/formiojs/types/components/_classes/field/field.d.ts","../../../node_modules/formiojs/types/components/_classes/multivalue/multivalue.d.ts","../../../node_modules/formiojs/types/components/_classes/input/input.d.ts","../../../node_modules/formiojs/types/components/_classes/nested/nestedComponent.d.ts","../../../node_modules/formiojs/types/components/_classes/widgetcomponent/widgetComponent.d.ts","../../../node_modules/formiojs/types/components/components.d.ts","../../../node_modules/formiojs/types/form.d.ts","../../../node_modules/formiojs/types/formbuilder.d.ts","../../../node_modules/formiojs/types/formio.d.ts","../../../node_modules/formiojs/types/templates.d.ts","../../../node_modules/formiojs/types/displays.d.ts","../../../node_modules/formiojs/types/widgets.d.ts","../../../node_modules/moment/ts3.1-typings/moment.d.ts","../../../node_modules/formiojs/types/utils.d.ts","../../../node_modules/formiojs/types/builders.d.ts","../../../node_modules/formiojs/types/rulesEngine/conjunctions.d.ts","../../../node_modules/formiojs/types/rulesEngine/operators.d.ts","../../../node_modules/formiojs/types/rulesEngine/quckRules.d.ts","../../../node_modules/formiojs/types/rulesEngine/rules.d.ts","../../../node_modules/formiojs/types/rulesEngine/transformers.d.ts","../../../node_modules/formiojs/types/rulesEngine/valueSources.d.ts","../../../node_modules/formiojs/types/index.d.ts","../../../node_modules/formiojs/index.d.ts","./src/domain/FormioComponent.ts","./src/domain/FormioRole.ts","./src/domain/FormioSchema.ts","./src/domain/FormioSubmission.ts","./src/domain/FormioToken.ts","./src/index.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e",{"version":"cd3d9cab6f7c025d8285822941ae64e385fa4aa37b6b3eb2501b5ed408bca1e6","signature":"92ba4b36078c80ac3843e9b707ea982ae848bc1bbd687b61906e1b4e0d6bc2f9"},{"version":"aa111b36b09fff933a4d54a1a4c7e2abde9896e1043e0538bb01590084fae07a","signature":"443afda5541bbc888a33ce2ad544793c44a1eb548ec38dd25222428e39614b2a"},{"version":"38d085dd22cc7b2a09593191a1b0135f464a7b16efbad3d629ebfcb18b80be43","signature":"4e088d6e83233011b0a2fd268ad923d574e2d136d3155314394a9f63f0577342"},{"version":"723d448726e9f30283a0cd1828ab6697672102cdd7ebdfb39e741fa7245089b5","signature":"bdc67ef709e9eb5e9ededac8fd8ac7d7e518cccea298c8d4ea65149ac40ce9b3"},{"version":"8c8b88cb08c68ed8096bf9ccd917d9878eab20131c53a5499e8bc07e011ff0c5","signature":"ff2261fb5e93e48f8620ab86b70948e1464614a47d161adfb87552aa86bfd477"},{"version":"7fd1ef30994a8e099b8b20a27b7e65590733e760ec65a3921b27b293f75f54ec","signature":"29bfc16519d075df0126d90209b97f018a92a48211cae93da9f1246f8784a04d"},"6d70efa5812fb33a2296ea47a1be519fd4ac3b2627c174a96373e66e144ddf1b","7d1c9299ee0ea1b06997714555d957da0b06dafa1c5aa30c0d3ba95e4c1d4599","8c75e14bf64a1b32f1a5db5ac14d569b72596ab0cb29cf11050dfa99c770e44b","ee062c98b6ebd92d298b6cb292c28bcbacf271ecfa356e60eec044ebc4599216","682f06842d20a27b5e9fd1d1d9dee22d8b9ccf4f17ba693ee4ebb422499f8046","dcfb3216f9071c0184f1a26a8edab0ee197984ae7e402dbb96d7381188591cd8","8353520a2f623d128a688ce111bcc886c5b5d5f753835781392c6387b7ad892a","e371ee353dcf535283ef5e65eb983fba89167f1199f0c6997897f3ae0a90f5d9","3736e77c164e6bf6b0678da51a46ad06b37b5a7bfa47c2c10288311f440bf6f9","da82909774dea1c746b9c00f3ca90753a7d24a36a99161e4445ed9d7448a74bb","9f850b177adf6420b699ae6f7867bb13c5862a405796dc990343d4b14bf82eab","dd8a7e662570f4f3cade6b778543b98443842a37974f11b6f494a77cefe336d1","6a3fcec5bea2c8eda9c4c6886cb2620a696babe3cf1ce5f7120f6823f7d11bbe","76d26e0bbfe26e849cf2caf29ced995d23b0e84e63ab4c4c174f11d2c0792ef0","9fb4334c4787b0c205c0742814c4cfd96aea28b5a6074676773db7b264a79346","c6fcb0b525a57d490dc6c4eaa8babe5cafa99480151f675536f5eca7dc4b611e","d3888a9690debb54e3eef3c241121aaf2d525446f1328e88f06d856d6a46c943","4051f6311deb0ce6052329eeb1cd4b1b104378fe52f882f483130bea75f92197","8d50d3d1791037c310df4c61481d8262f4ebd6c5cb385d5a326806ab9d515fe8","97c4233354b4f812ab7274122b5cca8c20d1588956f6f4d45a75944135043365","853addb6a36adf8f68db637933123d5d86cfb71b7f4ddf003cb7ee8b6876c4cb","73e2d4578cacf789279ff5d767452991c5130643f2362086fa829af3b5f4a42a","2f0685c2347511555ddcf173b2fde96e3e308c47c297c728f62713e1f8675967","ca68ca3887a4dc7f826c7ada07d3bc0e878c2b1017147a33696cc59aa9fcc834","2d82a0179e249b5e7bc5c1da74f80d2a78f29ca6abec8f6472346664ed2cfa2a","854315173ff52b8c21637202d2a998b11f7ca9090663d5acd0dca6e04c64e242","ff541b5d424fc3dae69a391ea1f531237be91f9f0b94eb42456632d6eeba1d59","d5c19655468e29f60c871b21e73af8ebc653f736e7123ade916f22c4a5f80ce5",{"version":"8d3ad8c915044f1a2f2df59dc6a4aac4bd84328d3ec36dcd03d1f1efa50dfdf0","signature":"91cc3d330450c4a40a0b55fcb0519aac8faaf037f6691f073dfea9972d27a1de"},{"version":"87340f9b0c116eb52b2a5fa445c1c4057d9e85738bbe441cc4b1fdf2bf09d8b4","signature":"a29da14a69326578a1bd0c36f911286d3de7d5d980ae448140551c9a4d8239b5"},{"version":"efc77e93d4a13f9781c762b71f1756bf49871d6af31d5d576a872323db86d028","signature":"a71204597f68d7e08b26a19345299e9281e72ce4c14e5abb4623d2894f6454c4"},{"version":"f79fb97f25ef2d702a783ddbcd7a02bd7f94cf769b3e5bc70d1164b8c378aab0","signature":"66f76d5ac7ead319f67ecfbff789428bafd074b539300e946baa8ba7dbb3be8d"},{"version":"143781a0e7d7284c26a83b075bb59766dacc6890feba276d01d888c3051746cc","signature":"64c54d2f123090a20d0a9af6fef3272473eba394b54c8a4dfb5a9e92adb1e0aa"},{"version":"53f733d4937d00bfacf28835b21f5f1e8498635ed88d20781d04f3cff0d93fb3","signature":"541333bdb5b4f5a57d04c7a43a824feb6d3d171c59ca9dd816dd69ca55ef46cf"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"newLine":1,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","preserveConstEnums":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"suppressImplicitAnyIndexErrors":false,"target":99},"fileIdsList":[[78],[52,54],[55],[54,55,58],[57],[55,57],[59],[52,55,56,57,58,59,60,61],[53],[54],[63],[52,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77],[69],[45],[45,51,79],[45,50,80],[45,46],[45,46,47,48,49,50,51,80,81,82,83,84],[51,79],[50,80],[46],[46,47,48,49,50,51,80,81,82,83,84]],"referencedMap":[[79,1],[55,2],[56,3],[57,3],[59,4],[58,5],[60,6],[61,7],[62,8],[54,9],[63,10],[64,11],[78,12],[70,13],[46,14],[47,14],[48,14],[49,14],[80,15],[51,16],[50,14],[81,14],[82,14],[83,17],[84,14],[85,18]],"exportedModulesMap":[[79,1],[55,2],[56,3],[57,3],[59,4],[58,5],[60,6],[61,7],[62,8],[54,9],[63,10],[64,11],[78,12],[70,13],[80,19],[51,20],[83,21],[85,22]],"semanticDiagnosticsPerFile":[79,71,55,56,57,59,58,60,61,62,52,67,54,53,63,64,65,78,72,73,74,75,76,77,66,70,68,69,45,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,8,44,41,42,43,1,46,47,48,49,80,51,50,81,82,83,84,85]},"version":"4.7.4"} \ No newline at end of file diff --git a/packages/third-parties/formio/.eslintignore b/packages/third-parties/formio/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/formio/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/formio/.eslintrc.js b/packages/third-parties/formio/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/formio/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/formio/jest.config.js b/packages/third-parties/formio/jest.config.js index 479c50ef2e8..2211d5016d2 100644 --- a/packages/third-parties/formio/jest.config.js +++ b/packages/third-parties/formio/jest.config.js @@ -2,7 +2,10 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "formio"), + ...require("@tsed/jest-config"), + moduleNameMapper: { + "@tsed/formio": "/src/index.ts" + }, coverageThreshold: { global: { statements: 100, diff --git a/packages/third-parties/formio/package.json b/packages/third-parties/formio/package.json index 50c493daa57..a2fa41e1691 100644 --- a/packages/third-parties/formio/package.json +++ b/packages/third-parties/formio/package.json @@ -22,12 +22,13 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "start": "ts-node test/app/index.ts", + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "@tsed/formio-types": "7.18.2", @@ -43,7 +44,10 @@ "express": "^4.17.1", "formio": "^2.0.0", "mongodb": "*", - "mongoose": "^6.1.7" + "mongoose": "^6.1.7", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -58,4 +62,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/formio/tsconfig.cjs.json b/packages/third-parties/formio/tsconfig.cjs.json new file mode 100644 index 00000000000..573bf91a7e0 --- /dev/null +++ b/packages/third-parties/formio/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../orm/mongoose" + }, + { + "path": "../formio-types" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/third-parties/formio/tsconfig.compile.esm.json b/packages/third-parties/formio/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/formio/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/formio/tsconfig.compile.json b/packages/third-parties/formio/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/formio/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/formio/tsconfig.esm.json b/packages/third-parties/formio/tsconfig.esm.json new file mode 100644 index 00000000000..09f3aac1ba5 --- /dev/null +++ b/packages/third-parties/formio/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../orm/mongoose" + }, + { + "path": "../formio-types" + }, + { + "path": "../../utils/normalize-path" + } + ] +} diff --git a/packages/third-parties/formio/tsconfig.json b/packages/third-parties/formio/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/formio/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/schema-formio/.eslintignore b/packages/third-parties/schema-formio/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/schema-formio/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/schema-formio/.eslintrc.js b/packages/third-parties/schema-formio/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/schema-formio/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/schema-formio/jest.config.js b/packages/third-parties/schema-formio/jest.config.js index 19b4a53d259..d9cbfc42085 100644 --- a/packages/third-parties/schema-formio/jest.config.js +++ b/packages/third-parties/schema-formio/jest.config.js @@ -2,7 +2,11 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "schema-formio"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/schema-formio": "/src/index.ts" + }, coverageThreshold: { global: { statements: 100, diff --git a/packages/third-parties/schema-formio/package.json b/packages/third-parties/schema-formio/package.json index 62686f3c405..d76589ec64c 100644 --- a/packages/third-parties/schema-formio/package.json +++ b/packages/third-parties/schema-formio/package.json @@ -17,12 +17,13 @@ }, "scripts": { "clean": "rm -rf lib", - "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser", "build:browser": "webpack", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "keywords": [ "TypeScript", @@ -44,7 +45,10 @@ "devDependencies": { "@tsed/core": "7.18.2", "@tsed/openspec": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/core": "^7.18.2", @@ -74,4 +78,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/schema-formio/tsconfig.cjs.json b/packages/third-parties/schema-formio/tsconfig.cjs.json new file mode 100644 index 00000000000..f639d5ed3d8 --- /dev/null +++ b/packages/third-parties/schema-formio/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../formio-types" + } + ] +} diff --git a/packages/third-parties/schema-formio/tsconfig.compile.json b/packages/third-parties/schema-formio/tsconfig.compile.json deleted file mode 100644 index 36a526336bc..00000000000 --- a/packages/third-parties/schema-formio/tsconfig.compile.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": [ - "node_modules", - "test", - "lib", - "benchmark", - "coverage", - "spec", - "**/*.benchmark.ts", - "**/*.spec.ts", - "keys", - "jest.config.js", - "webpack.config.js" - ] -} diff --git a/packages/third-parties/schema-formio/tsconfig.esm.json b/packages/third-parties/schema-formio/tsconfig.esm.json new file mode 100644 index 00000000000..c135f83dea3 --- /dev/null +++ b/packages/third-parties/schema-formio/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../core" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../formio-types" + } + ] +} diff --git a/packages/third-parties/schema-formio/tsconfig.json b/packages/third-parties/schema-formio/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/schema-formio/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/socketio-testing/.eslintignore b/packages/third-parties/socketio-testing/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/socketio-testing/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/socketio-testing/.eslintrc.js b/packages/third-parties/socketio-testing/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/socketio-testing/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/socketio-testing/package.json b/packages/third-parties/socketio-testing/package.json index a349876a21d..ac672695bcf 100644 --- a/packages/third-parties/socketio-testing/package.json +++ b/packages/third-parties/socketio-testing/package.json @@ -14,10 +14,11 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts" + "build": "yarn build:ts", + "start": "ts-node test/app/index.ts", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -25,13 +26,15 @@ "devDependencies": { "@tsed/common": "7.18.2", "@tsed/di": "7.18.2", - "socket.io-client": "^4.1.2" + "socket.io-client": "^4.1.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", "@tsed/core": "^7.18.2", "@tsed/di": "^7.18.2", - "@tsed/socketio": "^7.18.2", "socket.io-client": "^4.0.1" } -} \ No newline at end of file +} diff --git a/packages/third-parties/socketio-testing/tsconfig.cjs.json b/packages/third-parties/socketio-testing/tsconfig.cjs.json new file mode 100644 index 00000000000..8e8739d1a14 --- /dev/null +++ b/packages/third-parties/socketio-testing/tsconfig.cjs.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/socketio-testing/tsconfig.compile.esm.json b/packages/third-parties/socketio-testing/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/socketio-testing/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/socketio-testing/tsconfig.compile.json b/packages/third-parties/socketio-testing/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/socketio-testing/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/socketio-testing/tsconfig.esm.json b/packages/third-parties/socketio-testing/tsconfig.esm.json new file mode 100644 index 00000000000..257d09cb6e0 --- /dev/null +++ b/packages/third-parties/socketio-testing/tsconfig.esm.json @@ -0,0 +1,39 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/socketio-testing/tsconfig.json b/packages/third-parties/socketio-testing/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/socketio-testing/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/socketio/.eslintignore b/packages/third-parties/socketio/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/socketio/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/socketio/.eslintrc.js b/packages/third-parties/socketio/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/socketio/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/socketio/jest.config.js b/packages/third-parties/socketio/jest.config.js index 31efccd31a3..d74f018700a 100644 --- a/packages/third-parties/socketio/jest.config.js +++ b/packages/third-parties/socketio/jest.config.js @@ -1,8 +1,11 @@ // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html - module.exports = { - ...require("@tsed/jest-config")(__dirname, "socketio"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "^@tsed/socketio$": "/src/index.ts" + }, coverageThreshold: { global: { statements: 100, diff --git a/packages/third-parties/socketio/package.json b/packages/third-parties/socketio/package.json index faa6f93d405..8b79eacd4a7 100644 --- a/packages/third-parties/socketio/package.json +++ b/packages/third-parties/socketio/package.json @@ -21,12 +21,13 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "test": "cross-env NODE_ENV=test yarn jest --runInBand --testTimeout 10000" + "start": "ts-node test/app/index.ts", + "test": "cross-env NODE_ENV=test yarn jest --runInBand --testTimeout 10000", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -38,10 +39,14 @@ "@tsed/json-mapper": "7.18.2", "@tsed/openspec": "7.18.2", "@tsed/platform-middlewares": "7.18.2", + "@tsed/socketio-testing": "7.18.2", "@tsed/schema": "7.18.2", "express": "^4.17.1", "socket.io": "4.4.1", - "socket.io-client": "^4.1.2" + "socket.io-client": "^4.1.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/di": "^7.18.2", @@ -65,4 +70,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/socketio/tsconfig.cjs.json b/packages/third-parties/socketio/tsconfig.cjs.json new file mode 100644 index 00000000000..81eb8ca41be --- /dev/null +++ b/packages/third-parties/socketio/tsconfig.cjs.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../platform/platform-middlewares" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../socketio-testing" + } + ] +} diff --git a/packages/third-parties/socketio/tsconfig.compile.esm.json b/packages/third-parties/socketio/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/socketio/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/socketio/tsconfig.compile.json b/packages/third-parties/socketio/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/socketio/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/socketio/tsconfig.esm.json b/packages/third-parties/socketio/tsconfig.esm.json new file mode 100644 index 00000000000..54ce086860c --- /dev/null +++ b/packages/third-parties/socketio/tsconfig.esm.json @@ -0,0 +1,54 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../di" + }, + { + "path": "../../specs/json-mapper" + }, + { + "path": "../../platform/platform-middlewares" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../specs/openspec" + }, + { + "path": "../socketio-testing" + } + ] +} diff --git a/packages/third-parties/socketio/tsconfig.json b/packages/third-parties/socketio/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/socketio/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/stripe/.eslintignore b/packages/third-parties/stripe/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/stripe/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/stripe/.eslintrc.js b/packages/third-parties/stripe/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/stripe/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/stripe/jest.config.js b/packages/third-parties/stripe/jest.config.js index 948e548cb9d..3def6a723b9 100644 --- a/packages/third-parties/stripe/jest.config.js +++ b/packages/third-parties/stripe/jest.config.js @@ -1,8 +1,13 @@ // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html +const {getModuleNameMapper} = require("@tsed/jest-config/moduleNameMapper.js"); module.exports = { - ...require("@tsed/jest-config")(__dirname, "stripe"), + ...require("@tsed/jest-config"), + roots: ["/src", "/test"], + moduleNameMapper: { + "@tsed/stripe": "/src/index.ts" + }, coverageThreshold: { global: { statements: 97.29, diff --git a/packages/third-parties/stripe/package.json b/packages/third-parties/stripe/package.json index f8c93b4ad19..b4ada49964a 100644 --- a/packages/third-parties/stripe/package.json +++ b/packages/third-parties/stripe/package.json @@ -23,11 +23,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -39,7 +40,10 @@ "@tsed/platform-middlewares": "7.18.2", "@tsed/platform-params": "7.18.2", "@tsed/schema": "7.18.2", - "stripe": "^8.129.0" + "stripe": "^8.129.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/exceptions": "^7.18.2", @@ -67,4 +71,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/stripe/tsconfig.cjs.json b/packages/third-parties/stripe/tsconfig.cjs.json new file mode 100644 index 00000000000..c7606ad6048 --- /dev/null +++ b/packages/third-parties/stripe/tsconfig.cjs.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/exceptions" + }, + { + "path": "../../platform/platform-middlewares" + }, + { + "path": "../../platform/platform-params" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/stripe/tsconfig.compile.esm.json b/packages/third-parties/stripe/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/stripe/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/stripe/tsconfig.compile.json b/packages/third-parties/stripe/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/stripe/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/stripe/tsconfig.esm.json b/packages/third-parties/stripe/tsconfig.esm.json new file mode 100644 index 00000000000..9346503560b --- /dev/null +++ b/packages/third-parties/stripe/tsconfig.esm.json @@ -0,0 +1,48 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../specs/exceptions" + }, + { + "path": "../../platform/platform-middlewares" + }, + { + "path": "../../platform/platform-params" + }, + { + "path": "../../specs/schema" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + } + ] +} diff --git a/packages/third-parties/stripe/tsconfig.json b/packages/third-parties/stripe/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/stripe/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/terminus/.eslintignore b/packages/third-parties/terminus/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/terminus/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/terminus/.eslintrc.js b/packages/third-parties/terminus/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/terminus/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/terminus/jest.config.js b/packages/third-parties/terminus/jest.config.js index 752f0ec41b1..2de5fff2a55 100644 --- a/packages/third-parties/terminus/jest.config.js +++ b/packages/third-parties/terminus/jest.config.js @@ -2,7 +2,8 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "terminus"), + ...require("@tsed/jest-config"), + roots: ["/src"], coverageThreshold: { global: { statements: 100, diff --git a/packages/third-parties/terminus/package.json b/packages/third-parties/terminus/package.json index 27c14cd92cd..404b37b9ede 100644 --- a/packages/third-parties/terminus/package.json +++ b/packages/third-parties/terminus/package.json @@ -15,12 +15,13 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "start": "ts-node -r tsconfig-paths/register test/app/index.ts", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "start": "ts-node test/app/index.ts", + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "tslib": "2.4.0" @@ -30,7 +31,10 @@ "@tsed/common": "7.18.2", "@tsed/core": "7.18.2", "@tsed/di": "7.18.2", - "@tsed/schema": "7.18.2" + "@tsed/schema": "7.18.2", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@godaddy/terminus": "^4.7.1", @@ -53,4 +57,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/terminus/tsconfig.cjs.json b/packages/third-parties/terminus/tsconfig.cjs.json new file mode 100644 index 00000000000..679b6b4b4cd --- /dev/null +++ b/packages/third-parties/terminus/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/third-parties/terminus/tsconfig.compile.esm.json b/packages/third-parties/terminus/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/terminus/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/terminus/tsconfig.compile.json b/packages/third-parties/terminus/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/terminus/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/terminus/tsconfig.esm.json b/packages/third-parties/terminus/tsconfig.esm.json new file mode 100644 index 00000000000..0a085690ed2 --- /dev/null +++ b/packages/third-parties/terminus/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/schema" + } + ] +} diff --git a/packages/third-parties/terminus/tsconfig.json b/packages/third-parties/terminus/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/terminus/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/third-parties/vite-ssr-plugin/.eslintignore b/packages/third-parties/vite-ssr-plugin/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/third-parties/vite-ssr-plugin/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/third-parties/vite-ssr-plugin/.eslintrc.js b/packages/third-parties/vite-ssr-plugin/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/third-parties/vite-ssr-plugin/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/third-parties/vite-ssr-plugin/jest.config.js b/packages/third-parties/vite-ssr-plugin/jest.config.js index 26617df6d3d..f6df5141812 100644 --- a/packages/third-parties/vite-ssr-plugin/jest.config.js +++ b/packages/third-parties/vite-ssr-plugin/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "vite-ssr-plugin"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/third-parties/vite-ssr-plugin/package.json b/packages/third-parties/vite-ssr-plugin/package.json index 0f4e3e249c7..1161e716f4c 100644 --- a/packages/third-parties/vite-ssr-plugin/package.json +++ b/packages/third-parties/vite-ssr-plugin/package.json @@ -19,11 +19,12 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "sirv": ">=2.0.2" @@ -34,7 +35,10 @@ "@tsed/di": "7.18.2", "@tsed/exceptions": "7.18.2", "vite": "3.2.5", - "vite-plugin-ssr": "0.4.87" + "vite-plugin-ssr": "0.4.87", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": { "@tsed/common": "^7.18.2", @@ -46,4 +50,4 @@ "optional": false } } -} \ No newline at end of file +} diff --git a/packages/third-parties/vite-ssr-plugin/tsconfig.cjs.json b/packages/third-parties/vite-ssr-plugin/tsconfig.cjs.json new file mode 100644 index 00000000000..fccbab1c4fd --- /dev/null +++ b/packages/third-parties/vite-ssr-plugin/tsconfig.cjs.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + } + ] +} diff --git a/packages/third-parties/vite-ssr-plugin/tsconfig.compile.esm.json b/packages/third-parties/vite-ssr-plugin/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/vite-ssr-plugin/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/vite-ssr-plugin/tsconfig.compile.json b/packages/third-parties/vite-ssr-plugin/tsconfig.compile.json deleted file mode 100644 index 97476d245bb..00000000000 --- a/packages/third-parties/vite-ssr-plugin/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/vite-ssr-plugin/tsconfig.esm.json b/packages/third-parties/vite-ssr-plugin/tsconfig.esm.json new file mode 100644 index 00000000000..a0eada06ead --- /dev/null +++ b/packages/third-parties/vite-ssr-plugin/tsconfig.esm.json @@ -0,0 +1,42 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../platform/common" + }, + { + "path": "../../core" + }, + { + "path": "../../di" + }, + { + "path": "../../specs/exceptions" + } + ] +} diff --git a/packages/third-parties/vite-ssr-plugin/tsconfig.json b/packages/third-parties/vite-ssr-plugin/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/third-parties/vite-ssr-plugin/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/utils/normalize-path/.eslintignore b/packages/utils/normalize-path/.eslintignore new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/packages/utils/normalize-path/.eslintignore @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/packages/utils/normalize-path/.eslintrc.js b/packages/utils/normalize-path/.eslintrc.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/packages/utils/normalize-path/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/packages/utils/normalize-path/jest.config.js b/packages/utils/normalize-path/jest.config.js index feec2fd3f94..f6df5141812 100644 --- a/packages/utils/normalize-path/jest.config.js +++ b/packages/utils/normalize-path/jest.config.js @@ -2,7 +2,7 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - ...require("@tsed/jest-config")(__dirname, "core"), + ...require("@tsed/jest-config"), coverageThreshold: { global: require("./coverage.json") } diff --git a/packages/utils/normalize-path/package.json b/packages/utils/normalize-path/package.json index e62aca69912..1469761ab88 100644 --- a/packages/utils/normalize-path/package.json +++ b/packages/utils/normalize-path/package.json @@ -14,18 +14,22 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn barrels && yarn run build:esm && yarn run build:cjs", + "build": "yarn barrels && yarn build:ts", "barrels": "yarn barrelsby --delete -d src -e \"\\.spec\\.ts\"", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json", - "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" + "test": "cross-env NODE_ENV=test yarn jest --max-workers=2", + "build:ts": "tsc --build tsconfig.json", + "lint": "eslint '**/*.{ts,js}'", + "lint:fix": "eslint '**/*.{ts,js}' --fix" }, "dependencies": { "normalize-path": "3.0.0", "tslib": "2.4.0" }, "devDependencies": { - "@types/normalize-path": "^3.0.0" + "@types/normalize-path": "^3.0.0", + "@tsed/typescript": "7.18.2", + "@tsed/eslint": "7.18.2", + "eslint": "^8.12.0" }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/utils/normalize-path/tsconfig.cjs.json b/packages/utils/normalize-path/tsconfig.cjs.json new file mode 100644 index 00000000000..290e454aeca --- /dev/null +++ b/packages/utils/normalize-path/tsconfig.cjs.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/utils/normalize-path/tsconfig.compile.esm.json b/packages/utils/normalize-path/tsconfig.compile.esm.json deleted file mode 100644 index 11130dd3889..00000000000 --- a/packages/utils/normalize-path/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": "./", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts", "jest.config.js"] -} diff --git a/packages/utils/normalize-path/tsconfig.compile.json b/packages/utils/normalize-path/tsconfig.compile.json deleted file mode 100644 index 1f2cfdf4168..00000000000 --- a/packages/utils/normalize-path/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts", "jest.config.js"] -} diff --git a/packages/utils/normalize-path/tsconfig.esm.json b/packages/utils/normalize-path/tsconfig.esm.json new file mode 100644 index 00000000000..89f93d97c26 --- /dev/null +++ b/packages/utils/normalize-path/tsconfig.esm.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/packages/utils/normalize-path/tsconfig.json b/packages/utils/normalize-path/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/packages/utils/normalize-path/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/packages/utils/normalize-path/tsconfig.tsbuildinfo b/packages/utils/normalize-path/tsconfig.tsbuildinfo new file mode 100644 index 00000000000..ffc27f83051 --- /dev/null +++ b/packages/utils/normalize-path/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/normalize-path/index.d.ts","./src/normalizePath.ts","./src/index.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e","2e355a2e70d2d3e513679850a00dca98c461a35e9344057ac08e9c55cc8109e5","9f49803bacfa0365d95e22f46bf001ee140bcf00fbe60cd7ade266edbc95fe07","684f459a73194d48e8294abd6fae8a75d6057ed16b65ceda5cf12032e68efca9"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"newLine":1,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","preserveConstEnums":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"suppressImplicitAnyIndexErrors":false,"target":99},"fileIdsList":[[45,47],[45,46]],"referencedMap":[[48,1],[47,2]],"exportedModulesMap":[[48,1],[47,2]],"semanticDiagnosticsPerFile":[46,45,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,8,44,41,42,43,1,48,[47,[{"file":"./src/normalizePath.ts","start":57,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'path'. '/Volumes/workspaces/tsed/ts-express-decorators/node_modules/path/path.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"messageText":"Try `npm i --save-dev @types/path` if it exists or add a new declaration (.d.ts) file containing `declare module 'path';`","category":1,"code":7035}]}}]]],"affectedFilesPendingEmit":[[46,1],[45,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[48,1],[47,1]]},"version":"4.7.4"} \ No newline at end of file diff --git a/tools/eslint/eslint.template.js b/tools/eslint/eslint.template.js new file mode 100644 index 00000000000..802f86f8b54 --- /dev/null +++ b/tools/eslint/eslint.template.js @@ -0,0 +1 @@ +module.exports = require("@tsed/eslint/node.js"); diff --git a/tools/eslint/eslintignore.template b/tools/eslint/eslintignore.template new file mode 100644 index 00000000000..2aab498ae47 --- /dev/null +++ b/tools/eslint/eslintignore.template @@ -0,0 +1,13 @@ +node_modules +docs +docs-references +lib +dist +coverage +.nyc_output +*-lock.json +*.lock +benchmarks.* +**/generated + +**/*.js diff --git a/tools/eslint/index.js b/tools/eslint/index.js new file mode 100644 index 00000000000..fd12e632b8a --- /dev/null +++ b/tools/eslint/index.js @@ -0,0 +1,38 @@ +const mono = require("@tsed/monorepo-utils"); +const {dirname, join, relative} = require("path"); +const cloneDeep = require("lodash/cloneDeep.js"); +const {readFile, writeFile, writeJson} = require("fs-extra"); + +const scriptDir = __dirname; + +async function main() { + const monoRepo = new mono.MonoRepo({ + rootDir: process.cwd(), + verbose: false + }); + + const packages = await mono.findPackages(monoRepo); + const template = await readFile(join(scriptDir, "./eslint.template.js")); + const ignore = await readFile(join(scriptDir, "./eslintignore.template")); + + const promises = packages.map(async (pkg) => { + const path = dirname(pkg.path); + + if (pkg.pkg.source && pkg.pkg.source.endsWith(".ts")) { + await writeFile(join(path, ".eslintrc.js"), template, {spaces: 2}); + await writeFile(join(path, ".eslintignore"), ignore, {spaces: 2}); + + pkg.pkg.scripts["lint"] = "eslint '**/*.{ts,js}'"; + pkg.pkg.scripts["lint:fix"] = "eslint '**/*.{ts,js}' --fix"; + + pkg.pkg.devDependencies["@tsed/eslint"] = pkg.pkg.version; + pkg.pkg.devDependencies["eslint"] = monoRepo.rootPkg.devDependencies["eslint"]; + + await writeJson(pkg.path, pkg.pkg, {spaces: 2}); + } + }); + + await Promise.all(promises); +} + +main(); diff --git a/.eslintrc b/tools/eslint/node.js similarity index 71% rename from .eslintrc rename to tools/eslint/node.js index 8467a4d7c5d..b3ca1854d92 100644 --- a/.eslintrc +++ b/tools/eslint/node.js @@ -1,17 +1,16 @@ -{ - "parser": "@typescript-eslint/parser", - "extends": ["prettier", "plugin:@typescript-eslint/recommended"], - "plugins": ["@typescript-eslint", "workspaces"], - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "project": "./tsconfig.json" +module.exports = { + parser: "@typescript-eslint/parser", + extends: ["prettier", "plugin:@typescript-eslint/recommended"], + plugins: ["@typescript-eslint", "workspaces"], + parserOptions: { + ecmaVersion: 2018, + sourceType: "module" }, - "env": { - "node": true, - "es6": true + env: { + node: true, + es6: true }, - "rules": { + rules: { "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-types": "off", @@ -30,16 +29,16 @@ "no-fallthrough": "off", "workspaces/no-absolute-imports": "error" }, - "overrides": [ + overrides: [ { - "files": [ + files: [ "**/*.benchmark.ts", "**/test/**", "**/__mock__/**" ], - "rules": { + rules: { "workspaces/no-absolute-imports": "off" } } ] -} +}; diff --git a/tools/eslint/package.json b/tools/eslint/package.json new file mode 100644 index 00000000000..d8cf25e7f0e --- /dev/null +++ b/tools/eslint/package.json @@ -0,0 +1,15 @@ +{ + "name": "@tsed/eslint", + "version": "7.18.2", + "description": "Util to compile source", + "private": true, + "main": "index.js", + "exports": { + ".": "./index.js", + "./node.js": "./node.js" + }, + "scripts": {}, + "dependencies": {}, + "devDependencies": {}, + "peerDependencies": {} +} diff --git a/tools/integration/package.json b/tools/integration/package.json index 0aad6e95de0..1596815fc10 100644 --- a/tools/integration/package.json +++ b/tools/integration/package.json @@ -1,10 +1,11 @@ { "name": "@tsed/integration", "version": "7.18.2", - "main": "index.js", + "source": "src/index.ts", + "main": "src/index.js", "private": true, "scripts": { - "build": "yarn run tsc --project tsconfig.compile.json" + "build": "tsc --build tsconfig.json" }, "devDependencies": { "@tsed/common": "7.18.2", @@ -15,8 +16,9 @@ "@tsed/platform-express": "7.18.2", "@tsed/platform-views": "7.18.2", "@tsed/schema": "7.18.2", - "@tsed/swagger": "7.18.2" + "@tsed/swagger": "7.18.2", + "@tsed/typescript": "7.18.2" }, "dependencies": {}, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/tools/integration/tsconfig.cjs.json b/tools/integration/tsconfig.cjs.json new file mode 100644 index 00000000000..bc272d12508 --- /dev/null +++ b/tools/integration/tsconfig.cjs.json @@ -0,0 +1,57 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../packages/platform/common" + }, + { + "path": "../../packages/di" + }, + { + "path": "../../packages/specs/exceptions" + }, + { + "path": "../../packages/specs/json-mapper" + }, + { + "path": "../../packages/platform/platform-exceptions" + }, + { + "path": "../../packages/platform/platform-express" + }, + { + "path": "../../packages/platform/platform-views" + }, + { + "path": "../../packages/specs/schema" + }, + { + "path": "../../packages/specs/swagger" + } + ] +} diff --git a/tools/integration/tsconfig.compile.esm.json b/tools/integration/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/tools/integration/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/tools/integration/tsconfig.compile.json b/tools/integration/tsconfig.compile.json deleted file mode 100644 index 90ae3ce92f8..00000000000 --- a/tools/integration/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts", "jest.config.js"] -} diff --git a/tools/integration/tsconfig.esm.json b/tools/integration/tsconfig.esm.json new file mode 100644 index 00000000000..35ed007e727 --- /dev/null +++ b/tools/integration/tsconfig.esm.json @@ -0,0 +1,57 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [ + { + "path": "../../packages/platform/common" + }, + { + "path": "../../packages/di" + }, + { + "path": "../../packages/specs/exceptions" + }, + { + "path": "../../packages/specs/json-mapper" + }, + { + "path": "../../packages/platform/platform-exceptions" + }, + { + "path": "../../packages/platform/platform-express" + }, + { + "path": "../../packages/platform/platform-views" + }, + { + "path": "../../packages/specs/schema" + }, + { + "path": "../../packages/specs/swagger" + } + ] +} diff --git a/tools/integration/tsconfig.json b/tools/integration/tsconfig.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/tools/integration/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/tools/jest/jest.config.js b/tools/jest/jest.config.js index 31fbc07788d..c63b235dd93 100644 --- a/tools/jest/jest.config.js +++ b/tools/jest/jest.config.js @@ -1,11 +1,8 @@ // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html -const {join} = require("path"); -const fixPath = require("normalize-path"); -const packageDir = join(__dirname, "../../packages"); -module.exports = (rootDir) => ({ - rootDir: fixPath(rootDir), +module.exports = { + roots: ["/src"], // Automatically clear mock calls and instances between every test clearMocks: true, @@ -17,11 +14,12 @@ module.exports = (rootDir) => ({ // The directory where Jest should output its coverage files coverageDirectory: "coverage", - + coverageReporters: ["clover", "json", "lcov", "text", "json-summary"], // moduleDirectories: ["node_modules", "packages"], // An array of regexp pattern strings used to skip coverage collection coveragePathIgnorePatterns: [ "index.ts", + "/lib", "/node_modules/", "/test/", "exports.ts", @@ -30,75 +28,36 @@ module.exports = (rootDir) => ({ "engines", "FakeAdapter" ], - moduleNameMapper: { - "^@tsed/core$": fixPath(join(packageDir, "core/src")), - "^@tsed/normalize-path$": fixPath(join(packageDir, "utils/normalize-path/src")), - "^@tsed/di$": fixPath(join(packageDir, "di/src")), - "^@tsed/perf$": fixPath(join(packageDir, "perf/src")), - "^@tsed/engines": fixPath(join(packageDir, "engines/src")), - "^@tsed/common$": fixPath(join(packageDir, "platform/common/src")), - "^@tsed/schema$": fixPath(join(packageDir, "specs/schema/src")), - "^@tsed/ajv$": fixPath(join(packageDir, "specs/ajv/src")), - "^@tsed/exceptions$": fixPath(join(packageDir, "specs/exceptions/src")), - "^@tsed/json-mapper$": fixPath(join(packageDir, "specs/json-mapper/src")), - "^@tsed/openspec$": fixPath(join(packageDir, "specs/openspec/src")), - "^@tsed/swagger$": fixPath(join(packageDir, "specs/swagger/src")), - "^@tsed/apollo": fixPath(join(packageDir, "graphql/apollo/src")), - "^@tsed/typegraphql": fixPath(join(packageDir, "graphql/typegraphql/src")), - "^@tsed/platform-(.*)$": fixPath(join(packageDir, "platform/platform-$1/src")), - "^@tsed/testing-mongoose$": fixPath(join(packageDir, "orm/testing-mongoose/src")), - "^@tsed/objection$": fixPath(join(packageDir, "orm/objection/src")), - "^@tsed/typeorm$": fixPath(join(packageDir, "orm/typeorm/src")), - "^@tsed/mikro-orm": fixPath(join(packageDir, "orm/mikro-orm/src")), - "^@tsed/prisma": fixPath(join(packageDir, "orm/prisma/src")), - "^@tsed/adapters$": fixPath(join(packageDir, "orm/adapters/src")), - "^@tsed/mongoose$": fixPath(join(packageDir, "orm/mongoose/src")), - "^@tsed/adapters-redis$": fixPath(join(packageDir, "orm/adapters-redis/src")), - "^@tsed/agenda$": fixPath(join(packageDir, "third-parties/agenda/src")), - "^@tsed/components-scan$": fixPath(join(packageDir, "third-parties/components-scan/src")), - "^@tsed/formio$": fixPath(join(packageDir, "third-parties/formio/src")), - "^@tsed/formio-types$": fixPath(join(packageDir, "third-parties/formio-types/src")), - "^@tsed/schema-formio$": fixPath(join(packageDir, "third-parties/schema-formio/src")), - "^@tsed/terminus$": fixPath(join(packageDir, "third-parties/terminus/src")), - "^@tsed/stripe$": fixPath(join(packageDir, "third-parties/stripe/src")), - "^@tsed/socketio$": fixPath(join(packageDir, "third-parties/socketio/src")), - "^@tsed/socketio-testing$": fixPath(join(packageDir, "third-parties/socketio-testing/src")), - "^@tsed/passport$": fixPath(join(packageDir, "security/passport/src")), - "^@tsed/jwks$": fixPath(join(packageDir, "security/jwks/src")), - "^@tsed/oidc-provider$": fixPath(join(packageDir, "security/oidc-provider/src")), - "^@tsed/vite-ssr-plugin$": fixPath(join(packageDir, "third-parties/vite-ssr-plugin/src")), - "^@tsed/ioredis$": fixPath(join(packageDir, "orm/ioredis/src")) - }, - testPathIgnorePatterns: ["node_modules", "/docs/", "/docs-references/", "/engines/"], - modulePathIgnorePatterns: ["/lib", "/dist"], // An object that configures minimum threshold enforcement for coverage results - coverageThreshold: { - global: { - branches: 70, - functions: 70, - lines: 70, - statements: 70 - } - }, - - // An array of file extensions your modules use - moduleFileExtensions: ["js", "json", "jsx", "ts", "tsx", "node"], - - // The test environment that will be used for testing + // modulePathIgnorePatterns: ["/lib", "/dist"], // An object that configures minimum threshold enforcement for coverage results testEnvironment: "node", - - // The glob patterns Jest uses to detect test files - + testPathIgnorePatterns: ["node_modules", "/docs/", "/docs-references/", "/engines/"], // A map from regular expressions to paths to transformers transform: { - "\\.(ts)$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + tsconfig: "/tsconfig.cjs.json" + } + ] }, preset: "ts-jest", - - // The paths to modules that run some code to configure or set up the testing environment before each test - setupFiles: [], + transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$", "^.+\\.module\\.(css|sass|scss)$"], + modulePaths: ["/src"], + moduleNameMapper: {}, + moduleFileExtensions: [ + // Place tsx and ts to beginning as suggestion from Jest team + // https://jestjs.io/docs/configuration#modulefileextensions-arraystring + "tsx", + "ts", + "js", + "json", + "jsx", + "node" + ], + extensionsToTreatAsEsm: [".ts"], reporters: ["default"], snapshotFormat: { escapeString: true, printBasicPrototype: true } -}); +}; diff --git a/tools/mocha/mocha.config.js b/tools/mocha/mocha.config.js index 8fa11a7e080..5aeaba65d44 100644 --- a/tools/mocha/mocha.config.js +++ b/tools/mocha/mocha.config.js @@ -5,11 +5,9 @@ process.env.NODE_ENV = "test"; const rootDir = __dirname; module.exports = () => ({ - require: [ - !process.argv.includes("ts-node/register") && "ts-node/register/transpile-only", - "tsconfig-paths/register", - fixPath(join(rootDir, "register")) - ].filter(Boolean), + require: [!process.argv.includes("ts-node/register") && "ts-node/register/transpile-only", fixPath(join(rootDir, "register"))].filter( + Boolean + ), recursive: true, reporter: "dot", spec: ["packages/**/*.spec.ts"], diff --git a/tools/typescript/index.js b/tools/typescript/index.js new file mode 100644 index 00000000000..6263d28654f --- /dev/null +++ b/tools/typescript/index.js @@ -0,0 +1,89 @@ +const mono = require("@tsed/monorepo-utils"); +const {dirname, join, relative} = require("path"); +const cloneDeep = require("lodash/cloneDeep.js"); +const {readJson, writeJson, removeSync} = require("fs-extra"); + +const scriptDir = __dirname; + +async function main() { + const monoRepo = new mono.MonoRepo({ + rootDir: process.cwd(), + verbose: false + }); + + const tsConfigTemplate = await readJson(join(scriptDir, "./tsconfig.template.json")); + const tsConfigEsmTemplate = await readJson(join(scriptDir, "./tsconfig.template.esm.json")); + const tsConfigCjsTemplate = await readJson(join(scriptDir, "./tsconfig.template.cjs.json")); + + const tsConfigRootPath = join(monoRepo.rootDir, "tsconfig.json"); + const tsConfigRoot = await readJson(tsConfigRootPath); + tsConfigRoot.references = []; + + const packages = await mono.findPackages(monoRepo); + + const packagesRefsMap = packages.reduce((map, pkg) => { + if (pkg.pkg.source && pkg.pkg.source.endsWith(".ts")) { + return map.set(pkg.pkg.name, dirname(pkg.path)); + } + return map; + }, new Map()); + + const promises = packages.map(async (pkg) => { + const path = dirname(pkg.path); + + if (pkg.pkg.source && pkg.pkg.source.endsWith(".ts")) { + const tsConfig = cloneDeep(tsConfigTemplate); + const tsConfigPath = join(path, "tsconfig.json"); + const tsConfigCjs = cloneDeep(tsConfigCjsTemplate); + const tsConfigCjsPath = join(path, "tsconfig.cjs.json"); + const tsConfigEsm = cloneDeep(tsConfigEsmTemplate); + const tsConfigEsmPath = join(path, "tsconfig.esm.json"); + + Object.keys({ + ...(pkg.pkg.peerDependencies || {}), + ...(pkg.pkg.devDependencies || {}), + ...(pkg.pkg.dependencies || {}) + }) + .filter((peer) => { + return packagesRefsMap.has(peer); + }) + .map((peer) => { + tsConfigCjs.references.push({ + path: relative(dirname(pkg.path), packagesRefsMap.get(peer)) + }); + tsConfigEsm.references.push({ + path: relative(dirname(pkg.path), packagesRefsMap.get(peer)) + }); + }); + + await writeJson(tsConfigPath, tsConfig, {spaces: 2}); + await writeJson(tsConfigEsmPath, tsConfigEsm, {spaces: 2}); + await writeJson(tsConfigCjsPath, tsConfigCjs, {spaces: 2}); + + tsConfigRoot.references.push({ + path: `./${relative(process.cwd(), path)}` + }); + + if (pkg.pkg.scripts["build:cjs"]) { + pkg.pkg.scripts["build"] = pkg.pkg.scripts["build"].replace("yarn run build:esm && yarn run build:cjs", "yarn build:ts"); + pkg.pkg.scripts["build:ts"] = "tsc --build tsconfig.json"; + delete pkg.pkg.scripts["build:cjs"]; + delete pkg.pkg.scripts["build:esm"]; + } + + pkg.pkg.devDependencies["@tsed/typescript"] = pkg.pkg.version; + + await writeJson(pkg.path, pkg.pkg, {spaces: 2}); + try { + removeSync(join(path, "tsconfig.compile.esm.json")); + removeSync(join(path, "tsconfig.compile.json")); + } catch {} + } + }); + + await Promise.all(promises); + + await writeJson(tsConfigRootPath, tsConfigRoot, {spaces: 2}); +} + +main(); diff --git a/tools/typescript/package.json b/tools/typescript/package.json new file mode 100644 index 00000000000..17c40fa8a5f --- /dev/null +++ b/tools/typescript/package.json @@ -0,0 +1,18 @@ +{ + "name": "@tsed/typescript", + "version": "7.18.2", + "description": "Util to compile source", + "private": true, + "main": "index.js", + "exports": { + ".": "./index.js", + "./tsconfig.base.json": "./tsconfig.base.json", + "./tsconfig.node.json": "./tsconfig.node.json" + }, + "scripts": { + "build:references": "node ./index.js" + }, + "dependencies": {}, + "devDependencies": {}, + "peerDependencies": {} +} diff --git a/tsconfig.base.json b/tools/typescript/tsconfig.node.json similarity index 76% rename from tsconfig.base.json rename to tools/typescript/tsconfig.node.json index cfc2912afd8..15322c41f3a 100644 --- a/tsconfig.base.json +++ b/tools/typescript/tsconfig.node.json @@ -2,8 +2,6 @@ "compilerOptions": { "module": "commonjs", "target": "esnext", - "sourceMap": true, - "declaration": false, "experimentalDecorators": true, "emitDecoratorMetadata": true, "moduleResolution": "node", @@ -18,11 +16,12 @@ "importHelpers": true, "resolveJsonModule": true, "newLine": "LF", - "noEmit": true, - "allowJs": true, "skipLibCheck": true, "lib": ["ES2021", "esnext.asynciterable"], - "typeRoots": ["./node_modules/@types"] - }, - "exclude": ["docs", "integration", "examples/**", "coverage", ".nyc_output"] + "declaration": true, + "noResolve": false, + "preserveConstEnums": true, + "sourceMap": true, + "noEmit": false + } } diff --git a/tools/typescript/tsconfig.template.cjs.json b/tools/typescript/tsconfig.template.cjs.json new file mode 100644 index 00000000000..290e454aeca --- /dev/null +++ b/tools/typescript/tsconfig.template.cjs.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/tools/typescript/tsconfig.template.esm.json b/tools/typescript/tsconfig.template.esm.json new file mode 100644 index 00000000000..89f93d97c26 --- /dev/null +++ b/tools/typescript/tsconfig.template.esm.json @@ -0,0 +1,29 @@ +{ + "extends": "@tsed/typescript/tsconfig.node.json", + "compilerOptions": { + "baseUrl": ".", + "module": "ES2020", + "rootDir": "src", + "outDir": "./lib/esm", + "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", + "jest.config.js", + "**/__mock__/**", + "webpack.config.js" + ], + "references": [] +} diff --git a/tools/typescript/tsconfig.template.json b/tools/typescript/tsconfig.template.json new file mode 100644 index 00000000000..96553fe7036 --- /dev/null +++ b/tools/typescript/tsconfig.template.json @@ -0,0 +1,18 @@ +{ + "files": [], + "compilerOptions": { + "esModuleInterop": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "composite": true + }, + "exclude": ["node_modules", "lib", "benchmark", "coverage", "spec", "keys", "jest.config.js", "webpack.config.js"], + "references": [ + { + "path": "./tsconfig.esm.json" + }, + { + "path": "./tsconfig.cjs.json" + } + ] +} diff --git a/tools/webpack/webpack.config.js b/tools/webpack/webpack.config.js index dc08b194afc..27d1bbf3d73 100644 --- a/tools/webpack/webpack.config.js +++ b/tools/webpack/webpack.config.js @@ -41,7 +41,7 @@ exports.create = ({root, name, externals = {}, resolve = {}}) => { { loader: "ts-loader", options: { - configFile: "tsconfig.compile.esm.json" + configFile: "tsconfig.esm.json" } } ], diff --git a/tsconfig.compile.json b/tsconfig.compile.json deleted file mode 100644 index aa8df6c7c78..00000000000 --- a/tsconfig.compile.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "moduleResolution": "node", - "declaration": true, - "noResolve": false, - "preserveConstEnums": true, - "sourceMap": true, - "noEmit": false, - "inlineSources": true - } -} diff --git a/tsconfig.json b/tsconfig.json index 76fe399294e..06a0dbb3ddb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,173 @@ { - "extends": "./tsconfig.base.json", + "files": [], "compilerOptions": { - "baseUrl": ".", - "paths": { - "@tsed/*": [ - "packages/*/src", - "packages/platform/*/src", - "packages/security/*/src", - "packages/specs/*/src", - "packages/orm/*/src", - "packages/graphql/*/src", - "packages/third-parties/*/src", - "packages/utils/*/src" - ] - } + "module": "ES2020", + "target": "ES2020", + "noEmit": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "allowJs": true, + "moduleResolution": "node" }, - "exclude": ["node_modules", "**/node_modules", "**/dist", "**/.*/"] + "references": [ + { + "path": "./packages/engines" + }, + { + "path": "./packages/di" + }, + { + "path": "./packages/platform/platform-params" + }, + { + "path": "./packages/platform/platform-router" + }, + { + "path": "./packages/specs/openspec" + }, + { + "path": "./packages/utils/normalize-path" + }, + { + "path": "./packages/third-parties/components-scan" + }, + { + "path": "./packages/platform/platform-log-middleware" + }, + { + "path": "./packages/platform/common" + }, + { + "path": "./packages/graphql/apollo" + }, + { + "path": "./packages/platform/platform-response-filter" + }, + { + "path": "./packages/platform/platform-middlewares" + }, + { + "path": "./packages/graphql/typegraphql" + }, + { + "path": "./packages/orm/ioredis" + }, + { + "path": "./packages/orm/mongoose" + }, + { + "path": "./packages/orm/adapters" + }, + { + "path": "./packages/orm/mikro-orm" + }, + { + "path": "./packages/specs/ajv" + }, + { + "path": "./packages/specs/exceptions" + }, + { + "path": "./packages/orm/prisma" + }, + { + "path": "./packages/platform/platform-cache" + }, + { + "path": "./packages/specs/schema" + }, + { + "path": "./packages/orm/objection" + }, + { + "path": "./packages/orm/adapters-redis" + }, + { + "path": "./packages/specs/json-mapper" + }, + { + "path": "./packages/platform/platform-express" + }, + { + "path": "./packages/platform/platform-exceptions" + }, + { + "path": "./packages/orm/testing-mongoose" + }, + { + "path": "./packages/platform/platform-koa" + }, + { + "path": "./packages/platform/platform-test-sdk" + }, + { + "path": "./packages/security/passport" + }, + { + "path": "./packages/third-parties/agenda" + }, + { + "path": "./packages/platform/platform-views" + }, + { + "path": "./packages/platform/platform-serverless-http" + }, + { + "path": "./packages/third-parties/formio" + }, + { + "path": "./packages/specs/swagger" + }, + { + "path": "./packages/platform/platform-serverless" + }, + { + "path": "./packages/security/jwks" + }, + { + "path": "./packages/security/oidc-provider" + }, + { + "path": "./packages/third-parties/socketio-testing" + }, + { + "path": "./packages/platform/platform-serverless-testing" + }, + { + "path": "./packages/third-parties/vite-ssr-plugin" + }, + { + "path": "./packages/third-parties/stripe" + }, + { + "path": "./packages/third-parties/schema-formio" + }, + { + "path": "./packages/third-parties/socketio" + }, + { + "path": "./tools/integration" + }, + { + "path": "./packages/third-parties/event-emitter" + }, + { + "path": "./packages/third-parties/formio-types" + }, + { + "path": "./packages/perf" + }, + { + "path": "./packages/orm/typeorm" + }, + { + "path": "./packages/third-parties/terminus" + }, + { + "path": "./packages/core" + } + ], + "exclude": ["node_modules", "docs", "docs-references"] } diff --git a/yarn.lock b/yarn.lock index 576a4108c5c..58a3bdf0458 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14908,7 +14908,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.1, json5@^2.1.2, json5@^2.2.0, json5@^2.2.1, json5@^2.2.2: +json5@^2.1.1, json5@^2.1.2, json5@^2.2.0, json5@^2.2.1: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -23139,15 +23139,6 @@ ts-pattern@^4.0.1: resolved "https://registry.yarnpkg.com/ts-pattern/-/ts-pattern-4.0.5.tgz#8e87db265b890ddb0dfc10deda36568296ebd5c3" integrity sha512-Bq44KCEt7JVaNLa148mBCJkcQf4l7jtLEBDuDdeuLynWDA+1a60P4D0rMkqSM9mOKLQbIWUddE9h3XKyKwBeqA== -tsconfig-paths@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz#4819f861eef82e6da52fb4af1e8c930a39ed979a" - integrity sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw== - dependencies: - json5 "^2.2.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - tslib@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" @@ -23381,6 +23372,11 @@ typeorm@^0.2.45: yargs "^17.0.1" zen-observable-ts "^1.0.0" +typescript@4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + typescript@^3.5.3: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" @@ -23391,11 +23387,6 @@ typescript@^4.1.3, typescript@^4.4.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== -typescript@^4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== - uglify-js@2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.0.tgz#25eaa1cc3550e39410ceefafd1cfbb6b6d15f001"