-
-
Notifications
You must be signed in to change notification settings - Fork 293
Fix di remove schema dependencies #3087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Conversation
WalkthroughThis change removes all webpack-related build tooling and configuration from the repository, replacing it with Vite across multiple packages. Import paths are refactored for clarity and granularity. Numerous Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Vite as Vite Build Tool
participant Package as Package (core/di/hooks/ajv/etc.)
participant Output as UMD .cjs Bundle
Dev->>Vite: Run vite build (browser build script)
Vite->>Package: Read Vite config (vite.config.mts)
Vite->>Package: Bundle source files (src/index.ts, etc.)
Vite->>Output: Emit UMD .cjs file in lib/browser/
Possibly related PRs
Suggested labels
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (107)
.gitignore
(0 hunks)package.json
(2 hunks)packages/config/tsconfig.esm.json
(1 hunks)packages/core/package.json
(2 hunks)packages/core/src/decorators/storeFn.ts
(1 hunks)packages/core/src/decorators/storeMerge.ts
(1 hunks)packages/core/src/decorators/storeSet.ts
(1 hunks)packages/core/src/errors/UnsupportedDecoratorType.ts
(1 hunks)packages/core/src/index.ts
(1 hunks)packages/core/src/types/Metadata.ts
(1 hunks)packages/core/src/types/MetadataTypes.ts
(1 hunks)packages/core/src/types/Store.ts
(1 hunks)packages/core/src/utils/AnyToPromise.spec.ts
(1 hunks)packages/core/src/utils/AnyToPromise.ts
(1 hunks)packages/core/src/utils/ObjectUtils.spec.ts
(1 hunks)packages/core/src/utils/constructorOf.ts
(1 hunks)packages/core/src/utils/decorateMethodsOf.spec.ts
(1 hunks)packages/core/src/utils/decorateMethodsOf.ts
(1 hunks)packages/core/src/utils/decoratorArgs.spec.ts
(1 hunks)packages/core/src/utils/decoratorArgs.ts
(1 hunks)packages/core/src/utils/decoratorTypeOf.ts
(1 hunks)packages/core/src/utils/inheritedDescriptorOf.ts
(1 hunks)packages/core/src/utils/isEnumerable.ts
(1 hunks)packages/core/src/utils/methodsOf.ts
(1 hunks)packages/core/src/utils/useDecorators.spec.ts
(1 hunks)packages/core/src/utils/useDecorators.ts
(1 hunks)packages/core/src/utils/useMethodDecorator.spec.ts
(1 hunks)packages/core/src/utils/useMethodDecorators.ts
(1 hunks)packages/core/tsconfig.esm.json
(1 hunks)packages/core/vite.config.mts
(1 hunks)packages/core/webpack.config.cjs
(0 hunks)packages/di/package.json
(2 hunks)packages/di/src/common/decorators/autoInjectable.ts
(1 hunks)packages/di/src/common/decorators/configuration.ts
(1 hunks)packages/di/src/common/decorators/constant.ts
(2 hunks)packages/di/src/common/decorators/controller.ts
(2 hunks)packages/di/src/common/decorators/inject.ts
(1 hunks)packages/di/src/common/decorators/intercept.ts
(1 hunks)packages/di/src/common/decorators/lazyInject.ts
(1 hunks)packages/di/src/common/decorators/module.ts
(1 hunks)packages/di/src/common/decorators/opts.ts
(1 hunks)packages/di/src/common/decorators/overrideProvider.ts
(1 hunks)packages/di/src/common/decorators/scope.ts
(1 hunks)packages/di/src/common/decorators/useOpts.ts
(1 hunks)packages/di/src/common/decorators/value.ts
(2 hunks)packages/di/src/common/domain/Provider.ts
(1 hunks)packages/di/src/common/errors/InjectionError.ts
(1 hunks)packages/di/src/common/errors/InvalidPropertyTokenError.ts
(1 hunks)packages/di/src/common/fn/configuration.ts
(1 hunks)packages/di/src/common/fn/lazyInject.ts
(1 hunks)packages/di/src/common/interfaces/RegistrySettings.ts
(1 hunks)packages/di/src/common/registries/GlobalProviders.ts
(1 hunks)packages/di/src/common/services/DIConfiguration.ts
(1 hunks)packages/di/src/common/services/InjectorService.ts
(1 hunks)packages/di/src/common/utils/createContainer.ts
(1 hunks)packages/di/src/common/utils/discoverHooks.ts
(1 hunks)packages/di/src/common/utils/getConfiguration.ts
(1 hunks)packages/di/src/common/utils/getConstructorDependencies.ts
(1 hunks)packages/di/src/common/utils/providerBuilder.ts
(1 hunks)packages/di/src/node/decorators/injectContext.ts
(1 hunks)packages/di/src/node/services/DITest.ts
(1 hunks)packages/di/tsconfig.esm.json
(1 hunks)packages/di/vite.config.mts
(1 hunks)packages/di/webpack.config.cjs
(0 hunks)packages/engines/tsconfig.esm.json
(1 hunks)packages/graphql/apollo/tsconfig.esm.json
(1 hunks)packages/graphql/graphql-ws/tsconfig.esm.json
(1 hunks)packages/graphql/typegraphql/tsconfig.esm.json
(1 hunks)packages/hooks/package.json
(2 hunks)packages/hooks/tsconfig.esm.json
(1 hunks)packages/hooks/vite.config.mts
(1 hunks)packages/hooks/webpack.config.cjs
(0 hunks)packages/orm/adapters-redis/tsconfig.esm.json
(1 hunks)packages/orm/adapters/tsconfig.esm.json
(1 hunks)packages/orm/ioredis/tsconfig.esm.json
(1 hunks)packages/orm/mikro-orm/tsconfig.esm.json
(1 hunks)packages/orm/mongoose/tsconfig.esm.json
(1 hunks)packages/orm/objection/tsconfig.esm.json
(1 hunks)packages/orm/prisma/package.json
(1 hunks)packages/orm/prisma/tsconfig.esm.json
(1 hunks)packages/orm/testcontainers-mongo/tsconfig.esm.json
(1 hunks)packages/perf/tsconfig.esm.json
(1 hunks)packages/platform/common/tsconfig.esm.json
(1 hunks)packages/platform/platform-cache/tsconfig.esm.json
(1 hunks)packages/platform/platform-exceptions/tsconfig.esm.json
(1 hunks)packages/platform/platform-express/tsconfig.esm.json
(1 hunks)packages/platform/platform-fastify/tsconfig.esm.json
(1 hunks)packages/platform/platform-http/tsconfig.esm.json
(1 hunks)packages/platform/platform-koa/tsconfig.esm.json
(1 hunks)packages/platform/platform-log-middleware/tsconfig.esm.json
(1 hunks)packages/platform/platform-log-request/tsconfig.esm.json
(1 hunks)packages/platform/platform-middlewares/tsconfig.esm.json
(1 hunks)packages/platform/platform-multer/tsconfig.esm.json
(1 hunks)packages/platform/platform-params/tsconfig.esm.json
(1 hunks)packages/platform/platform-response-filter/tsconfig.esm.json
(1 hunks)packages/platform/platform-router/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless-http/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless-testing/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless/tsconfig.esm.json
(1 hunks)packages/platform/platform-test-sdk/tsconfig.esm.json
(1 hunks)packages/platform/platform-views/tsconfig.esm.json
(1 hunks)packages/security/jwks/tsconfig.esm.json
(1 hunks)packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json
(1 hunks)packages/security/oidc-provider/tsconfig.esm.json
(1 hunks)packages/security/passport/tsconfig.esm.json
(1 hunks)packages/specs/ajv/package.json
(2 hunks)packages/specs/ajv/tsconfig.esm.json
(1 hunks)
⛔ Files not processed due to max files limit (48)
- packages/specs/ajv/vite.config.mts
- packages/specs/ajv/webpack.config.cjs
- packages/specs/exceptions/package.json
- packages/specs/exceptions/tsconfig.esm.json
- packages/specs/exceptions/vite.config.mts
- packages/specs/exceptions/webpack.config.cjs
- packages/specs/json-mapper/package.json
- packages/specs/json-mapper/tsconfig.esm.json
- packages/specs/json-mapper/vite.config.mts
- packages/specs/json-mapper/webpack.config.cjs
- packages/specs/openapi-utils/tsconfig.esm.json
- packages/specs/openspec/tsconfig.esm.json
- packages/specs/scalar/tsconfig.esm.json
- packages/specs/schema/package.json
- packages/specs/schema/src/domain/JsonEntityStore.ts
- packages/specs/schema/tsconfig.esm.json
- packages/specs/schema/vite.config.mts
- packages/specs/schema/webpack.config.cjs
- packages/specs/swagger/tsconfig.esm.json
- packages/third-parties/agenda/tsconfig.esm.json
- packages/third-parties/bullmq/tsconfig.esm.json
- packages/third-parties/components-scan/tsconfig.esm.json
- packages/third-parties/event-emitter/package.json
- packages/third-parties/event-emitter/tsconfig.esm.json
- packages/third-parties/event-emitter/vite.config.mts
- packages/third-parties/event-emitter/webpack.config.cjs
- packages/third-parties/formio-types/tsconfig.esm.json
- packages/third-parties/formio/tsconfig.esm.json
- packages/third-parties/normalize-path/tsconfig.esm.json
- packages/third-parties/pulse/tsconfig.esm.json
- packages/third-parties/schema-formio/package.json
- packages/third-parties/schema-formio/tsconfig.esm.json
- packages/third-parties/schema-formio/vite.config.mts
- packages/third-parties/schema-formio/webpack.config.cjs
- packages/third-parties/socketio-testing/tsconfig.esm.json
- packages/third-parties/socketio/tsconfig.esm.json
- packages/third-parties/sse/tsconfig.esm.json
- packages/third-parties/stripe/tsconfig.esm.json
- packages/third-parties/temporal/tsconfig.esm.json
- packages/third-parties/terminus/tsconfig.esm.json
- packages/third-parties/vike/tsconfig.esm.json
- tools/integration/tsconfig.esm.json
- tools/typescript/tsconfig.template.esm.json
- tools/vitest/presets/alias.js
- tools/vitest/presets/index.js
- tools/webpack/package.json
- tools/webpack/webpack.config.js
- tsconfig.spec.json
💤 Files with no reviewable changes (4)
- .gitignore
- packages/core/webpack.config.cjs
- packages/di/webpack.config.cjs
- packages/hooks/webpack.config.cjs
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/di/src/common/decorators/controller.ts (4)
packages/core/src/utils/useDecorators.ts (1)
useDecorators
(4-21)packages/di/src/common/fn/injectable.ts (1)
controller
(13-15)packages/core/src/types/Store.ts (1)
Store
(72-175)packages/core/src/utils/classOf.ts (1)
classOf
(16-18)
🪛 GitHub Check: test-specs (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-third-parties (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-graphql (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-orm (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-security (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-platform (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-core (20.12.2)
packages/core/src/utils/useDecorators.spec.ts
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Actions: Build & Release
packages/core/src/utils/useDecorators.spec.ts
[error] 1-1: TypeScript error TS2307: Cannot find module '../..' or its corresponding type declarations.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: CodeQL-Build
🔇 Additional comments (115)
packages/platform/platform-views/tsconfig.esm.json (1)
13-13
: Exclude configuration simplified and webpack config removed.The single-line
exclude
array aligns with the new pattern across the monorepo, and removing"webpack.config.js"
supports the migration to Vite without impacting emitted declarations. No issues detected.packages/security/oidc-provider/tsconfig.esm.json (1)
13-13
: Removal ofwebpack.config.js
fromexclude
is correct
Since this package no longer maintains a Webpack configuration and has fully migrated to Vite, dropping"webpack.config.js"
ensures the exclude list only covers relevant paths. This aligns with the other packages in the monorepo and avoids excluding non-existent files.packages/orm/mikro-orm/tsconfig.esm.json (1)
13-13
: Standardize and clean up theexclude
array
Aligns with other packages by consolidating exclusions into a single line and removing the now-unusedwebpack.config.js
entry.
Please verify that there are no remainingwebpack.config.js
files or references in this package to prevent unexpected compilation issues.packages/platform/platform-http/tsconfig.esm.json (1)
13-13
: Exclude list simplified and webpack.config.js removed as intended
The new single-line exclude array matches the other packages’tsconfig.esm.json
files and correctly drops the obsoletewebpack.config.js
. No changes to compiler settings or includes were made, and this aligns with the Vite migration.packages/graphql/typegraphql/tsconfig.esm.json (1)
13-13
: Correct removal of obsolete webpack exclusion
The updated single-lineexclude
array cleanly removes the now-unusedwebpack.config.js
entry and aligns with the Vite migration pattern seen across other packages.packages/orm/objection/tsconfig.esm.json (1)
13-13
: Exclude list flattened and webpack.config.js removed
The single-lineexclude
array correctly removes the now-irrelevantwebpack.config.js
entry and matches the streamlined format used across other packages during the Vite migration.packages/orm/mongoose/tsconfig.esm.json (1)
13-13
: Exclude array simplified andwebpack.config.js
removed consistently
Theexclude
list is now a single-line array matching other packages, and"webpack.config.js"
has been removed. Given thatinclude
only targetssrc/**/*.ts
/.json
, this change is safe and won’t affect compilation.packages/orm/testcontainers-mongo/tsconfig.esm.json (1)
13-13
: Align TSConfig excludes with monorepo conventions
The excluded paths have been consolidated into a single-line array and the now-unusedwebpack.config.js
entry has been removed, matching the standard pattern applied across packages.packages/platform/platform-serverless-http/tsconfig.esm.json (1)
13-13
: Removal of webpack.config.js from exclusions is appropriate
Dropping the"webpack.config.js"
entry aligns with the broader shift away from webpack in favor of Vite and matches updates in other packages. No further action is needed here.packages/platform/platform-fastify/tsconfig.esm.json (1)
13-13
: Consistent exclusion cleanupRemoved the now-obsolete
webpack.config.js
entry and collapsed theexclude
array into a single line to match the style of other packages in the monorepo. This keeps your TS build configuration aligned with the Vite migration and ensures no unintended files remain excluded.packages/perf/tsconfig.esm.json (1)
13-13
:✅ Verification successful
Remove obsolete webpack.config.js from exclude
The
webpack.config.js
entry is no longer relevant after the Vite migration and its removal here aligns this package with the rest of the monorepo’s updated config.Please verify that no webpack configuration files remain in
packages/perf
. For example, you can run:
🏁 Script executed:
#!/bin/bash # Verify removal of webpack config files in packages/perf fd webpack.config packages/perf || echo "✅ No webpack config files found"Length of output: 33
Let’s run a more comprehensive search to ensure no webpack config files remain:
🏁 Script executed:
#!/bin/bash # Thoroughly search for any webpack config files in packages/perf find packages/perf -type f \( -iname 'webpack.config.js' -o -iname 'webpack.config.*' \) || echo "✅ No webpack config files found"Length of output: 90
Let’s capture and check matches explicitly to confirm absence:
🏁 Script executed:
#!/bin/bash # Search for any webpack config files in packages/perf and report results matches=$(find packages/perf -type f \( -iname 'webpack.config.js' -o -iname 'webpack.config.*' \)) if [ -z "$matches" ]; then echo "✅ No webpack config files found in packages/perf" else echo "Found webpack config files:" echo "$matches" fiLength of output: 225
No webpack.config.js entry in exclude – comment no longer relevant
The
exclude
array inpackages/perf/tsconfig.esm.json
already omits any reference towebpack.config.js
. A search confirmed there are no webpack config files inpackages/perf
. No further action is required.packages/orm/prisma/package.json (1)
48-48
: DevDependency version bump for @tsed/monorepo-utils
Updated the@tsed/monorepo-utils
devDependency to2.3.13
to align with other packages in the monorepo.packages/platform/platform-test-sdk/tsconfig.esm.json (1)
13-13
: Simplify exclude array and remove obsolete webpack.config.js
Theexclude
array has been consolidated into a single line and"webpack.config.js"
removed, reflecting the shift from Webpack to Vite.packages/platform/platform-exceptions/tsconfig.esm.json (1)
13-13
: Simplify exclude array and remove obsolete webpack.config.js
Flattened theexclude
list and removed"webpack.config.js"
, consistent with the build-tooling migration to Vite.packages/orm/adapters-redis/tsconfig.esm.json (1)
13-13
: Simplify exclude array and remove obsolete webpack.config.js
Converted theexclude
entries to a single-line array and dropped"webpack.config.js"
to match other packages’ cleanup.packages/platform/platform-cache/tsconfig.esm.json (1)
13-13
: Simplify exclude array and remove obsolete webpack.config.js
Theexclude
field is now a one-liner and"webpack.config.js"
has been removed, in line with the monorepo’s migration from Webpack to Vite.packages/platform/platform-log-request/tsconfig.esm.json (1)
13-13
: Consistent tsconfig simplification and webpack exclusion removal.
Theexclude
array has been consolidated into a single line and the obsoletewebpack.config.js
entry is correctly removed, aligning with the repository’s migration to Vite.packages/platform/platform-middlewares/tsconfig.esm.json (1)
13-13
: Consistent tsconfig simplification and webpack exclusion removal.
Theexclude
array has been consolidated into a single line and the obsoletewebpack.config.js
entry is correctly removed, aligning with the Vite migration across packages.packages/orm/prisma/tsconfig.esm.json (1)
13-13
: Consistent tsconfig simplification and webpack exclusion removal.
Theexclude
array is now in single-line form, and the redundantwebpack.config.js
exclusion has been dropped in line with the broader shift to Vite.packages/platform/platform-serverless-testing/tsconfig.esm.json (1)
13-13
: Consistent tsconfig simplification and webpack exclusion removal.
The single-lineexclude
format improves readability, and the removedwebpack.config.js
exclusion correctly reflects the removal of webpack tooling.packages/config/tsconfig.esm.json (1)
13-13
: Consistent tsconfig simplification and webpack exclusion removal.
This update streamlines theexclude
list into a single line and properly removes the outdatedwebpack.config.js
entry, matching the monorepo-wide Vite migration.packages/orm/ioredis/tsconfig.esm.json (1)
13-13
: Exclude array updated correctly
Removed the obsolete"webpack.config.js"
exclusion and consolidated the patterns into a single-line array. This aligns with the Vite migration and maintains consistency.packages/graphql/graphql-ws/tsconfig.esm.json (1)
13-13
: Exclude array streamlined
Removed the webpack exclusion and flattened the array to one line, consistent with other packages after the Vite migration.packages/platform/platform-express/tsconfig.esm.json (1)
13-13
: Configuration cleanup approved
The exclusion of"webpack.config.js"
is no longer needed and has been removed. The updated single-line array matches the repo standard post-migration.packages/platform/platform-log-middleware/tsconfig.esm.json (1)
13-13
: Exclude list refactored correctly
Consistently removed the webpack config from the exclude list and simplified formatting. This change is in line with removing all webpack tooling.packages/graphql/apollo/tsconfig.esm.json (1)
13-13
: Exclude patterns updated
Obsolete webpack exclusions have been dropped, and the array has been reformatted into a single line—matching the broader Vite conversion.packages/platform/platform-response-filter/tsconfig.esm.json (1)
13-13
: Exclude list formatting simplified and removal of obsolete webpack config
The single-line array is cleaner, and dropping"webpack.config.js"
aligns with the migration from webpack to Vite. No semantic change.packages/platform/platform-koa/tsconfig.esm.json (1)
13-13
: Exclude list formatting simplified and removal of obsolete webpack config
Consistent with the repo-wide move to Vite, removing"webpack.config.js"
is correct and the one-line array is more maintainable.packages/security/passport/tsconfig.esm.json (1)
13-13
: Exclude list formatting simplified and removal of obsolete webpack config
This cleanup matches other packages’ tsconfig changes and safely removes the unused webpack configuration entry.packages/platform/platform-multer/tsconfig.esm.json (1)
13-13
: Exclude list formatting simplified and removal of obsolete webpack config
The change is purely stylistic and correctly omits the deprecated"webpack.config.js"
.packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json (1)
13-13
: Exclude list formatting simplified and removal of obsolete webpack config
Updates are consistent with the shift away from webpack; no functional impact.packages/platform/platform-router/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack exclusion – ApprovedThe
exclude
array has been consolidated to a single line and the redundant"webpack.config.js"
entry removed, which aligns with the migration from Webpack to Vite without affecting TypeScript compilation.packages/platform/common/tsconfig.esm.json (1)
13-13
: Streamlined exclude array and removed webpack.config.js
Theexclude
array has been consolidated into a single line and"webpack.config.js"
was removed, which aligns with the shift away from webpack to Vite.package.json (3)
116-116
: Bump monorepo-utils to 2.3.13
The patch-level update of@tsed/monorepo-utils
is safe and consistent with other package bumps in the monorepo.
150-150
: Downgraded Vite to 6.2.2: verify consistency
Confirm that the Vite version downgrade is intentional and compatible across all packages in the monorepo, and that there are no regressions compared to the previously used version.
151-153
: Added Vite plugins and Vitest
The addition ofvite-plugin-dts
,vite-tsconfig-paths
, andvitest
supports the migration to Vite and adds TypeScript path resolution and test capabilities.packages/specs/ajv/package.json (4)
10-10
: Updated browser entry to use CommonJS UMD
The"browser"
field now points toajv.umd.cjs
, matching the new UMD CJS bundle format.
15-15
: Aligned exports browser entry with new CJS build
The exports map’s browser entry now points to the.cjs
file, ensuring consistency with the built bundle.
23-23
: Build:browser script switched to Vite; ensure config exists
Thebuild:browser
script now invokesvite build
. Please verify that avite.config.mts
(or equivalent Vite config) is present in this package to avoid build failures.
44-45
: Introduced Vite and Vitest for development
Addingvite
andvitest
todevDependencies
aligns with the removal of webpack and adoption of Vite-based builds and testing.packages/specs/ajv/tsconfig.esm.json (1)
13-13
: Simplified exclude array and removed webpack exclusion
Theexclude
list has been flattened to a single-line array and no longer excludeswebpack.config.js
, consistent with the broader migration to Vite.packages/core/src/utils/constructorOf.ts (1)
1-1
: Correct import path forType
Updating the import from"../types/Type.js"
reflects the new directory structure and consolidates type definitions undertypes
.packages/core/src/utils/methodsOf.ts (1)
1-1
: Import path refactored:Type
moved totypes
directory
The updated import from"../types/Type.js"
aligns with the new directory layout and matches other granular type imports in the package.packages/core/src/decorators/storeMerge.ts (1)
1-1
: Import path updated:Store
now imported fromtypes
Switching the import to"../types/Store.js"
correctly reflects the consolidated types folder and maintains consistency with adjacent decorators.packages/core/src/decorators/storeSet.ts (1)
1-1
: Import path updated:Store
now imported fromtypes
The change to"../types/Store.js"
keeps the same pattern as instoreMerge.ts
andstoreFn.ts
, reinforcing the flattened types directory structure.packages/di/src/common/decorators/opts.ts (1)
1-1
: Import path granularized:classOf
from sub-path
ImportingclassOf
from"@tsed/core/utils/classOf.js"
aligns with the move away from monolithic core exports to explicit utility imports.packages/di/src/node/decorators/injectContext.ts (1)
1-1
: Import path granularized:catchError
from sub-path
The switch to"@tsed/core/utils/catchError.js"
follows the same explicit-import convention and helps Tree-shaking in ESM builds.packages/di/src/common/fn/lazyInject.ts (1)
1-1
: GranularisFunction
import — updated to the explicit ESM subpath with.js
extension, improving modularity and tree-shaking.packages/core/src/types/Metadata.ts (1)
3-3
: FlattenedclassOf
import path — moved from the nestedutils/objects
directory to the top-levelutils
folder and added the.js
extension for ESM.packages/di/src/common/decorators/module.ts (1)
1-1
: Explicit ESM path foruseDecorators
— switching from the root package import to the granular subpath aligns with the new module layout and ensures correct bundler resolution.packages/core/src/utils/ObjectUtils.spec.ts (1)
19-19
: Updated test import path — adjusted to import from the flattenedutils
index (../index.js
) instead of the old nested path. This keeps the spec in sync with the restructured exports.packages/core/src/types/MetadataTypes.ts (1)
1-1
: LocalType
import path — changed to./Type.js
within thetypes
directory, matching the new file organization and ESM conventions.packages/di/src/common/decorators/scope.ts (1)
1-1
: Granular import usage for StoreSetImporting
StoreSet
directly from"@tsed/core/decorators/storeSet.js"
improves tree-shaking and aligns with the new Vite-based build setup.packages/di/src/common/fn/configuration.ts (1)
1-1
: Granular import applied for StoreImporting
Store
from"@tsed/core/types/Store.js"
enhances modularity and supports efficient tree-shaking under the Vite toolchain.packages/di/src/common/decorators/overrideProvider.ts (1)
1-1
: Explicit import for TypeSwitching to import
Type
from"@tsed/core/types/Type.js"
reduces bundle size and follows the ESM-focused import pattern introduced by the Vite migration.packages/di/src/common/utils/createContainer.ts (1)
1-1
: Use specific import path for TypeImporting
Type
from"@tsed/core/types/Type.js"
maintains consistency with the package-wide granular import strategy and aids tree-shaking in Vite.packages/di/src/common/interfaces/RegistrySettings.ts (1)
1-1
: Refined import for TypeThe import of
Type
from"@tsed/core/types/Type.js"
improves clarity and aligns with the granular dependency approach across the@tsed
ecosystem post-migration to Vite.packages/core/src/utils/useDecorators.ts (1)
1-2
: Consistent type import paths.
The updated imports from../types/AnyDecorator.js
and../types/DecoratorParameters.js
align with the newtypes
directory structure and maintain explicit.js
extensions for ESM resolution.packages/core/src/utils/useMethodDecorator.spec.ts (1)
1-2
: Updated decorator and type imports in spec.
Switching to../decorators/storeFn.js
and../types/Store.js
matches the reorganized module layout and keeps test imports in sync with source.packages/di/src/common/decorators/lazyInject.ts (1)
1-2
: Granular utility imports from@tsed/core
.
ImportingcatchError
andisFunction
via explicit sub-paths (utils/catchError.js
,utils/isFunction.js
) improves modularity and supports tree-shaking.packages/di/src/common/utils/getConstructorDependencies.ts (1)
1-1
: Explicit metadata import.
Refactoring to@tsed/core/types/Metadata.js
ensures accurate module resolution and aligns with the project’s granular import strategy.packages/di/src/common/utils/getConfiguration.ts (1)
1-2
: Explicit type imports for configuration utilities.
Using@tsed/core/types/Store.js
and@tsed/core/types/Type.js
aligns with the overall refactoring toward precise sub-path imports and enhances maintainability.packages/core/src/decorators/storeFn.ts (1)
1-2
: Approve import path updates
The imports have been correctly redirected to the consolidatedtypes
directory, matching the new module structure without any logic changes.packages/di/tsconfig.esm.json (1)
13-13
: Approve tsconfig exclude simplification
Consolidating theexclude
array into a single line and droppingwebpack.config.js
is consistent with the move from Webpack to Vite.packages/core/tsconfig.esm.json (1)
13-13
: Approve tsconfig exclude simplification
The streamlined single-lineexclude
array and removal ofwebpack.config.js
correctly reflect the build-tooling migration.packages/hooks/tsconfig.esm.json (1)
13-13
: Approve tsconfig exclude simplification
Updating theexclude
list to one line and taking outwebpack.config.js
aligns with the shift to Vite across packages.packages/core/src/utils/isEnumerable.ts (1)
2-2
: Approve utility import path update
Changing the import to./inheritedDescriptorOf.js
aligns with the flattened utils folder and preserves existing logic.packages/core/src/utils/AnyToPromise.spec.ts (1)
6-7
: Refined import paths for test utilities
The imports forcatchAsyncError
andisStream
have been correctly updated to use local relative modules (./catchError.js
,./isStream.js
), aligning with the new file layout.packages/di/src/common/utils/providerBuilder.ts (1)
3-4
: Use granular submodule imports for clarity
SwitchingStore
andType
to import from their explicit paths under@tsed/core/types
improves modularity and makes tree-shaking more effective.packages/di/src/common/decorators/value.ts (2)
1-1
: Update catchError import to explicit path
ImportingcatchError
from@tsed/core/utils/catchError.js
is consistent with the project's move to granular submodules.
27-27
: Correct example import forEnv
The example now referencesEnv
from"@tsed/core/domain/Env.js"
, matching the new module structure in docs.packages/core/src/utils/inheritedDescriptorOf.ts (1)
1-1
: Simplify import path forancestorsOf
Switching to./ancestorsOf.js
removes an unnecessary directory hop and aligns with the flattened utils structure.packages/di/src/common/errors/InvalidPropertyTokenError.ts (1)
1-2
: Granular imports for error utilities
ImportingclassOf
andnameOf
from their dedicated paths under@tsed/core/utils
enhances clarity and supports better tree-shaking.packages/core/src/utils/AnyToPromise.ts (1)
1-4
: Import paths updated to flattened utils structure
The relative imports forisObject
,isObservable
,isPromise
, andisStream
have been correctly adjusted to./
now that all utilities live directly underutils
. No logic changes here and module resolution should work under the new Vite setup.packages/core/src/utils/decoratorTypeOf.ts (1)
1-2
: Consistent utility import paths
The imports forDecoratorTypes
andclassOf
have been updated to the flattened directories (types
andutils
respectively). This aligns with the broader restructure—no functional impact.packages/core/src/utils/decoratorArgs.spec.ts (1)
2-3
: Test imports reflect new utils layout
The spec file’s imports fordescriptorOf
andprototypeOf
now point to./descriptorOf.js
and./prototypeOf.js
, matching the refactored utils folder structure. Tests should continue to pass.packages/di/src/common/services/DIConfiguration.ts (1)
1-3
: Granular imports from@tsed/core
subpaths
Replaced the grouped import with explicit imports ofEnv
,getValue
, andsetValue
from their specific submodules. This improves clarity and supports tree-shaking under Vite. No other logic changes introduced.packages/core/src/utils/useMethodDecorators.ts (1)
1-2
: Flattened import paths for decorator utils
Updated imports forAnyDecorator
anddescriptorOf
to align with the newtypes
andutils
directories. Functionality remains unchanged.packages/di/src/common/errors/InjectionError.ts (1)
1-4
: LGTM! Import path refactoring improves modularity.The refactoring from grouped imports to specific import paths is excellent for tree-shaking and build optimization. Using
.js
extensions is correct for ES module imports in TypeScript.packages/di/src/common/utils/discoverHooks.ts (1)
1-2
: Excellent use of specific import paths and type-only imports.The refactoring properly separates types and utilities into their respective import paths, and correctly uses
type
imports for type-only usage.packages/di/src/common/registries/GlobalProviders.ts (1)
1-2
: Consistent import path refactoring maintains functionality.The specific import paths align well with the overall refactoring strategy and improve build optimization potential.
packages/di/src/common/decorators/autoInjectable.ts (1)
1-2
: Refactoring completed consistently with proper type-only imports.The import path changes maintain all functionality while improving modularity. The
type
import forType
is correctly used since it's only needed for type annotations.packages/core/src/utils/decoratorArgs.ts (1)
1-2
: Import path update is consistent and correct.The refactored imports now point to the
types
and localutils
directories in the new project layout. Paths resolve correctly and no functional changes were introduced.packages/core/src/utils/decorateMethodsOf.spec.ts (1)
1-3
: Import path adjustments are correct.The updated relative imports for
StoreMerge
,StoreSet
,Store
, anddescriptorOf
align with the flatteneddecorators
,types
, andutils
structure. All paths are accurate.Also applies to: 5-5
packages/core/src/utils/decorateMethodsOf.ts (1)
1-5
: Flattened utility imports are correct.These imports now leverage the consolidated
types
directory and localutils
modules. Paths accurately reflect the reorganized project structure.packages/di/src/common/decorators/constant.ts (2)
1-2
: Explicit utility imports are accurate.Moving from root-level imports to
@tsed/core/utils/...
improves modularity and tree-shaking. The paths tocatchError
anddeepClone
are correct.
40-40
: Example import path updated appropriately.The code example now points to
@tsed/core/domain/Env.js
, matching the new domain export location. This aligns with the explicit import strategy.packages/core/src/errors/UnsupportedDecoratorType.ts (1)
1-3
: Flattened utility imports are correct.The imports for
classOf
,decoratorTypeOf
, andnameOf
now reference the top-levelutils
folder, reflecting the new flattened directory structure. Paths are accurate.packages/di/src/common/services/InjectorService.ts (1)
1-10
: Granularized imports for improved modularity and tree-shaking
The switch from a monolithic@tsed/core
import to explicit sub‐module imports (e.g.,@tsed/core/utils/classOf.js
) is consistent with the new Vite‐based build and enhances bundle optimization. All paths include the.js
extension as required by ES modules.packages/di/src/node/services/DITest.ts (1)
1-4
: Refined core imports to explicit sub-paths
ImportingEnv
,getValue
,isClass
, andisObject
from their granular@tsed/core
modules aligns with the overall modularization effort. Paths and extensions look correct.packages/di/src/common/decorators/inject.ts (1)
1-7
: Refactored decorator imports to specific modules
Good update: importingDecoratorTypes
,Metadata
,Store
,catchError
,decoratorTypeOf
, andisPromise
directly from@tsed/core
sub‐paths cleans up dependencies and aligns with Vite’s ESM expectations.packages/di/src/common/decorators/configuration.ts (2)
1-3
: Explicit import of decorator utilities
Switching imports ofDecoratorParameters
,DecoratorTypes
, anddecoratorTypeOf
to their precise module locations is consistent with the refactoring across@tsed/di
.
8-8
: Removed obsolete configuration token import
The import ofDIConfiguration
only (and removal of the legacyCONFIGURATION
import) rightly aligns with the updated decorator behavior. Ensure that no downstream references toCONFIGURATION
remain.packages/core/src/types/Store.ts (1)
1-7
: LGTM! Import reorganization improves maintainability.The import path refactoring from nested subdirectories to a flatter structure enhances code organization and maintainability. All necessary utilities are properly imported and the logic remains unchanged.
packages/di/src/common/domain/Provider.ts (1)
1-6
: Excellent import granularization for better modularity.The migration from aggregated imports to specific sub-path imports improves tree-shaking, makes dependencies more explicit, and follows modern ES module best practices. This enhances build optimization without affecting functionality.
packages/di/src/common/decorators/intercept.ts (1)
1-8
: Consistent import refactoring aligns with package modernization.The granular import approach matches the pattern used throughout the codebase refactoring, improving modularity and build optimization. The functionality remains unchanged.
packages/di/vite.config.mts (1)
1-19
:❓ Verification inconclusive
Solid Vite configuration with modern Node.js dependency.
The Vite configuration correctly sets up UMD library builds with appropriate externals and output settings. However,
import.meta.dirname
requires Node.js 20.11.0+ or 21.2.0+.Please verify that the project's minimum Node.js version supports
import.meta.dirname
:
🏁 Script executed:
#!/bin/bash # Check package.json files for Node.js version requirements fd package.json --exec grep -l "engines\|node" {} \; | head -5 | xargs catLength of output: 11784
Confirm Node.js version compatibility
I didn’t find any
engines.node
field in yourpackage.json
files, so it’s unclear whether the project guarantees Node.js 20.11.0+ (required forimport.meta.dirname
). Please ensure:
- Your CI and developer environments run Node.js ≥ 20.11.0 (or ≥ 21.2.0).
- You add an
"engines": { "node": ">=20.11.0" }
entry to your rootpackage.json
(and any others as needed).packages/di/src/common/decorators/useOpts.ts (1)
1-4
: Granular imports improve tree-shaking
Switching from aggregate to explicit sub-path imports (UnsupportedDecoratorType
,DecoratorTypes
, etc.) increases bundle-shakeability and clarity. This change aligns well with the modularization strategy.packages/di/package.json (4)
10-15
: Updated browser entry to.cjs
Switching thebrowser
field andexports.browser
to./lib/browser/di.umd.cjs
correctly aligns with the Vite-based output.
22-22
: Switch build script to Vite
Changing"build:browser"
from Webpack tovite build
ensures consistency with the new tooling strategy.
41-42
: Dev dependencies updated for Vite and Vitest
Adding"vite"
and"vitest"
and removing Webpack-related deps matches the monorepo migration plan.
47-47
: Peer dependency on@tsed/logger
added
Including@tsed/logger
inpeerDependencies
maintains correct expectations for consumers.packages/hooks/package.json (3)
10-15
: Browser entry updated to.cjs
Adjusting the"browser"
field and"exports.browser"
tohooks.umd.cjs
aligns with the Vite build output and removes the minified Webpack artifact.
22-23
: Use Vite for browser builds
Switching"build:browser"
tovite build
is correct per the migration away from Webpack.
32-38
: Dev dependencies updated for Vite and Vitest
Updating@tsed/monorepo-utils
, addingvite
, and addingvitest
reflects the new build and test tooling.packages/core/src/index.ts (3)
8-17
: LGTM! Well-organized type exports consolidation.The consolidation of type exports from
domain
andinterfaces
directories into a unifiedtypes
directory improves organization and import clarity.
18-75
: LGTM! Excellent flattening of utility exports.The flattening of utility exports from nested directories (like
utils/objects
andutils/decorators
) to the top-levelutils
folder significantly improves:
- Import granularity and specificity
- Tree-shaking capabilities
- Overall maintainability
This restructuring follows modern module organization best practices.
1-76
:❓ Verification inconclusive
Verify backward compatibility impact.
This export restructuring represents a breaking change for existing consumers who import from the previous nested paths. Ensure that:
- All referenced files exist at their new locations
- Proper migration documentation is provided
- Consider providing a deprecation period with both old and new paths
🏁 Script executed:
#!/bin/bash # Verify all exported files exist at their new locations echo "Checking if all exported TypeScript files exist..." # Check types directory exports for file in AnyDecorator DecoratorParameters DecoratorTypes Env Metadata MetadataTypes Relation Store Type ValueOf; do if [ ! -f "packages/core/src/types/${file}.ts" ]; then echo "Missing: packages/core/src/types/${file}.ts" fi done # Check a sample of utils exports for file in ancestorOf ancestorsOf classOf cleanObject constructorOf useDecorators useMethodDecorators; do if [ ! -f "packages/core/src/utils/${file}.ts" ]; then echo "Missing: packages/core/src/utils/${file}.ts" fi done echo "Verification complete."Length of output: 3012
🏁 Script executed:
#!/bin/bash echo "Searching for migration and deprecation documentation..." # Look for keywords in the repo rg -i -n "migration" . rg -i -n "upgrade" . rg -i -n "deprecate" . # Check for common guide files for file in CHANGELOG.md UPGRADE_GUIDE.md MIGRATION.md MIGRATION_GUIDE.md; do if [ -f "$file" ]; then echo "Found documentation file: $file" fi doneLength of output: 28651
Exports Verified – Add Migration Docs & Deprecation Period
All files exported in packages/core/src/index.ts exist at their new paths. To ensure a smooth upgrade for consumers, please:
- Update CHANGELOG.md or add an UPGRADE_GUIDE (e.g., in docs/introduction/) to call out the move from nested imports to the new root barrel.
- Provide a deprecation layer by re-exporting the old nested paths (marked as deprecated) for at least one minor release before removal.
- Document in your main README or migration guide how to switch imports, with examples of old vs. new import statements.
fix_required
packages/di/src/common/decorators/controller.ts (3)
1-5
: LGTM! Import path updates align with core restructuring.The updated imports using specific subpaths from
@tsed/core
align perfectly with the export restructuring in the core package and improve tree-shaking capabilities.
60-72
: LGTM! Excellent decorator consolidation.The refactoring consolidates multiple decorator operations into a single
useDecorators
call while maintaining the same functionality:
- Sets
path
metadata when provided- Establishes
childrenControllers
collection- Creates bidirectional
parentController
relationshipsThis approach is more efficient than multiple separate decorator calls and provides clearer intent.
69-71
:❓ Verification inconclusive
Verify parent-child controller relationship establishment.
The logic correctly establishes bidirectional relationships between parent and child controllers. Ensure this maintains the same behavior as the previous implementation.
🏁 Script executed:
#!/bin/bash # Search for the previous controller decorator implementation to compare logic echo "Searching for previous controller decorator patterns..." # Look for any Path decorator usage rg -A 5 -B 5 "Path\(" packages/di/src/ # Look for Children decorator usage rg -A 5 -B 5 "Children\(" packages/di/src/ # Look for parentController metadata usage rg -A 3 -B 3 "parentController" packages/di/src/Length of output: 3633
Verify bidirectional controller relationship logic
The decorator now explicitly sets both sides of the relationship:
factory.store().set("childrenControllers", children); children.forEach(childToken => Store.from(childToken).set("parentController", classOf(target)) );Since we don’t have a previous
@Controller
implementation on record to diff against, please confirm:
- Declaring nested controllers still yields the same
childrenControllers
andparentController
metadata at runtime.- Your existing tests (e.g. in
packages/di/src/common/domain/ControllerProvider.spec.ts
) cover nested-controller scenarios, or add new ones to validate this behavior.packages/core/package.json (4)
10-10
: LGTM! Browser build migration to Vite with appropriate file extension.The change from
.umd.min.js
to.umd.cjs
is appropriate for the CommonJS UMD format, and the migration to Vite is a good modernization choice.Also applies to: 15-15
19-24
: LGTM! Export pattern optimization aligns with flattened structure.The narrowing of export patterns from
./**/*
to./*.js
is well-aligned with the flattened module structure and should improve module resolution performance while reducing the export scope to only the necessary files.
29-29
: LGTM! Build script migration to Vite.The migration from webpack to Vite for browser builds is a positive modernization that should provide better build performance and developer experience.
40-46
:❓ Verification inconclusive
Verify Vite configuration exists and dependency versions.
The dependency updates look reasonable with webpack removed and Vite added. Ensure that:
- The corresponding
vite.config.mts
file exists and is properly configured- The Vite version (6.2.2) is stable and compatible with the project
🏁 Script executed:
#!/bin/bash # Check if Vite configuration exists echo "Checking for Vite configuration..." if [ -f "packages/core/vite.config.mts" ]; then echo "✓ vite.config.mts exists" echo "Content preview:" head -20 packages/core/vite.config.mts else echo "✗ vite.config.mts not found" fi # Check if webpack config was removed if [ -f "packages/core/webpack.config.cjs" ]; then echo "⚠ webpack.config.cjs still exists - should it be removed?" else echo "✓ webpack.config.cjs properly removed" fiLength of output: 883
Confirm Vite migration is complete
The Vite config and dependency updates look good:
- packages/core/vite.config.mts exists and is correctly set up for a UMD build.
- packages/core/webpack.config.cjs has been removed.
Next step: please verify that Vite v6.2.2 is published on npm and compatible with your existing plugins and workflows (e.g., review the v6 changelog for breaking changes and run your local smoke tests). Once you’ve confirmed everything works, this migration is ready to merge.
"**/__mock__/**", | ||
"webpack.config.js" | ||
] | ||
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Approve removal of obsolete Webpack exclusion; suggest excluding Vite configs
The "webpack.config.js"
entry is correctly removed, since Webpack is no longer part of the build. To complete the migration to Vite and avoid emitting your Vite configuration into the ESM output, consider excluding vite.config.ts
(and/or vite.config.js
) as well.
- "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
+ "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**", "vite.config.ts", "vite.config.js"]
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"] | |
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**", "vite.config.ts", "vite.config.js"] |
🤖 Prompt for AI Agents
In packages/engines/tsconfig.esm.json at line 13, the exclusion of
"webpack.config.js" was correctly removed as Webpack is no longer used. To
prevent Vite configuration files from being included in the ESM build output,
add "vite.config.ts" and "vite.config.js" to the "exclude" array. This will
ensure these config files are not processed or emitted during the build.
"**/__mock__/**", | ||
"webpack.config.js" | ||
] | ||
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Consider centralizing common TSConfig excludes
The same exclude
patterns appear in many tsconfig.esm.json
files. Extracting them into a shared base config (or into @tsed/typescript/tsconfig.node.json
) would reduce duplication and simplify future maintenance.
🤖 Prompt for AI Agents
In packages/orm/ioredis/tsconfig.esm.json at line 13, the exclude array
duplicates patterns found in other tsconfig.esm.json files. To fix this, create
a shared base tsconfig file (e.g., @tsed/typescript/tsconfig.node.json)
containing the common exclude patterns, then extend this base config in the
current file and remove the duplicated exclude array here. This centralizes the
excludes and reduces maintenance overhead.
import {StoreFn} from "../../decorators/storeFn.js"; | ||
import {Store} from "../../domain/Store.js"; | ||
import {AnyDecorator} from "../../interfaces/AnyDecorator.js"; | ||
import {AnyDecorator} from "../.."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect import path for AnyDecorator
The spec fails to resolve import {AnyDecorator} from "../.."
. This path should point to the actual entry file with a .js
extension.
Apply this diff to fix the import:
-import {AnyDecorator} from "../..";
+import {AnyDecorator} from "../../index.js";
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import {AnyDecorator} from "../.."; | |
-import {AnyDecorator} from "../.."; | |
+import {AnyDecorator} from "../../index.js"; |
🧰 Tools
🪛 GitHub Check: test-specs (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-third-parties (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-graphql (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-orm (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-security (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-platform (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Check: test-core (20.12.2)
[failure] 1-1:
Cannot find module '../..' or its corresponding type declarations.
🪛 GitHub Actions: Build & Release
[error] 1-1: TypeScript error TS2307: Cannot find module '../..' or its corresponding type declarations.
🤖 Prompt for AI Agents
In packages/core/src/utils/useDecorators.spec.ts at line 1, the import path for
AnyDecorator is incorrect and causes resolution failure. Update the import
statement to point to the actual entry file with the correct relative path
including the .js extension to ensure the module resolves properly.
import {defineConfig} from "vite"; | ||
import {resolve} from "path"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define __dirname
for ESM resolution
The current import of resolve
combined with import.meta.dirname
on line 16 will break at runtime because import.meta.dirname
is not a standard property in Node ESM. You need to derive __dirname
from import.meta.url
.
Proposed patch:
-import {defineConfig} from "vite";
-import {resolve} from "path";
+import {defineConfig} from "vite";
+import {resolve, dirname} from "path";
+import {fileURLToPath} from "url";
+
+// Derive __dirname in ESM
+const __dirname = dirname(fileURLToPath(import.meta.url));
Then update entry: resolve(import.meta.dirname, "src/index.ts")
to:
-lib: {
- entry: resolve(import.meta.dirname, "src/index.ts"),
+lib: {
+ entry: resolve(__dirname, "src/index.ts"),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import {defineConfig} from "vite"; | |
import {resolve} from "path"; | |
import {defineConfig} from "vite"; | |
import {resolve, dirname} from "path"; | |
import {fileURLToPath} from "url"; | |
// Derive __dirname in ESM | |
const __dirname = dirname(fileURLToPath(import.meta.url)); | |
export default defineConfig({ | |
// ... other config ... | |
lib: { | |
entry: resolve(__dirname, "src/index.ts"), | |
// ... other lib options ... | |
}, | |
// ... other config ... | |
}); |
🤖 Prompt for AI Agents
In packages/hooks/vite.config.mts at the top of the file (lines 1 to 3), define
the __dirname constant by converting import.meta.url to a file path using URL
and path utilities, since import.meta.dirname is not standard in Node ESM. Then
update the entry path on line 16 to use this __dirname variable with resolve
instead of import.meta.dirname to ensure correct runtime resolution.
build: { | ||
outDir: "lib/browser", | ||
lib: { | ||
entry: resolve(import.meta.dirname, "src/index.ts"), | ||
formats: ["umd"], | ||
name: "@tsed/hooks", | ||
fileName: "hooks", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure output filename matches .cjs
extension in package.json
With fileName: "hooks"
and formats: ["umd"]
, Vite will emit hooks.umd.js
, but packages/hooks/package.json
points to hooks.umd.cjs
. You need to override the filename to include the .cjs
extension.
Example fix:
build: {
outDir: "lib/browser",
lib: {
- fileName: "hooks",
+ // force .cjs extension
+ fileName: () => `hooks.umd.cjs`,
},
},
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
build: { | |
outDir: "lib/browser", | |
lib: { | |
entry: resolve(import.meta.dirname, "src/index.ts"), | |
formats: ["umd"], | |
name: "@tsed/hooks", | |
fileName: "hooks", | |
}, | |
build: { | |
outDir: "lib/browser", | |
lib: { | |
entry: resolve(import.meta.dirname, "src/index.ts"), | |
formats: ["umd"], | |
name: "@tsed/hooks", | |
// force .cjs extension | |
fileName: () => `hooks.umd.cjs`, | |
}, | |
}, |
🤖 Prompt for AI Agents
In packages/hooks/vite.config.mts around lines 13 to 20, the output filename is
set to "hooks" with format "umd", which causes Vite to emit "hooks.umd.js" by
default, but the package.json expects "hooks.umd.cjs". To fix this, explicitly
set the fileName property to "hooks.umd.cjs" so the output filename matches the
extension specified in package.json.
plugins: [ | ||
// dts({ | ||
// outDir: "lib/browser/types", | ||
// include: ["src"], | ||
// exclude: ["**/*.spec.{ts,tsx}", "**/*.stories.{ts,tsx}"], | ||
// }) | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Remove or enable the commented dts
plugin
The placeholder for the TypeScript declaration plugin is commented out. Clean up by removing it or integrating it into the build and adding the plugin dependency.
🤖 Prompt for AI Agents
In packages/core/vite.config.mts around lines 6 to 12, the dts plugin
configuration is commented out. Either remove this commented block entirely if
the plugin is not needed, or uncomment and properly integrate the dts plugin
into the plugins array. If enabling it, ensure the dts plugin dependency is
installed and configured correctly for generating TypeScript declaration files.
import {defineConfig} from "vite"; | ||
import {resolve} from "path"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define __dirname
for ESM resolution
Same issue as in @tsed/hooks
: import.meta.dirname
is invalid in Node ESM. Derive __dirname
using fileURLToPath(import.meta.url)
.
🤖 Prompt for AI Agents
In packages/core/vite.config.mts at the top of the file (lines 1 to 3), define
the __dirname constant for ESM by importing fileURLToPath and URL from 'url' and
then setting __dirname to the directory name of the current module using
fileURLToPath(import.meta.url). This replaces the invalid import.meta.dirname
usage and ensures proper path resolution in ESM.
build: { | ||
outDir: "lib/browser", | ||
lib: { | ||
entry: resolve(import.meta.dirname, "src/index.ts"), | ||
formats: ["umd"], | ||
name: "@tsed/core", | ||
fileName: "core", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Match output filename to .cjs
referenced in package.json
Using fileName: "core"
yields core.umd.js
, but the @tsed/core
package expects .cjs
. Update to output a .cjs
file.
Example:
lib: {
- fileName: "core",
+ fileName: () => `core.umd.cjs`,
},
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
build: { | |
outDir: "lib/browser", | |
lib: { | |
entry: resolve(import.meta.dirname, "src/index.ts"), | |
formats: ["umd"], | |
name: "@tsed/core", | |
fileName: "core", | |
}, | |
build: { | |
outDir: "lib/browser", | |
lib: { | |
entry: resolve(import.meta.dirname, "src/index.ts"), | |
formats: ["umd"], | |
name: "@tsed/core", | |
fileName: () => `core.umd.cjs`, | |
}, |
🤖 Prompt for AI Agents
In packages/core/vite.config.mts around lines 13 to 20, the output filename is
set to "core" which results in a file named core.umd.js, but the package.json
expects a .cjs extension. Update the fileName property to "core.cjs" to ensure
the output file matches the expected .cjs extension.
83e85b0
to
a7a85b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 10
♻️ Duplicate comments (19)
packages/engines/tsconfig.esm.json (1)
13-13
: 🛠️ Refactor suggestionExclude Vite configuration files to prevent them from being emitted.
Since the repository is migrating to Vite, add
vite.config.ts
andvite.config.js
to yourexclude
array so that Vite config files aren’t processed or shipped in the ESM build output.Proposed diff:
- "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"] + "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**", "vite.config.ts", "vite.config.js"]packages/orm/prisma/tsconfig.esm.json (1)
13-13
: Consistent cleanup of webpack config exclusion. Removal of"webpack.config.js"
and single-line formatting inexclude
matches the repository-wide migration from Webpack to Vite.packages/platform/platform-test-sdk/tsconfig.esm.json (1)
13-13
: Consistent cleanup of webpack config exclusion. Removal of"webpack.config.js"
and single-line formatting inexclude
matches the repository-wide migration from Webpack to Vite.packages/platform/platform-exceptions/tsconfig.esm.json (1)
13-13
: Consistent cleanup of webpack config exclusion. Removal of"webpack.config.js"
and single-line formatting inexclude
matches the repository-wide migration from Webpack to Vite.packages/orm/ioredis/tsconfig.esm.json (1)
13-13
: 🧹 Nitpick (assertive)Consider centralizing common TSConfig exclude patterns
Theexclude
array here duplicates the same patterns found across manytsconfig.esm.json
files. Extract these into the shared base config (@tsed/typescript/tsconfig.node.json
) and remove them here to avoid duplication and simplify future maintenance.packages/platform/platform-serverless-testing/tsconfig.esm.json (1)
13-13
: 🧹 Nitpick (assertive)Consider centralizing common TSConfig exclude patterns
Theexclude
array here duplicates the same patterns found across manytsconfig.esm.json
files. Extract these into the shared base config (@tsed/typescript/tsconfig.node.json
) and remove them here to avoid duplication and simplify future maintenance.packages/platform/platform-serverless-http/tsconfig.esm.json (1)
13-13
: 🧹 Nitpick (assertive)Consider centralizing common TSConfig exclude patterns
Theexclude
array here duplicates the same patterns found across manytsconfig.esm.json
files. Extract these into the shared base config (@tsed/typescript/tsconfig.node.json
) and remove them here to avoid duplication and simplify future maintenance.packages/perf/tsconfig.esm.json (1)
13-13
: 🧹 Nitpick (assertive)Consider centralizing common TSConfig exclude patterns
Theexclude
array here duplicates the same patterns found across manytsconfig.esm.json
files. Extract these into the shared base config (@tsed/typescript/tsconfig.node.json
) and remove them here to avoid duplication and simplify future maintenance.packages/orm/adapters-redis/tsconfig.esm.json (1)
13-13
: 🧹 Nitpick (assertive)Consider centralizing common TSConfig exclude patterns
Theexclude
array here duplicates the same patterns found across manytsconfig.esm.json
files. Extract these into the shared base config (@tsed/typescript/tsconfig.node.json
) and remove them here to avoid duplication and simplify future maintenance.tools/integration/tsconfig.esm.json (1)
13-13
: Duplicate of exclude list update
This change mirrors the update inpackages/platform/platform-serverless/tsconfig.esm.json
: removingwebpack.config.js
and consolidating the array formatting.packages/graphql/apollo/tsconfig.esm.json (1)
13-13
: Duplicate of exclude list update
Same rationale as above:webpack.config.js
is no longer present, so it’s removed from the exclude list and the array is now one line.packages/platform/platform-http/tsconfig.esm.json (1)
13-13
: Duplicate of exclude list update
Consistently removeswebpack.config.js
from the exclude list and consolidates formatting, as in other packages.packages/specs/openspec/tsconfig.esm.json (1)
13-13
: Duplicate of exclude list update
Matches the pattern in othertsconfig.esm.json
files: single-line exclude array withoutwebpack.config.js
.packages/hooks/vite.config.mts (3)
6-11
: [duplicate] Clean up commented-out DTS plugin configuration
The commenteddts
block (lines 7–11) still clutters the config. Either remove it entirely or enable and complete it (addingvite-plugin-dts
todevDependencies
), per previous feedback.
19-20
:⚠️ Potential issueEnsure UMD output uses
.cjs
extension
WithfileName: "hooks"
, Vite will emithooks.umd.js
, butpackage.json
expectshooks.umd.cjs
. OverridefileName
to force the.cjs
extension.Example fix:
build: { outDir: "lib/browser", lib: { - fileName: "hooks", + // force .cjs extension for UMD + fileName: () => `hooks.umd.cjs`, }, },
1-3
:⚠️ Potential issueDefine
__dirname
for correct ESM path resolution
Usingimport.meta.dirname
on line 16 will break at runtime. You should derive__dirname
fromimport.meta.url
and use it inresolve()
.Proposed patch:
-import {defineConfig} from "vite"; -import {resolve} from "path"; +import {defineConfig} from "vite"; +import {resolve, dirname} from "path"; +import {fileURLToPath} from "url"; + +// Derive __dirname in ESM +const __dirname = dirname(fileURLToPath(import.meta.url));Then update entry:
-lib: { - entry: resolve(import.meta.dirname, "src/index.ts"), +lib: { + entry: resolve(__dirname, "src/index.ts"),packages/core/vite.config.mts (3)
6-12
: Remove or enable the commenteddts
plugin
The DTS plugin configuration block is commented out. Either remove this section if declaration files aren’t needed, or uncomment and installvite-plugin-dts
to generate.d.ts
files.
1-3
: Define__dirname
for ESM resolution
import.meta.dirname
is invalid in Node ESM. UsefileURLToPath(import.meta.url)
fromurl
to derive__dirname
before passing toresolve
.
19-19
: Match output filename to.cjs
extension
fileName: "core"
producescore.umd.js
, but the package expects.cjs
. Update tofileName: "core.umd.cjs"
or use a function to include the extension.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (99)
package.json
(2 hunks)packages/config/tsconfig.esm.json
(1 hunks)packages/core/package.json
(2 hunks)packages/core/src/utils/useDecorators.spec.ts
(1 hunks)packages/core/tsconfig.esm.json
(1 hunks)packages/core/vite.config.mts
(1 hunks)packages/core/webpack.config.cjs
(0 hunks)packages/di/package.json
(2 hunks)packages/di/tsconfig.esm.json
(1 hunks)packages/di/vite.config.mts
(1 hunks)packages/di/webpack.config.cjs
(0 hunks)packages/engines/tsconfig.esm.json
(1 hunks)packages/graphql/apollo/tsconfig.esm.json
(1 hunks)packages/graphql/graphql-ws/tsconfig.esm.json
(1 hunks)packages/graphql/typegraphql/tsconfig.esm.json
(1 hunks)packages/hooks/package.json
(2 hunks)packages/hooks/tsconfig.esm.json
(1 hunks)packages/hooks/vite.config.mts
(1 hunks)packages/hooks/webpack.config.cjs
(0 hunks)packages/orm/adapters-redis/tsconfig.esm.json
(1 hunks)packages/orm/adapters/tsconfig.esm.json
(1 hunks)packages/orm/ioredis/tsconfig.esm.json
(1 hunks)packages/orm/mikro-orm/tsconfig.esm.json
(1 hunks)packages/orm/mongoose/tsconfig.esm.json
(1 hunks)packages/orm/objection/tsconfig.esm.json
(1 hunks)packages/orm/prisma/package.json
(1 hunks)packages/orm/prisma/tsconfig.esm.json
(1 hunks)packages/orm/testcontainers-mongo/tsconfig.esm.json
(1 hunks)packages/perf/tsconfig.esm.json
(1 hunks)packages/platform/common/tsconfig.esm.json
(1 hunks)packages/platform/platform-cache/tsconfig.esm.json
(1 hunks)packages/platform/platform-exceptions/tsconfig.esm.json
(1 hunks)packages/platform/platform-express/tsconfig.esm.json
(1 hunks)packages/platform/platform-fastify/tsconfig.esm.json
(1 hunks)packages/platform/platform-http/tsconfig.esm.json
(1 hunks)packages/platform/platform-koa/tsconfig.esm.json
(1 hunks)packages/platform/platform-log-middleware/tsconfig.esm.json
(1 hunks)packages/platform/platform-log-request/tsconfig.esm.json
(1 hunks)packages/platform/platform-middlewares/tsconfig.esm.json
(1 hunks)packages/platform/platform-multer/tsconfig.esm.json
(1 hunks)packages/platform/platform-params/tsconfig.esm.json
(1 hunks)packages/platform/platform-response-filter/tsconfig.esm.json
(1 hunks)packages/platform/platform-router/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless-http/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless-testing/tsconfig.esm.json
(1 hunks)packages/platform/platform-serverless/tsconfig.esm.json
(1 hunks)packages/platform/platform-test-sdk/tsconfig.esm.json
(1 hunks)packages/platform/platform-views/tsconfig.esm.json
(1 hunks)packages/security/jwks/tsconfig.esm.json
(1 hunks)packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json
(1 hunks)packages/security/oidc-provider/tsconfig.esm.json
(1 hunks)packages/security/passport/tsconfig.esm.json
(1 hunks)packages/specs/ajv/package.json
(2 hunks)packages/specs/ajv/tsconfig.esm.json
(1 hunks)packages/specs/ajv/vite.config.mts
(1 hunks)packages/specs/ajv/webpack.config.cjs
(0 hunks)packages/specs/exceptions/package.json
(2 hunks)packages/specs/exceptions/tsconfig.esm.json
(1 hunks)packages/specs/exceptions/vite.config.mts
(1 hunks)packages/specs/exceptions/webpack.config.cjs
(0 hunks)packages/specs/json-mapper/package.json
(2 hunks)packages/specs/json-mapper/tsconfig.esm.json
(1 hunks)packages/specs/json-mapper/vite.config.mts
(1 hunks)packages/specs/json-mapper/webpack.config.cjs
(0 hunks)packages/specs/openapi-utils/tsconfig.esm.json
(1 hunks)packages/specs/openspec/tsconfig.esm.json
(1 hunks)packages/specs/scalar/tsconfig.esm.json
(1 hunks)packages/specs/schema/package.json
(2 hunks)packages/specs/schema/tsconfig.esm.json
(1 hunks)packages/specs/schema/vite.config.mts
(1 hunks)packages/specs/schema/webpack.config.cjs
(0 hunks)packages/specs/swagger/tsconfig.esm.json
(1 hunks)packages/third-parties/agenda/tsconfig.esm.json
(1 hunks)packages/third-parties/bullmq/tsconfig.esm.json
(1 hunks)packages/third-parties/components-scan/tsconfig.esm.json
(1 hunks)packages/third-parties/event-emitter/package.json
(2 hunks)packages/third-parties/event-emitter/tsconfig.esm.json
(1 hunks)packages/third-parties/event-emitter/vite.config.mts
(1 hunks)packages/third-parties/event-emitter/webpack.config.cjs
(0 hunks)packages/third-parties/formio-types/tsconfig.esm.json
(1 hunks)packages/third-parties/formio/tsconfig.esm.json
(1 hunks)packages/third-parties/normalize-path/tsconfig.esm.json
(1 hunks)packages/third-parties/pulse/tsconfig.esm.json
(1 hunks)packages/third-parties/schema-formio/package.json
(2 hunks)packages/third-parties/schema-formio/tsconfig.esm.json
(1 hunks)packages/third-parties/schema-formio/vite.config.mts
(1 hunks)packages/third-parties/schema-formio/webpack.config.cjs
(0 hunks)packages/third-parties/socketio-testing/tsconfig.esm.json
(1 hunks)packages/third-parties/socketio/tsconfig.esm.json
(1 hunks)packages/third-parties/sse/tsconfig.esm.json
(1 hunks)packages/third-parties/stripe/tsconfig.esm.json
(1 hunks)packages/third-parties/temporal/tsconfig.esm.json
(1 hunks)packages/third-parties/terminus/tsconfig.esm.json
(1 hunks)packages/third-parties/vike/tsconfig.esm.json
(1 hunks)tools/integration/tsconfig.esm.json
(1 hunks)tools/typescript/tsconfig.template.esm.json
(1 hunks)tools/webpack/package.json
(0 hunks)tools/webpack/webpack.config.js
(0 hunks)tsconfig.spec.json
(1 hunks)
💤 Files with no reviewable changes (11)
- tools/webpack/package.json
- packages/specs/ajv/webpack.config.cjs
- packages/core/webpack.config.cjs
- packages/third-parties/event-emitter/webpack.config.cjs
- packages/third-parties/schema-formio/webpack.config.cjs
- packages/specs/schema/webpack.config.cjs
- packages/specs/json-mapper/webpack.config.cjs
- packages/di/webpack.config.cjs
- packages/specs/exceptions/webpack.config.cjs
- packages/hooks/webpack.config.cjs
- tools/webpack/webpack.config.js
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: test-third-parties (20.12.2)
- GitHub Check: test-platform (20.12.2)
- GitHub Check: CodeQL-Build
🔇 Additional comments (99)
packages/third-parties/bullmq/tsconfig.esm.json (1)
13-13
: Standardize exclude formatting and drop obsolete Webpack config exclusion.Consolidating the
exclude
entries into a single line improves readability and aligns with the monorepo convention. Removing"webpack.config.js"
is correct since Webpack configs are no longer present or used in this package.packages/third-parties/formio-types/tsconfig.esm.json (1)
13-13
: Clean up exclude list to remove webpack config.Removing
"webpack.config.js"
from theexclude
array aligns with the migration to Vite (since there is no longer any Webpack config in this package). The single-line formatting is consistent with the updates in other packages’tsconfig.esm.json
files. No further action required.packages/orm/adapters/tsconfig.esm.json (1)
13-13
: Approve removal ofwebpack.config.js
from the exclude list.The exclusion of Webpack config is no longer necessary after migrating to Vite, and the consolidated, single-line array correctly captures all relevant patterns.
packages/platform/platform-params/tsconfig.esm.json (1)
13-13
: Exclude list cleanup and formatting standardization
The removal of"webpack.config.js"
from the exclude array aligns with the migration away from webpack, and consolidating the array onto a single line matches the formatting applied across othertsconfig.esm.json
files. No impact to public APIs or build outputs is expected.packages/specs/swagger/tsconfig.esm.json (1)
13-13
: Exclude list updated correctly.
The removal of"webpack.config.js"
from the exclusion list—and consolidation into a single-line array—aligns with the shift from Webpack to Vite. Since theinclude
section is scoped tosrc
, no additional exclusions (e.g., for Vite config files) are necessary here.packages/security/passport/tsconfig.esm.json (1)
13-13
: Remove obsolete Webpack exclusion as part of the Vite migration
Thewebpack.config.js
entry has been correctly removed from the exclusion list, and consolidating the array into a single line matches the formatting applied across other packages.packages/platform/platform-views/tsconfig.esm.json (1)
13-13
: Remove stale webpack.config.js exclusion
Dropping"webpack.config.js"
from theexclude
list cleans up an obsolete reference and aligns this config with the broader Vite-based build migration.packages/security/oidc-provider/tsconfig.esm.json (1)
13-13
: Removed outdated webpack.config.js exclusion
Dropping"webpack.config.js"
and consolidating theexclude
array into a single line aligns with the migration to Vite and keeps this config consistent with other packages.packages/third-parties/components-scan/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack exclusion: approved
Theexclude
array has been consolidated into a single line and the"webpack.config.js"
entry correctly removed as part of the migration to Vite. All necessary patterns remain excluded.packages/third-parties/socketio-testing/tsconfig.esm.json (1)
13-13
: Exclude list modernization – looks goodThe obsolete
"webpack.config.js"
entry has been removed and the exclude array is now a concise single-line list, matching the updates in other packages.packages/third-parties/temporal/tsconfig.esm.json (1)
13-13
: Exclude cleanup aligns with migration
Removing"webpack.config.js"
from theexclude
list correctly reflects the switch to Vite, and consolidating the array into a single line is consistent with other updatedtsconfig.esm.json
files.packages/orm/mongoose/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion
Dropping"webpack.config.js"
from theexclude
list correctly aligns with the migration away from Webpack. Ensure there are no leftoverwebpack.config.js
files in this package, otherwise TypeScript may still attempt to process them.packages/specs/openapi-utils/tsconfig.esm.json (1)
13-13
: Exclude list consolidation and removal ofwebpack.config.js
is correct.Converting the
exclude
array to a single-line format improves consistency across packages, and droppingwebpack.config.js
aligns with the Vite-based migration. Everything looks in order.packages/platform/platform-log-request/tsconfig.esm.json (1)
13-13
:✅ Verification successful
Remove obsolete webpack exclusion
The"webpack.config.js"
entry has been dropped from theexclude
array, which correctly reflects the shift from Webpack to Vite. Please ensure that the corresponding Webpack config file has been removed from this package to avoid stale references.
You can verify with:
🏁 Script executed:
#!/bin/bash # Confirm no webpack config remains in this package rg -l 'webpack\.config' packages/platform/platform-log-requestLength of output: 64
✅ Obsolete webpack exclusion correctly removed
Nowebpack.config.js
files found underpackages/platform/platform-log-request
, confirming the exclusion update.packages/orm/objection/tsconfig.esm.json (1)
13-13
: Removed obsoletewebpack.config.js
entry and unified array formatting
Theexclude
array no longer references the now-removed Webpack config and is consolidated into a single-line list, matching the pattern applied across other packages.packages/third-parties/agenda/tsconfig.esm.json (1)
13-13
: Removed obsolete Webpack config exclusion
Dropping"webpack.config.js"
from theexclude
list aligns with the migration to Vite—this entry is no longer needed and its removal keeps the configuration clean.packages/orm/mikro-orm/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack exclusion aligns with Vite migration
The"webpack.config.js"
entry has been correctly removed from theexclude
array following the shift away from Webpack. This change is consistent with the standardized format across other packages.packages/core/src/utils/useDecorators.spec.ts (1)
1-3
: LGTM! Import paths correctly updated to fix module resolution.The import statements have been properly updated to use specific relative paths with
.js
extensions, which should resolve the module resolution failures flagged in previous reviews. The migration from the problematic../..
import to granular paths like../types/AnyDecorator.js
aligns well with the project's restructuring effort.packages/third-parties/normalize-path/tsconfig.esm.json (1)
13-13
: Correct removal of obsolete Webpack config: Dropping"webpack.config.js"
from theexclude
list appropriately aligns this package with the migration to Vite and avoids excluding a file that no longer exists. The single-line formatting matches the style adopted across the monorepo.packages/third-parties/formio/tsconfig.esm.json (1)
13-13
:✅ Verification successful
Exclude list cleanup aligns with Vite migration
The consolidation of theexclude
array into a single line and removal of"webpack.config.js"
correctly reflects the shift away from Webpack-based builds.Please run the following script to verify that no obsolete Webpack configuration files remain in this package:
🏁 Script executed:
#!/bin/bash # Verify no webpack.config.js files remain in the formio package if rg --files -g 'webpack.config.js' packages/third-parties/formio; then echo "Error: Found a leftover webpack.config.js" exit 1 else echo "Success: No webpack.config.js found" fiLength of output: 144
Exclude list cleanup verified – Vite migration complete
The consolidatedexclude
array inpackages/third-parties/formio/tsconfig.esm.json
correctly reflects the move away from Webpack. A ripgrep search confirms no leftoverwebpack.config.js
files in this package.packages/orm/prisma/package.json (1)
48-48
: Bump@tsed/monorepo-utils
to v2.3.13 for consistency. Aligns the devDependency with other packages in the monorepo. Please verify that version 2.3.13 is published to NPM and confirm there are no breaking changes or missing migration notes.packages/config/tsconfig.esm.json (1)
13-13
: Remove deprecated webpack exclusion and consolidate formatting. Removed"webpack.config.js"
from theexclude
list and unified the array into a single line, reflecting the shift from Webpack to Vite-based builds.packages/platform/platform-koa/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion
Theexclude
list correctly omits"webpack.config.js"
now that Webpack configs have been removed in favor of Vite. The single-line format is consistent with the updated monorepo style.packages/platform/platform-middlewares/tsconfig.esm.json (1)
13-13
: Removed deprecated webpack.config.js entry
Since this package no longer uses Webpack, excluding"webpack.config.js"
is no longer necessary. The single-line array matches the standardized formatting across packages.packages/specs/scalar/tsconfig.esm.json (1)
13-13
: Dropped webpack.config.js from exclusions
Correctly removes the now-nonexistent"webpack.config.js"
entry and adopts the one-lineexclude
array style used throughout the monorepo.packages/security/jwks/tsconfig.esm.json (1)
13-13
: Clean up tsconfig exclude list
Eliminating"webpack.config.js"
is appropriate after the migration to Vite. The consolidated single-line formatting is in line with other packages.packages/graphql/graphql-ws/tsconfig.esm.json (1)
13-13
: Exclude array updated to remove webpack config
As Webpack configs are gone, dropping"webpack.config.js"
makes sense. The one-lineexclude
array maintains consistency with the repo-wide convention.packages/platform/platform-serverless/tsconfig.esm.json (1)
13-13
: Exclude list updated to remove webpack.config.js
The exclude array has been consolidated into a single line and no longer excludeswebpack.config.js
, matching the removal of Webpack configuration from this package.packages/platform/platform-fastify/tsconfig.esm.json (1)
13-13
: Removal of obsolete Webpack config exclusion
The"webpack.config.js"
entry has been correctly removed from theexclude
array, and the array has been consolidated into a single line. This aligns with the monorepo-wide migration from Webpack to Vite and cleans up stale configuration references.packages/third-parties/socketio/tsconfig.esm.json (1)
13-13
: Clean up tsconfig exclusions
Removing"webpack.config.js"
and flattening theexclude
array into a single-line format is appropriate, given the switch to Vite and removal of all Webpack configs.packages/platform/platform-cache/tsconfig.esm.json (1)
13-13
: Update tsconfig exclusion list
The change drops the obsolete"webpack.config.js"
from the exclusions and unifies the array formatting, matching the rest of the monorepo post-Vite migration.packages/orm/testcontainers-mongo/tsconfig.esm.json (1)
13-13
: Remove Webpack config from tsconfig excludes
Correctly eliminates the now-nonexistentwebpack.config.js
reference and simplifies the exclude array to one line, consistent with the new Vite-based setup.packages/platform/platform-log-middleware/tsconfig.esm.json (1)
13-13
: Strip out Webpack exclusion and format
The"webpack.config.js"
exclusion has been removed and the array consolidated, in line with the broader cleanup of Webpack artifacts in favor of Vite.packages/platform/platform-router/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion and streamline formatting
The"webpack.config.js"
entry was safely removed (the file no longer exists and TS only includessrc/**/*.ts|json
), and the single-line array matches the monorepo-wide convention.packages/platform/platform-express/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion and streamline formatting
Consistent with the migration to Vite, excluding the removed Webpack config is no longer needed, and the single-line exclude list aligns with other packages.packages/platform/platform-multer/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion and streamline formatting
The Webpack config exclusion has been dropped appropriately, and the unified single-line format keeps consistency across tsconfig files.packages/security/oidc-provider-plugin-wildcard-redirect-uri/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion and streamline formatting
With the removal of Webpack tooling, the exclusion is no longer necessary, and the single-line formatting matches the repository standard.packages/third-parties/terminus/tsconfig.esm.json (1)
13-13
: Remove obsolete webpack.config.js exclusion and streamline formatting
The change safely removes the non-existent Webpack config from the exclude list and adopts the single-line array for consistency.packages/platform/platform-response-filter/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion is correct.
Excluding"webpack.config.js"
is no longer necessary after migrating to Vite, and consolidating the array into a single line keeps the configuration concise and consistent.packages/graphql/typegraphql/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion is correct.
Excluding"webpack.config.js"
is no longer necessary after migrating to Vite, and consolidating the array into a single line keeps the configuration concise and consistent.packages/third-parties/vike/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion is correct.
Excluding"webpack.config.js"
is no longer necessary after migrating to Vite, and consolidating the array into a single line keeps the configuration concise and consistent.packages/platform/common/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion is correct.
Excluding"webpack.config.js"
is no longer necessary after migrating to Vite, and consolidating the array into a single line keeps the configuration concise and consistent.packages/third-parties/stripe/tsconfig.esm.json (1)
13-13
: Removal of obsolete webpack exclusion is correct.
Excluding"webpack.config.js"
is no longer necessary after migrating to Vite, and consolidating the array into a single line keeps the configuration concise and consistent.packages/third-parties/pulse/tsconfig.esm.json (1)
13-13
: Remove deprecated webpack.config.js from exclusions
Theexclude
array has been reformatted to a single line and no longer lists"webpack.config.js"
, which aligns with the migration off Webpack to Vite. This is purely a configuration cleanup and has no impact on the compiled output.packages/hooks/tsconfig.esm.json (1)
13-13
: Clean up exclude list by dropping webpack.config.js
Consolidating theexclude
entries into a single line and removing the outdated"webpack.config.js"
keeps the TypeScript config in sync with the new Vite-based build. No compiler behavior changes.packages/core/tsconfig.esm.json (1)
13-13
: Update exclude array to remove webpack.config.js
This change removes the obsolete"webpack.config.js"
exclusion and flattens the array format, consistent with the Vite migration across the monorepo. It doesn’t alter any compiler options.packages/third-parties/schema-formio/tsconfig.esm.json (1)
13-13
: Drop webpack.config.js from tsconfig exclusions
The single-lineexclude
array now omits"webpack.config.js"
, matching the removal of webpack artifacts and switching to Vite. This is a non-functional cleanup.packages/specs/schema/tsconfig.esm.json (1)
13-13
: Remove webpack.config.js entry in exclude list
Converting theexclude
list to one line and removing"webpack.config.js"
aligns the TypeScript config with the new Vite-based workflow. No effect on type checking or output.packages/specs/ajv/tsconfig.esm.json (1)
13-13
: Consistent removal of webpack.config.js and single-line formatting
Removing"webpack.config.js"
from the exclude array is correct now that the Webpack config file has been deleted, and consolidating the list into a single line aligns with the repository-wide style for ESM tsconfig files.tools/typescript/tsconfig.template.esm.json (1)
13-13
: Template tsconfig synced with migration away from Webpack
The exclusion ofwebpack.config.js
has been removed from the template and the array reformatted in the same style as project-specific configs—this maintains consistency across all generated ESM setups.packages/di/tsconfig.esm.json (1)
13-13
: Exclude list updated for DI package per Vite migration
Dropping"webpack.config.js"
fromexclude
is appropriate since the DI package no longer uses Webpack, and the one-line format matches other tsconfig files.packages/specs/exceptions/tsconfig.esm.json (1)
13-13
: Exceptions package tsconfig cleanup
The removal of the Webpack config exclusion is correct for this package’s Vite-based build, and the consolidated line ensures uniform formatting across all specs.packages/specs/json-mapper/tsconfig.esm.json (1)
13-13
: JSON Mapper tsconfig updated to reflect Webpack removal
Excluding the now-deletedwebpack.config.js
and using a single-line array keeps this config consistent with the rest of the migration.packages/third-parties/event-emitter/tsconfig.esm.json (1)
13-13
: Consistentexclude
formatting and Webpack removal
The consolidated single-lineexclude
array and removal of"webpack.config.js"
align with the broader Vite migration across the monorepo.packages/specs/json-mapper/package.json (2)
23-23
: Switch browser build script to Vite
Updated thebuild:browser
script from Webpack tovite build
, which should pick up the newvite.config.mts
in this package.
51-52
: Add Vite and Vitest to devDependencies
Introducingvite
andvitest
supports the new build and testing toolchain and replaces obsolete Webpack tooling.packages/specs/exceptions/package.json (4)
10-10
: Update browser bundle path to.cjs
The top-level"browser"
field now points toexceptions.umd.cjs
, matching the Vite-generated UMD CommonJS output.
15-15
: Syncexports.browser
to.cjs
output
Aligned theexports["."].browser
entry with the new.cjs
bundle file name.
23-23
: Switch browser build script to Vite
Changedbuild:browser
from Webpack tovite build
to leverage the new Vite configuration.
40-41
: Add Vite and Vitest to devDependencies
Replacing Webpack withvite
and addingvitest
ensures the package has the correct build and test dependencies.packages/specs/schema/vite.config.mts (2)
1-19
: LGTM! Clean Vite configuration for library build.The configuration correctly sets up a UMD library build for browser usage. The structure is appropriate for the Webpack to Vite migration.
10-10
:❓ Verification inconclusive
Verify Node.js version compatibility for import.meta.dirname.
The
import.meta.dirname
feature requires Node.js 20.11.0 or later. Ensure your project's minimum Node.js version supports this feature.
🌐 Web query:
What is the minimum Node.js version that supports import.meta.dirname?
💡 Result:
The minimum Node.js version that supports
import.meta.dirname
is Node.js v20.11.0. This version introduced bothimport.meta.dirname
andimport.meta.filename
for ES modules, providing direct replacements for the CommonJS__dirname
and__filename
globals that were previously unavailable in ES modules[1][4][7].This means that starting from Node.js v20.11.0, you can use
import.meta.dirname
without workarounds or custom boilerplate in ES module code. In earlier versions, you had to manually reconstruct directory paths usingimport.meta.url
and utilities likefileURLToPath
[5][8].Citations:
- 1: https://www.sonarsource.com/blog/dirname-node-js-es-modules/
- 2: import.meta.filename and import.meta.dirname WinterTC55/proposal-minimum-common-api#50
- 3: https://nodejs.org/api/esm.html
- 4: https://blog.stackademic.com/practical-features-in-node-js-v20-11-0-import-meta-filename-and-import-meta-dirname-a9b115e4dc4a
- 5: https://blog.logrocket.com/alternatives-dirname-node-js-es-modules/
- 6: support
import.meta.dirname
andimport.meta.filename
webpack/webpack#18320- 7: https://www.infoq.com/news/2024/05/node-22-released/
- 8: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
- 9: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve
- 10: https://nodejs.org/en/blog/release/v20.11.0
Verify Node.js version compatibility for import.meta.dirname
The
import.meta.dirname
feature is only available starting in Node.js v20.11.0. Please confirm your project’s minimum supported Node.js version (e.g., inpackage.json
engines
and your CI matrix) meets this requirement.
If you need to support older Node.js releases, consider using thefileURLToPath
fallback:Files to review:
- packages/specs/schema/vite.config.mts:10
Proposed fallback snippet:
+ import { dirname, join } from "path"; + import { fileURLToPath } from "url"; + const __dirname = dirname(fileURLToPath(import.meta.url)); - entry: join(import.meta.dirname, "src/index.ts"), + entry: join(__dirname, "src/index.ts"),packages/di/vite.config.mts (2)
1-19
: LGTM! Consistent Vite configuration with appropriate entry point.The configuration follows the same pattern as other packages with a customized entry point for the DI package structure.
10-10
:✅ Verification successful
Verify the entry point path exists.
The DI package uses a different entry point (
src/common/index.ts
) compared to other packages. Ensure this path exists and is the correct entry point for the package.
🏁 Script executed:
#!/bin/bash # Verify the entry point exists for the DI package if [ -f "packages/di/src/common/index.ts" ]; then echo "✓ Entry point exists" head -10 "packages/di/src/common/index.ts" else echo "✗ Entry point does not exist" echo "Available files in src directory:" find "packages/di/src" -name "*.ts" -type f | head -10 fiLength of output: 504
Entry point path confirmed for DI package
I’ve verified that
packages/di/src/common/index.ts
exists and correctly exports the necessary modules. No further changes are needed.packages/third-parties/schema-formio/vite.config.mts (1)
1-19
: LGTM! Standard Vite configuration for third-party integration package.The configuration correctly handles the hyphenated package name and follows the established pattern for the monorepo migration.
packages/specs/ajv/vite.config.mts (1)
1-19
: LGTM! Consistent configuration pattern maintained.This configuration maintains the same structure as other packages in the migration, ensuring consistency across the monorepo.
packages/third-parties/schema-formio/package.json (4)
10-10
: Updatebrowser
field to point to.cjs
bundle
Thebrowser
entry now correctly referencesschema-formio.umd.cjs
instead of the old.min.js
.
15-15
: Syncexports.browser
subpath with updated output
Theexports["."].browser
path is updated toschema-formio.umd.cjs
, matching thebrowser
field.
23-23
: Switchbuild:browser
script to Vite
Replaced the Webpack command withvite build
, consistent with the monorepo migration.
54-54
: Addvite
as a devDependency
Including[email protected]
enables the newbuild:browser
script.packages/di/package.json (5)
10-10
: Updatebrowser
field to.cjs
UMD output
Thebrowser
entry now points todi.umd.cjs
, reflecting the Vite-generated bundle.
15-15
: Syncexports.browser
subpath with updated bundle
Theexports["."].browser
path is set todi.umd.cjs
, matching thebrowser
field.
22-22
: Switchbuild:browser
script to Vite
Changed from Webpack tovite build
, in line with the monorepo-wide build tooling update.
41-42
: Add Vite and Vitest as devDependencies
Including[email protected]
and[email protected]
supports the new build and test workflows.
47-47
: Include@tsed/logger
in peerDependencies
The DI package now explicitly lists@tsed/logger
as a peer, ensuring consistency with other Ts.ED modules.package.json (2)
116-116
: Upgrade@tsed/monorepo-utils
to 2.3.13
The patch bump aligns with the latest toolkit improvements.
150-153
: Add and align Vite and related plugins
New devDependencies[email protected]
,[email protected]
,[email protected]
, and[email protected]
are required for the monorepo’s migration to Vite and updated test runner.packages/specs/schema/package.json (4)
10-10
: Update browser entry to CommonJS UMD
Thebrowser
field has been updated to point toschema.umd.cjs
, which aligns with your migration from webpack’s minified UMD to a CJS UMD build.
15-15
: Align exports.browser with new artifact
You’ve updated the export map’sbrowser
entry to the new.cjs
file, ensuring consumers targeting browsers load the correct bundle.
23-23
: Switch build:browser script to Vite
Thebuild:browser
script now usesvite build
, consistent with the migration. Ensure avite.config.mts
is present in this package.
61-62
: Add Vite and Vitest devDependencies
The addition ofvite
andvitest
replaces webpack and integrates the new test runner. Versions look reasonable.packages/third-parties/event-emitter/package.json (4)
15-15
: Update browser entry to CommonJS UMD
Changed thebrowser
field toevent-emitter.umd.cjs
, matching the new Vite output.
20-20
: Align exports.browser with new file
Theexports
mapping’sbrowser
entry now correctly points to the.cjs
bundle.
27-27
: Switch build script to Vite
Thebuild:browser
script now callsvite build
, which is consistent with the migration pattern.
45-46
: Add Vite and Vitest to devDependencies
Replacingwebpack
withvite
and addingvitest
aligns dev tooling across packages.packages/specs/ajv/package.json (4)
10-10
: Update browser entry to CommonJS UMD
Switchedbrowser
field toajv.umd.cjs
to reflect the new Vite-built output.
15-15
: Align exports.browser mapping
Updated the export map to point to the new.cjs
bundle, ensuring consistency for browser consumers.
23-23
: Use Vite for browser build
Thebuild:browser
script now invokesvite build
, matching the migration strategy.
44-45
: Include Vite and Vitest in devDependencies
DevDependencies now includevite
andvitest
, replacing webpack and standardizing test tooling.packages/hooks/package.json (5)
10-10
: Update browser entry point to.cjs
format
The top-levelbrowser
field now points tohooks.umd.cjs
, which aligns with the switch to CommonJS bundles.
15-15
: Align exports browser entry with updated bundle
The"browser"
export underexports["."]
correctly mirrors the top-level entry, pointing to the.cjs
file. Ensure this file is generated by the Vite build.
22-22
: Switch browser build script from Webpack to Vite
Thebuild:browser
script now usesvite build
. Verify that the newvite.config.mts
exists and is configured to output the UMD.cjs
bundle inlib/browser
.
32-32
: Bump@tsed/monorepo-utils
to 2.3.13
You upgraded@tsed/monorepo-utils
. Confirm there are no breaking changes in this patch release that could affect build or release workflows.
37-38
: Update Vite and Vitest versions
Downgradedvite
to6.2.2
and setvitest
to3.1.4
. Ensure compatibility with existing configs and run the full test suite to catch any regressions.packages/core/package.json (5)
10-10
: Update root browser field to.cjs
bundle
The root-levelbrowser
entry now points tocore.umd.cjs
. Ensure the Vite build outputs this file tolib/browser
as expected.
15-15
: Align exports browser entry with.cjs
output
The"browser"
export under the main entry mirrors the updated bundle format. Confirm that the generated file path matches.
19-23
: Refine exports for subpath mappings
You replaced the recursive"./**/*.js"
pattern with"./*.js"
, restricting exports to top-level files. Verify that no essential nested modules are missing from exports and adjust patterns if deeper imports are required.
29-29
: Switch browser build script to Vite
Thebuild:browser
script now invokesvite build
. Ensurepackages/core/vite.config.mts
defines the correct UMD format and output directory.
40-46
: Update devDependencies: monorepo-utils, Vite, plugins, and Vitest
- Bumped
@tsed/monorepo-utils
to2.3.13
- Set
vite
to6.2.2
, added[email protected]
, and[email protected]
Ensure these versions are compatible with each other and with existing TypeScript configs, and validate type declaration generation in CI.
"**/__mock__/**", | ||
"webpack.config.js" | ||
] | ||
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Removed obsolete Webpack config from exclusions
Removing "webpack.config.js"
aligns with the migration to Vite and cleans up dead config. Consolidating the array onto a single line improves readability.
Please verify that no residual webpack.config.js
files remain in the repository:
🏁 Script executed:
#!/bin/bash
# Search for any lingering Webpack config files
rg -l "webpack.config.js"
Length of output: 25
🏁 Script executed:
#!/bin/bash
# Search for any residual Webpack config files by filename
rg --files --glob 'webpack.config.*'
Length of output: 126
Residual Webpack config file detected
We removed "webpack.config.js"
from the exclusion list in packages/third-parties/sse/tsconfig.esm.json
as part of the Vite migration and consolidated the array onto one line for readability. However, a lingering Webpack config was found:
- packages/platform/platform-serverless-http/test/integration/aws-basic/webpack.config.js
Please confirm whether this file is still required. If it’s obsolete, remove it; otherwise, update your exclusion patterns accordingly.
🤖 Prompt for AI Agents
In packages/third-parties/sse/tsconfig.esm.json at line 13, after removing
"webpack.config.js" from the exclude array, a residual Webpack config file was
found at
packages/platform/platform-serverless-http/test/integration/aws-basic/webpack.config.js.
Verify if this file is still needed; if obsolete, delete it from the repository,
otherwise add its path or pattern back to the exclude array to prevent build
issues.
@@ -78,6 +78,6 @@ | |||
"@tsed/temporal": ["./packages/third-parties/temporal/src/index.ts"] | |||
} | |||
}, | |||
"include": ["vitest.*.mts", "**/vitest.*.mts", "**/*.ts"], | |||
"include": ["**/vite.*.mts", "vitest.*.mts", "**/vitest.*.mts", "**/*.ts"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Include Vite and Vitest configuration files in compilation
The new "**/vite.*.mts"
and "**/vitest.*.mts"
patterns ensure Vite configs and Vitest setup files are included in the spec TypeScript project.
Consider consolidating overlapping patterns (e.g., "vitest.*.mts"
vs. "**/vitest.*.mts"
) to simplify maintenance.
🤖 Prompt for AI Agents
In tsconfig.spec.json at line 81, the include array has overlapping patterns
"vitest.*.mts" and "**/vitest.*.mts" which can be consolidated. Remove the
redundant "vitest.*.mts" pattern and keep only the more general
"**/vitest.*.mts" to simplify the configuration and avoid duplication.
rollupOptions: { | ||
// external: /node_modules\/(.*)/ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Externalize dependencies in Rollup options
Uncomment and adjust the external
setting to prevent bundling dependencies into your UMD build:
rollupOptions: {
- // external: /node_modules\/(.*)/
+ external: [/node_modules\/(.*)/]
}
This will keep vendor code out of the distributed bundle.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
rollupOptions: { | |
// external: /node_modules\/(.*)/ | |
} | |
rollupOptions: { | |
external: [/node_modules\/(.*)/] | |
} |
🤖 Prompt for AI Agents
In packages/specs/exceptions/vite.config.mts around lines 15 to 17, uncomment
the external option inside rollupOptions and adjust its pattern to correctly
match dependencies that should be excluded from the UMD bundle. This change will
ensure that vendor dependencies are not bundled into the output, keeping the
distributed bundle smaller and avoiding duplication of external libraries.
build: { | ||
outDir: "lib/browser", | ||
lib: { | ||
entry: join(import.meta.dirname, "src/index.ts"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct entry path resolution in ESM config
import.meta.dirname
is not a standard property in Node ESM and will lead to runtime errors.
Replace with a proper resolution using import.meta.url
, for example:
-import {join} from "node:path";
-entry: join(import.meta.dirname, "src/index.ts"),
+import {fileURLToPath} from "node:url";
+import {dirname, join} from "node:path";
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
+...
+entry: join(__dirname, "src/index.ts"),
This ensures the entry path is correctly resolved in an ES module context.
🤖 Prompt for AI Agents
In packages/specs/exceptions/vite.config.mts at line 10, replace the use of the
non-standard `import.meta.dirname` with a proper path resolution using
`import.meta.url`. Use Node's URL and path utilities to convert
`import.meta.url` to a directory path and then join it with "src/index.ts" to
correctly resolve the entry path in the ES module context.
fileName: "schema" | ||
}, | ||
rollupOptions: { | ||
external: /node_modules\/(.*)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Consider refining the external dependencies pattern.
The current regex /node_modules\/(.*)/
will externalize all dependencies, which is generally good for library builds. However, consider if you need more granular control over which dependencies to bundle vs. externalize.
For more precise control, consider:
- external: /node_modules\/(.*)/
+ external: (id) => {
+ return id.includes('node_modules') && !id.includes('some-specific-dep-to-bundle')
+ }
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
external: /node_modules\/(.*)/ | |
external: (id) => { | |
return id.includes('node_modules') && !id.includes('some-specific-dep-to-bundle') | |
} |
🤖 Prompt for AI Agents
In packages/specs/schema/vite.config.mts at line 16, the current external
dependencies regex /node_modules\/(.*)/ externalizes all node_modules, which may
be too broad. Refine this pattern to selectively externalize only specific
dependencies you want to exclude from bundling, or use an array or function to
control which modules are externalized, allowing more granular control over
bundling behavior.
import {defineConfig} from "vite"; | ||
import {join} from "node:path"; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [], | ||
build: { | ||
outDir: "lib/browser", | ||
lib: { | ||
entry: join(import.meta.dirname, "src/index.ts"), | ||
formats: ["umd"], | ||
name: "@tsed/ajv", | ||
fileName: "ajv" | ||
}, | ||
rollupOptions: { | ||
external: /node_modules\/(.*)/ | ||
} | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Consider creating a shared Vite configuration helper.
Since all four configs follow nearly identical patterns, consider creating a shared helper function to reduce duplication and ensure consistency:
Create a shared configuration file:
// tools/vite-config-lib.mts
import {defineConfig, UserConfig} from "vite";
import {join} from "node:path";
export function createLibConfig(options: {
name: string;
fileName: string;
entry?: string;
}): UserConfig {
return defineConfig({
plugins: [],
build: {
outDir: "lib/browser",
lib: {
entry: join(import.meta.dirname, options.entry || "src/index.ts"),
formats: ["umd"],
name: options.name,
fileName: options.fileName
},
rollupOptions: {
external: /node_modules\/(.*)/
}
}
});
}
Then simplify each config:
// packages/specs/ajv/vite.config.mts
import {createLibConfig} from "../../../tools/vite-config-lib.mts";
export default createLibConfig({
name: "@tsed/ajv",
fileName: "ajv"
});
🤖 Prompt for AI Agents
In packages/specs/ajv/vite.config.mts lines 1 to 19, the Vite configuration is
duplicated across multiple similar files. To fix this, create a shared helper
function in a new file like tools/vite-config-lib.mts that accepts options for
name, fileName, and optional entry, and returns the common Vite config using
defineConfig. Then, update this file to import and call that helper with the
specific parameters, reducing duplication and improving maintainability.
build: { | ||
outDir: "lib/browser", | ||
lib: { | ||
entry: join(import.meta.dirname, "src/index.ts"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define __dirname
for correct ESM path resolution
import.meta.dirname
is not standard in Node ESM. Derive __dirname
via fileURLToPath(import.meta.url)
and use that for join()
.
-import {defineConfig} from "vite";
-import {join} from "node:path";
+import {defineConfig} from "vite";
+import {join, dirname} from "node:path";
+import {fileURLToPath} from "url";
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
...
- entry: join(import.meta.dirname, "src/index.ts"),
+ entry: join(__dirname, "src/index.ts"),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
entry: join(import.meta.dirname, "src/index.ts"), | |
// packages/third-parties/event-emitter/vite.config.mts | |
import { defineConfig } from "vite"; | |
import { join, dirname } from "node:path"; | |
import { fileURLToPath } from "url"; | |
const __dirname = dirname(fileURLToPath(import.meta.url)); | |
export default defineConfig({ | |
build: { | |
lib: { | |
entry: join(__dirname, "src/index.ts"), | |
// …other options | |
} | |
} | |
}); |
🤖 Prompt for AI Agents
In packages/third-parties/event-emitter/vite.config.mts at line 10, replace the
non-standard import.meta.dirname with a properly defined __dirname. Import
fileURLToPath and URL from 'url', then define __dirname as fileURLToPath(new
URL('.', import.meta.url)). Use this __dirname variable in the join() call to
correctly resolve the path in ESM context.
entry: join(import.meta.dirname, "src/index.ts"), | ||
formats: ["umd"], | ||
name: "@tsed/event-emitter", | ||
fileName: "event-emitter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure UMD output uses .cjs
extension
fileName: "event-emitter"
will produce event-emitter.umd.js
, but the package expects .umd.cjs
. Override fileName
accordingly.
lib: {
fileName: () => `event-emitter.umd.cjs`,
},
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
fileName: "event-emitter" | |
fileName: () => `event-emitter.umd.cjs`, |
🤖 Prompt for AI Agents
In packages/third-parties/event-emitter/vite.config.mts at line 13, the UMD
output fileName is set to "event-emitter" which results in an output file named
event-emitter.umd.js. To match the package expectation of a .umd.cjs extension,
change the fileName value to "event-emitter.umd.cjs" so the output file has the
correct extension.
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Consider generating TypeScript declarations
Currently plugins
is empty. If you need type declaration outputs, integrate vite-plugin-dts
(or similar) and enable the commented DTS plugin configuration.
🤖 Prompt for AI Agents
In packages/specs/json-mapper/vite.config.mts at line 6, the plugins array is
empty and does not include a plugin to generate TypeScript declaration files. To
fix this, add and configure the vite-plugin-dts (or a similar plugin) in the
plugins array to enable automatic generation of .d.ts files during the build
process. Uncomment and properly set up the DTS plugin configuration to ensure
type declarations are outputted.
import {defineConfig} from "vite"; | ||
import {join} from "node:path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid import.meta.dirname
in ESM
import.meta.dirname
is not supported in Node ESM. Derive __dirname
using fileURLToPath(import.meta.url)
to ensure the entry path resolves correctly.
Consider:
-import {join} from "node:path";
+import {fileURLToPath} from "node:url";
+import {join, dirname} from "node:path";
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
...
-entry: join(import.meta.dirname, "src/index.ts"),
+entry: join(__dirname, "src/index.ts"),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import {defineConfig} from "vite"; | |
import {join} from "node:path"; | |
import {defineConfig} from "vite"; | |
import {fileURLToPath} from "node:url"; | |
import {join, dirname} from "node:path"; | |
const __dirname = dirname(fileURLToPath(import.meta.url)); | |
export default defineConfig({ | |
// …other config… | |
entry: join(__dirname, "src/index.ts"), | |
// …other config… | |
}); |
🤖 Prompt for AI Agents
In packages/specs/json-mapper/vite.config.mts at lines 1 to 2, the code
incorrectly uses import.meta.dirname which is not supported in Node ESM. To fix
this, import fileURLToPath and URL from 'node:url', then derive __dirname by
converting import.meta.url with fileURLToPath and extracting the directory name.
Replace any usage of import.meta.dirname with this derived __dirname to
correctly resolve paths.
🎉 This PR is included in version 8.10.0-rc.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
New Features
Refactor
Chores