-
Notifications
You must be signed in to change notification settings - Fork 1
Load dynamically latest node-version #926
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: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c80b0a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
pnpm installs the dependencies into the node_modules folder, which is now ignored
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (51.84%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #926 +/- ##
===========================================
- Coverage 67.85% 51.84% -16.01%
===========================================
Files 31 38 +7
Lines 840 1163 +323
Branches 146 160 +14
===========================================
+ Hits 570 603 +33
- Misses 258 546 +288
- Partials 12 14 +2
🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This pull request enhances the monorepo generator by implementing automatic Node.js version fetching and improving Node.js project support. The generator now dynamically retrieves the latest Node.js version from GitHub releases and includes comprehensive Node.js patterns in the .gitignore template.
Key changes:
- Dynamic Node.js version fetching via GitHub API integration
- Enhanced .gitignore template with Node.js and pnpm-specific patterns
- Code refactoring to extract shared semver functionality
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/monorepo-generator/templates/monorepo/.node-version.hbs | New template file for dynamic Node.js version generation |
packages/monorepo-generator/templates/monorepo/.gitignore | Updated with comprehensive Node.js ignore patterns |
packages/monorepo-generator/src/index.ts | Added Node.js version fetching action to generator pipeline |
packages/monorepo-generator/src/actions/terraform.ts | Refactored to use extracted semver utility function |
packages/monorepo-generator/src/actions/semver.ts | New utility module for shared semver fetching logic |
packages/monorepo-generator/src/actions/node.ts | New action for fetching latest Node.js version |
packages/monorepo-generator/README.md | Updated documentation with nodeVersion variable |
.changeset/hot-ravens-taste.md | Changeset for .gitignore updates |
.changeset/hip-mammals-build.md | Changeset for .node-version generation |
.map(semverFormatFn); | ||
|
||
if (version.isErr()) { | ||
console.warn(`Could not fetch latest version`); |
Copilot
AI
Sep 25, 2025
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.
Direct console usage bypasses proper logging infrastructure. Consider using a structured logger or the plop logging mechanism to maintain consistency with the rest of the codebase.
Copilot uses AI. Check for mistakes.
@kin0992 I know that this PR is draft, but I think there is a better way to achieve this goal by switching to nvm supports "lts" specifications to allow selecting the latest release of a lts by writing in the Example latest 20.x? https://github.com/nodejs/Release?tab=readme-ov-file#release-schedule We don't use non-LTS releases, so there will be no use cases where we wan't to get the latest version available |
@lucacavallaro nice point! It looks to me we have to make some decisions:
what do you think? |
This pull request enhances the monorepo generator by automatically fetching and using the latest Node.js version, and by updating the
.gitignore
template to better support Node.js and pnpm workflows. The changes improve the generator's automation and ensure that new monorepos are set up with modern Node practices.Closes CES-1300