Skip to content
Open
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 2.1.2

### Security

- **Dependency upgrades for Snyk findings.** Bumps `react-router`, `glob`, and `ajv`/`fast-uri` to patched versions that address reported CSRF, brace-expansion, and URI-parsing vulnerabilities.

### UX improvements

- **Fix: Model Lineage opens the correct view on first use.** Opening Model Lineage from a model `.sql`, `.model.json`, or `.yml` file (context menu, editor title, or `Cmd+Shift+L`) now shows the model lineage graph in Data Explorer instead of Column Lineage the first time the panel opens.

## 2.1.1

### Airflow
Expand Down
4 changes: 3 additions & 1 deletion DEVELOPMENT_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ For general environment setup (Trino, Java, dbt, etc.), see the **[Setup Guide](

For development, you'll also need:

- **Node.js** (v20.x - v22.x LTS recommended)
<!-- https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch -->

- **Node.js** (v22.22+ or v24.x LTS recommended)
- **npm** (10.x or higher)
- **VS Code** (version 1.87.0 or higher)

Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const config = {
preset: 'ts-jest',
moduleNameMapper: {
'^vscode$': '<rootDir>/src/__mocks__/vscode.js',
admin: ['<rootDir>/src/admin'],
'@services/(.*)': ['<rootDir>/src/services/$1'],
'@services': ['<rootDir>/src/services'],
Expand All @@ -24,6 +25,7 @@ const config = {
'<rootDir>/.venv/',
'/__tests__/helpers\\.ts$',
],
modulePathIgnorePatterns: ['<rootDir>/out/', '<rootDir>/dist/'],
};

module.exports = config;
71 changes: 28 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/Workday/dj.git"
},
"version": "2.1.1",
"version": "2.1.2",
"workspaces": [
"web"
],
Expand Down Expand Up @@ -1012,9 +1012,9 @@
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json"
},
"dependencies": {
"ajv": "^8.17.1",
"ajv": "^8.20.0",
"dompurify": "^3.2.6",
"glob": "^11.0.3",
"glob": "^12.0.0",
"html-react-parser": "^5.2.5",
"jsonc-parser": "^3.3.1",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -1049,7 +1049,7 @@
"typescript-eslint": "^8.50.1"
},
"overrides": {
"fast-uri": "3.1.4",
"brace-expansion@5": "5.0.8"
"fast-uri": "3.1.5",
"brace-expansion@5": "5.0.9"
}
}
66 changes: 66 additions & 0 deletions src/__mocks__/vscode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Jest stub for the VS Code extension API. Extension code imports `vscode` at
* module load; Node/Jest has no real module, so tests map here via jest.config.js.
*/

class ThemeIcon {
constructor(id) {
this.id = id;
}
}

const ConfigurationTarget = {
Global: 1,
Workspace: 2,
WorkspaceFolder: 3,
};

class Uri {
static file(fsPath) {
return { fsPath };
}
}

const configuration = {
get: (_key, defaultValue) => defaultValue,
update: async () => undefined,
};

const workspace = {
workspaceFolders: [{ uri: { fsPath: process.cwd() } }],
findFiles: async () => [],
getConfiguration: () => configuration,
fs: {
readFile: async () => new Uint8Array(),
writeFile: async () => undefined,
createDirectory: async () => undefined,
stat: async () => ({ type: 1 }),
delete: async () => undefined,
},
onDidSaveTextDocument: () => ({ dispose: () => undefined }),
createFileSystemWatcher: () => ({
onDidCreate: () => ({ dispose: () => undefined }),
onDidChange: () => ({ dispose: () => undefined }),
onDidDelete: () => ({ dispose: () => undefined }),
dispose: () => undefined,
}),
};

const window = {
tabGroups: { all: [], onDidChangeTabs: () => ({ dispose: () => undefined }) },
showErrorMessage: async () => undefined,
setStatusBarMessage: () => ({ dispose: () => undefined }),
};

const commands = {
executeCommand: async () => undefined,
};

module.exports = {
ThemeIcon,
ConfigurationTarget,
Uri,
workspace,
window,
commands,
};
9 changes: 6 additions & 3 deletions src/services/columnLineage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,12 @@ export class ColumnLineageService implements DJService {
if (this.lastStatus) {
this.sendStatus(this.lastStatus.message, this.lastStatus.variant);
}
void this.handleAutoRefresh(vscode.window.activeTextEditor, {
retry: true,
});
// Only auto-refresh when restoring prior column state — not on cold panel open.
if (this.lastContext || this.lastSourceContext) {
void this.handleAutoRefresh(vscode.window.activeTextEditor, {
retry: true,
});
}
}

public sendConfig(): void {
Expand Down
19 changes: 0 additions & 19 deletions src/services/trino/__tests__/profiles.test.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
import { afterEach, describe, expect, it, jest } from '@jest/globals';

// Mock vscode before importing anything that pulls it in transitively.
// The profiles module only relies on `vscode.workspace.getConfiguration` for
// the (settings-bound) profile list + active-profile pointer, and
// `vscode.ConfigurationTarget.Workspace` as an enum constant. Stubbing those
// is enough for the pure-logic tests below.
jest.mock(
'vscode',
() => ({
workspace: {
getConfiguration: () => ({
get: <T>(_key: string, fallback: T) => fallback,
update: jest.fn(),
}),
},
ConfigurationTarget: { Workspace: 2 },
}),
{ virtual: true },
);

import {
resolveProfileSecret,
TrinoProfileError,
Expand Down
6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"@xyflow/react": "^12.8.6",
"diff": "^8.0.3",
"driver.js": "^1.3.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-hook-form": "^7.52.1",
"react-router": "^7.3.0",
"react-router": "^8.3.0",
"react-syntax-highlighter": "^16.1.0",
"react-use": "^17.5.0",
"zustand": "^4.5.7"
Expand Down
2 changes: 1 addition & 1 deletion web/src/context/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import {
BrowserRouter,
createBrowserRouter,
Route,
RouterProvider,
Routes,
} from 'react-router';
import { RouterProvider } from 'react-router/dom';
import { useMount, useUnmount } from 'react-use';
import * as uuid from 'uuid';

Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/DataExplorer/DataExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function DataExplorer() {
<div
className={`absolute inset-0 ${activeView === 'column' ? '' : 'hidden'}`}
>
<ColumnLineage />
{activeView === 'column' ? <ColumnLineage /> : null}
</div>
<div
className={`absolute inset-0 ${activeView === 'sql' ? '' : 'hidden'}`}
Expand Down