Skip to content

Commit f99645c

Browse files
committed
chore: joi -> @hapi/joi
1 parent 0c635af commit f99645c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/@vue/cli-shared-utils/lib/validate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const { exit } = require('./exit')
22

33
// proxy to joi for option validation
4-
exports.createSchema = fn => fn(require('joi'))
4+
exports.createSchema = fn => fn(require('@hapi/joi'))
55

66
exports.validate = (obj, schema, cb) => {
7-
require('joi').validate(obj, schema, {}, err => {
7+
require('@hapi/joi').validate(obj, schema, {}, err => {
88
if (err) {
99
cb(err.message)
1010
if (process.env.VUE_CLI_TEST) {
@@ -17,7 +17,7 @@ exports.validate = (obj, schema, cb) => {
1717
}
1818

1919
exports.validateSync = (obj, schema) => {
20-
const result = require('joi').validate(obj, schema)
20+
const result = require('@hapi/joi').validate(obj, schema)
2121
if (result.error) {
2222
throw result.error
2323
}

packages/@vue/cli-shared-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
},
2121
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-shared-utils#readme",
2222
"dependencies": {
23+
"@hapi/joi": "^15.0.1",
2324
"chalk": "^2.4.1",
2425
"execa": "^1.0.0",
25-
"joi": "^14.3.0",
2626
"launch-editor": "^2.2.1",
2727
"lru-cache": "^5.1.1",
2828
"node-ipc": "^9.1.1",

0 commit comments

Comments
 (0)