From 78d32a9becbf9ac55e576d3025f14f6dba5cfe80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 18:41:18 +0000 Subject: [PATCH 1/2] Bump through2 and @types/through2 in /extensions/ql-vscode Bumps [through2](https://github.com/rvagg/through2) and [@types/through2](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/through2). These dependencies needed to be updated together. Updates `through2` from 4.0.2 to 5.0.11 - [Release notes](https://github.com/rvagg/through2/releases) - [Changelog](https://github.com/rvagg/through2/blob/master/CHANGELOG.md) - [Commits](https://github.com/rvagg/through2/compare/v4.0.2...v5.0.11) Updates `@types/through2` from 2.0.41 to 5.0.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/through2) --- updated-dependencies: - dependency-name: "@types/through2" dependency-version: 5.0.0 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: through2 dependency-version: 5.0.7 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- extensions/ql-vscode/package-lock.json | 118 +++++++++++++++++++++---- extensions/ql-vscode/package.json | 4 +- 2 files changed, 103 insertions(+), 19 deletions(-) diff --git a/extensions/ql-vscode/package-lock.json b/extensions/ql-vscode/package-lock.json index 50cea68fcad..eba8bed1ae0 100644 --- a/extensions/ql-vscode/package-lock.json +++ b/extensions/ql-vscode/package-lock.json @@ -85,7 +85,7 @@ "@types/stream-json": "^1.7.8", "@types/styled-components": "^5.1.11", "@types/tar-stream": "^3.1.4", - "@types/through2": "^2.0.36", + "@types/through2": "^5.0.0", "@types/tmp": "^0.2.6", "@types/vscode": "1.90.0", "@types/yauzl": "^3.4.0", @@ -126,7 +126,7 @@ "prettier": "^3.9.3", "storybook": "^10.5.5", "tar-stream": "^3.2.0", - "through2": "^4.0.2", + "through2": "^5.0.11", "ts-jest": "^29.4.6", "ts-json-schema-generator": "^2.3.0", "ts-node": "^10.9.2", @@ -9293,12 +9293,14 @@ } }, "node_modules/@types/through2": { - "version": "2.0.41", - "resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.41.tgz", - "integrity": "sha512-ryQ0tidWkb1O1JuYvWKyMLYEtOWDqF5mHerJzKz/gQpoAaJq2l/dsMPBF0B5BNVT34rbARYJ5/tsZwLfUi2kwQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/through2/-/through2-5.0.0.tgz", + "integrity": "sha512-YyU370wADw76AgGLLRmlAp4wPNYXcQBCqvugUE3MjiVdp/7JSEYjt+LyH1wRBkfWNIIZenXsNISDSwGFNITN0g==", + "deprecated": "This is a stub types definition. through2 provides its own type definitions, so you do not need this installed.", "dev": true, + "license": "MIT", "dependencies": { - "@types/node": "*" + "through2": "*" } }, "node_modules/@types/tmp": { @@ -10535,6 +10537,19 @@ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", "dev": true }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -15021,12 +15036,32 @@ "node": ">=4.0.0" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/eventemitter3": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", "license": "MIT" }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/events-universal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz", @@ -24959,6 +24994,16 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -27728,12 +27773,13 @@ } }, "node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/through2/-/through2-5.0.11.tgz", + "integrity": "sha512-g3ACuADXGxvApYBg83YNLCSGeQUkKnXjH0FEBLmtap5vDN6pFfLr8uhVUqynb704X6Q3KpgLW2enSZ7WE+Vp5A==", "dev": true, + "license": "MIT", "dependencies": { - "readable-stream": "3" + "readable-stream": "^4.7.0" } }, "node_modules/through2-filter": { @@ -27756,18 +27802,56 @@ "xtend": "~4.0.1" } }, + "node_modules/through2/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/through2/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, + "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { - "node": ">= 6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" } }, "node_modules/tiny-invariant": { diff --git a/extensions/ql-vscode/package.json b/extensions/ql-vscode/package.json index 76a2507a208..6623f48b548 100644 --- a/extensions/ql-vscode/package.json +++ b/extensions/ql-vscode/package.json @@ -2143,7 +2143,7 @@ "@types/stream-json": "^1.7.8", "@types/styled-components": "^5.1.11", "@types/tar-stream": "^3.1.4", - "@types/through2": "^2.0.36", + "@types/through2": "^5.0.0", "@types/tmp": "^0.2.6", "@types/vscode": "1.90.0", "@types/yauzl": "^3.4.0", @@ -2184,7 +2184,7 @@ "prettier": "^3.9.3", "storybook": "^10.5.5", "tar-stream": "^3.2.0", - "through2": "^4.0.2", + "through2": "^5.0.11", "ts-jest": "^29.4.6", "ts-json-schema-generator": "^2.3.0", "ts-node": "^10.9.2", From 94ff00f46ac92cba8c3b34fe903e7513564d492b Mon Sep 17 00:00:00 2001 From: Chuan-kai Lin Date: Tue, 4 Aug 2026 09:18:44 -0700 Subject: [PATCH 2/2] Fix through2 v5 migration Use the new objectTransform API and align the transform callback with the v5 types. Replace the deprecated through2 stub types with the readable-stream types required by through2's declarations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8a4f7856-b291-4191-a8af-e2b410a8c01f --- extensions/ql-vscode/gulpfile.ts/textmate.ts | 7 +++--- extensions/ql-vscode/package-lock.json | 23 ++++++++++---------- extensions/ql-vscode/package.json | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/extensions/ql-vscode/gulpfile.ts/textmate.ts b/extensions/ql-vscode/gulpfile.ts/textmate.ts index a2ed4db083b..3666722f6fe 100644 --- a/extensions/ql-vscode/gulpfile.ts/textmate.ts +++ b/extensions/ql-vscode/gulpfile.ts/textmate.ts @@ -1,6 +1,6 @@ import { dest, src } from "gulp"; import { load } from "js-yaml"; -import { obj } from "through2"; +import { objectTransform } from "through2"; import PluginError from "plugin-error"; import type Vinyl from "vinyl"; import type { @@ -247,11 +247,11 @@ function transformFile(yaml: ExtendedTextmateGrammar) { } export function transpileTextMateGrammar() { - return obj( + return objectTransform( ( file: Vinyl, _encoding: string, - callback: (err: string | null, file: Vinyl | PluginError) => void, + callback: (err?: Error | null, file?: Vinyl) => void, ): void => { if (file.isNull()) { callback(null, file); @@ -266,7 +266,6 @@ export function transpileTextMateGrammar() { callback(null, file); } else { callback( - "error", new PluginError("transpileTextMateGrammar", "Format not supported."), ); } diff --git a/extensions/ql-vscode/package-lock.json b/extensions/ql-vscode/package-lock.json index eba8bed1ae0..4224fba6d61 100644 --- a/extensions/ql-vscode/package-lock.json +++ b/extensions/ql-vscode/package-lock.json @@ -80,12 +80,12 @@ "@types/proper-lockfile": "^4.1.4", "@types/react": "^19.2.17", "@types/react-dom": "^19.2.3", + "@types/readable-stream": "^4.0.24", "@types/sarif": "^2.1.2", "@types/semver": "^7.7.1", "@types/stream-json": "^1.7.8", "@types/styled-components": "^5.1.11", "@types/tar-stream": "^3.1.4", - "@types/through2": "^5.0.0", "@types/tmp": "^0.2.6", "@types/vscode": "1.90.0", "@types/yauzl": "^3.4.0", @@ -9188,6 +9188,16 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/readable-stream": { + "version": "4.0.24", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.24.tgz", + "integrity": "sha512-NRvUNC/JFGPJvqdAfEve8oginbM6V08u5NzLWpG8MwA2kTPOLnqk+wpwuPT+mp3aUsxyuT6m2gnrPuHYCruzEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/resolve": { "version": "1.20.6", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.6.tgz", @@ -9292,17 +9302,6 @@ "@types/node": "*" } }, - "node_modules/@types/through2": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/through2/-/through2-5.0.0.tgz", - "integrity": "sha512-YyU370wADw76AgGLLRmlAp4wPNYXcQBCqvugUE3MjiVdp/7JSEYjt+LyH1wRBkfWNIIZenXsNISDSwGFNITN0g==", - "deprecated": "This is a stub types definition. through2 provides its own type definitions, so you do not need this installed.", - "dev": true, - "license": "MIT", - "dependencies": { - "through2": "*" - } - }, "node_modules/@types/tmp": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.6.tgz", diff --git a/extensions/ql-vscode/package.json b/extensions/ql-vscode/package.json index 6623f48b548..5eb689d2a91 100644 --- a/extensions/ql-vscode/package.json +++ b/extensions/ql-vscode/package.json @@ -2138,12 +2138,12 @@ "@types/proper-lockfile": "^4.1.4", "@types/react": "^19.2.17", "@types/react-dom": "^19.2.3", + "@types/readable-stream": "^4.0.24", "@types/sarif": "^2.1.2", "@types/semver": "^7.7.1", "@types/stream-json": "^1.7.8", "@types/styled-components": "^5.1.11", "@types/tar-stream": "^3.1.4", - "@types/through2": "^5.0.0", "@types/tmp": "^0.2.6", "@types/vscode": "1.90.0", "@types/yauzl": "^3.4.0",