Skip to content
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

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

Merged
merged 6 commits into from Nov 6, 2023
Merged

Conversation

dimkl
Copy link
Member

@dimkl dimkl commented Oct 11, 2023

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 owner October 11, 2023 14:59
@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2023

🦋 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
Name Type
@clerk/shared Major
gatsby-plugin-clerk Major
@clerk/chrome-extension Major
@clerk/clerk-js Major
@clerk/clerk-sdk-node Major
@clerk/backend Major
@clerk/fastify Major
@clerk/nextjs Major
@clerk/themes Major
@clerk/clerk-react Major
@clerk/remix Major
@clerk/types Major
@clerk/clerk-expo Major

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

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

@LekoArts LekoArts left a comment

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
Copy link
Member

nikosdouvlis commented Oct 12, 2023

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
Member Author

dimkl commented Oct 16, 2023

Blocked by #1837

@dimkl dimkl changed the title [WIP] chore(repo): Deprecate node@{14,15,16,17} versions chore(repo): Deprecate node@{14,15,16,17} versions Nov 2, 2023
@dimkl dimkl force-pushed the js-698-node-18 branch 6 times, most recently from 502b56d to 781bdcc Compare November 6, 2023 08:22
@@ -48,7 +48,7 @@ This package provides Clerk Backend API resources and low-level authentication u

## 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).
Copy link
Member

@LekoArts LekoArts Nov 6, 2023

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 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`.
Copy link
Member

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

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@types/node": "^18.18",
Copy link
Member

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
Copy link
Member Author

dimkl commented Nov 6, 2023

@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
Copy link
Member Author

dimkl commented Nov 6, 2023

@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 97407d8 Nov 6, 2023
7 checks passed
@dimkl dimkl deleted the js-698-node-18 branch November 6, 2023 12:40
Sign up for free to 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.

None yet

4 participants