-
Notifications
You must be signed in to change notification settings - Fork 14
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
[BUG] bd.includes is not a function #98
Comments
The package.json that this module gets has been passed through a normalize function. It is not intended to get the un-normalized package.json. This is why it is making the assumption that if Do you have steps to reproduce that aren't manually changing a test file? |
We get the issue when retrieve packages from |
We are using node |
It still fails in metavuln-calculator/lib/index.js Line 55 in fd9e345
It seems npm registry will convert |
If the cloudsmith registry is returning the |
The request to cloudsmith is in this module: metavuln-calculator/lib/index.js Line 109 in fd9e345
The response with metavuln-calculator/lib/index.js Line 121 in fd9e345
Should I raise the issue in https://github.com/npm/cli? |
Ah, good find. It's this module that's fetching the packument. This module needs to normalize it with |
Is there an existing issue for this?
Current Behavior
We get the the error
bd.includes is not a function
when runnpm audit
, in this line:metavuln-calculator/lib/advisory.js
Line 266 in fd9e345
There are some codes in github that the
bundleDependencies
is not an array:https://github.com/search?q=%22%5C%22bundleDependencies%5C%22%3A+true%22+path%3A**%2Fpackage.json&type=code
As described in npm Docs: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bundledependencies
Alternatively, "bundleDependencies" can be defined as a boolean value. A value of true will bundle all dependencies, a value of false will bundle none.
Expected Behavior
No errors when running
npm audit
ifbundleDependencies
in some dependecies is not an array. We need checkbundleDependencies
is an array before call includes.Steps To Reproduce
in
metavuln-calculator/test/advisory.js
Line 183 in fd9e345
change from
bundleDependencies: ['minimist'],
tobundleDependencies: true,
then
npm run test
Environment
The text was updated successfully, but these errors were encountered: