You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our organization's Black Duck has started flagging alasql for its dependency on glob v7, which is severely outdated, with the most recent major being v13.
I see there's an open PR to update to the most recent version, is there a chance to get that in? #2439
Thank you very much in advance and keep up the good work!
Edit: I just took a look at your package.json and you actually have an override for glob@13 in there. However, in my project, alasql pulls in glob@7:
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
I'll do some further digging to find out where that dependency comes from and report back.
Update: It's not a misconfiguration in our project, even when starting from scratch with:
npm init
npm i alasql
I end up with glob 7.2.3. Here's the output of npm why glob:
glob@7.2.3 optional peer
node_modules/glob
glob@"^7.1.1" from @react-native/codegen@0.82.1
node_modules/@react-native/codegen
@react-native/codegen@"0.82.1" from react-native@0.82.1
node_modules/react-native
peer react-native@"*" from @react-native/virtualized-lists@0.82.1
node_modules/@react-native/virtualized-lists
@react-native/virtualized-lists@"0.82.1" from react-native@0.82.1
peer react-native@"*" from react-native-fs@2.20.0
node_modules/react-native-fs
optional react-native-fs@"^2.20.0" from alasql@4.17.0
node_modules/alasql
alasql@"^4.17.0" from the root project
glob@"^7.1.1" from react-native@0.82.1
node_modules/react-native
peer react-native@"*" from @react-native/virtualized-lists@0.82.1
node_modules/@react-native/virtualized-lists
@react-native/virtualized-lists@"0.82.1" from react-native@0.82.1
peer react-native@"*" from react-native-fs@2.20.0
node_modules/react-native-fs
optional react-native-fs@"^2.20.0" from alasql@4.17.0
node_modules/alasql
alasql@"^4.17.0" from the root project
glob@"^7.1.3" from rimraf@3.0.2
node_modules/rimraf
rimraf@"^3.0.2" from chromium-edge-launcher@0.2.0
node_modules/chromium-edge-launcher
chromium-edge-launcher@"^0.2.0" from @react-native/dev-middleware@0.82.1
node_modules/@react-native/dev-middleware
@react-native/dev-middleware@"0.82.1" from @react-native/community-cli-plugin@0.82.1
node_modules/@react-native/community-cli-plugin
@react-native/community-cli-plugin@"0.82.1" from react-native@0.82.1
node_modules/react-native
peer react-native@"*" from @react-native/virtualized-lists@0.82.1
node_modules/@react-native/virtualized-lists
@react-native/virtualized-lists@"0.82.1" from react-native@0.82.1
peer react-native@"*" from react-native-fs@2.20.0
node_modules/react-native-fs
optional react-native-fs@"^2.20.0" from alasql@4.17.0
node_modules/alasql
alasql@"^4.17.0" from the root project
glob@"^7.1.4" from test-exclude@6.0.0
node_modules/test-exclude
test-exclude@"^6.0.0" from babel-plugin-istanbul@6.1.1
node_modules/babel-plugin-istanbul
babel-plugin-istanbul@"^6.1.1" from @jest/transform@29.7.0
node_modules/@jest/transform
@jest/transform@"^29.7.0" from babel-jest@29.7.0
node_modules/babel-jest
babel-jest@"^29.7.0" from react-native@0.82.1
node_modules/react-native
peer react-native@"*" from @react-native/virtualized-lists@0.82.1
node_modules/@react-native/virtualized-lists
@react-native/virtualized-lists@"0.82.1" from react-native@0.82.1
peer react-native@"*" from react-native-fs@2.20.0
node_modules/react-native-fs
optional react-native-fs@"^2.20.0" from alasql@4.17.0
node_modules/alasql
alasql@"^4.17.0" from the root project
babel-plugin-istanbul@"^6.1.1" from babel-jest@29.7.0
node_modules/babel-jest
babel-jest@"^29.7.0" from react-native@0.82.1
node_modules/react-native
peer react-native@"*" from @react-native/virtualized-lists@0.82.1
node_modules/@react-native/virtualized-lists
@react-native/virtualized-lists@"0.82.1" from react-native@0.82.1
peer react-native@"*" from react-native-fs@2.20.0
node_modules/react-native-fs
optional react-native-fs@"^2.20.0" from alasql@4.17.0
node_modules/alasql
alasql@"^4.17.0" from the root project
It looks like it's react-native-fs that's pulling in that dependency. The last release was 4 years ago, I have found this post by someone maintaining a fork. @mathiasrw, would it be worth it to look into migrating?
Since react-native-fs is declared as optional, a fix for this problem could also be to declare it under peerDependenciesMeta instead of optionalDependencies.
This would be a breaking change, as the package would no longer be automatically installed, but it would be easily fixable and would not require looking into a replacement package.
Without knowing anything about the reasoning behind the inclusion of react-native-fs, my understanding after having a look at the code is that what we want to do:
If react-native-fs is available in target env, use it. If it isn't, do nothing.
This, however, means that the dependency really should be declared as a peer, as we don't want to add any runtime dependencies. Is this understanding correct?
yes, this understanding is correct. The decision is from a different time - a echo of a different programming era. We are moving it to peer dependency for sure next time we bump the major version.
Activity
ej612 commentedon Mar 17, 2026
Update: It's not a misconfiguration in our project, even when starting from scratch with:
I end up with glob 7.2.3. Here's the output of
npm why glob:ej612 commentedon Mar 18, 2026
It looks like it's
react-native-fsthat's pulling in that dependency. The last release was 4 years ago, I have found this post by someone maintaining a fork. @mathiasrw, would it be worth it to look into migrating?ej612 commentedon Mar 24, 2026
Since
react-native-fsis declared as optional, a fix for this problem could also be to declare it underpeerDependenciesMetainstead ofoptionalDependencies.This would be a breaking change, as the package would no longer be automatically installed, but it would be easily fixable and would not require looking into a replacement package.
Without knowing anything about the reasoning behind the inclusion of
react-native-fs, my understanding after having a look at the code is that what we want to do:This, however, means that the dependency really should be declared as a peer, as we don't want to add any runtime dependencies. Is this understanding correct?
Make `react-native-fs` an optional peer dependency
mathiasrw commentedon Apr 1, 2026
yes, this understanding is correct. The decision is from a different time - a echo of a different programming era. We are moving it to peer dependency for sure next time we bump the major version.
For now I will bump the glob dep.
mathiasrw commentedon Apr 1, 2026
Fix released as part of v4.17.1
ej612 commentedon Apr 1, 2026
Hi there, thank you! I tested
4.17.1and the problem persists, which makes sense. Can we keep this issue open until the next major?