-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Consolidate package versions into a single constants file for easier updating #437
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
Conversation
…or easier updating
ENG-561 Centralize package versions
It'll be easier if we can centralize package versions in a single file so it makes it easy to update the versions of external packages in one file vs. scattered files. |
🦋 Changeset detectedLatest commit: f00374f The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request centralizes package version management by introducing new constant files that define package versions for different domains—core, Fastify, React, and storage. Hardcoded version strings across multiple generator modules have been replaced with dynamic references to these centralized constants. Additionally, the exports have been updated to re‐export the new constants, ensuring that all relevant modules consistently access package versions from a single source. Changes
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 6
🔭 Outside diff range comments (1)
packages/fastify-generators/src/generators/auth0/auth0-module/index.ts (1)
192-192: 🛠️ Refactor suggestionMove hardcoded version to centralized constants.
The version string
'3.0.0'forfastify-auth0-verifyshould be moved toFASTIFY_PACKAGESto maintain consistency with the PR objective.Apply this diff:
- 'fastify-auth0-verify': '3.0.0', + 'fastify-auth0-verify': FASTIFY_PACKAGES['fastify-auth0-verify'],
🧹 Nitpick comments (12)
plugins/baseplate-plugin-storage/src/constants/storage-packages.ts (1)
7-7: Consider removing the empty line.For better readability and consistency, consider removing the empty line between package groups.
packages/fastify-generators/src/constants/fastify-packages.ts (1)
60-60: Ensure consistent version prefix usage across all packages.The
@types/nodepackage uses the caret (^) prefix while other packages don't. This inconsistency could lead to different version resolution behavior during installation.Apply this diff to maintain consistency with other packages:
- '@types/node': `^20.0.0`, + '@types/node': '20.0.0',packages/fastify-generators/src/generators/core/fastify-cookie-context/index.ts (1)
10-10: LGTM! Package version centralization implemented correctly.The changes successfully integrate with the centralized version management system.
Consider adding TypeScript type definitions for
FASTIFY_PACKAGESto ensure type safety when accessing package versions. This would help catch typos and validate package names at compile time.// Example type definition type FastifyPackages = { '@fastify/cookie': string; '@fastify/request-context': string; '@sendgrid/mail': string; '@node-rs/argon2': string; // ... other packages };Also applies to: 33-33
packages/fastify-generators/src/generators/core/request-context/index.ts (1)
17-18: Remove extra blank line after import.For consistency with the codebase style, remove the extra blank line after the import statement.
import { FASTIFY_PACKAGES } from '@src/constants/fastify-packages.js'; - import { fastifyServerProvider } from '../fastify-server/index.js';packages/fastify-generators/src/generators/stripe/fastify-stripe/index.ts (1)
52-53: Consider consistent property access notation.For consistency, consider using either dot notation or bracket notation throughout:
- stripe: FASTIFY_PACKAGES.stripe, - 'fastify-raw-body': FASTIFY_PACKAGES['fastify-raw-body'], + stripe: FASTIFY_PACKAGES['stripe'], + 'fastify-raw-body': FASTIFY_PACKAGES['fastify-raw-body'],plugins/baseplate-plugin-storage/src/generators/react/upload-components/index.ts (1)
23-23: Consider more specific import path.The import from '@src/constants' is too generic. Consider importing directly from the storage-packages file for better maintainability:
-import { STORAGE_PACKAGES } from '@src/constants'; +import { STORAGE_PACKAGES } from '@src/constants/storage-packages.js';plugins/baseplate-plugin-storage/src/generators/fastify/storage-module/index.ts (1)
178-178: Fix typo in AWS secret key seed value.There's a typo in the seed value for AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCSS_KEY' is missing an 'E'.
- seedValue: 'AWS_SECRET_ACCSS_KEY', + seedValue: 'AWS_SECRET_ACCESS_KEY',packages/react-generators/src/generators/core/react-tailwind/index.ts (1)
17-18: Remove extra blank line after import.For consistency with the rest of the codebase, remove the extra blank line after the import statement.
import { REACT_PACKAGES } from '@src/constants/react-packages.js'; - import { reactProvider } from '../react/index.js';packages/react-generators/src/generators/core/react-config/index.ts (1)
21-21: Consider moving the import statement.For better code organization, consider moving this import statement near other package imports at the top of the file.
import { sortBy } from 'es-toolkit'; import { z } from 'zod'; +import { REACT_PACKAGES } from '@src/constants/react-packages.js'; - -import { REACT_PACKAGES } from '@src/constants/react-packages.js';packages/react-generators/src/generators/core/react-router/index.ts (1)
135-135: Address the TODO comment about layout key uniqueness.This TODO comment indicates a potential issue with multiple layout keys. Consider implementing a validation check to ensure layout key uniqueness.
Would you like me to help implement a validation check for layout key uniqueness?
packages/react-generators/src/generators/auth/auth-hooks/index.ts (1)
16-17: Consider removing empty line.For better code organization, consider removing the empty line after the import statement.
import { z } from 'zod'; import { REACT_PACKAGES } from '@src/constants/react-packages.js'; - import { reactApolloProvider } from '../../apollo/react-apollo/index.js';packages/react-generators/src/generators/core/react-components/index.ts (1)
112-118: Consider moving date-picker related package versions to constants.The date-picker related packages still use hardcoded versions. Consider moving these to the centralized constants file for consistency.
- 'react-datepicker': '4.25.0', - 'date-fns': '3.2.0', + 'react-datepicker': REACT_PACKAGES['react-datepicker'], + 'date-fns': REACT_PACKAGES['date-fns'],- '@types/react-datepicker': '4.19.5', + '@types/react-datepicker': REACT_PACKAGES['@types/react-datepicker'],
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite
📒 Files selected for processing (53)
.changeset/cuddly-carrots-fly.md(1 hunks)packages/core-generators/src/constants/core-packages.ts(1 hunks)packages/core-generators/src/constants/index.ts(1 hunks)packages/core-generators/src/generators/node/eslint/index.ts(2 hunks)packages/core-generators/src/generators/node/prettier/index.ts(3 hunks)packages/core-generators/src/generators/node/typescript/index.ts(2 hunks)packages/core-generators/src/generators/node/vitest/index.ts(2 hunks)packages/core-generators/src/index.ts(1 hunks)packages/fastify-generators/src/constants/fastify-packages.ts(1 hunks)packages/fastify-generators/src/constants/index.ts(1 hunks)packages/fastify-generators/src/generators/auth/auth-plugin/index.ts(2 hunks)packages/fastify-generators/src/generators/auth/password-hasher-service/index.ts(2 hunks)packages/fastify-generators/src/generators/auth0/auth0-module/index.ts(2 hunks)packages/fastify-generators/src/generators/bull/fastify-bull-board/index.ts(3 hunks)packages/fastify-generators/src/generators/core/axios/index.ts(2 hunks)packages/fastify-generators/src/generators/core/config-service/index.ts(2 hunks)packages/fastify-generators/src/generators/core/fastify-cookie-context/index.ts(2 hunks)packages/fastify-generators/src/generators/core/fastify-redis/index.ts(2 hunks)packages/fastify-generators/src/generators/core/fastify-sentry/index.ts(2 hunks)packages/fastify-generators/src/generators/core/fastify-server/index.ts(2 hunks)packages/fastify-generators/src/generators/core/fastify/setup-fastify-typescript.ts(2 hunks)packages/fastify-generators/src/generators/core/logger-service/index.ts(2 hunks)packages/fastify-generators/src/generators/core/request-context/index.ts(2 hunks)packages/fastify-generators/src/generators/email/fastify-postmark/index.ts(2 hunks)packages/fastify-generators/src/generators/email/fastify-sendgrid/index.ts(2 hunks)packages/fastify-generators/src/generators/pothos/pothos-prisma/index.ts(2 hunks)packages/fastify-generators/src/generators/pothos/pothos-scalar/index.ts(2 hunks)packages/fastify-generators/src/generators/pothos/pothos/index.ts(2 hunks)packages/fastify-generators/src/generators/prisma/prisma/index.ts(2 hunks)packages/fastify-generators/src/generators/stripe/fastify-stripe/index.ts(2 hunks)packages/fastify-generators/src/generators/vitest/prisma-vitest/index.ts(2 hunks)packages/fastify-generators/src/generators/yoga/yoga-plugin/index.ts(4 hunks)packages/fastify-generators/src/index.ts(1 hunks)packages/react-generators/src/constants/index.ts(1 hunks)packages/react-generators/src/constants/react-packages.ts(1 hunks)packages/react-generators/src/generators/admin/admin-components/index.ts(2 hunks)packages/react-generators/src/generators/apollo/react-apollo/index.ts(2 hunks)packages/react-generators/src/generators/auth/auth-hooks/index.ts(2 hunks)packages/react-generators/src/generators/auth0/react-auth0/index.ts(2 hunks)packages/react-generators/src/generators/core/react-components/index.ts(2 hunks)packages/react-generators/src/generators/core/react-config/index.ts(2 hunks)packages/react-generators/src/generators/core/react-datadog/index.ts(2 hunks)packages/react-generators/src/generators/core/react-error-boundary/index.ts(2 hunks)packages/react-generators/src/generators/core/react-logger/index.ts(2 hunks)packages/react-generators/src/generators/core/react-router/index.ts(2 hunks)packages/react-generators/src/generators/core/react-sentry/index.ts(2 hunks)packages/react-generators/src/generators/core/react-tailwind/index.ts(3 hunks)packages/react-generators/src/generators/core/react/node.ts(1 hunks)packages/react-generators/src/index.ts(1 hunks)plugins/baseplate-plugin-storage/src/constants/index.ts(1 hunks)plugins/baseplate-plugin-storage/src/constants/storage-packages.ts(1 hunks)plugins/baseplate-plugin-storage/src/generators/fastify/storage-module/index.ts(2 hunks)plugins/baseplate-plugin-storage/src/generators/react/upload-components/index.ts(3 hunks)
✅ Files skipped from review due to trivial changes (5)
- plugins/baseplate-plugin-storage/src/constants/index.ts
- packages/react-generators/src/index.ts
- packages/fastify-generators/src/constants/index.ts
- packages/react-generators/src/constants/index.ts
- packages/core-generators/src/constants/index.ts
🔇 Additional comments (56)
packages/fastify-generators/src/index.ts (1)
1-1: LGTM!The new export statement follows the existing pattern and aligns with the PR objective of consolidating package versions.
packages/core-generators/src/index.ts (1)
2-2: LGTM!The new export statement follows the existing pattern and aligns with the PR objective of consolidating package versions.
plugins/baseplate-plugin-storage/src/constants/storage-packages.ts (1)
2-4: LGTM! AWS SDK packages are in sync.All AWS SDK packages are correctly using the same version (3.370.0).
packages/core-generators/src/constants/core-packages.ts (2)
27-27: LGTM! Good use ofas const.The use of
as constassertion ensures type safety by making the object properties read-only and their types inferred as literal types.
6-15:Details
✅ Verification successful
Verify ESLint and plugin compatibility.
Let's verify that all ESLint plugins are compatible with the ESLint core version 8.57.0.
🏁 Script executed:
#!/bin/bash # Description: Check ESLint and plugin compatibility # Get ESLint core version echo "ESLint core version:" npm view eslint version # Check plugin versions and their peer dependencies for pkg in '@typescript-eslint/eslint-plugin' '@typescript-eslint/parser' 'eslint-plugin-jsx-a11y' 'eslint-plugin-react' 'eslint-plugin-react-hooks' 'eslint-config-prettier' 'eslint-import-resolver-typescript' 'eslint-plugin-import' 'eslint-plugin-vitest' do echo "Checking $pkg..." npm view $pkg peerDependencies.eslint doneLength of output: 3960
ESLint Plugin Compatibility Verified
The compatibility check confirms that our configured ESLint version (
8.57.0) meets all the peer dependency requirements for our ESLint plugins. Although the latest ESLint version on npm is9.20.1, each plugin’s peer dependency range explicitly includes^8.57.0(or equivalent), ensuring that:
- @typescript-eslint/eslint-plugin and @typescript-eslint/parser support
^8.57.0 || ^9.0.0- eslint-plugin-jsx-a11y accepts ESLint versions including
^8- eslint-plugin-react supports ESLint versions up to
^8(and^9.7)- eslint-plugin-react-hooks covers ESLint
^8.0.0-0among other ranges- eslint-config-prettier requires ESLint
>=7.0.0- eslint-import-resolver-typescript imposes no specific ESLint constraints
- eslint-plugin-import and eslint-plugin-vitest likewise support our configured version
This confirms that the dependency versions defined in
packages/core-generators/src/constants/core-packages.ts(lines 6-15) are compatible with the respective peer dependency ranges.packages/fastify-generators/src/generators/core/fastify/setup-fastify-typescript.ts (1)
6-6: LGTM! Package versions are now centralized.The changes successfully migrate hardcoded package versions to the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 33-37
packages/fastify-generators/src/generators/core/axios/index.ts (1)
2-2: LGTM! Package version is now centralized.The changes successfully migrate the hardcoded axios version to the centralized
CORE_PACKAGESconstant, improving maintainability.Also applies to: 27-29
packages/fastify-generators/src/generators/email/fastify-postmark/index.ts (1)
13-13: LGTM! Package version is now centralized.The changes successfully migrate the hardcoded postmark version to the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 34-36
packages/fastify-generators/src/constants/fastify-packages.ts (1)
1-92: LGTM! Well-organized package version centralization.The package versions are well-organized by categories with clear comments, making it easy to locate and update versions. The use of
as constensures type safety and immutability.packages/fastify-generators/src/generators/email/fastify-sendgrid/index.ts (1)
13-13: LGTM! Package version centralization implemented correctly.The changes successfully replace the hardcoded version with a reference to the centralized
FASTIFY_PACKAGESconstant.Also applies to: 37-37
packages/fastify-generators/src/generators/auth/password-hasher-service/index.ts (1)
13-13: LGTM! Package version centralization implemented correctly.The changes successfully integrate with the centralized version management system.
Also applies to: 49-49
packages/fastify-generators/src/generators/auth/auth-plugin/index.ts (1)
10-10: LGTM! Package version centralization implemented correctly.The changes successfully integrate with the centralized version management system while maintaining code readability.
Also applies to: 47-48
packages/fastify-generators/src/generators/core/fastify-cookie-context/index.ts (1)
1-1:Details
✅ Verification successful
Verify package versions in the centralized constants file.
Let's ensure all package versions in
FASTIFY_PACKAGESare valid and up-to-date.
🏁 Script executed:
#!/bin/bash # Description: Verify package versions and check for any security advisories # Function to check package version and advisories check_package() { local package=$1 echo "Checking $package..." # Get latest version from npm echo "Latest version:" npm view "$package" version # Check for security advisories echo "Security advisories:" npm audit "$package" 2>/dev/null || true echo "---" } # Check all packages used in the changes check_package "@fastify/cookie" check_package "@fastify/request-context" check_package "@sendgrid/mail" check_package "@node-rs/argon2"Length of output: 1296
Centralized Package Version Verification Complete
- Verified package versions in
FASTIFY_PACKAGES:
@fastify/cookie: 11.0.2@fastify/request-context: 6.0.2@sendgrid/mail: 8.1.4@node-rs/argon2: 2.0.2- All packages are current and no security advisories were flagged.
- The type safety improvements suggested earlier remain optional and don't affect version centralization.
packages/fastify-generators/src/generators/pothos/pothos-prisma/index.ts (2)
46-46: LGTM! Package version centralized.Successfully moved the @pothos/plugin-prisma version to FASTIFY_PACKAGES constant.
13-13:Details
❓ Verification inconclusive
Verify the import path.
The import path uses
@src/alias. Ensure this alias is properly configured in the TypeScript configuration.
🏁 Script executed:
#!/bin/bash # Check if tsconfig.json contains the @src alias configuration cat tsconfig.json | jq '.compilerOptions.paths["@src/*"]'Length of output: 105
Verify alias configuration in project settings
The import statement in
packages/fastify-generators/src/generators/pothos/pothos-prisma/index.ts(line 13) uses the@srcalias. However, our initial check did not find atsconfig.json, and there’s no evidence of ajsconfig.jsoneither. Please manually confirm that the@srcalias is configured in your project (for example, via webpack, rollup, or another build configuration) so that the import resolves correctly.
🏁 Script executed:
[run_scripts] #!/bin/bash # Attempt to locate a configuration file that might define the '@src' alias. if [ -f tsconfig.json ]; then echo "Found tsconfig.json:" cat tsconfig.json | jq '.compilerOptions.paths["@src/*"]' elif [ -f jsconfig.json ]; then echo "Found jsconfig.json:" cat jsconfig.json | jq '.compilerOptions.paths["@src/*"]' else echo "No tsconfig.json or jsconfig.json found. Please verify if the '@src' alias is configured in another configuration file (e.g., webpack.config.js, rollup.config.js, etc.)." fiLength of output: 530
Action Required: Verify
@srcalias configuration manuallyThe import statement in
packages/fastify-generators/src/generators/pothos/pothos-prisma/index.ts(line 13) uses the@srcalias. However, notsconfig.jsonorjsconfig.jsonwas found to confirm the alias configuration. Please manually verify that the@srcalias is correctly configured in your project’s build system (for example, viawebpack.config.js,rollup.config.js, or another configuration file) to ensure that the import resolves as intended.packages/fastify-generators/src/generators/core/request-context/index.ts (1)
74-77: LGTM! Package version centralized.Successfully moved the @fastify/request-context version to FASTIFY_PACKAGES constant.
plugins/baseplate-plugin-storage/src/generators/react/upload-components/index.ts (1)
53-57: LGTM! Package versions centralized.Successfully moved package versions to their respective constants:
- axios → CORE_PACKAGES
- react-dropzone and react-circular-progressbar → STORAGE_PACKAGES
packages/fastify-generators/src/generators/core/fastify-redis/index.ts (1)
18-18: LGTM! Package versions are now centrally managed.The changes successfully migrate hardcoded package versions to use the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 50-51
packages/fastify-generators/src/generators/pothos/pothos-scalar/index.ts (1)
11-11: LGTM! Package versions are now centrally managed.The changes successfully migrate hardcoded package versions to use the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 62-66
packages/core-generators/src/generators/node/eslint/index.ts (1)
10-10: LGTM! Package versions are now centrally managed.The changes successfully migrate hardcoded package versions to use the centralized
CORE_PACKAGESconstant, improving maintainability while preserving the conditional inclusion of React and Vitest packages.Also applies to: 66-90
packages/fastify-generators/src/generators/vitest/prisma-vitest/index.ts (1)
15-15: LGTM! Package versions are now centrally managed.The changes successfully migrate hardcoded package versions to use the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 49-51
packages/fastify-generators/src/generators/bull/fastify-bull-board/index.ts (1)
15-15: LGTM! Package versions successfully consolidated.The changes consistently replace hardcoded package versions with references to
FASTIFY_PACKAGES, improving maintainability.Also applies to: 61-63, 68-69, 136-136
packages/fastify-generators/src/generators/core/logger-service/index.ts (1)
20-21: LGTM! Package versions successfully consolidated.The changes consistently replace hardcoded package versions with references to
FASTIFY_PACKAGES, improving maintainability.Also applies to: 80-80, 84-84
packages/core-generators/src/generators/node/vitest/index.ts (1)
12-12: LGTM! Package versions successfully consolidated.The changes consistently replace hardcoded package versions with references to
CORE_PACKAGES, improving maintainability.Also applies to: 62-63
packages/fastify-generators/src/generators/core/config-service/index.ts (1)
24-25: LGTM! Package versions successfully consolidated.The changes consistently replace hardcoded package versions with references to
FASTIFY_PACKAGES, improving maintainability.Also applies to: 86-88, 91-91
packages/fastify-generators/src/generators/auth0/auth0-module/index.ts (2)
15-15: LGTM! Import of centralized package versions.The import of
FASTIFY_PACKAGESaligns with the PR objective of consolidating package versions.
70-70: LGTM! Use of centralized package version.The use of
FASTIFY_PACKAGES.auth0replaces the hardcoded version string, improving maintainability.packages/fastify-generators/src/generators/core/fastify-server/index.ts (2)
20-20: LGTM! Import of centralized package versions.The import of
FASTIFY_PACKAGESaligns with the PR objective of consolidating package versions.
80-85: LGTM! Consistent use of centralized package versions.All package versions are now using
FASTIFY_PACKAGES, improving maintainability:
fastify@fastify/helmetfastify-pluginnanoidpackages/core-generators/src/generators/node/prettier/index.ts (3)
22-22: LGTM! Import of centralized package versions.The import of
CORE_PACKAGESaligns with the PR objective of consolidating package versions.
52-52: LGTM! Use of centralized package version for prettier plugin.The use of
CORE_PACKAGES['prettier-plugin-packagejson']replaces the hardcoded version string, improving maintainability.
250-254: LGTM! Consistent use of centralized package versions.The use of
CORE_PACKAGES.prettierand dynamic mapping of plugin versions fromDEFAULT_PLUGINSimproves maintainability.packages/fastify-generators/src/generators/core/fastify-sentry/index.ts (3)
18-18: LGTM! Import of centralized package versions.The import of
FASTIFY_PACKAGESaligns with the PR objective of consolidating package versions.
136-141: LGTM! Consistent use of centralized package versions for runtime dependencies.All runtime dependencies are now using
FASTIFY_PACKAGES, improving maintainability:
@sentry/core@sentry/node@sentry/profiling-nodelodash
143-146: LGTM! Consistent use of centralized package versions for dev dependencies.All dev dependencies are now using
FASTIFY_PACKAGES, improving maintainability:
@sentry/types@types/lodashpackages/fastify-generators/src/generators/prisma/prisma/index.ts (1)
30-30: LGTM! Package versions are now centrally managed.The changes successfully migrate package versions to the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 100-102, 106-106
packages/core-generators/src/generators/node/typescript/index.ts (1)
17-17: LGTM! TypeScript version is now centrally managed.The changes successfully migrate the TypeScript version from a hardcoded constant to the centralized
CORE_PACKAGESconstant, improving maintainability.Also applies to: 116-116
packages/fastify-generators/src/generators/yoga/yoga-plugin/index.ts (1)
19-19: LGTM! Package versions are now centrally managed.The changes successfully migrate multiple package versions to the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 149-154, 158-160, 256-257, 293-296
packages/fastify-generators/src/generators/pothos/pothos/index.ts (1)
26-26: LGTM! Package versions are now centrally managed.The changes successfully migrate Pothos-related package versions to the centralized
FASTIFY_PACKAGESconstant, improving maintainability.Also applies to: 169-173
plugins/baseplate-plugin-storage/src/generators/fastify/storage-module/index.ts (1)
28-28:Details
✅ Verification successful
LGTM! Package versions are now centralized.
The changes align with the PR objective by consolidating package versions into a single constants file, making it easier to update versions in one place.
Let's verify that the import path is correctly configured:
Also applies to: 156-166
🏁 Script executed:
#!/bin/bash # Description: Verify the import path alias configuration. # Test: Search for tsconfig.json or other configuration files that define path aliases. fd -t f -e json tsconfig.json -x cat {} \; | jq -r '.compilerOptions.paths | select(. != null)'Length of output: 844
LGTM! Package versions are now centralized and the import alias is correctly configured.
The alias
@src/*is properly mapped in the TypeScript configuration (e.g.,"@src/*": ["src/*"]), confirming that importing from@src/constantsworks as expected. With package version references now consolidated (including lines 156–166), future updates will be simpler and more reliable..changeset/cuddly-carrots-fly.md (1)
1-9: LGTM! Changeset is accurate and well-documented.The patch version bump is appropriate for this non-breaking refactor, and the description clearly explains the purpose of consolidating package versions.
packages/react-generators/src/generators/core/react/node.ts (1)
3-18: LGTM! Package versions are now centralized.The changes successfully replace hardcoded versions with references to the centralized constants, improving maintainability.
packages/react-generators/src/generators/core/react-logger/index.ts (1)
17-18: LGTM! Package version is now centralized.The changes successfully replace the hardcoded version with a reference to the centralized constant.
Also applies to: 49-50
packages/react-generators/src/generators/core/react-error-boundary/index.ts (1)
15-16: LGTM! Package version is now centralized.The changes successfully replace the hardcoded version with a reference to the centralized constant.
Also applies to: 42-43
packages/react-generators/src/generators/auth0/react-auth0/index.ts (1)
8-8: LGTM! Package version successfully centralized.The change properly implements the centralization of package versions by replacing the hardcoded version with a reference to
REACT_PACKAGES['@auth0/auth0-react'].Also applies to: 30-30
packages/react-generators/src/generators/core/react-datadog/index.ts (1)
17-17: LGTM! Package version successfully centralized.The change properly implements the centralization of package versions by replacing the hardcoded version with a reference to
REACT_PACKAGES['@datadog/browser-logs'].Also applies to: 47-47
packages/react-generators/src/generators/core/react-tailwind/index.ts (1)
52-56: LGTM! Package versions successfully centralized.The changes properly implement the centralization of package versions for all Tailwind-related packages and the prettier plugin.
Also applies to: 69-69
packages/react-generators/src/generators/admin/admin-components/index.ts (1)
12-12: LGTM! Package version successfully centralized.The change properly implements the centralization of package versions by replacing the hardcoded version with a reference to
REACT_PACKAGES.nanoid.Also applies to: 39-39
packages/react-generators/src/generators/core/react-sentry/index.ts (1)
17-17:Details
✅ Verification successful
LGTM! Verify package version consistency.
The change aligns with the PR objective of centralizing package versions. The implementation correctly references the version from the centralized constants.
Also applies to: 59-59
🏁 Script executed:
#!/bin/bash # Verify that the Sentry package version is consistently referenced across the codebase rg -g '!node_modules' -g '!dist' '@sentry/react.*\d+\.\d+\.\d+'Length of output: 344
LGTM – Verified Sentry version consistency across the codebase.
The centralized package version for@sentry/reactis consistently set to8.55.0in all referenced files (constants, lock file, and package manifest). The change correctly centralizes the Sentry version as intended.packages/react-generators/src/generators/core/react-config/index.ts (1)
74-74:Details
✅ Verification successful
LGTM! Verify zod package version.
The change correctly references the zod package version from the centralized constants.
🏁 Script executed:
#!/bin/bash # Verify that the zod package version is consistently referenced across the codebase rg -g '!node_modules' -g '!dist' 'zod.*\d+\.\d+\.\d+'Length of output: 1350
Zod Package Version Consistency Verified
The centralized reference is correct. The
REACT_PACKAGES.zodconstant is set to "3.24.1" inpackages/react-generators/src/constants/react-packages.tsand is consistently used across the repository.
- The output confirms that the version "3.24.1" is used consistently.
- The code snippet
zod: REACT_PACKAGES.zod,inpackages/react-generators/src/generators/core/react-config/index.tsproperly relies on the centralized constant.LGTM!
packages/react-generators/src/generators/auth/auth-hooks/index.ts (1)
77-82:Details
✅ Verification successful
LGTM! Verify package versions.
The changes correctly reference the package versions from the centralized constants.
🏁 Script executed:
#!/bin/bash # Verify that the use-subscription and its types package versions are consistently referenced across the codebase rg -g '!node_modules' -g '!dist' 'use-subscription.*\d+\.\d+\.\d+'Length of output: 255
Package Version Consistency Verified – LGTM!
The script confirms that the centralized constants in
packages/react-generators/src/constants/react-packages.tscorrectly define:
- use-subscription:
^1.5.1- @types/use-subscription:
^1.0.0No further changes are needed.
packages/react-generators/src/generators/core/react-components/index.ts (2)
17-17: LGTM! Good practice to centralize package versions.The addition of
REACT_PACKAGESimport helps centralize package version management.
90-97: LGTM! Package versions are now managed centrally.The replacement of hardcoded versions with constants from
REACT_PACKAGESimproves maintainability.packages/react-generators/src/generators/apollo/react-apollo/index.ts (3)
24-24: LGTM! Good practice to centralize package versions.The addition of
REACT_PACKAGESimport helps centralize package version management.
111-114: LGTM! Apollo client package versions are now managed centrally.The replacement of hardcoded versions with constants from
REACT_PACKAGESimproves maintainability.Also applies to: 117-119
122-131: LGTM! GraphQL codegen package versions are now managed centrally.The replacement of hardcoded versions with constants from
REACT_PACKAGESimproves maintainability.
| export const STORAGE_PACKAGES = { | ||
| '@aws-sdk/client-s3': '3.370.0', | ||
| '@aws-sdk/s3-presigned-post': '3.370.0', | ||
| '@aws-sdk/s3-request-presigner': '3.370.0', | ||
| 'mime-types': '2.1.35', | ||
| '@types/mime-types': '2.1.1', | ||
|
|
||
| 'react-dropzone': '14.2.3', | ||
| 'react-circular-progressbar': '2.1.0', | ||
| }; |
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
Verify package versions for security and compatibility.
Let's verify that these package versions are the latest stable releases and free from known vulnerabilities.
🏁 Script executed:
#!/bin/bash
# Description: Check for latest versions and security advisories for storage packages
for pkg in '@aws-sdk/client-s3' '@aws-sdk/s3-presigned-post' '@aws-sdk/s3-request-presigner' 'mime-types' '@types/mime-types' 'react-dropzone' 'react-circular-progressbar'
do
echo "Checking $pkg..."
# Get latest version from npm
npm view $pkg version
# Check for security advisories
npm audit $pkg
doneLength of output: 4746
Action Required: Update Package Versions & Enable Security Auditing
- The AWS packages (
@aws-sdk/client-s3,@aws-sdk/s3-presigned-post, and@aws-sdk/s3-request-presigner) are currently pinned at version 3.370.0, while the latest stable release is 3.744.0. @types/mime-typesis set to 2.1.1 but the latest version is 2.1.4.react-dropzoneis at 14.2.3 even though 14.3.5 is now available.- The versions for
mime-types(2.1.35) andreact-circular-progressbar(2.1.0) remain current. - Security Auditing: The npm audit commands failed due to the absence of a package-lock file. Please run
npm i --package-lock-onlyto generate a lockfile, then re-run the audit to verify there are no known vulnerabilities.
Please update the package versions in plugins/baseplate-plugin-storage/src/constants/storage-packages.ts accordingly and ensure you have a valid lockfile for proper security scanning.
| @@ -0,0 +1,27 @@ | |||
| export const CORE_PACKAGES = { | |||
| // Typescript | |||
| typescript: '5.5.4', | |||
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.
Fix incorrect TypeScript version.
The specified TypeScript version 5.5.4 appears to be incorrect as it doesn't exist yet. The latest TypeScript version should be used.
| export const CORE_PACKAGES = { | ||
| // Typescript | ||
| typescript: '5.5.4', | ||
|
|
||
| // Linting | ||
| '@typescript-eslint/eslint-plugin': '7.16.1', | ||
| '@typescript-eslint/parser': '7.16.1', | ||
| eslint: '8.57.0', | ||
| 'eslint-plugin-jsx-a11y': '6.9.0', | ||
| 'eslint-plugin-react': '7.34.4', | ||
| 'eslint-plugin-react-hooks': '4.6.2', | ||
| 'eslint-config-prettier': '9.1.0', | ||
| 'eslint-import-resolver-typescript': '3.6.1', | ||
| 'eslint-plugin-import': '2.29.1', | ||
| 'eslint-plugin-vitest': '0.4.1', | ||
|
|
||
| // Formatting | ||
| prettier: '3.3.3', | ||
| 'prettier-plugin-packagejson': '2.5.2', | ||
|
|
||
| // Testing | ||
| vitest: '3.0.5', | ||
| 'vite-tsconfig-paths': '5.1.4', | ||
|
|
||
| // Utils | ||
| axios: '1.7.4', | ||
| } as const; |
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
Verify package versions for security and compatibility.
Let's verify that these package versions are the latest stable releases and free from known vulnerabilities.
🏁 Script executed:
#!/bin/bash
# Description: Check for latest versions and security advisories for core packages
# Function to check package
check_package() {
local pkg=$1
echo "Checking $pkg..."
# Get latest version
npm view $pkg version
# Check for security advisories
npm audit $pkg
}
# Check TypeScript
check_package typescript
# Check Prettier and plugins
check_package prettier
check_package 'prettier-plugin-packagejson'
# Check Testing packages
check_package vitest
check_package 'vite-tsconfig-paths'
# Check Utils
check_package axiosLength of output: 3167
Action Required: Update Package Versions and Verify Security Checks
The verification indicates that some of the package versions in the CORE_PACKAGES object are behind the latest stable releases:
- TypeScript: Defined as
5.5.4but the latest version is5.7.3 - Prettier: Defined as
3.3.3versus the latest3.5.1 - prettier-plugin-packagejson: Defined as
2.5.2versus the latest2.5.8 - Axios: Defined as
1.7.4versus the latest1.7.9
Additionally, the npm audit commands failed due to a missing lockfile (ENOLOCK error). To properly assess security advisories, please generate a lockfile (e.g., via npm i --package-lock-only) and re-run the audit.
Please update these versions as appropriate and verify that your application remains compatible with the newer releases.
| export const FASTIFY_PACKAGES = { | ||
| // Fastify | ||
| fastify: '5.1.0', | ||
| '@fastify/helmet': '13.0.0', | ||
| 'fastify-plugin': '5.0.1', | ||
| nanoid: '3.3.8', | ||
|
|
||
| pino: '9.5.0', | ||
| 'pino-pretty': '13.0.0', | ||
|
|
||
| 'altair-fastify-plugin': '8.0.4', | ||
| graphql: '16.9.0', | ||
| '@envelop/core': '5.0.1', | ||
| '@envelop/disable-introspection': '6.0.0', | ||
| 'graphql-yoga': '5.6.1', | ||
|
|
||
| '@envelop/types': '5.0.0', | ||
| '@types/ws': '8.5.13', | ||
|
|
||
| '@fastify/websocket': '11.0.1', | ||
| '@fastify/request-context': '6.0.1', | ||
| '@fastify/formbody': '8.0.1', | ||
| '@fastify/cookie': '11.0.1', | ||
| 'fastify-raw-body': '5.0.0', | ||
|
|
||
| // Pothos | ||
| '@pothos/core': '4.3.0', | ||
| '@pothos/plugin-simple-objects': '4.1.0', | ||
| '@pothos/plugin-relay': '4.3.0', | ||
| '@pothos/plugin-prisma': '4.3.1', | ||
|
|
||
| '@graphql-yoga/redis-event-target': '2.0.0', | ||
| 'graphql-ws': '5.16.0', | ||
|
|
||
| // Bull Board | ||
| '@bull-board/api': '6.5.3', | ||
| '@bull-board/fastify': '6.5.3', | ||
|
|
||
| // Prisma | ||
| '@prisma/client': '5.19.1', | ||
| '@prisma/instrumentation': '5.19.1', | ||
| prisma: '5.19.1', | ||
|
|
||
| // Utils | ||
| ms: '2.1.3', | ||
| '@types/redis-info': '3.0.3', | ||
| '@types/ms': '0.7.34', | ||
| lodash: '4.17.21', | ||
| '@types/lodash': '4.17.7', | ||
| uuid: '9.0.0', | ||
| '@types/uuid': '9.0.1', | ||
|
|
||
| // Environment | ||
| 'cross-env': '7.0.3', | ||
| dotenv: '16.3.1', | ||
|
|
||
| // Compilation | ||
| 'tsc-alias': '1.8.10', | ||
| tsx: '4.19.1', | ||
| '@types/node': `^20.0.0`, | ||
|
|
||
| // Redis | ||
| ioredis: '5.3.2', | ||
| 'ioredis-mock': '8.7.0', | ||
|
|
||
| // Sentry | ||
| '@sentry/core': '8.55.0', | ||
| '@sentry/node': '8.55.0', | ||
| '@sentry/profiling-node': '8.55.0', | ||
|
|
||
| '@sentry/types': '8.55.0', | ||
|
|
||
| // Validation | ||
| zod: '3.24.1', | ||
|
|
||
| // Testing | ||
| 'vitest-mock-extended': '1.3.2', | ||
| 'pg-connection-string': '2.6.4', | ||
|
|
||
| // Auth | ||
| '@node-rs/argon2': '2.0.2', | ||
| auth0: '4.0.2', | ||
|
|
||
| // Postmark | ||
| postmark: '4.0.2', | ||
|
|
||
| // Sendgrid | ||
| '@sendgrid/mail': '8.1.0', | ||
|
|
||
| // Stripe | ||
| stripe: '14.5.0', | ||
| } as const; |
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
Verify package versions for security and compatibility.
Let's verify that the package versions are up-to-date and free from known vulnerabilities.
🏁 Script executed:
#!/bin/bash
# Description: Check for latest versions and security advisories for key packages
# Check npm for latest versions and advisories
for pkg in fastify '@fastify/helmet' '@prisma/client' zod stripe; do
echo "Checking $pkg..."
npm view $pkg version
npm audit $pkg
done
# Check GitHub Security Advisories
gh api graphql -f query='
{
securityVulnerabilities(first: 10, ecosystem: NPM, package: "fastify") {
nodes {
advisory {
summary
severity
publishedAt
}
vulnerableVersionRange
firstPatchedVersion {
identifier
}
}
}
}'Length of output: 4128
Action Required: Upgrade Package Versions for Enhanced Security and Compatibility
After verifying against the latest npm view results and GitHub security advisories, please review the following updates in the file packages/fastify-generators/src/constants/fastify-packages.ts (Lines 1–92):
-
fastify:
- Current:
5.1.0 - Latest:
5.2.1 - Action: Update if compatible with your application as the current version is safe per advisories but behind the latest release.
- Current:
-
@fastify/helmet:
- Current:
13.0.0 - Latest:
13.0.1 - Action: Bump the version to benefit from the latest fixes.
- Current:
-
@prisma/client:
- Current:
5.19.1 - Latest:
6.3.1 - Action: This is a significant version jump; please verify compatibility and test thoroughly before updating.
- Current:
-
zod:
- Current:
3.24.1 - Latest:
3.24.2 - Action: A minor patch upgrade is advised.
- Current:
-
stripe:
- Current:
14.5.0 - Latest:
17.6.0 - Action: Consider updating after ensuring that there are no breaking changes with the newer version.
- Current:
Additional Note:
The npm audit checks were unable to run due to the absence of a lockfile. Creating a lockfile (e.g., via npm i --package-lock-only) might provide a clearer audit trail for assessing security vulnerabilities.
Please update these dependencies and run your test suite to ensure full compatibility.
| export const REACT_PACKAGES = { | ||
| // React | ||
| react: '18.3.1', | ||
| 'react-dom': '18.3.1', | ||
| 'react-router-dom': '6.22.3', | ||
| '@types/node': `^20.0.0`, | ||
| '@types/react': '18.3.8', | ||
| '@types/react-dom': '18.3.0', | ||
| '@vitejs/plugin-react': '4.3.4', | ||
| vite: '6.0.11', | ||
| 'vite-plugin-svgr': '4.3.0', | ||
| 'vite-tsconfig-paths': '5.1.4', | ||
|
|
||
| loglevel: '1.9.1', | ||
|
|
||
| // Tailwind | ||
| autoprefixer: '10.4.20', | ||
| tailwindcss: '3.4.11', | ||
| 'prettier-plugin-tailwindcss': '0.6.6', | ||
| '@tailwindcss/forms': '0.5.9', | ||
|
|
||
| // Components | ||
| '@headlessui/react': '1.7.18', | ||
| '@hookform/resolvers': '3.9.0', | ||
| clsx: '2.1.1', | ||
| 'react-hook-form': '7.53.0', | ||
| 'react-hot-toast': '2.4.1', | ||
| 'react-icons': '5.0.1', | ||
| 'react-select': '5.8.0', | ||
| zustand: '4.4.6', | ||
| 'react-error-boundary': '4.0.13', | ||
|
|
||
| // GraphQL | ||
| '@apollo/client': '3.10.8', | ||
| graphql: '16.9.0', | ||
| 'graphql-ws': '5.16.0', | ||
| '@graphql-codegen/cli': '5.0.2', | ||
| '@graphql-codegen/typescript': '4.0.9', | ||
| '@graphql-codegen/typescript-operations': '4.2.3', | ||
| '@graphql-codegen/typescript-react-apollo': '4.3.0', | ||
| '@parcel/watcher': '2.4.1', | ||
|
|
||
| // Utils | ||
| nanoid: '3.3.8', | ||
| 'use-subscription': '^1.5.1', | ||
| '@types/use-subscription': '^1.0.0', | ||
|
|
||
| // Auth | ||
| '@auth0/auth0-react': '2.2.3', | ||
|
|
||
| // Validation | ||
| zod: '3.24.1', | ||
|
|
||
| // Datadog | ||
| '@datadog/browser-logs': '4.19.1', | ||
|
|
||
| // Sentry | ||
| '@sentry/react': '8.55.0', | ||
| } as const; |
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
🛠️ Refactor suggestion
🧩 Analysis chain
Verify package versions and ensure consistent version format.
Several concerns need to be addressed:
- Version format inconsistency: Some versions use caret (^) while others don't. This inconsistency might lead to unexpected behavior.
- React version 18.3.1 seems incorrect as it might not exist.
- Consider documenting peer dependency requirements for packages.
Let's verify the React version and check for any potential issues:
Also, let's verify the package versions and their dependencies:
Consider applying these improvements:
- Standardize version format:
- '@types/node': `^20.0.0`,
- 'use-subscription': '^1.5.1',
- '@types/use-subscription': '^1.0.0',
+ '@types/node': '20.0.0',
+ 'use-subscription': '1.5.1',
+ '@types/use-subscription': '1.0.0',- Add documentation about peer dependencies:
export const REACT_PACKAGES = {
+ // React Core
+ // Note: These packages have peer dependencies:
+ // - react-dom requires react of the same version
+ // - @vitejs/plugin-react requires react >=16.8.0
// React
react: '18.3.1',
'react-dom': '18.3.1',🏁 Script executed:
#!/bin/bash
# Description: Verify package versions exist and check their peer dependencies
# Function to check if a package version exists
check_package() {
local package=$1
local version=$2
echo "Checking $package@$version..."
npm view "$package@$version" version 2>/dev/null
}
# Check React and its DOM package
check_package "react" "18.3.1"
check_package "react-dom" "18.3.1"
# Check a few other major packages
check_package "@vitejs/plugin-react" "4.3.4"
check_package "vite" "6.0.11"
# Get peer dependencies for key packages
echo -e "\nChecking peer dependencies..."
npm view "@vitejs/[email protected]" peerDependencies --json 2>/dev/null
npm view "[email protected]" peerDependencies --json 2>/dev/nullLength of output: 1028
🌐 Web query:
What is the latest version of React?
💡 Result:
The latest stable version of React is 19.0, released on December 5, 2024[1][2][6][8]. This major update introduces significant features like:
Key improvements:
- New Actions API for form handling and data mutations
- Enhanced hooks (
useActionState,useFormStatus,useOptimistic) - Official support for Server Components and Server Actions
- Improved hydration with better error reporting
- Support for passing
refas a normal prop[2][6]
For developers upgrading from React 18:
- First update to React 18.3.1 to identify deprecated API usage[2]
- Follow the official React 19 Upgrade Guide for codemods and migration steps[6]
- Replace legacy root API with
ReactDOM.createRoot()[5]
React 19 requires the new JSX transform and removes several deprecated APIs including string refs, propTypes, and legacy context APIs[2]. The team recommends using TypeScript for type checking instead of propTypes[2].
Older supported versions include React 18.x (current LTS) and React 17.x (maintenance mode)[3][7]. The npm package receives ~28M weekly downloads as of February 2025[8].
Citations:
- 1: https://react.dev/versions
- 2: https://github.com/facebook/react/releases
- 3: https://en.wikipedia.org/wiki/React_(software)
- 4: https://www.scalablepath.com/react/react-18-release-features
- 5: https://www.w3schools.com/react/react_upgrade.asp
- 6: https://react.dev/blog/2024/12/05/react-19
- 7: https://legacy.reactjs.org/versions/
- 8: https://www.npmjs.com/package/react
Ensure consistent version formatting and add peer dependency documentation.
The constant file is correctly exporting package versions and the version "18.3.1" for React and ReactDOM is valid per npm. However, a few issues remain:
-
Version Format Inconsistency: Some packages (e.g.
@types/node,use-subscription,@types/use-subscription) use the caret (^) prefix while others use fixed versions. For clarity and to avoid potential unexpected behavior, please consider standardizing these version strings.
Example diff suggestion:- '@types/node': `^20.0.0`, - 'use-subscription': '^1.5.1', - '@types/use-subscription': '^1.0.0', + '@types/node': '20.0.0', + 'use-subscription': '1.5.1', + '@types/use-subscription': '1.0.0',
-
Peer Dependency Documentation: Some packages have peer dependency requirements (e.g.
react-domrequires a compatiblereactversion;@vitejs/plugin-reactrequires a specific range forvite). Adding inline comments documenting these dependencies will help maintain clarity.
Example snippet addition:export const REACT_PACKAGES = { + // React Core + // Note: peer dependencies include: + // - react-dom requires the same version of react (currently set to 18.3.1) + // - @vitejs/plugin-react requires vite version "^4.2.0 || ^5.0.0 || ^6.0.0"
Also, although the latest stable React release is now 19.0, if the project's upgrade strategy is to initially set React to 18.3.1 to address deprecation warnings, consider documenting that rationale.
📝 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.
| export const REACT_PACKAGES = { | |
| // React | |
| react: '18.3.1', | |
| 'react-dom': '18.3.1', | |
| 'react-router-dom': '6.22.3', | |
| '@types/node': `^20.0.0`, | |
| '@types/react': '18.3.8', | |
| '@types/react-dom': '18.3.0', | |
| '@vitejs/plugin-react': '4.3.4', | |
| vite: '6.0.11', | |
| 'vite-plugin-svgr': '4.3.0', | |
| 'vite-tsconfig-paths': '5.1.4', | |
| loglevel: '1.9.1', | |
| // Tailwind | |
| autoprefixer: '10.4.20', | |
| tailwindcss: '3.4.11', | |
| 'prettier-plugin-tailwindcss': '0.6.6', | |
| '@tailwindcss/forms': '0.5.9', | |
| // Components | |
| '@headlessui/react': '1.7.18', | |
| '@hookform/resolvers': '3.9.0', | |
| clsx: '2.1.1', | |
| 'react-hook-form': '7.53.0', | |
| 'react-hot-toast': '2.4.1', | |
| 'react-icons': '5.0.1', | |
| 'react-select': '5.8.0', | |
| zustand: '4.4.6', | |
| 'react-error-boundary': '4.0.13', | |
| // GraphQL | |
| '@apollo/client': '3.10.8', | |
| graphql: '16.9.0', | |
| 'graphql-ws': '5.16.0', | |
| '@graphql-codegen/cli': '5.0.2', | |
| '@graphql-codegen/typescript': '4.0.9', | |
| '@graphql-codegen/typescript-operations': '4.2.3', | |
| '@graphql-codegen/typescript-react-apollo': '4.3.0', | |
| '@parcel/watcher': '2.4.1', | |
| // Utils | |
| nanoid: '3.3.8', | |
| 'use-subscription': '^1.5.1', | |
| '@types/use-subscription': '^1.0.0', | |
| // Auth | |
| '@auth0/auth0-react': '2.2.3', | |
| // Validation | |
| zod: '3.24.1', | |
| // Datadog | |
| '@datadog/browser-logs': '4.19.1', | |
| // Sentry | |
| '@sentry/react': '8.55.0', | |
| } as const; | |
| export const REACT_PACKAGES = { | |
| // React Core | |
| // Note: These packages have peer dependencies: | |
| // - react-dom requires react of the same version | |
| // - @vitejs/plugin-react requires react >=16.8.0 | |
| // React | |
| react: '18.3.1', | |
| 'react-dom': '18.3.1', | |
| 'react-router-dom': '6.22.3', | |
| '@types/node': '20.0.0', | |
| '@types/react': '18.3.8', | |
| '@types/react-dom': '18.3.0', | |
| '@vitejs/plugin-react': '4.3.4', | |
| vite: '6.0.11', | |
| 'vite-plugin-svgr': '4.3.0', | |
| 'vite-tsconfig-paths': '5.1.4', | |
| loglevel: '1.9.1', | |
| // Tailwind | |
| autoprefixer: '10.4.20', | |
| tailwindcss: '3.4.11', | |
| 'prettier-plugin-tailwindcss': '0.6.6', | |
| '@tailwindcss/forms': '0.5.9', | |
| // Components | |
| '@headlessui/react': '1.7.18', | |
| '@hookform/resolvers': '3.9.0', | |
| clsx: '2.1.1', | |
| 'react-hook-form': '7.53.0', | |
| 'react-hot-toast': '2.4.1', | |
| 'react-icons': '5.0.1', | |
| 'react-select': '5.8.0', | |
| zustand: '4.4.6', | |
| 'react-error-boundary': '4.0.13', | |
| // GraphQL | |
| '@apollo/client': '3.10.8', | |
| graphql: '16.9.0', | |
| 'graphql-ws': '5.16.0', | |
| '@graphql-codegen/cli': '5.0.2', | |
| '@graphql-codegen/typescript': '4.0.9', | |
| '@graphql-codegen/typescript-operations': '4.2.3', | |
| '@graphql-codegen/typescript-react-apollo': '4.3.0', | |
| '@parcel/watcher': '2.4.1', | |
| // Utils | |
| nanoid: '3.3.8', | |
| 'use-subscription': '1.5.1', | |
| '@types/use-subscription': '1.0.0', | |
| // Auth | |
| '@auth0/auth0-react': '2.2.3', | |
| // Validation | |
| zod: '3.24.1', | |
| // Datadog | |
| '@datadog/browser-logs': '4.19.1', | |
| // Sentry | |
| '@sentry/react': '8.55.0', | |
| } as const; |
|
|
||
| import type { ReactRoute, ReactRouteLayout } from '@src/providers/routes.js'; | ||
|
|
||
| import { REACT_PACKAGES } from '@src/constants/react-packages.js'; |
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
LGTM! Verify react-router-dom package version.
The change correctly references the package version from the centralized constants.
Also applies to: 62-64
🏁 Script executed:
#!/bin/bash
# Verify that the react-router-dom package version is consistently referenced across the codebase
rg -g '!node_modules' -g '!dist' 'react-router-dom.*\d+\.\d+\.\d+'Length of output: 593
LGTM for the version integration!
The centralized constant for 'react-router-dom' is correctly set to version 6.22.3 and is consistently used across the repository (as verified in pnpm-lock.yaml, package.json, and related files).
- Please address the pending TODO comment in the file to ensure any follow-up work is completed.
- Also, confirm that the same considerations apply for the code at lines 62–64.
Summary by CodeRabbit