Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: 'yarn'

- name: Turbo cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: yarn

- name: Turbo cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dvc-cli-output-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: yarn

- run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: 'yarn'

- name: Turbo cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: 'yarn'

- run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion demo
9 changes: 4 additions & 5 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.75.0",
"node": ">=16.13.0"
"vscode": "^1.85.0",
"node": ">=20.12.1"
},
"activationEvents": [
"onStartupFinished",
Expand Down Expand Up @@ -1621,7 +1621,6 @@
"lodash.isequal": "4.5.0",
"lodash.merge": "4.6.2",
"lodash.omit": "4.5.0",
"node-fetch": "2.7.0",
"process-exists": "4.1.0",
"tree-kill": "1.2.2",
"uuid": "11.0.5",
Expand All @@ -1645,11 +1644,11 @@
"@types/lodash.omit": "4.5.9",
"@types/mocha": "10.0.10",
"@types/mock-require": "3.0.0",
"@types/node": "16.x",
"@types/node": "20.x",
"@types/sinon-chai": "3.2.12",
"@types/uuid": "10.0.0",
"@types/vega": "3.2.0",
"@types/vscode": "1.75.0",
"@types/vscode": "1.85.0",
"@vscode/test-electron": "2.4.1",
"@vscode/vsce": "2.25.0",
"@wdio/cli": "8.41.0",
Expand Down
2 changes: 1 addition & 1 deletion extension/src/experiments/data/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import querystring from 'querystring'
import fetch from 'node-fetch'
// Native fetch is available in Node.js 20+
import { collectBranches, collectFiles } from './collect'
import {
EXPERIMENTS_GIT_LOGS_REFS,
Expand Down
2 changes: 1 addition & 1 deletion extension/src/setup/studio.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Event, EventEmitter, Disposable as VSCodeDisposable } from 'vscode'
import fetch from 'node-fetch'
// Native fetch is available in Node.js 20+
import { DEFAULT_STUDIO_URL } from './webview/contract'
import { AvailableCommands, InternalCommands } from '../commands/internal'
import { getFirstWorkspaceFolder } from '../vscode/workspaceFolders'
Expand Down
6 changes: 3 additions & 3 deletions extension/src/test/suite/experiments/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { spy, stub } from 'sinon'
import { EventEmitter } from 'vscode'
import * as Fetch from 'node-fetch'
// Native fetch is available in Node.js 20+ - using global fetch object
import { WorkspaceExperiments } from '../../../experiments/workspace'
import { Experiments } from '../../../experiments'
import { Disposer } from '../../../extension'
Expand Down Expand Up @@ -291,14 +291,14 @@ export const buildExperimentsData = (
commitOutput
)
const mockGetNumCommits = stub(gitReader, 'getNumCommits').resolves(404)
const mockFetch = stub(Fetch, 'default').resolves({
const mockFetch = stub(globalThis, 'fetch').resolves({
json: () =>
Promise.resolve({
live: [],
pushed: [],
view_url: mockBaseStudioUrl
})
} as Fetch.Response)
} as unknown as Response)

const mockGetBranchesToShow = stub().returns(['main'])
const mockSetBranches = stub()
Expand Down
16 changes: 8 additions & 8 deletions extension/src/test/suite/setup/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { afterEach, beforeEach, describe, it, suite } from 'mocha'
import { ensureFileSync, remove } from 'fs-extra'
import { expect } from 'chai'
import { SinonStub, restore, spy, stub, useFakeTimers, match } from 'sinon'
import * as Fetch from 'node-fetch'
// Native fetch is available in Node.js 20+ - using global fetch object
import {
MessageItem,
QuickPickItem,
Expand Down Expand Up @@ -52,7 +52,7 @@ import {
SetupSection
} from '../../../setup/webview/contract'
import { getFirstWorkspaceFolder } from '../../../vscode/workspaceFolders'
import { Response } from '../../../vscode/response'
import { Response as VscodeResponse } from '../../../vscode/response'
import { DvcConfig } from '../../../cli/dvc/config'
import * as QuickPickUtil from '../../../setup/quickPick'
import { EventName } from '../../../telemetry/constants'
Expand Down Expand Up @@ -893,7 +893,7 @@ suite('Setup Test Suite', () => {

mockFetch.onFirstCall().resolves({
json: () => Promise.resolve(mockStudioRes)
} as Fetch.Response)
} as unknown as Response)
mockGetCallbackUrl.onFirstCall().resolves(mockCallbackUrl)

const callbackUriHandlerEvent: Promise<() => unknown> = new Promise(
Expand Down Expand Up @@ -945,7 +945,7 @@ suite('Setup Test Suite', () => {
json: () =>
Promise.resolve({ detail: 'Request failed for some reason.' }),
status: 500
} as Fetch.Response)
} as unknown as Response)

const failedTokenEvent = waitForSpyCall(delayProgressClosingSpy, 0)

Expand Down Expand Up @@ -976,7 +976,7 @@ suite('Setup Test Suite', () => {
mockFetch.onThirdCall().resolves({
json: () => Promise.resolve({ access_token: mockToken }),
status: 200
} as Fetch.Response)
} as unknown as Response)
const tokenEvent = waitForSpyCall(delayProgressClosingSpy, 1)

mockOnStudioResponse()
Expand Down Expand Up @@ -1017,7 +1017,7 @@ suite('Setup Test Suite', () => {
user_code: '40DWMKNA',
verification_uri: 'https://studio.datachain.ai/auth/device-login'
})
} as Fetch.Response)
} as unknown as Response)
const openUrlEvent = new Promise(resolve =>
mockOpenUrl.onFirstCall().callsFake(() => {
resolve(undefined)
Expand Down Expand Up @@ -1075,7 +1075,7 @@ suite('Setup Test Suite', () => {
user_code: '40DWMKNA',
verification_uri: 'https://studio.datachain.ai/auth/device-login'
})
} as Fetch.Response)
} as unknown as Response)

