Skip to content

Commit 1c8eb33

Browse files
committed
Remove glob-promise and upgrade to glob 9
The `glob` package now uses promises in version 9, so we don't need the separate `glob-promise` package anymore. This also updates one call site to use `cwd` instead of `join` to avoid possible issues due to a breaking change in version 8 which treats Windows path separators differently. By changing the `cwd`, we should not run into these issues. Removing the `resolutions` of `glob-parent` did not change the `package-lock.json`, so this does not have any effect on the package version we are using.
1 parent a7b3e3d commit 1c8eb33

4 files changed

Lines changed: 9 additions & 58 deletions

File tree

extensions/ql-vscode/package-lock.json

Lines changed: 4 additions & 50 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: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,6 @@
14421442
"d3": "^7.6.1",
14431443
"d3-graphviz": "^5.0.2",
14441444
"fs-extra": "^11.1.1",
1445-
"glob-promise": "^6.0.2",
14461445
"immutable": "^4.0.0",
14471446
"js-yaml": "^4.1.0",
14481447
"minimist": "~1.2.6",
@@ -1493,7 +1492,6 @@
14931492
"@types/d3-graphviz": "^2.6.6",
14941493
"@types/del": "^4.0.0",
14951494
"@types/fs-extra": "^11.0.1",
1496-
"@types/glob": "^7.1.1",
14971495
"@types/google-protobuf": "^3.2.7",
14981496
"@types/gulp": "^4.0.9",
14991497
"@types/gulp-replace": "^1.1.0",
@@ -1573,8 +1571,5 @@
15731571
"prettier --write",
15741572
"eslint --fix"
15751573
]
1576-
},
1577-
"resolutions": {
1578-
"glob-parent": "6.0.0"
15791574
}
15801575
}

extensions/ql-vscode/src/helpers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
writeFile,
77
opendir,
88
} from "fs-extra";
9-
import { promise as glob } from "glob-promise";
9+
import { glob } from "glob";
1010
import { load } from "js-yaml";
1111
import { join, basename } from "path";
1212
import { dirSync } from "tmp-promise";
@@ -515,7 +515,9 @@ export async function getQlPackForDbscheme(
515515
export async function getPrimaryDbscheme(
516516
datasetFolder: string,
517517
): Promise<string> {
518-
const dbschemes = await glob(join(datasetFolder, "*.dbscheme"));
518+
const dbschemes = await glob("*.dbscheme", {
519+
cwd: datasetFolder,
520+
});
519521

520522
if (dbschemes.length < 1) {
521523
throw new Error(

extensions/ql-vscode/src/local-databases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { pathExists, stat, remove } from "fs-extra";
2-
import { promise as glob } from "glob-promise";
2+
import { glob } from "glob";
33
import { join, basename, resolve, relative, dirname, extname } from "path";
44
import * as vscode from "vscode";
55
import * as cli from "./cli";

0 commit comments

Comments
 (0)