Skip to content

chore(repo): Deprecate node@{14,15,16,17} versions - #1864

Merged
dimkl merged 6 commits into
mainfrom
js-698-node-18
Nov 6, 2023
Merged

chore(repo): Deprecate node@{14,15,16,17} versions#1864
dimkl merged 6 commits into
mainfrom
js-698-node-18

Conversation

@dimkl

@dimkldimkl commented Oct 11, 2023

Copy link
Copy Markdown
Contributor

Description

Some information about changes for all those node versions

Node 15 : https://platform.sh/blog/nodejs-15-could-make-your-app-leaner-and-meaner/- Logical assignment operators
- String.prototype.replaceAll
- Promise.any
- AggregateError
- AbortController
- timers/promises
- npm 7
- Workspaces
- New package-lock.json format
Node 16 : https://medium.com/the-node-js-collection/node-js-16-available-now-7f5099a97e70- Stable Timers Promises API
- Experimental implementation of the standard Web Crypto API
- npm 7 (v7.10.0 in Node.js v16.0.0)
- Node-API version 8
- Stable AbortController implementation based on the AbortController Web API
- Stable Source Maps v3
- Web platform atob (buffer.atob(data)) and btoa (buffer.btoa(data)) implementations for compatibility with legacy web platform APIs
Node 17 : https://blog.appsignal.com/2021/10/27/what-s-new-in-nodejs-17.html- New Promise-based APIs (dns, fs, stream, and timers)
- Stack Traces Now Include the Version of Node.js
- OpenSSL 3.0 Support
- V8 Upgraded to v9.5 : https://v8.dev/blog/v8-release-95- Intl.DisplayNames
- WebAssembly Exception Handling
Node 18 : https://nodejs.org/en/blog/announcements/v18-release-announce- V8 Upgraded to 10.1
- Array: findLast and findLastIndex
- Built-in Test Runner
- New Browser-compatible APIs
- fetch
- Streams
- Blob - https://nodejs.org/api/buffer.html#class-blob- BroadcastChannel - https://nodejs.org/api/worker_threads.html#class-broadcastchannel-extends-eventtarget

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@dimkl
dimkl requested a review from a team as a code ownerOctober 11, 2023 14:59
@changeset-bot

changeset-botBot commented Oct 11, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8553f03

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@clerk/sharedMajor
gatsby-plugin-clerkMajor
@clerk/chrome-extensionMajor
@clerk/clerk-jsMajor
@clerk/clerk-sdk-nodeMajor
@clerk/backendMajor
@clerk/fastifyMajor
@clerk/nextjsMajor
@clerk/themesMajor
@clerk/clerk-reactMajor
@clerk/remixMajor
@clerk/typesMajor
@clerk/clerk-expoMajor

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

@dimkldimkl changed the title chore(repo): Deprecate node@{14,15,16,17 versionschore(repo): Deprecate node@{14,15,16,17} versionsOct 11, 2023
@dimkldimkl self-assigned this Oct 11, 2023
@dimkldimkl changed the title chore(repo): Deprecate node@{14,15,16,17} versions[WIP] chore(repo): Deprecate node@{14,15,16,17} versionsOct 11, 2023
@LekoArts
LekoArts marked this pull request as draft October 12, 2023 07:29

@LekoArtsLekoArts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be good to add the engines field to all packages, e.g. shared is missing that information

For our reasoning why we chose Node 18 we should use https://github.com/nodejs/release#release-schedule for our changelog. We'll just follow the LTS plan

@nikosdouvlis

nikosdouvlis commented Oct 12, 2023

Copy link
Copy Markdown
Member

It would be good to add the engines field to all packages, e.g. shared is missing that information

For our reasoning why we chose Node 18 we should use https://github.com/nodejs/release#release-schedule for our changelog. We'll just follow the LTS plan

The reason we chose Node 18 for the v5 release is outlined here: https://nodejs.org/en/blog/announcements/nodejs16-eol

@dimkl

Copy link
Copy Markdown
ContributorAuthor

Blocked by #1837

@dimkldimkl changed the title [WIP] chore(repo): Deprecate node@{14,15,16,17} versionschore(repo): Deprecate node@{14,15,16,17} versionsNov 2, 2023
@dimkl
dimklforce-pushed the js-698-node-18 branch 6 times, most recently from 502b56d to 781bdccCompareNovember 6, 2023 08:22
Comment threadpackages/backend/README.md Outdated
## How to use

Works on Node >= 16 or on any V8 Isolates runtimes such as Cloudflare Workers.
Works on Node.js `^18.18` (or later) or on any V8 Isolates runtimes (eg Cloudflare Workers).

@LekoArtsLekoArtsNov 6, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the README you write ^18.18 but in the engines field we have >=18.

Currently that would mean we allow ^18.0.0. So if you want to have ^18.18.0 you'll need to adjust the engines field everywhere.

Comment thread.changeset/purple-pumas-study.md Outdated
Comment on lines +17 to +18
Upgrade all packages to node@v18 version, moved some deps to dev dependencies
and introduced `isomorphicBtoa` helper in `@clerk/shared`. No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Upgrade all packages to node@v18 version, moved some deps to dev dependencies
and introduced `isomorphicBtoa` helper in `@clerk/shared`.
Dropping support for Node 14 and 16 as they both reached EOL status. The minimal Node.js version required by Clerk is `18.18.0` now.

For the new helper in @clerk/shared you can add a new changeset with a minor

"web-vitals": "^2.1.4"
},
"devDependencies": {
"@types/node": "^18.18",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: You write 18.18 everywhere but it would be better to also have the patch version everywhere. So if you mean 18.18.0 then use that

@dimkl

dimkl commented Nov 6, 2023

Copy link
Copy Markdown
ContributorAuthor

@LekoArts : I will update the @types/node, engines and the README to ^18.18.0 everywhere since the v18 has entered maintenance mode and there probably won't ever be a v18.19.

@dimkl
dimkl requested a review from LekoArtsNovember 6, 2023 09:21
@dimkl
dimklforce-pushed the js-698-node-18 branch 2 times, most recently from 7361d84 to 03d3eceCompareNovember 6, 2023 09:44
@dimkl
dimkl enabled auto-merge November 6, 2023 09:55
@dimkl

dimkl commented Nov 6, 2023

Copy link
Copy Markdown
ContributorAuthor

@LekoArts changes applied, ptal.

@dimkl
dimkl added this pull request to the merge queue Nov 6, 2023
Merged via the queue into main with commit 97407d8Nov 6, 2023
@dimkl
dimkl deleted the js-698-node-18 branch November 6, 2023 12:40
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dimkl@nikosdouvlis@LekoArts@clerk-cookie