Skip to content

Commit

Permalink
Update dependencies (#974)
Browse files Browse the repository at this point in the history
## Changes
<!-- Summary of your changes that are easy to understand -->

## Tests
<!-- How is this tested? -->
  • Loading branch information
kartikgupta-db authored Dec 18, 2023
1 parent b5a80a7 commit 1835fc2
Show file tree
Hide file tree
Showing 15 changed files with 1,881 additions and 2,538 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"homepage": "https://github.com/databricks/databricks-vscode#readme",
"packageManager": "yarn@3.2.1",
"devDependencies": {
"@types/node": "^20.5.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"conventional-changelog-cli": "^3.0.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^8.8.0",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"ts-mockito": "^2.6.1",
"typescript": "5.1.6"
"typescript": "^5.3.3"
},
"resolutions": {
"json5": "2.2.2"
Expand Down
10 changes: 5 additions & 5 deletions packages/databricks-vscode-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"test": "yarn run test:lint && yarn run test:unit"
},
"devDependencies": {
"@types/vscode": "^1.69.1",
"eslint": "^8.51.0",
"prettier": "^3.0.0",
"typescript": "5.1.6"
"@types/vscode": "^1.85.0",
"eslint": "^8.55.0",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"dependencies": {
"@databricks/databricks-sdk": "file:../../vendor/databricks-sdk.tgz",
"databricks": "*"
"databricks": "workspace:^"
}
}
1 change: 1 addition & 0 deletions packages/databricks-vscode/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bin/**
.wdio-vscode-service
src/test/e2e/workspace/
extension/
.pytest_cache/

# Telemetry file, automatically generated by packages/databricks-vscode/scripts/generateTelemetry.ts
telemetry.json
4 changes: 3 additions & 1 deletion packages/databricks-vscode/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ package-lock.json
.wdio-vscode-service/
src/test/e2e/workspace/.databricks/
extension/
resources/python/generated/
resources/python/generated/
.venv
*.vsix
77 changes: 38 additions & 39 deletions packages/databricks-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,62 +724,61 @@
"dependencies": {
"@databricks/databricks-sdk": "file:../../vendor/databricks-sdk.tgz",
"@databricks/databricks-vscode-types": "workspace:^",
"@types/lodash": "^4.14.199",
"@vscode/debugadapter": "^1.61.0",
"@vscode/extension-telemetry": "^0.8.1",
"@vscode/webview-ui-toolkit": "^1.2.2",
"@types/lodash": "^4.14.202",
"@vscode/debugadapter": "^1.64.0",
"@vscode/extension-telemetry": "^0.9.1",
"@vscode/webview-ui-toolkit": "^1.4.0",
"add": "^2.0.6",
"ansi-to-html": "^0.7.2",
"bcryptjs": "^2.4.3",
"lodash": "^4.17.21",
"triple-beam": "^1.4.1",
"winston": "^3.10.0",
"yaml": "^2.3.2"
"winston": "^3.11.0",
"yaml": "^2.3.4"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@sinonjs/fake-timers": "^10.3.0",
"@types/bcryptjs": "^2.4.2",
"@types/chai": "^4.3.5",
"@types/eslint": "^8.44.6",
"@types/fs-extra": "^11.0.1",
"@types/mocha": "^10.0.2",
"@types/mock-require": "^2.0.1",
"@types/node": "^20.4.2",
"@types/sinonjs__fake-timers": "^8.1.2",
"@types/tmp": "^0.2.3",
"@types/triple-beam": "^1.3.2",
"@types/vscode": "^1.69.1",
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/utils": "^6.9.0",
"@vscode/test-electron": "^2.3.3",
"@wdio/cli": "^8.12.2",
"@wdio/local-runner": "^8.12.1",
"@wdio/mocha-framework": "^8.12.1",
"@wdio/spec-reporter": "^8.12.2",
"@wdio/types": "^8.10.4",
"chai": "^4.3.7",
"esbuild": "^0.19.4",
"eslint": "^8.51.0",
"eslint-plugin-local-rules": "^2.0.0",
"fs-extra": "^11.1.1",
"@sinonjs/fake-timers": "^11.2.2",
"@types/bcryptjs": "^2.4.6",
"@types/chai": "^4.3.11",
"@types/eslint": "^8.44.9",
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.6",
"@types/mock-require": "^2.0.3",
"@types/node": "^20.10.4",
"@types/sinonjs__fake-timers": "^8.1.5",
"@types/tmp": "^0.2.6",
"@types/triple-beam": "^1.3.5",
"@types/vscode": "^1.83.0",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@typescript-eslint/utils": "^6.14.0",
"@vscode/test-electron": "^2.3.8",
"@wdio/cli": "^8.26.1",
"@wdio/local-runner": "^8.26.1",
"@wdio/mocha-framework": "^8.24.12",
"@wdio/spec-reporter": "^8.24.12",
"@wdio/types": "^8.24.12",
"chai": "^4.3.10",
"esbuild": "^0.19.9",
"eslint": "^8.55.0",
"eslint-plugin-local-rules": "^2.0.1",
"fs-extra": "^11.2.0",
"glob": "^10.3.10",
"json-schema-to-typescript": "^13.1.1",
"mocha": "^10.2.0",
"mock-require": "^3.0.3",
"nyc": "^15.1.0",
"prettier": "^3.0.0",
"prettier": "^3.1.1",
"tmp-promise": "^3.0.3",
"ts-mocha": "^10.0.0",
"ts-mockito": "^2.6.1",
"ts-node": "^10.9.1",
"typescript": "5.1.6",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vsce": "^2.15.0",
"wdio-video-reporter": "^4.0.3",
"wdio-vscode-service": "^5.2.0",
"winston": "^3.10.0",
"wdio-video-reporter": "^4.0.5",
"wdio-vscode-service": "^5.2.2",
"yargs": "^17.7.2"
},
"nyc": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ describe(__filename, () => {
mockListClustersResponse.clusters![0]
);

const items = await ClusterListDataProvider.clusterNodeToTreeItems(
cluster
);
const items =
await ClusterListDataProvider.clusterNodeToTreeItems(cluster);
assert.deepEqual(items, [
{
description: "cluster-id-2",
Expand Down
6 changes: 3 additions & 3 deletions packages/databricks-vscode/src/cluster/ClusterManager.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {compute, Time, TimeUnits} from "@databricks/databricks-sdk";
import {Cluster} from "../sdk-extensions";
import {CancellationTokenSource, Disposable} from "vscode";
import _ from "lodash";
import * as lodash from "lodash";
export class ClusterManager implements Disposable {
private cancellationTokenSource?: CancellationTokenSource;
private refreshTimer?: NodeJS.Timer;
private refreshTimer?: NodeJS.Timeout;

constructor(
readonly cluster: Cluster,
Expand All @@ -18,7 +18,7 @@ export class ClusterManager implements Disposable {
this.refreshTimer = setInterval(async () => {
const oldState = this.cluster.state;
await this.cluster.refresh();
if (!_.isEqual(oldState, this.cluster.state)) {
if (!lodash.isEqual(oldState, this.cluster.state)) {
this.onChange(this.cluster.state);
}
}, this.refreshTimeout.toMillSeconds().value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {BundleFileSet, parseBundleYaml, writeBundleYaml} from "../bundle";
import {BundleTarget} from "../bundle/types";
import {Mutex} from "../locking";
import {BundleConfig, ConfigReaderWriter, isBundleConfigKey} from "./types";
import _ from "lodash";
import * as lodash from "lodash";
/**
* Reads and writes bundle configs. This class does not notify when the configs change.
* We use the BundleWatcher to notify when the configs change.
Expand Down Expand Up @@ -179,7 +179,7 @@ export class BundleConfigReaderWriter

const newTargetData = this.writerMapping[key](targetData, value);

if (_.isEqual(newTargetData, targetData)) {
if (lodash.isEqual(newTargetData, targetData)) {
return;
}
data.targets = {...data.targets, [target]: newTargetData};
Expand Down
8 changes: 4 additions & 4 deletions packages/databricks-vscode/src/configuration/ConfigModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Mutex} from "../locking";
import {BundleWatcher} from "../bundle";
import {CachedValue} from "../locking/CachedValue";
import {StateStorage} from "../vscode-objs/StateStorage";
import _ from "lodash";
import * as lodash from "lodash";
import {onError} from "../utils/onErrorDecorator";

function isDirectToBundleConfig(
Expand Down Expand Up @@ -74,7 +74,7 @@ export class ConfigModel implements Disposable {
(oldValue === null && newValue[key] !== undefined) ||
// Old value is not null, and old and new values for the key are different
(oldValue !== null &&
!_.isEqual(oldValue.config[key], newValue[key]))
!lodash.isEqual(oldValue.config[key], newValue[key]))
) {
this.changeEmitters.get(key)?.emitter.fire();
didAnyConfigChange = true;
Expand Down Expand Up @@ -209,8 +209,8 @@ export class ConfigModel implements Disposable {
}
| undefined
> {
const {config: fullConfig, source: fullSource} = await this.configCache
.value;
const {config: fullConfig, source: fullSource} =
await this.configCache.value;
const config = fullConfig[key] ?? defaults[key];
const source =
fullConfig[key] !== undefined ? fullSource[key] : "default";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ export class ConnectionCommands implements Disposable {
);
return;
}
const created = await this.wsfsCommands.createFolder(
rootDir
);
const created =
await this.wsfsCommands.createFolder(rootDir);
if (created === undefined) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export class DatabricksEnvFileManager implements Disposable {
)
? workspaceConfigs.userEnvFile
: isValidUserEnvPath(workspaceConfigs.msPythonEnvFile, [
this.unresolvedDatabricksEnvFile,
this.databricksEnvPath.fsPath,
])
? workspaceConfigs.msPythonEnvFile
: path.join("${workspaceFolder}", ".env");
this.unresolvedDatabricksEnvFile,
this.databricksEnvPath.fsPath,
])
? workspaceConfigs.msPythonEnvFile
: path.join("${workspaceFolder}", ".env");
this.userEnvPath = Uri.file(
systemVariableResolver.resolve(this.unresolvedUserEnvFile)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ export class DbConnectInstallPrompt implements Disposable {
return;
}

const hasPyspark = await this.pythonExtension.findPackageInEnvironment(
"pyspark"
);
const hasPyspark =
await this.pythonExtension.findPackageInEnvironment("pyspark");

const dbConnectDetails =
await this.pythonExtension.getPackageDetailsFromEnvironment(
Expand All @@ -49,8 +48,8 @@ export class DbConnectInstallPrompt implements Disposable {
const pkgUpdateMessagePart = hasPyspark
? "(pyspark will be uninstalled)"
: hasDbConnect
? `(databricks-connect will be updated to the latest version: ${dbConnectDetails.version} -> ${DATABRICKS_CONNECT_VERSION} )`
: "";
? `(databricks-connect will be updated to the latest version: ${dbConnectDetails.version} -> ${DATABRICKS_CONNECT_VERSION} )`
: "";
const message = `${mainMessagePart} ${envMessagePart}. ${pkgUpdateMessagePart}`;

const choices = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import * as os from "node:os";
import * as path from "node:path";
import {mkdtemp, readFile} from "fs/promises";
import {Mutex} from "../locking";
import * as child_process from "node:child_process";
import * as childProcess from "node:child_process";
import {promisify} from "node:util";
export const execFile = promisify(child_process.execFile);
export const execFile = promisify(childProcess.execFile);

export class MsPythonExtensionWrapper implements Disposable {
public readonly api: MsPythonExtensionApi;
Expand Down
5 changes: 2 additions & 3 deletions packages/databricks-vscode/src/logger/LoggerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ export class LoggerManager {
const outputChannel = window.createOutputChannel("Databricks Logs");
outputChannel.clear();

const sdkAndExtensionLogfile = await this.getLogFile(
"sdk-and-extension"
);
const sdkAndExtensionLogfile =
await this.getLogFile("sdk-and-extension");

NamedLogger.getOrCreate(
ExposedLoggers.SDK,
Expand Down
Loading

0 comments on commit 1835fc2

Please sign in to comment.