Skip to content

Commit c4229ed

Browse files
authored
Merge pull request #4451 from github/nickrolfe-bump-js-yaml-to-v5
Bump js-yaml from ^4.2.0 to ^5.0.0
2 parents 33eeaa5 + 59e4ccf commit c4229ed

3 files changed

Lines changed: 125 additions & 15 deletions

File tree

extensions/ql-vscode/package-lock.json

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

extensions/ql-vscode/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,7 @@
20822082
"d3": "^7.9.0",
20832083
"d3-graphviz": "^5.6.0",
20842084
"fs-extra": "^11.1.1",
2085-
"js-yaml": "^4.2.0",
2085+
"js-yaml": "^5.0.0",
20862086
"koffi": "^2.15.5",
20872087
"msw": "^2.14.6",
20882088
"nanoid": "^5.0.7",
@@ -2134,7 +2134,6 @@
21342134
"@types/fs-extra": "^11.0.1",
21352135
"@types/gulp": "^4.0.18",
21362136
"@types/jest": "^30.0.0",
2137-
"@types/js-yaml": "^4.0.6",
21382137
"@types/node": "22.19.*",
21392138
"@types/proper-lockfile": "^4.1.4",
21402139
"@types/react": "^19.2.17",

extensions/ql-vscode/src/packaging/qlpack-file-loader.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const qlpackFileValidate = ajv.compile(qlpackFileSchemaJson);
1111
export async function loadQlpackFile(path: string): Promise<QlPackFile> {
1212
const qlpackFileText = await readFile(path, "utf8");
1313

14-
let qlPack = load(qlpackFileText) as QlPackFile | undefined;
14+
let qlPack: QlPackFile | undefined;
15+
if (qlpackFileText.trim()) {
16+
qlPack = load(qlpackFileText) as QlPackFile | undefined;
17+
}
1518

1619
if (qlPack === undefined || qlPack === null) {
1720
// An empty file is not valid according to the schema since it's not an object,

0 commit comments

Comments
 (0)