Skip to content

Commit 1aef726

Browse files
authored
chore!: bump joi to v17 (#5973)
1 parent 158c0bf commit 1aef726

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

lib/options.js

+17-10
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,39 @@ const schema = createSchema(joi => joi.object({
99
runtimeCompiler: joi.boolean(),
1010
transpileDependencies: joi.array(),
1111
productionSourceMap: joi.boolean(),
12-
parallel: joi.alternatives().try([
12+
parallel: joi.alternatives().try(
1313
joi.boolean(),
1414
joi.number().integer()
15-
]),
15+
),
1616
devServer: joi.object(),
1717
pages: joi.object().pattern(
1818
/\w+/,
19-
joi.alternatives().try([
19+
joi.alternatives().try(
2020
joi.string().required(),
2121
joi.array().items(joi.string().required()),
2222

2323
joi.object().keys({
24-
entry: joi.alternatives().try([
24+
entry: joi.alternatives().try(
2525
joi.string().required(),
2626
joi.array().items(joi.string().required())
27-
]).required()
27+
).required()
2828
}).unknown(true)
29-
])
29+
)
3030
),
31-
crossorigin: joi.string().valid(['', 'anonymous', 'use-credentials']),
31+
crossorigin: joi.string().valid('', 'anonymous', 'use-credentials'),
3232
integrity: joi.boolean(),
3333

3434
// css
3535
css: joi.object({
36-
// TODO: deprecate this after joi 16 release
37-
modules: joi.boolean(),
36+
modules:
37+
joi.boolean()
38+
.warning('deprecate.error', {
39+
message: 'Please use `css.requireModuleExtension` instead.'
40+
})
41+
.message({
42+
'deprecate.error':
43+
'The {#label} option in vue.config.js is deprecated. {#message}'
44+
}),
3845
requireModuleExtension: joi.boolean(),
3946
extract: joi.alternatives().try(joi.boolean(), joi.object()),
4047
sourceMap: joi.boolean(),
@@ -56,7 +63,7 @@ const schema = createSchema(joi => joi.object({
5663
),
5764

5865
// known runtime options for built-in plugins
59-
lintOnSave: joi.any().valid([true, false, 'error', 'warning', 'default']),
66+
lintOnSave: joi.any().valid(true, false, 'error', 'warning', 'default'),
6067
pwa: joi.object(),
6168

6269
// 3rd party plugin options

0 commit comments

Comments
 (0)