Skip to content

Commit 2c66f4e

Browse files
Bump js-yaml from 3.14.1 to 4.1.0 (#82)
* Bump js-yaml from 3.14.1 to 4.1.0 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 4.1.0. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.14.1...4.1.0) --- updated-dependencies: - dependency-name: js-yaml dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: use dump instead of safeDump (js-yaml update) * fix: use load instead of safeLoad (js-yaml update) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shazron Abdullah <36107+shazron@users.noreply.github.com>
1 parent 3bb0697 commit 2c66f4e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"deepmerge": "^4.0.0",
2727
"dotenv": "16.3.1",
2828
"hjson": "^3.1.2",
29-
"js-yaml": "^3.13.0"
29+
"js-yaml": "^4.1.0"
3030
},
3131
"devDependencies": {
3232
"@adobe/eslint-config-aio-lib-config": "^2.0.0",

src/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const loadFile = (file) => {
131131
}
132132
} else {
133133
try {
134-
return { values: yaml.safeLoad(contents, { json: true }), format: 'yaml' }
134+
return { values: yaml.load(contents, { json: true }), format: 'yaml' }
135135
} catch (e) {
136136
throw new Error('Cannot parse yaml')
137137
}
@@ -160,7 +160,7 @@ const saveFile = (file, obj, format) => {
160160
} else if (format === 'json') {
161161
str = hjson.stringify(obj, { condense: true, emitRootBraces: true, separator: true, bracesSameLine: true, multiline: 'off' })
162162
} else {
163-
str = yaml.safeDump(obj, { sortKeys: true, lineWidth: 1024, noCompatMode: true })
163+
str = yaml.dump(obj, { sortKeys: true, lineWidth: 1024, noCompatMode: true })
164164
}
165165

166166
fs.writeFileSync(file, str)

0 commit comments

Comments
 (0)