Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const buildOmitList = obj => {
const only = obj.only
if (/^prod(uction)?$/.test(only) || obj.production)
omit.push('dev')
else if (obj.production === false)
include.push('dev')

if (/^dev/.test(obj.also))
include.push('dev')
Expand Down Expand Up @@ -1396,8 +1398,8 @@ define('preid', {
})

define('production', {
default: false,
type: Boolean,
default: null,
type: [null, Boolean],
deprecated: 'Use `--omit=dev` instead.',
description: 'Alias for `--omit=dev`',
flatten (key, obj, flatOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,8 @@ Alias for --include=optional or --omit=optional

#### \`production\`

* Default: false
* Type: Boolean
* Default: null
* Type: null or Boolean
* DEPRECATED: Use \`--omit=dev\` instead.

Alias for \`--omit=dev\`
Expand Down
4 changes: 2 additions & 2 deletions test/lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ t.test('flatteners that populate flat.omit array', t => {
definitions.production.flatten('production', obj, flat)
t.strictSame(obj, {
production: false,
include: [],
include: ['dev'],
omit: [],
}, '--no-production has no effect')
}, '--no-production explicitly includes dev')
t.strictSame(flat, { omit: [] }, '--no-production has no effect')

obj.production = true
Expand Down