Skip to content

Commit 8670997

Browse files
committed
chore: bump js-yaml version
1 parent df00b3e commit 8670997

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

packages/@vue/cli-ui/apollo-server/connectors/configurations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function readFile (config, fileDescriptor, context) {
7777
if (file.type === 'json') {
7878
fileData = JSON.parse(rawContent)
7979
} else if (file.type === 'yaml') {
80-
fileData = yaml.safeLoad(rawContent)
80+
fileData = yaml.load(rawContent)
8181
}
8282
}
8383
}
@@ -121,7 +121,7 @@ function writeFile (config, fileId, data, changedFields, context) {
121121
if (file.type === 'json') {
122122
rawContent = JSON.stringify(data, null, 2)
123123
} else if (file.type === 'yaml') {
124-
rawContent = yaml.safeDump(data)
124+
rawContent = yaml.dump(data)
125125
} else if (file.type === 'js') {
126126
const source = fs.readFileSync(file.path, { encoding: 'utf8' })
127127
if (!source.trim()) {

packages/@vue/cli-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"graphql-tag": "^2.10.3",
5050
"graphql-type-json": "^0.3.1",
5151
"javascript-stringify": "^2.0.1",
52-
"js-yaml": "^3.14.1",
52+
"js-yaml": "^4.0.0",
5353
"lodash.merge": "^4.6.1",
5454
"lowdb": "^1.0.0",
5555
"lru-cache": "^6.0.0",

packages/@vue/cli/__tests__/invoke.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ test('invoke with existing files (yaml)', async () => {
134134
await project.write(`.eslintrc.yml`, `
135135
root: true
136136
extends:
137-
- 'plugin:vue/essential'
138-
- 'eslint:recommended'
137+
- plugin:vue/essential
138+
- eslint:recommended
139139
`.trim())
140140

141141
await project.run(`${require.resolve('../bin/vue')} invoke eslint --config airbnb`)
142142

143143
const updated = await project.read('.eslintrc.yml')
144144
expect(updated).toMatch(`
145145
extends:
146-
- 'plugin:vue/essential'
147-
- 'eslint:recommended'
146+
- plugin:vue/essential
147+
- eslint:recommended
148148
- '@vue/airbnb'
149149
`.trim())
150150
})

packages/@vue/cli/lib/util/configTransforms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ const transformJSON = {
4848
}
4949

5050
const transformYAML = {
51-
read: ({ source }) => require('js-yaml').safeLoad(source),
51+
read: ({ source }) => require('js-yaml').load(source),
5252
write: ({ value, existing }) => {
53-
return require('js-yaml').safeDump(merge(existing, value, mergeOptions), {
53+
return require('js-yaml').dump(merge(existing, value, mergeOptions), {
5454
skipInvalid: true
5555
})
5656
}

packages/@vue/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"inquirer": "^7.1.0",
4646
"isbinaryfile": "^4.0.6",
4747
"javascript-stringify": "^2.0.1",
48-
"js-yaml": "^3.14.1",
48+
"js-yaml": "^4.0.0",
4949
"leven": "^3.1.0",
5050
"lodash.clonedeep": "^4.5.0",
5151
"lru-cache": "^6.0.0",

0 commit comments

Comments
 (0)