-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Upgrade to Node22 #12488
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
Upgrade to Node22 #12488
Conversation
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.
PR Summary
Major upgrade to Node.js v22.12.0 across all packages to support ESM modules, particularly for BlocknoteJS compatibility, with changes to default serverless function runtime and dependency restructuring.
- Upgraded base Node.js version from 18.17.1 to 22.12.0 in all Dockerfiles, package.json files, and GitHub Actions
- Added new migration
1749205425841-UpdateServerlessFunctionDefaultRuntimeToNode22.ts
to set Node 22.x as default runtime - Removed version 0.43 database migrations as they're no longer needed
- Modified BlocknoteJS import in
record-input-transformer.service.ts
to use dynamic imports for ESM/CJS compatibility - Added new feature flag
IS_AI_ENABLED
in feature-flags.ts, leveraging Node 22's improved capabilities
27 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
PageDecorator, | ||
PageDecoratorArgs, | ||
} from '~/testing/decorators/PageDecorator'; |
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.
style: Indentation uses 4 spaces while rest of file uses 2 spaces
PageDecorator, | |
PageDecoratorArgs, | |
} from '~/testing/decorators/PageDecorator'; | |
PageDecorator, | |
PageDecoratorArgs, | |
} from '~/testing/decorators/PageDecorator'; |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:14639 This environment will automatically shut down when the PR is closed or after 5 hours. |
BlocknoteJS requires an ESM module where our server is CJS, this forced us to pin the server-util version, which led us to force the resolution of several packages, leading to bugs downstream. From Node 22.12 Node supports requiring ESM modules (available from Node 22.0 with a flag). So I upgrade the module. I picked Node 22 and not Node 23 or Node 24 because 22 is the LTS and we don't plan to change node versions frequently. If you remain on Node 18, things should still mostly work, except if you edit a Rich Text field. I also starting changing the default runtime for Serverless Functions which isn't directly related. This means new serverless functions will be created on Node 22, but we will still need another PR to migrate existing serverless functions before September (end of support by AWS). (In this PR I also remove the upgrade commands from 0.43 since they rely on Blocknote and I didn't want to have to deal with this) --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
BlocknoteJS requires an ESM module where our server is CJS, this forced us to pin the server-util version, which led us to force the resolution of several packages, leading to bugs downstream.
From Node 22.12 Node supports requiring ESM modules (available from Node 22.0 with a flag). So I upgrade the module.
I picked Node 22 and not Node 23 or Node 24 because 22 is the LTS and we don't plan to change node versions frequently.
If you remain on Node 18, things should still mostly work, except if you edit a Rich Text field.
I also starting changing the default runtime for Serverless Functions which isn't directly related. This means new serverless functions will be created on Node 22, but we will still need another PR to migrate existing serverless functions before September (end of support by AWS).
(In this PR I also remove the upgrade commands from 0.43 since they rely on Blocknote and I didn't want to have to deal with this)