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

Upgrade glob@7 to glob@10 to resolve deprecation warnings #1442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robhogan
Copy link
Contributor

Summary:
This is a long overdue follow-up from facebook/react-native#46724, and upgrades the deprecated glob@7 to glob@10.

When creating any React Native project today, you are greeted by a wall of deprecation warnings when installing with npm -- with the most frequent offender being [email protected]. This hurts UX and diminishes developers' trust, even before starting their project.

image

Unfortunately, no flow types are available for glob@9+. I've tried creating a flow definition, but it turns out that the glob@10 types use path-scurry@^1.11.1, minimatch@^9.0.4, and minipass@^7.1.2 -- all without flow type definitions. Writing the flow definitions for glob@9+ is non-trivial work, I'd be happy to help but I can't fix that on my own.

Important

glob@11 has already been released, but it's only supporting Node 20+. I believe React Native still supports Node 18 until the EOL in April 2025, that's why I used glob@10.

Changelog:

[GENERAL] [CHANGED] - Upgrade from deprecated glob@7 to supported glob@10

Summary:
This is a long overdue follow-up from facebook/react-native#46724, and upgrades the deprecated `glob@7` to `glob@10`.

When creating any React Native project today, you are greeted by a wall of deprecation warnings when installing with `npm` -- with the most frequent offender being `[email protected]`. This hurts UX and diminishes developers' trust, even before starting their project.

<img width="1005" alt="image" src="https://github.com/user-attachments/assets/a5661470-98df-4f3f-8be2-7b0baa9711b6" />

Unfortunately, no [flow types are available for `glob@9+`](https://github.com/flow-typed/flow-typed/tree/main/definitions/npm). I've tried creating a flow definition, but it turns out that the `glob@10` types use `path-scurry@^1.11.1`, `minimatch@^9.0.4`, and `minipass@^7.1.2` -- all without flow type definitions. Writing the flow definitions for glob@9+ is non-trivial work, I'd be happy to help but I can't fix that on my own.

> [!IMPORTANT]
> `glob@11` has already been released, but it's only supporting Node 20+. I believe React Native still supports Node 18 until the EOL in April 2025, that's why I used `glob@10`.

## Changelog:

[GENERAL] [CHANGED] - Upgrade from deprecated `glob@7` to supported `glob@10`

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [CHANGED] - Upgrade from deprecated `glob@7` to supported `glob@10`

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

X-link: facebook/react-native#48875

Reviewed By: robhogan, cortinico

Differential Revision: D69594539

Pulled By: huntie
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants