Skip to content

Commit b1ef0b5

Browse files
authored
update dependencies (#67)
1 parent 6a4c4dd commit b1ef0b5

File tree

9 files changed

+227
-261
lines changed

9 files changed

+227
-261
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"homepage": "https://github.com/databricks/databricks-vscode#readme",
3030
"packageManager": "yarn@3.2.1",
3131
"devDependencies": {
32-
"@typescript-eslint/eslint-plugin": "^5.32.0",
33-
"@typescript-eslint/parser": "^5.32.0",
32+
"@typescript-eslint/eslint-plugin": "^5.33.0",
33+
"@typescript-eslint/parser": "^5.33.0",
3434
"eslint": "^8.21.0",
3535
"eslint-config-prettier": "^8.5.0",
3636
"typescript": "^4.7.4"

packages/databricks-sdk-js/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"/dist"
1818
],
1919
"scripts": {
20-
"build": "tsc -p tsconfig.json",
20+
"build": "tsc -p tsconfig.json && cp src/fetch.* dist/",
2121
"watch": "tsc -w -p tsconfig.json",
2222
"clean": "rm -rf dist node_modules",
2323
"fix": "prettier . --write",
@@ -30,14 +30,13 @@
3030
},
3131
"dependencies": {
3232
"ini": "^3.0.0",
33-
"node-fetch": "^2.6.7"
33+
"node-fetch": "^3.2.10"
3434
},
3535
"devDependencies": {
3636
"@istanbuljs/nyc-config-typescript": "^1.0.2",
3737
"@types/ini": "^1.3.31",
3838
"@types/mocha": "^9.1.1",
39-
"@types/node": "^18.6.4",
40-
"@types/node-fetch": "^2.6.2",
39+
"@types/node": "^18.7.1",
4140
"@types/tmp": "^0.2.3",
4241
"@types/uuid": "^8.3.4",
4342
"eslint": "^8.21.0",

packages/databricks-sdk-js/src/api-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
2-
import fetch from "node-fetch";
32
import * as https from "node:https";
43
import {TextDecoder} from "node:util";
54
import {fromDefaultChain} from "./auth/fromChain";
5+
import {fetch} from "./fetch";
66

77
const sdkVersion = require("../package.json").version;
88

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @param { import("node-fetch").RequestInfo} url
3+
* @param {import("node-fetch").RequestInit} init
4+
* @returns {Promise<import("node-fetch").Response>}
5+
*/
6+
export function fetch(
7+
url: import("node-fetch").RequestInfo,
8+
init: import("node-fetch").RequestInit
9+
): Promise<import("node-fetch").Response>;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// node-fetch@3 is ESM only. Need some trickery to make it work with CommonJS
2+
3+
exports.fetch = async function (url, init) {
4+
const {default: fetch} = await import("node-fetch");
5+
return await fetch(url, init);
6+
};

packages/databricks-sdk-js/src/test/IntegrationTestSetup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import {v4 as uuidv4} from "uuid";
44
import {ApiClient} from "../api-client";
5-
import {ClusterService} from "../apis/cluster";
65
import {Cluster} from "../services/Cluster";
76

87
export class IntegrationTestSetup {

packages/databricks-sdk-js/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
"moduleResolution": "Node",
77
"esModuleInterop": true,
88
"isolatedModules": true,
9-
"lib": ["ES2020"],
9+
"lib": ["ES2020", "DOM"],
1010
"sourceMap": true,
1111
"rootDir": "src",
1212
"outDir": "dist",
1313
"strict": true /* enable all strict type-checking options */,
1414
"experimentalDecorators": true
15-
}
15+
},
16+
"include": ["src"]
1617
}

packages/databricks-vscode/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@
290290
"@istanbuljs/nyc-config-typescript": "^1.0.2",
291291
"@types/glob": "^7.2.0",
292292
"@types/mocha": "^9.1.1",
293-
"@types/node": "^18.6.4",
293+
"@types/node": "^18.7.1",
294294
"@types/tmp": "^0.2.3",
295295
"@types/vscode": "^1.69.1",
296-
"@typescript-eslint/eslint-plugin": "^5.32.0",
297-
"@typescript-eslint/parser": "^5.32.0",
296+
"@typescript-eslint/eslint-plugin": "^5.33.0",
297+
"@typescript-eslint/parser": "^5.33.0",
298298
"@vscode/test-electron": "^2.1.5",
299-
"esbuild": "^0.14.53",
299+
"esbuild": "^0.15.1",
300300
"eslint": "^8.21.0",
301301
"glob": "^8.0.3",
302302
"mocha": "^10.0.0",
@@ -306,7 +306,7 @@
306306
"ts-mockito": "^2.6.1",
307307
"typescript": "^4.7.4",
308308
"vsce": "^2.10.0",
309-
"vscode-extension-tester": "^4.4.0"
309+
"vscode-extension-tester": "^4.4.1"
310310
},
311311
"nyc": {
312312
"extends": "@istanbuljs/nyc-config-typescript",

0 commit comments

Comments
 (0)