Skip to content

Commit 9e92537

Browse files
committed
Remove erroneous --dep bundle option (#1256).
1 parent 8f71eb4 commit 9e92537

File tree

9 files changed

+13
-22
lines changed

9 files changed

+13
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ If you have a use case where this change is not what is desired, please [report
5959
### Breaking
6060

6161
- node >= 12 is required. Time to upgrade that old-ass server you never touch.
62-
- `peerDependencies` are now excluded by default. Peer dependencies should use the **lowest** possible version that works. The old behavior encouraged a bad practice of uprading peer dependencies. You can use `--dep prod,dev,bundle,optional,peer` for the old behavior ([#951](https://github.com/raineorshine/npm-check-updates/issues/951)).
62+
- `peerDependencies` are now excluded by default. Peer dependencies should use the **lowest** possible version that works. The old behavior encouraged a bad practice of uprading peer dependencies. You can use `--dep prod,dev,optional,peer` for the old behavior ([#951](https://github.com/raineorshine/npm-check-updates/issues/951)).
6363
- Dependencies with `>` will be converted to `>=`. The old behavior was causing upgrades to `> [latest]` which was impossible ([#957](https://github.com/raineorshine/npm-check-updates/issues/957)).
6464

6565
## Other

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ ncu "/^(?!react-).*$/" # windows
150150
--deep Run recursively in current working directory.
151151
Alias of (--packageFile '**/package.json').
152152
--dep <value> Check one or more sections of dependencies only:
153-
dev, optional, peer, prod, bundle, packageManager
153+
dev, optional, peer, prod, or packageManager
154154
(comma-delimited). (default:
155-
["prod","dev","bundle","optional"])
155+
["prod","dev","optional"])
156156
--deprecated Include deprecated packages.
157157
-d, --doctor Iteratively installs upgrades and runs tests to
158158
identify breaking upgrades. Requires "-u" to

src/cli-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ const cliOptions: CLIOption[] = [
375375
long: 'dep',
376376
arg: 'value',
377377
description:
378-
'Check one or more sections of dependencies only: dev, optional, peer, prod, bundle, packageManager (comma-delimited).',
379-
default: ['prod', 'dev', 'bundle', 'optional'],
378+
'Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited).',
379+
default: ['prod', 'dev', 'optional'],
380380
parse: value => (value && typeof value === 'string' ? value.split(',') : value),
381381
type: 'string | string[]',
382382
},

src/lib/doctor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ const doctor = async (run: Run, options: Options): Promise<void> => {
8888
...pkg.dependencies,
8989
...pkg.devDependencies,
9090
...pkg.optionalDependencies,
91-
...pkg.bundleDependencies,
9291
}
9392

9493
/** Install dependencies using "npm run install" or a custom script given by --doctorInstall. */

src/lib/getCurrentDependencies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const parsePackageManager = (pkgData: PackageFile) => {
2424
/**
2525
* Get the current dependencies from the package file.
2626
*
27-
* @param [pkgData={}] Object with dependencies, devDependencies, peerDependencies, optionalDependencies, and/or bundleDependencies properties
27+
* @param [pkgData={}] Object with dependencies, devDependencies, peerDependencies, and/or optionalDependencies properties.
2828
* @param [options={}]
2929
* @param options.dep
3030
* @param options.filter
@@ -36,7 +36,7 @@ function getCurrentDependencies(pkgData: PackageFile = {}, options: Options = {}
3636
? typeof options.dep === 'string'
3737
? options.dep.split(',')
3838
: options.dep
39-
: ['prod', 'dev', 'bundle', 'optional']
39+
: ['prod', 'dev', 'optional']
4040

4141
// map the dependency section option to a full dependency section name
4242
const depSections = depOptions.map(

src/lib/upgradePackageData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function upgradePackageData(
2929
? typeof options.dep === 'string'
3030
? options.dep.split(',')
3131
: options.dep
32-
: ['prod', 'dev', 'bundle', 'optional']
32+
: ['prod', 'dev', 'optional']
3333

3434
// map the dependency section option to a full dependency section name
3535
const depSections = depOptions.map(

src/types/PackageFile.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { VersionSpec } from './VersionSpec'
44

55
/** The relevant bits of a parsed package.json file. */
66
export interface PackageFile {
7-
bundleDependencies?: Index<VersionSpec>
87
dependencies?: Index<VersionSpec>
98
devDependencies?: Index<VersionSpec>
109
engines?: Index<VersionSpec>

src/types/RunOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface RunOptions {
3636
/** Run recursively in current working directory. Alias of (--packageFile '**\/package.json'). */
3737
deep?: boolean
3838

39-
/** Check one or more sections of dependencies only: dev, optional, peer, prod, bundle, packageManager (comma-delimited). (default: ["prod","dev","bundle","optional"]) */
39+
/** Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited). (default: ["prod","dev","optional"]) */
4040
dep?: string | string[]
4141

4242
/** Include deprecated packages. */

test/getCurrentDependencies.test.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe('getCurrentDependencies', () => {
1010
beforeEach(() => {
1111
deps = {
1212
dependencies: {
13+
bluebird: '^1.0.0',
1314
mocha: '1.2',
1415
},
1516
devDependencies: {
@@ -22,9 +23,6 @@ describe('getCurrentDependencies', () => {
2223
optionalDependencies: {
2324
chalk: '^1.1.0',
2425
},
25-
bundleDependencies: {
26-
bluebird: '^1.0.0',
27-
},
2826
}
2927
})
3028

@@ -34,19 +32,20 @@ describe('getCurrentDependencies', () => {
3432
getCurrentDependencies({}, {}).should.eql({})
3533
})
3634

37-
it('get dependencies, devDependencies, and bundleDependencies, and optionalDependencies by default', () => {
35+
it('get dependencies, devDependencies, and optionalDependencies by default', () => {
3836
getCurrentDependencies(deps).should.eql({
37+
bluebird: '^1.0.0',
3938
mocha: '1.2',
4039
lodash: '^3.9.3',
4140
chalk: '^1.1.0',
42-
bluebird: '^1.0.0',
4341
moment: '^1.0.0',
4442
})
4543
})
4644

4745
describe('dep', () => {
4846
it('only get dependencies with --dep prod', () => {
4947
getCurrentDependencies(deps, { dep: 'prod' }).should.eql({
48+
bluebird: '^1.0.0',
5049
mocha: '1.2',
5150
})
5251
})
@@ -70,12 +69,6 @@ describe('getCurrentDependencies', () => {
7069
})
7170
})
7271

73-
it('only get bundleDependencies with --dep bundle', () => {
74-
getCurrentDependencies(deps, { dep: 'bundle' }).should.eql({
75-
bluebird: '^1.0.0',
76-
})
77-
})
78-
7972
it('only get devDependencies and peerDependencies with --dep dev,peer', () => {
8073
getCurrentDependencies(deps, { dep: 'dev,peer' }).should.eql({
8174
lodash: '^3.9.3',

0 commit comments

Comments
 (0)