Skip to content

Commit dffbcc2

Browse files
authored
Merge pull request #3700 from github/koesie10/upgrade-octokit
Upgrade Octokit packages
2 parents 28d07a8 + 97c497b commit dffbcc2

File tree

7 files changed

+118
-108
lines changed

7 files changed

+118
-108
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 83 additions & 90 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,9 +1968,9 @@
19681968
},
19691969
"dependencies": {
19701970
"@floating-ui/react": "^0.26.12",
1971-
"@octokit/plugin-retry": "^6.0.1",
1972-
"@octokit/plugin-throttling": "^8.0.0",
1973-
"@octokit/rest": "^20.0.2",
1971+
"@octokit/plugin-retry": "^7.1.1",
1972+
"@octokit/plugin-throttling": "^9.3.1",
1973+
"@octokit/rest": "^21.0.2",
19741974
"@vscode/codicons": "^0.0.36",
19751975
"@vscode/debugadapter": "^1.59.0",
19761976
"@vscode/debugprotocol": "^1.65.0",

extensions/ql-vscode/src/view/jest.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Config } from "jest";
2+
import { transformIgnorePatterns } from "../../test/jest-config";
23

34
/*
45
* For a detailed explanation regarding each configuration property and type check, visit:
@@ -184,10 +185,7 @@ const config: Config = {
184185
},
185186

186187
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
187-
transformIgnorePatterns: [
188-
// These use ES modules, so need to be transformed
189-
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6|d3|d3-(.*)|internmap|delaunator|robust-predicates)/.*)",
190-
],
188+
transformIgnorePatterns,
191189

192190
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
193191
// unmockedModulePathPatterns: undefined,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// These are all the packages that DO need to be transformed. All other packages will be ignored.
2+
// These pacakges all use ES modules, so need to be transformed
3+
const transformScopes = ["@microsoft", "@octokit"];
4+
const transformPackages = [
5+
"@vscode/webview-ui-toolkit",
6+
"before-after-hook",
7+
"d3",
8+
"delaunator",
9+
"exenv-es6",
10+
"internmap",
11+
"nanoid",
12+
"p-queue",
13+
"p-timeout",
14+
"robust-predicates",
15+
"universal-user-agent",
16+
];
17+
const transformWildcards = ["d3-(.*)"];
18+
const transformPatterns = [
19+
...transformScopes.map((scope) => `${scope}/.+`),
20+
...transformPackages,
21+
...transformWildcards,
22+
];
23+
24+
export const transformIgnorePatterns = [
25+
`node_modules/(?!(?:${transformPatterns.join("|")})/.*)`,
26+
];

extensions/ql-vscode/test/unit-tests/jest.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Config } from "jest";
2+
import { transformIgnorePatterns } from "../jest-config";
23

34
/*
45
* For a detailed explanation regarding each configuration property and type check, visit:
@@ -180,10 +181,7 @@ const config: Config = {
180181
},
181182

182183
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
183-
transformIgnorePatterns: [
184-
// These use ES modules, so need to be transformed
185-
"node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6|nanoid|p-queue|p-timeout)/.*)",
186-
],
184+
transformIgnorePatterns,
187185

188186
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
189187
// unmockedModulePathPatterns: undefined,

extensions/ql-vscode/test/unit-tests/variant-analysis/custom-errors.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ describe("handleRequestError", () => {
3232

3333
it("returns false when handling an error without response", () => {
3434
const e = new RequestError("Timeout", 500, {
35-
headers: {
36-
"Content-Type": "application/json",
37-
},
3835
request: {
3936
method: "POST",
4037
url: faker.internet.url(),

0 commit comments

Comments
 (0)