Skip to content

Commit baa449e

Browse files
committed
fix: Replace yaml by js-yaml
1 parent 169bf10 commit baa449e

File tree

3 files changed

+48
-49
lines changed

3 files changed

+48
-49
lines changed

package-lock.json

Lines changed: 43 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@rollup/plugin-node-resolve": "13.3.0",
4242
"@rollup/plugin-typescript": "^8.3.3",
4343
"@types/ini": "1.3.31",
44+
"@types/js-yaml": "^4.0.5",
4445
"@types/node": "16.11.7",
4546
"@types/rollup-plugin-node-builtins": "^2.1.2",
4647
"@typescript-eslint/eslint-plugin": "5.27.1",
@@ -56,6 +57,7 @@
5657
"eslint-plugin-unused-imports": "2.0.0",
5758
"fast-plist": "0.1.2",
5859
"ini": "3.0.0",
60+
"js-yaml": "^4.1.0",
5961
"json5": "2.2.1",
6062
"monaco-emacs": "^0.3.0",
6163
"monaco-vim": "^0.3.4",
@@ -70,8 +72,7 @@
7072
"ts-node": "10.8.1",
7173
"tslib": "^2.4.0",
7274
"typescript": "4.7.3",
73-
"vscode-textmate": "^6.0.0",
74-
"yaml": "2.1.1"
75+
"vscode-textmate": "^6.0.0"
7576
},
7677
"browserslist": [
7778
"defaults",

update-extensions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import JSON5 from 'json5'
33
import ini from 'ini'
44
import cson from 'cson-parser'
55
import plist from 'fast-plist'
6-
import YAML from 'yaml'
76
import type * as monaco from 'monaco-editor'
7+
import jsYaml from 'js-yaml'
88
import https from 'https'
99
import path from 'path'
1010
import * as fs from 'fs/promises'
@@ -502,7 +502,7 @@ async function fetchExtensions () {
502502
} else if (ext === '.json' || ext === '.JSON-tmLanguage') {
503503
grammarObject = JSON5.parse(grammarText)
504504
} else if (ext === '.yaml' || ext === '.yml') {
505-
grammarObject = YAML.parse(grammarText)
505+
grammarObject = jsYaml.load(grammarText)
506506
} else {
507507
return Promise.reject(new Error('Unknown file extension: ' + ext))
508508
}

0 commit comments

Comments
 (0)