From 58b5919488d453d3240a14f5bfbada4b11ef60ce Mon Sep 17 00:00:00 2001 From: "ashish.alex10@gmail.com" Date: Wed, 26 Nov 2025 23:07:48 +0000 Subject: [PATCH 1/4] refactor: Simplify extension activation events to trigger on workspace file presence instead of individual commands. --- package.json | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 6d241c2f..c2243583 100644 --- a/package.json +++ b/package.json @@ -24,28 +24,8 @@ ], "activationEvents": [ "workspaceContains:**/*.sqlx", - "onCommand:extension.runFilesTagsWtOptionsInRemoteWorkspace", - "onCommand:extension.runCurrentFile", - "onCommand:extension.runCurrentFileWtApi", - "onCommand:extension.runCurrentFileWtDependenciesApi", - "onCommand:extension.runCurrentFileWtDependentsApi", - "onCommand:extension.showDependentsInGraph", - "onCommand:extension.runCurrentFileWtDeps", - "onCommand:extension.runCurrentFileWtDownstreamDeps", - "onCommand:extension.showCompiledQueryWtDryRun", - "onCommand:extension.runTag", - "onCommand:extension.runTagWtDeps", - "onCommand:extension.runTagWtDownstreamDeps", - "onCommand:extension.runTagWtApi", - "onCommand:extension.runTagWtDependenciesApi", - "onCommand:extension.runTagWtDependentsApi", - "onCommand:extension.runFilesTagsWtOptions", - "onCommand:extension.runFilesTagsWtOptionsApi", - "onCommand:extension.createNewDataformProject", - "onCommand:extension.showCompiledQueryInWebView", - "onCommand:extension.dependencyGraphPanel", - "onCommand:extension.selectWorkspaceFolder", - "onCommand:extension.clearExtensionCache" + "workspaceContains:**/workflow_settings.yaml", + "workspaceContains:**/dataform.json" ], "main": "./out/src/extension.js", "contributes": { @@ -433,4 +413,4 @@ "tablemark": "^3.1.0", "typescript": "^5.7.3" } -} +} \ No newline at end of file From 781722c1bae6b6daf9ffab07ce7c69c37b9d25fb Mon Sep 17 00:00:00 2001 From: "ashish.alex10@gmail.com" Date: Wed, 26 Nov 2025 23:13:15 +0000 Subject: [PATCH 2/4] refactor: move CDN links configuration to a dedicated constant --- src/constants.ts | 13 +++++++++++++ src/extension.ts | 13 ++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index baafcb5b..091c3eb6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -184,4 +184,17 @@ export async function getFileNotFoundErrorMessageForWebView(relativeFilePath: st `; return errorMessage; +} + + + +export const defaultCdnLinks = { + highlightJsCssUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css", + highlightJsUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js", + highlightJsOneDarkThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css", + highlightJsOneLightThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css", + highlightJsLineNoExtUri: "https://cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js", + tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_midnight.min.css", + tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_simple.min.css", + tabulatorUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/js/tabulator.min.js", } \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 238daf34..f2433b1e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -8,7 +8,7 @@ import { CustomViewProvider } from './views/register-query-results-panel'; import { dataformCodeActionProviderDisposable, applyCodeActionUsingDiagnosticMessage } from './codeActionProvider'; import { DataformRequireDefinitionProvider, DataformJsDefinitionProvider, DataformCTEDefinitionProvider } from './definitionProvider'; import { DataformConfigProvider, DataformHoverProvider, DataformBigQueryHoverProvider } from './hoverProvider'; -import { executablesToCheck } from './constants'; +import { defaultCdnLinks, executablesToCheck } from './constants'; import { getWorkspaceFolder, getCurrentFileMetadata, sendNotifactionToUserOnExtensionUpdate, selectWorkspaceFolder } from './utils'; import { executableIsAvailable } from './utils'; import { sourcesAutoCompletionDisposable, dependenciesAutoCompletionDisposable, tagsAutoCompletionDisposable, schemaAutoCompletionDisposable } from './completions'; @@ -50,16 +50,7 @@ export async function activate(context: vscode.ExtensionContext) { globalThis.cancelBigQueryJobSignal = false; globalThis.queryLimit = 1000; globalThis.diagnosticCollection = undefined; - globalThis.cdnLinks = { - highlightJsCssUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css", - highlightJsUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js", - highlightJsOneDarkThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css", - highlightJsOneLightThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css", - highlightJsLineNoExtUri: "https://cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js", - tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_midnight.min.css", - tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_simple.min.css", - tabulatorUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/js/tabulator.min.js", - }; + globalThis.cdnLinks = defaultCdnLinks; globalThis.compiledQuerySchema = undefined; globalThis.incrementalCheckBox = false; globalThis.schemaAutoCompletions = []; From 629a5d926010e94c5a169bcc2967113b79c567d7 Mon Sep 17 00:00:00 2001 From: "ashish.alex10@gmail.com" Date: Tue, 2 Dec 2025 14:36:59 +0000 Subject: [PATCH 3/4] feat: make run assertion command available to the user --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index f698ccb5..e1a4199b 100644 --- a/package.json +++ b/package.json @@ -118,6 +118,11 @@ "category": "Dataform", "title": "Run tag with dependents using API" }, + { + "command": "vscode-dataform-tools.runAssertions", + "category": "Dataform", + "title": "Run assertions in the current model" + }, { "command": "vscode-dataform-tools.runCurrentFileWtDownstreamDeps", "category": "Dataform", From 716558ff4aa3e8213f2c37f1750029cd93575278 Mon Sep 17 00:00:00 2001 From: "ashish.alex10@gmail.com" Date: Tue, 2 Dec 2025 14:40:01 +0000 Subject: [PATCH 4/4] chore: have same versions of tabulator across the board --- src/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 091c3eb6..843db936 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -194,7 +194,7 @@ export const defaultCdnLinks = { highlightJsOneDarkThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css", highlightJsOneLightThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css", highlightJsLineNoExtUri: "https://cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js", - tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_midnight.min.css", - tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_simple.min.css", + tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/css/tabulator_midnight.min.css", + tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/css/tabulator_simple.min.css", tabulatorUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/js/tabulator.min.js", -} \ No newline at end of file +}; \ No newline at end of file