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

Add node engines fields specifying a minimum of 18 #8457

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

hsubox76
Copy link
Contributor

Update all appropriate package.json files in the repo to reflect a minimum Node engines version of 18.

Exceptions:

  • Unpublished packages that only serve as entry points. e.g. auth/cordova, or firebase/compat/storage (the actual published package is @firebase/storage-compat).
  • Types packages - FYI these are leftover from compat - all modular code should be using types within their own package.
  • Auth demo apps - these are demo apps for auth testing and should be maintained by auth to the specification they want them at
  • Packages that shouldn't be used in Node at all (Analytics, Installations, Messaging, Performance, Remote Config, Webchannel-wrapper)
  • The template packages

Notes:

  • Internal packages like component, logger, and util should be platform agnostic, but this enables us to introduce any new APIs (e.g., new cryptography API) that old versions of Node don't support, if we need to in the future
  • 18 isn't necessarily the exact minimum for many of our internal tools, many of which can handle much older versions of Node, but our CI runs on 18 anyway.

See https://docs.google.com/spreadsheets/d/1TpQleZQiw1AW_E_CQE12mfW0cRNLvwIB03hDsfop7f8/edit?gid=0&resourcekey=0-k7oyij2BtGpazx4_2cexuA#gid=0 (internal link) for a breakdown of exactly which packages were included or excluded and some notes as to why.

Copy link

changeset-bot bot commented Aug 23, 2024

⚠️ No Changeset found

Latest commit: 40481b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 23, 2024

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 23, 2024

@@ -71,5 +71,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

The spreadsheet notes that analytics and some of the types packages aren't supported in node. I had assumed that we wouldn't see a node engines entry in those packages' package.json files..?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, looks like the script didn't work, I'll fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR and also made a gist of the array in my script telling the script which packages to add this to, to make it easier for you to audit than having to go through all the files in this PR https://gist.github.com/hsubox76/e58e8a45d1cb04af7ebb31ebff07365d Let me know if any of them look incorrect.

@hsubox76 hsubox76 marked this pull request as ready for review August 29, 2024 15:02
Copy link
Contributor

@wu-hui wu-hui left a comment

Choose a reason for hiding this comment

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

LGTM from firestore

Copy link
Member

@yuchenshi yuchenshi left a comment

Choose a reason for hiding this comment

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

Approval for auth

@hsubox76 hsubox76 merged commit c04d9ef into v11 Sep 3, 2024
39 of 40 checks passed
@hsubox76 hsubox76 deleted the ch-node-engines branch September 3, 2024 21:13
@firebase firebase locked and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants