Repository navigation
Bump vscode-languageclient from 8.1.0 to 11.0.0 in /extensions/ql-vscode #4630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cklin
merged 4 commits into
main
from
dependabot/npm_and_yarn/extensions/ql-vscode/vscode-languageclient-11.0.0
Nov 20, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
39af4c7
Bump vscode-languageclient from 8.1.0 to 11.0.0 in /extensions/ql-vscode
dependabot[bot] b637c71
Separate language-client and server logs
cklin 835c78a
Override language-client minimatch to 11.0.1
cklin 1e19fc0
Check lockfile registry URLs before committing
cklin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| const { readFileSync } = require("node:fs"); | ||
| const { resolve } = require("node:path"); | ||
|
|
||
| const paths = process.argv.slice(2); | ||
| if (paths.length === 0) { | ||
| paths.push(resolve(__dirname, "../package-lock.json")); | ||
| } | ||
|
|
||
| for (const path of paths) { | ||
| const lockfile = JSON.parse(readFileSync(path, "utf8")); | ||
| if ( | ||
| !lockfile.packages || | ||
| typeof lockfile.packages !== "object" || | ||
| Array.isArray(lockfile.packages) | ||
| ) { | ||
| throw new Error(`${path}: expected a lockfile with a packages object`); | ||
| } | ||
|
|
||
| for (const [name, entry] of Object.entries(lockfile.packages)) { | ||
| if (!Object.hasOwn(entry, "resolved")) { | ||
| continue; | ||
| } | ||
|
|
||
| let url; | ||
| try { | ||
| if (typeof entry.resolved !== "string") { | ||
| throw new TypeError("Expected a URL string"); | ||
| } | ||
| url = new URL(entry.resolved); | ||
| } catch (error) { | ||
| if (!(error instanceof TypeError)) { | ||
| throw error; | ||
| } | ||
| console.error(`${path}: ${name}: invalid resolved URL`); | ||
| process.exitCode = 1; | ||
| continue; | ||
| } | ||
|
|
||
| if ( | ||
| url.protocol !== "https:" || | ||
| url.host !== "registry.npmjs.org" || | ||
| url.username || | ||
| url.password | ||
| ) { | ||
| console.error( | ||
| `${path}: ${name}: resolved URL must use https://registry.npmjs.org without credentials (received ${url.protocol}//${url.host})`, | ||
| ); | ||
| process.exitCode = 1; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
extensions/ql-vscode/test/unit-tests/scripts/check-lockfile-urls.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import { spawnSync } from "child_process"; | ||
| import { writeFileSync } from "fs"; | ||
| import { resolve, join } from "path"; | ||
| import type { DirResult } from "tmp"; | ||
| import { dirSync } from "tmp-promise"; | ||
|
|
||
| describe("lockfile URL check", () => { | ||
| let directory: DirResult; | ||
| const script = resolve(__dirname, "../../../scripts/check-lockfile-urls.cjs"); | ||
|
|
||
| beforeEach(() => { | ||
| directory = dirSync({ unsafeCleanup: true }); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| directory.removeCallback(); | ||
| }); | ||
|
|
||
| function check(packages: Record<string, unknown>) { | ||
| const path = join(directory.name, "package-lock.json"); | ||
| writeFileSync(path, JSON.stringify({ lockfileVersion: 3, packages })); | ||
| return spawnSync(process.execPath, [script, path], { encoding: "utf8" }); | ||
| } | ||
|
|
||
| it("accepts public registry URLs and entries without resolved URLs", () => { | ||
| const result = check({ | ||
| "": { name: "test" }, | ||
| "node_modules/example": { | ||
| resolved: "https://registry.npmjs.org/example/-/example-1.0.0.tgz", | ||
| }, | ||
| "node_modules/@scope/example": { | ||
| resolved: | ||
| "https://registry.npmjs.org/@scope/example/-/example-1.0.0.tgz", | ||
| }, | ||
| }); | ||
|
|
||
| expect(result.status).toBe(0); | ||
| expect(result.stderr).toBe(""); | ||
| }); | ||
|
|
||
| it.each([ | ||
| "https://pkgs.dev.azure.com/example/package.tgz", | ||
| "https://registry.npmjs.org.example.com/package.tgz", | ||
| "http://registry.npmjs.org/package.tgz", | ||
| "https://registry.npmjs.org:8443/package.tgz", | ||
| "file:../example", | ||
| "not-a-url", | ||
| null, | ||
| ])("rejects an invalid download location: %s", (resolved) => { | ||
| const result = check({ "node_modules/example": { resolved } }); | ||
|
|
||
| expect(result.status).toBe(1); | ||
| expect(result.stderr).toContain("node_modules/example"); | ||
| }); | ||
|
|
||
| it("rejects credentials without exposing them in diagnostics", () => { | ||
| const result = check({ | ||
| "node_modules/example": { | ||
| resolved: | ||
| "https://user:example-password@registry.npmjs.org/package.tgz", | ||
| }, | ||
| }); | ||
|
|
||
| expect(result.status).toBe(1); | ||
| expect(result.stderr).toContain("without credentials"); | ||
| expect(result.stderr).not.toContain("example-password"); | ||
| }); | ||
| }); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.