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 support for bundledDependencies #1438

Open
wants to merge 9 commits into
base: master
from

Conversation

@schmidsi
Copy link

commented Aug 3, 2019

Fixes #1436

@coveralls

This comment has been minimized.

Copy link

commented Aug 3, 2019

Coverage Status

Coverage increased (+2.3%) to 97.898% when pulling 9f4f33a on schmidsi:enhancement-bundledDependencies into 92b7533 on benmosher:master.

Show resolved Hide resolved tests/src/rules/no-unresolved.js Outdated

@schmidsi schmidsi force-pushed the schmidsi:enhancement-bundledDependencies branch from 28a9547 to 352a424 Aug 4, 2019

@schmidsi schmidsi marked this pull request as ready for review Aug 4, 2019

@schmidsi

This comment has been minimized.

Copy link
Author

commented Aug 4, 2019

Fixes my original issue (prisma/prisma2#314) through npm link. Should work now. Thanks for the help.

@ljharb ljharb changed the title WIP: Add support for bundledDependencies Add support for bundledDependencies Aug 5, 2019

Show resolved Hide resolved docs/rules/no-extraneous-dependencies.md Outdated
Show resolved Hide resolved src/rules/no-extraneous-dependencies.js Outdated

@ljharb ljharb added the semver-minor label Aug 5, 2019

schmidsi and others added some commits Aug 4, 2019

Implement support for bundledDependencies.
- Make tests pass.
- Fixes #1436.
Add Oxford comma for dependency-types
Co-Authored-By: Jordan Harband <ljharb@gmail.com>

@schmidsi schmidsi force-pushed the schmidsi:enhancement-bundledDependencies branch from 4868b89 to f9d47eb Aug 8, 2019

@schmidsi

This comment has been minimized.

Copy link
Author

commented Aug 14, 2019

It's ready to merge in my opinion. Any more comments?

@@ -17,6 +17,7 @@ function extractDepFields(pkg) {
devDependencies: pkg.devDependencies || {},
optionalDependencies: pkg.optionalDependencies || {},
peerDependencies: pkg.peerDependencies || {},
bundledDependencies: pkg.bundleDependencies || pkg.bundledDependencies || [],

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 17, 2019

Collaborator

this still isn't ensuring it's an array?

@@ -121,11 +124,16 @@ function reportIfMissing(context, deps, depsOptions, node, name) {
const isInDevDeps = deps.devDependencies[packageName] !== undefined
const isInOptDeps = deps.optionalDependencies[packageName] !== undefined
const isInPeerDeps = deps.peerDependencies[packageName] !== undefined
// BundledDeps should be in the form of an array, but object notation is also supported by `npm`
const isInBundledDeps =
deps.bundledDependencies.indexOf(packageName) !== -1 ||

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 17, 2019

Collaborator

objects don't have an indexOf method, so this will crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.