Skip to content

Conversation

@thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Aug 2, 2025

Related Issue

resolves #1379

Documentation

  1. document recommended minimum version of NodeJS - document latest NodeJS LTS / minimum version support (22.18.0) www.greenwoodjs.dev#226

Summary of Changes

  1. Update GitHub Actions, .nvmrc, engines, etc
  2. Removed strip types flag from init TS scaffolding starter
  3. Adopt amaro for internal type-stripping in Greenwood (instead of sucrase)

TODO

  1. 🚨 Need to wait for GitHub Actions to support latest version
  2. Greenwood <> Amaro (swap out sucrase)
  3. Check adapter <> Node versions compat
  4. WCC <> Amaro
    • I don't think, since we need Sucrase for JSX too
  5. review if case "CIRCULAR_DEPENDENCY": in Rollup is still needed
    • I think this is fine for now
  6. See if we can start using fs.cp + w / recursive flag - that was easy, we're already using it! 😅
  7. Update PR checks to capture latest workflows after merge

Nice to have / own issues

  1. See if we can start using fs.glob (still experimental) - refactor usages of glob-promise with native NodeJS fs.glob #1551
  2. Any chance URL Pattern is available in Node 22 now? (needed for SSR and API routes should support dynamic route naming (with prerendering) #882)
    • nope, not yet, only in >= 23.8.0
  3. Also, coming out of enhancement/issue 1324 prefix all node builtins imports with node: #1519, we could also consider enforcing our ESLint rule for node prefixes to match a NodeJS version.
    • I think it's fine, since we can only specify a single specific version and no ranges. But our test coverage should keep us honest here
  4. We can probably adopt parseArgs for the CLI and init packages now, so should make an issue - refactor CLI command runner to use native NodeJS parseArgs utility #1552
    • that said, it doesn't handle the "nice" things like a description, wonder if we could / should just roll that on our own?
  5. GitHub Actions still has a versioned ubuntu image - chore/bump linux actions to ubuntu-latest #1555

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) documentation Greenwood specific docs CLI breaking Init Types(cript) Requires type definition or TypeScript related work / documentation labels Aug 2, 2025
@thescientist13 thescientist13 self-assigned this Aug 2, 2025
@thescientist13 thescientist13 reopened this Aug 5, 2025
@thescientist13
Copy link
Member Author

Just checked and GitHub Actions are still on 22.17.x
https://github.com/ProjectEvergreen/greenwood/actions/runs/16737214358/job/47378407422
Screenshot 2025-08-04 at 8 20 33 PM

Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thescientist13
Copy link
Member Author

For an example of how to do the fs.glob conversion

// before
it("should contain one javascript file in the output directory", async function () {
  expect(await glob.promise(path.join(this.context.publicDir, "*.js"))).to.have.lengthOf(1);
});
// after
it("should contain one javascript file in the output directory", async function () {
  const files = await Array.fromAsync(fs.promises.glob(
    "*.js",
    { cwd: new URL(".", import.meta.url)},
  ));

  expect(files.length).to.equal(1);
});

@thescientist13 thescientist13 force-pushed the enhancement/issue-1379-stabilize-nodejs-version-22.18.0 branch from 835045d to 12d4c6a Compare August 21, 2025 02:05
@thescientist13 thescientist13 merged commit 195902e into master Aug 21, 2025
10 checks passed
@thescientist13 thescientist13 deleted the enhancement/issue-1379-stabilize-nodejs-version-22.18.0 branch August 21, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) Init Types(cript) Requires type definition or TypeScript related work / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stabilize to a single minimum NodeJS LTS version for engines

2 participants