-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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 to v7.1.1 #11893
Upgrade glob to v7.1.1 #11893
Conversation
There are three breaking changes: - 6.0 - Remove comment and negation pattern support - Ignore patterns are always in dot:true mode - 7.0 - Raise error if options.cwd is specified, and not a directory I ran `npm run test`, and all tests passed locally. I also quickly grepped the codebase, to see if it used any of those breaking changes. There are three places that specify `cwd`: 1. `local-cli/core/android/findPackageClassName.js:22` - `const files = glob.sync('**/*.java', { cwd: folder });` 2. `local-cli/core/windows/findNamespace.js:22` - `const files = glob.sync('**/*.cs', { cwd: folder });` 3. `local-cli/core/windows/findPackageClassName.js:22` - `const files = glob.sync('**/*.cs', { cwd: folder });` Nothing appeared to use negation or comment patterns in a glob, from my limited explorations, and there did not seem to be anything that set the `dot` argument. ## Motivation $ npm ls glob ├─┬ eslint@3.13.1 │ └── glob@7.1.1 ├─┬ jest@18.1.0 │ └─┬ jest-cli@18.1.0 │ └─┬ istanbul-api@1.1.0 │ ├─┬ fileset@2.0.3 │ │ └── glob@7.1.1 │ ├─┬ istanbul-lib-report@1.0.0-alpha.3 │ │ └─┬ rimraf@2.5.4 │ │ └── glob@7.1.1 │ └─┬ istanbul-lib-source-maps@1.1.0 │ └─┬ rimraf@2.5.4 │ └── glob@7.1.1 └─┬ react-native@0.39.2 ├── glob@5.0.15 └─┬ rimraf@2.5.4 └── glob@7.1.1 Of the three dependencies I have that rely on `glob`, react-native is the only one not on 7.x. If react-native upgrades, then npm can deduplicate the glob dependency.
By analyzing the blame information on this pull request, we identified @davidaurelio and @jeanlauliac to be potential reviewers. |
As far as I can tell, Circle failed because of an unrelated error. I can't restart the job to test that theory, however. |
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
Summary: > Explain the **motivation** for making this change. What existing problem does the pull request solve? Of the three dependencies I have that rely on `glob`, react-native is the only one not on 7.x. If react-native can upgrade, then npm can deduplicate the glob dependency. ```console $ npm ls glob ├─┬ eslint@3.13.1 │ └── glob@7.1.1 ├─┬ jest@18.1.0 │ └─┬ jest-cli@18.1.0 │ └─┬ istanbul-api@1.1.0 │ ├─┬ fileset@2.0.3 │ │ └── glob@7.1.1 │ ├─┬ istanbul-lib-report@1.0.0-alpha.3 │ │ └─┬ rimraf@2.5.4 │ │ └── glob@7.1.1 │ └─┬ istanbul-lib-source-maps@1.1.0 │ └─┬ rimraf@2.5.4 │ └── glob@7.1.1 └─┬ react-native@0.39.2 ├── glob@5.0.15 └─┬ rimraf@2.5.4 └── glob@7.1.1 ``` **Test plan (required)** > Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull req Closes facebook#11893 Differential Revision: D4796721 Pulled By: javache fbshipit-source-id: 6e7424dd731329f982c2f6c05b40dec8febf2e57
Of the three dependencies I have that rely on
glob
, react-native is the only one not on 7.x. If react-native can upgrade, then npm can deduplicate the glob dependency.Test plan (required)
There are three breaking changes since v5.0.15, as taken from node-glob/changelod.md:
I ran
npm run test
, and all tests passed locally. I also quickly grepped the codebase, to see if it used any of those breaking changes.There are three places that specify
cwd
:local-cli/core/android/findPackageClassName.js:22
const files = glob.sync('**/*.java', { cwd: folder });
local-cli/core/windows/findNamespace.js:22
const files = glob.sync('**/*.cs', { cwd: folder });
local-cli/core/windows/findPackageClassName.js:22
const files = glob.sync('**/*.cs', { cwd: folder });
If
folder
doesn't exist on disk, I suppose that glob@7 will throw an error, and the react-native cli would need to catch it in order to gracefully exit?Nothing appeared to use negation or comment patterns in a glob, from my limited explorations, and there did not seem to be anything that set the
dot
argument, so I believe that upgradingglob
should be an easy change. Hopefully.Let me know if I missed anything or if there's another reason that react-native is pinned to glob@5! I'm happy to do more work to let you all merge this, if you need me to.
Have a great week!