Skip to content

Commit

Permalink
Upgrade js-yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo930021 committed Jan 11, 2021
1 parent c26d51c commit f05f588
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.3",
"@types/glob": "^7.1.3",
"@types/js-yaml": "^3.12.5",
"@types/js-yaml": "^4.0.0",
"@types/lodash": "^4.14.167",
"@types/minimist": "^1.2.1",
"@types/mocha": "^8.2.0",
Expand All @@ -568,7 +568,7 @@
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"husky": "^4.3.7",
"js-yaml": "^3.14.1",
"js-yaml": "^4.0.0",
"lint-staged": "^10.5.3",
"minimist": "^1.2.5",
"mocha": "^8.2.1",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_grammar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import glob from 'glob';
import { safeLoad } from 'js-yaml';
import { load } from 'js-yaml';
import { writeFileSync, readFileSync } from 'fs';
import { parse } from 'path';
import { getGeneratedGrammar } from '../client/grammar';
Expand All @@ -9,7 +9,7 @@ glob('syntaxes/**/*.yaml', { nocase: true }, (_, files) => {
const pathData = parse(file);
writeFileSync(
pathData.dir + '/' + pathData.name + '.tmLanguage.json',
JSON.stringify(safeLoad(readFileSync(file).toString()), null, 2)
JSON.stringify(load(readFileSync(file).toString()), null, 2)
);
}

Expand Down
24 changes: 14 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@
"@types/minimatch" "*"
"@types/node" "*"

"@types/js-yaml@^3.12.5":
version "3.12.5"
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.5.tgz#136d5e6a57a931e1cce6f9d8126aa98a9c92a6bb"
integrity sha512-JCcp6J0GV66Y4ZMDAQCXot4xprYB+Zfd3meK9+INSJeVZwJmHAW30BBEEkPzXswMXuiyReUGOP3GxrADc9wPww==
"@types/js-yaml@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.0.tgz#d1a11688112091f2c711674df3a65ea2f47b5dfb"
integrity sha512-4vlpCM5KPCL5CfGmTbpjwVKbISRYhduEJvvUWsH5EB7QInhEj94XPZ3ts/9FPiLZFqYO0xoW4ZL8z2AabTGgJA==

"@types/lodash@^4.14.167":
version "4.14.167"
Expand Down Expand Up @@ -268,6 +268,11 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"

argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==

array-filter@~0.0.0:
version "0.0.1"
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
Expand Down Expand Up @@ -1107,13 +1112,12 @@ [email protected], js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@^3.14.1:
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
js-yaml@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
argparse "^2.0.1"

json-parse-better-errors@^1.0.1:
version "1.0.2"
Expand Down

0 comments on commit f05f588

Please sign in to comment.