const callbackUriHandlerEvent = new Promise(resolve =>
mockWaitForUriRes.onFirstCall().callsFake((_, onResponse) => {
Expand Down Expand Up @@ -1687,7 +1687,7 @@ suite('Setup Test Suite', () => {
)

stub(window, 'showWarningMessage').resolves(
Response.REMOVE as unknown as MessageItem
VscodeResponse.REMOVE as unknown as MessageItem
)

messageSpy.resetHistory()
Expand Down
4 changes: 2 additions & 2 deletions extension/src/test/suite/setup/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path'
import { EventEmitter, commands } from 'vscode'
import * as Fetch from 'node-fetch'
// Native fetch is available in Node.js 20+ - using global fetch object
import { Disposer } from '@hediet/std/disposable'
import { fake, spy, stub } from 'sinon'
import { ensureDirSync } from 'fs-extra'
Expand Down Expand Up @@ -97,7 +97,7 @@ export const buildSetup = ({

const mockConfig = stub(dvcConfig, 'config').resolves('')

const mockFetch = stub(Fetch, 'default')
const mockFetch = stub(globalThis, 'fetch')

const setup = disposer.track(
new Setup(
Expand Down
4 changes: 2 additions & 2 deletions extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"compilerOptions": {
"resolveJsonModule": true,
"module": "commonjs",
"target": "es6",
"target": "es2022",
"outDir": "dist",
"lib": ["es2020"],
"lib": ["es2022"],
"sourceMap": true,
"rootDir": "src",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion languageServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"license": "Apache-2.0",
"engines": {
"node": "*"
"node": ">=20.12.1"
},
"peerDependencies": {
"dvc": ">=0.0.1",
Expand Down
4 changes: 2 additions & 2 deletions languageServer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"resolveJsonModule": true,
"target": "es6",
"lib": ["es2020"],
"target": "es2022",
"lib": ["es2022"],
"module": "commonjs",
"esModuleInterop": true,
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@testing-library/react": "14.3.1",
"@types/jest": "29.5.14",
"@types/jsdom": "21.1.7",
"@types/node": "16.x",
"@types/node": "20.x",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/react-virtualized": "9.22.2",
Expand Down
5 changes: 3 additions & 2 deletions webview/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"esModuleInterop": true,
"target": "es6",
"target": "es2022",
"module": "commonjs",
"strict": true,
"outDir": "dist",
Expand All @@ -10,7 +10,8 @@
"newLine": "LF",
"sourceMap": true,
"jsx": "react",
"experimentalDecorators": true
"experimentalDecorators": true,
"lib": ["es2022", "dom"]
},
"include": ["src/**/*", "webpack.config.ts", "__mocks__"]
}
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4380,10 +4380,12 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==

"@types/node@16.x":
version "16.18.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.4.tgz#712ba61b4caf091fc6490301b1888356638c17bd"
integrity sha512-9qGjJ5GyShZjUfx2ArBIGM+xExdfLvvaCyQR0t6yRXKPcWCVYF/WemtX/uIU3r7FYECXRXkIiw2Vnhn6y8d+pw==
"@types/node@20.x":
version "20.19.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4"
integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==
dependencies:
undici-types "~6.21.0"

"@types/node@^18.0.0":
version "18.18.6"
Expand Down Expand Up @@ -4571,10 +4573,10 @@
dependencies:
vega "*"

"@types/vscode@1.75.0":
version "1.75.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.75.0.tgz#f1892a727db9a0eb4997058a804170b8c0ba218e"
integrity sha512-SAr0PoOhJS6FUq5LjNr8C/StBKALZwDVm3+U4pjF/3iYkt3GioJOPV/oB1Sf1l7lROe4TgrMyL5N1yaEgTWycw==
"@types/vscode@1.85.0":
version "1.85.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.85.0.tgz#46beb07f0f626665b52d1e2294382b2bc63b602e"
integrity sha512-CF/RBon/GXwdfmnjZj0WTUMZN5H6YITOfBCP4iEZlOtVQXuzw6t7Le7+cR+7JzdMrnlm7Mfp49Oj2TuSXIWo3g==

"@types/webpack-env@^1.16.0":
version "1.16.3"
Expand Down Expand Up @@ -13792,13 +13794,6 @@ node-fetch-native@^1.0.2:
resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.1.0.tgz#a530f5c4cadb49b382dcf81d8f5f19ed0f457fbe"
integrity sha512-nl5goFCig93JZ9FIV8GHT9xpNqXbxQUzkOmKIMKmncsBH9jhg7qKex8hirpymkBFmNQ114chEEG5lS4wgK2I+Q==

node-fetch@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

node-fetch@^2.0.0:
version "2.6.11"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25"
Expand Down Expand Up @@ -17876,6 +17871,11 @@ undici-types@~6.19.2:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

undici-types@~6.21.0:
version "6.21.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==

undici@5.28.5, undici@^5.28.3:
version "5.28.5"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.5.tgz#b2b94b6bf8f1d919bc5a6f31f2c01deb02e54d4b"
Expand Down
Loading