From 32bab79b0cc9d0b5236c97e9954fe1752ce491e9 Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Mon, 18 May 2026 15:38:49 -0600 Subject: [PATCH 1/6] Update to Node 22.22.1, TypeScript 6.0.3, VS Code 1.120.0, and latest dependency versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade platform versions and all npm dependencies to their latest compatible releases. This includes adapting source and test code for breaking changes in TypeScript 6, newer @types/vscode, fuse.js 7.3, and VS Code 1.120's built-in code actions. Platform: - Node: 18.15.0 → 22.22.1 - TypeScript: 5.2.2 → 6.0.3 - VS Code minimum: ^1.82.0 → ^1.120.0 Dependencies updated: - @salesforce/templates 54.7.0 → 66.7.13 - @types/chai 4.3.11 → 4.3.20, chai 4.3.10 → 4.5.0 - @types/glob 8.1.0 → 9.0.0, glob 10.3.10 → 13.0.6 - @types/mocha 10.0.6 → 10.0.10, mocha 10.2.0 → 11.7.5 - @types/node 18.11.9 → 22.17.2 - @types/semver 7.5.6 → 7.7.1, semver 7.5.4 → 7.8.0 - @types/shelljs 0.8.11 → 0.10.0, shelljs 0.8.5 → 0.10.0 - @types/sinon 17.0.2 → 21.0.1, sinon 17.0.1 → 22.0.0 - @types/vscode 1.82.0 → 1.120.0 - @types/which 3.0.3 → 3.0.4, which 4.0.0 → 6.0.1 - @vscode/test-electron 2.3.8 → 2.5.2 - ajv 8.12.0 → 8.20.0 - better-ajv-errors 1.2.0 → 2.0.3 - cross-env 7.0.3 → 10.1.0 - eslint 6.7.2 → 8.57.1, eslint-config-prettier 2.9.0 → 9.1.2 - fuse.js 7.0.0 → 7.3.0 - istanbul-lib-instrument 6.0.1 → 6.0.3 - istanbul-lib-source-maps 4.0.1 → 5.0.6 - istanbul-reports 3.1.6 → 3.2.0 - jsonc-parser 3.2.0 → 3.3.1 - nyc 15.1.0 → 18.0.0 - prettier 2.6.2 → 3.8.3 - request-light 0.7.0 → 0.8.0 - shx 0.3.4 → 0.4.0 - tmp 0.2.1 → 0.2.5 - vscode-json-languageservice ^5.3.7 → 5.7.2 - vscode-languageclient 8.1.0 → 9.0.1 Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/pr-build-and-test.yml | 2 +- .nvmrc | 2 +- contributing/developing.md | 2 +- .../analyticsdx-vscode-core/package.json | 42 +++++++++---------- .../analyticsdx-vscode-core/src/util/sfdx.ts | 2 +- .../telemetry/telemetry.test.ts | 1 + .../analyticsdx-vscode-core/tsconfig.json | 3 ++ .../analyticsdx-vscode-templates/package.json | 34 +++++++-------- .../src/templateLinter.ts | 2 +- .../telemetry/telemetry.test.ts | 1 + .../vscode-integration/vscodeTestUtils.ts | 5 ++- .../tsconfig.json | 3 ++ extensions/analyticsdx-vscode/package.json | 4 +- package.json | 24 +++++------ .../analyticsdx-template-lint/package.json | 27 ++++++------ .../analyticsdx-template-lint/src/utils.ts | 4 ++ .../test/testutils.ts | 6 +-- .../analyticsdx-template-lint/tsconfig.json | 2 + .../package.json | 24 +++++------ .../src/testrunner.ts | 4 +- .../tsconfig.json | 2 + 22 files changed, 109 insertions(+), 89 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8bd99bb8..6556cb29 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -6,7 +6,7 @@ on: - develop env: - NODE_VERSION: '18.15.0' + NODE_VERSION: '22.22.1' jobs: # We really only need to run lint on one job so we'll do it here diff --git a/.github/workflows/pr-build-and-test.yml b/.github/workflows/pr-build-and-test.yml index d07c1b76..0748133a 100644 --- a/.github/workflows/pr-build-and-test.yml +++ b/.github/workflows/pr-build-and-test.yml @@ -6,7 +6,7 @@ on: - develop env: - NODE_VERSION: '18.15.0' + NODE_VERSION: '22.22.1' jobs: pr-build: diff --git a/.nvmrc b/.nvmrc index e048c8ca..5ecee254 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.15.0 +v22.22.1 diff --git a/contributing/developing.md b/contributing/developing.md index a69a07e9..c92def2c 100644 --- a/contributing/developing.md +++ b/contributing/developing.md @@ -3,7 +3,7 @@ ## Pre-requisites 1. We are using the same version of Node that the supported release of VSCode uses (see `engines.vscode` in the - extensions' `package.json`'s, currently 18.15.0). + extensions' `package.json`'s, currently 22.22.1). If you need to work with multiple versions of Node (e.g. for other projects), you might consider using [nvm](https://github.com/creationix/nvm). 1. It is suggested, though not required, that you use the Insiders version of VS diff --git a/extensions/analyticsdx-vscode-core/package.json b/extensions/analyticsdx-vscode-core/package.json index 2c22aef4..9288f2bd 100644 --- a/extensions/analyticsdx-vscode-core/package.json +++ b/extensions/analyticsdx-vscode-core/package.json @@ -19,40 +19,40 @@ }, "license": "BSD-3-Clause", "engines": { - "vscode": "^1.82.0" + "vscode": "^1.120.0" }, "categories": [ "Other" ], "dependencies": { "@salesforce/salesforcedx-utils-vscode": "file:../../lib/salesforcedx-utils-vscode.tgz", - "@salesforce/templates": "54.7.0", - "glob": "10.3.10", - "semver": "7.5.4", - "tmp": "0.2.1", - "which": "4.0.0" + "@salesforce/templates": "66.7.13", + "glob": "13.0.6", + "semver": "7.8.0", + "tmp": "0.2.5", + "which": "6.0.1" }, "devDependencies": { "@salesforce/analyticsdx-test-utils-vscode": "1.2.1", - "@types/chai": "4.3.11", - "@types/glob": "8.1.0", - "@types/mocha": "10.0.6", - "@types/node": "18.11.9", - "@types/semver": "7.5.6", - "@types/sinon": "17.0.2", + "@types/chai": "4.3.20", + "@types/glob": "9.0.0", + "@types/mocha": "10.0.10", + "@types/node": "22.17.2", + "@types/semver": "7.7.1", + "@types/sinon": "21.0.1", "@types/tmp": "0.2.6", - "@types/vscode": "1.82.0", - "@types/which": "3.0.3", - "chai": "4.3.10", - "cross-env": "7.0.3", - "mocha": "10.2.0", + "@types/vscode": "1.120.0", + "@types/which": "3.0.4", + "chai": "4.5.0", + "cross-env": "10.1.0", + "mocha": "11.7.5", "mocha-junit-reporter": "2.2.1", "mocha-multi-reporters": "1.5.1", "mock-spawn": "0.2.6", - "nyc": "15.1.0", - "shx": "0.3.4", - "sinon": "17.0.1", - "typescript": "5.2.2" + "nyc": "18.0.0", + "shx": "0.4.0", + "sinon": "22.0.0", + "typescript": "6.0.3" }, "scripts": { "vscode:prepublish": "npm prune --production", diff --git a/extensions/analyticsdx-vscode-core/src/util/sfdx.ts b/extensions/analyticsdx-vscode-core/src/util/sfdx.ts index ed062276..b1931dcd 100644 --- a/extensions/analyticsdx-vscode-core/src/util/sfdx.ts +++ b/extensions/analyticsdx-vscode-core/src/util/sfdx.ts @@ -10,7 +10,7 @@ import { JsonArray, JsonMap } from '@salesforce/ts-types'; import * as path from 'path'; import * as semver from 'semver'; import * as vscode from 'vscode'; -import * as which from 'which'; +import which from 'which'; import { BaseSfdxCommandletExecutor, CliCommandExecutor, diff --git a/extensions/analyticsdx-vscode-core/test/vscode-integration/telemetry/telemetry.test.ts b/extensions/analyticsdx-vscode-core/test/vscode-integration/telemetry/telemetry.test.ts index 245bbe8f..7b8820a7 100644 --- a/extensions/analyticsdx-vscode-core/test/vscode-integration/telemetry/telemetry.test.ts +++ b/extensions/analyticsdx-vscode-core/test/vscode-integration/telemetry/telemetry.test.ts @@ -23,6 +23,7 @@ class MockExtensionContext implements vscode.ExtensionContext { public globalStorageUri!: vscode.ExtensionContext['globalStorageUri']; public logUri!: vscode.ExtensionContext['logUri']; public extension!: vscode.ExtensionContext['extension']; + public languageModelAccessInformation!: vscode.ExtensionContext['languageModelAccessInformation']; public subscriptions = []; public workspaceState!: vscode.ExtensionContext['workspaceState']; public globalState!: vscode.ExtensionContext['globalState']; diff --git a/extensions/analyticsdx-vscode-core/tsconfig.json b/extensions/analyticsdx-vscode-core/tsconfig.json index 2989e8da..285dc844 100644 --- a/extensions/analyticsdx-vscode-core/tsconfig.json +++ b/extensions/analyticsdx-vscode-core/tsconfig.json @@ -7,6 +7,9 @@ "declarationMap": true, "declaration": true, "moduleResolution": "node", + "ignoreDeprecations": "6.0", + "esModuleInterop": true, + "types": ["mocha", "node"], "noImplicitAny": true, "noUnusedLocals": true, "rootDir": ".", diff --git a/extensions/analyticsdx-vscode-templates/package.json b/extensions/analyticsdx-vscode-templates/package.json index e77ab0ab..abe5f50a 100644 --- a/extensions/analyticsdx-vscode-templates/package.json +++ b/extensions/analyticsdx-vscode-templates/package.json @@ -19,7 +19,7 @@ }, "license": "BSD-3-Clause", "engines": { - "vscode": "^1.82.0" + "vscode": "^1.120.0" }, "categories": [ "Other" @@ -27,32 +27,32 @@ "dependencies": { "@salesforce/analyticsdx-template-lint": "1.2.1", "@salesforce/salesforcedx-utils-vscode": "file:../../lib/salesforcedx-utils-vscode.tgz", - "jsonc-parser": "3.2.0", + "jsonc-parser": "3.3.1", "lodash.isequal": "4.5.0", - "request-light": "0.7.0", + "request-light": "0.8.0", "vscode-json-languageserver": "1.3.4", - "vscode-languageclient": "8.1.0" + "vscode-languageclient": "9.0.1" }, "devDependencies": { "@salesforce/analyticsdx-test-utils-vscode": "1.2.1", - "@types/chai": "4.3.11", + "@types/chai": "4.3.20", "@types/lodash.isequal": "4.5.8", - "@types/mocha": "10.0.6", - "@types/node": "18.11.9", - "@types/sinon": "17.0.2", + "@types/mocha": "10.0.10", + "@types/node": "22.17.2", + "@types/sinon": "21.0.1", "@types/tmp": "0.2.6", - "@types/vscode": "1.82.0", - "chai": "4.3.10", - "cross-env": "7.0.3", - "mocha": "10.2.0", + "@types/vscode": "1.120.0", + "chai": "4.5.0", + "cross-env": "10.1.0", + "mocha": "11.7.5", "mocha-junit-reporter": "2.2.1", "mocha-multi-reporters": "1.5.1", - "nyc": "15.1.0", + "nyc": "18.0.0", "readdirp": "3.6.0", - "shx": "0.3.4", - "sinon": "17.0.1", - "tmp": "0.2.1", - "typescript": "5.2.2" + "shx": "0.4.0", + "sinon": "22.0.0", + "tmp": "0.2.5", + "typescript": "6.0.3" }, "scripts": { "vscode:prepublish": "npm prune --production", diff --git a/extensions/analyticsdx-vscode-templates/src/templateLinter.ts b/extensions/analyticsdx-vscode-templates/src/templateLinter.ts index a5d44b56..0a9ad49a 100644 --- a/extensions/analyticsdx-vscode-templates/src/templateLinter.ts +++ b/extensions/analyticsdx-vscode-templates/src/templateLinter.ts @@ -130,7 +130,7 @@ export class TemplateLinterManager extends Disposable { vscode.languages.createDiagnosticCollection('analyticsdx-templates') ); - private timer: NodeJS.Timer | undefined; + private timer: ReturnType | undefined; private _isLinting = false; private templateInfoQueue = new Set(); diff --git a/extensions/analyticsdx-vscode-templates/test/vscode-integration/telemetry/telemetry.test.ts b/extensions/analyticsdx-vscode-templates/test/vscode-integration/telemetry/telemetry.test.ts index 423d132b..c18d4fe8 100644 --- a/extensions/analyticsdx-vscode-templates/test/vscode-integration/telemetry/telemetry.test.ts +++ b/extensions/analyticsdx-vscode-templates/test/vscode-integration/telemetry/telemetry.test.ts @@ -22,6 +22,7 @@ class MockExtensionContext implements vscode.ExtensionContext { public globalStorageUri!: vscode.ExtensionContext['globalStorageUri']; public logUri!: vscode.ExtensionContext['logUri']; public extension!: vscode.ExtensionContext['extension']; + public languageModelAccessInformation!: vscode.ExtensionContext['languageModelAccessInformation']; public subscriptions = []; public workspaceState!: vscode.ExtensionContext['workspaceState']; public globalState!: vscode.ExtensionContext['globalState']; diff --git a/extensions/analyticsdx-vscode-templates/test/vscode-integration/vscodeTestUtils.ts b/extensions/analyticsdx-vscode-templates/test/vscode-integration/vscodeTestUtils.ts index 6319fa7f..7d760204 100644 --- a/extensions/analyticsdx-vscode-templates/test/vscode-integration/vscodeTestUtils.ts +++ b/extensions/analyticsdx-vscode-templates/test/vscode-integration/vscodeTestUtils.ts @@ -492,7 +492,10 @@ export async function getCodeActions(uri: vscode.Uri, range: vscode.Range): Prom if (!result) { expect.fail('Expected vscode.CodeAction[], got undefined'); } - return result!; + // Filter out built-in VS Code AI/Copilot actions (e.g. "Fix", "Explain", "Modify") that are + // injected by VS Code 1.120+ on diagnostics, keeping only our extension's quick fix actions. + const builtinActionTitles = new Set(['Fix', 'Explain', 'Modify']); + return result!.filter(a => !builtinActionTitles.has(a.title)); } export async function getHovers(uri: vscode.Uri, range: vscode.Position): Promise { diff --git a/extensions/analyticsdx-vscode-templates/tsconfig.json b/extensions/analyticsdx-vscode-templates/tsconfig.json index cd05d0ac..253d500f 100644 --- a/extensions/analyticsdx-vscode-templates/tsconfig.json +++ b/extensions/analyticsdx-vscode-templates/tsconfig.json @@ -7,6 +7,9 @@ "declarationMap": true, "declaration": true, "moduleResolution": "node", + "ignoreDeprecations": "6.0", + "esModuleInterop": true, + "types": ["mocha", "node"], "noImplicitAny": true, "noUnusedLocals": true, "rootDir": ".", diff --git a/extensions/analyticsdx-vscode/package.json b/extensions/analyticsdx-vscode/package.json index 57830869..fa7b0197 100644 --- a/extensions/analyticsdx-vscode/package.json +++ b/extensions/analyticsdx-vscode/package.json @@ -18,10 +18,10 @@ }, "license": "BSD-3-Clause", "engines": { - "vscode": "^1.82.0" + "vscode": "^1.120.0" }, "devDependencies": { - "shx": "0.3.4" + "shx": "0.4.0" }, "scripts": { "clean": "shx rm -f analyticsdx-vscode-*.vsix", diff --git a/package.json b/package.json index 02a4eeaa..69c5ace5 100644 --- a/package.json +++ b/package.json @@ -6,28 +6,28 @@ "url": "git+https://github.com/forcedotcom/analyticsdx-vscode.git" }, "engines": { - "node": ">=18.15.0" + "node": ">=22.22.1" }, "dependencies": { - "node": "^18.15.0", - "npm": "^6" + "node": "^22.22.1", + "npm": "^10" }, "devDependencies": { "@salesforce/dev-config": "1.5.0", "@types/lerna-alias": "3.0.4", - "@types/shelljs": "0.8.11", - "@vscode/test-electron": "2.3.8", - "eslint": "6.7.2", - "eslint-config-prettier": "2.9.0", + "@types/shelljs": "0.10.0", + "@vscode/test-electron": "2.5.2", + "eslint": "8.57.1", + "eslint-config-prettier": "9.1.2", "lerna": "4.0.0", "lerna-alias": "3.0.2", "nlf": "2.1.1", - "prettier": "2.6.2", - "shelljs": "0.8.5", - "shx": "0.3.4", + "prettier": "3.8.3", + "shelljs": "0.10.0", + "shx": "0.4.0", "tslint": "6.1.3", "tslint-no-focused-test": "0.5.0", - "typescript": "5.2.2", + "typescript": "6.0.3", "vsce": "1.103.1" }, "scripts": { @@ -44,7 +44,7 @@ "test:vscode-insiders-integration": "lerna exec --concurrency 1 --stream --bail=false -- npm run test:vscode-insiders-integration --if-present", "test:vsix-integration": "npm run build-all-vsixs && npm run bootstrap && npm run compile && lerna exec --concurrency 1 --stream --bail=false -- npm run test:vsix-integration --if-present", "watch": "lerna run --parallel watch", - "eslint-check": "eslint --print-config .eslintrc.json | eslint-config-prettier-check", + "eslint-check": "npx eslint-config-prettier .eslintrc.json", "reformat": "node scripts/reformat-with-prettier.js", "vscode:package": "lerna exec --scope @salesforce/analyticsdx-template-lint -- npm prune --production && lerna run vscode:package --concurrency 1 && node scripts/reformat-with-prettier", "vscode:sha256": "lerna run vscode:sha256 --concurrency 1", diff --git a/packages/analyticsdx-template-lint/package.json b/packages/analyticsdx-template-lint/package.json index 19292939..d59255f7 100644 --- a/packages/analyticsdx-template-lint/package.json +++ b/packages/analyticsdx-template-lint/package.json @@ -6,25 +6,26 @@ "description": "Provides a linting api for Salesforce/TableauCRM analytics templates", "license": "BSD-3-Clause", "dependencies": { - "fuse.js": "7.0.0", - "jsonc-parser": "3.2.0" + "fuse.js": "7.3.0", + "jsonc-parser": "3.3.1" }, "devDependencies": { - "@types/chai": "4.3.11", - "@types/mocha": "10.0.6", - "@types/node": "18.11.9", - "ajv": "8.12.0", - "better-ajv-errors": "1.2.0", - "chai": "4.3.10", - "mocha": "10.2.0", + "@types/chai": "4.3.20", + "@types/mocha": "10.0.10", + "@types/node": "22.17.2", + "ajv": "8.20.0", + "better-ajv-errors": "2.0.3", + "chai": "4.5.0", + "mocha": "11.7.5", "mocha-junit-reporter": "2.2.1", "mocha-multi-reporters": "1.5.1", - "nyc": "15.1.0", - "shx": "0.3.4", - "typescript": "5.2.2" + "readdirp": "3.6.0", + "nyc": "18.0.0", + "shx": "0.4.0", + "typescript": "6.0.3" }, "optionalDependencies": { - "vscode-json-languageservice": "^5.3.7" + "vscode-json-languageservice": "5.7.2" }, "files": [ "out/src" diff --git a/packages/analyticsdx-template-lint/src/utils.ts b/packages/analyticsdx-template-lint/src/utils.ts index 2b89c287..6ef91edf 100644 --- a/packages/analyticsdx-template-lint/src/utils.ts +++ b/packages/analyticsdx-template-lint/src/utils.ts @@ -225,6 +225,10 @@ export function fuzzySearcher( const searchOpts = { limit }; let fuzzer: Fuse | undefined; return (pattern: string) => { + // empty patterns should never match anything + if (!pattern) { + return noFuzzyMatch(); + } // lazily, make a copy of the array since we have to index into it later and it could change outside of this // generated method if (!list) { diff --git a/packages/analyticsdx-template-lint/test/testutils.ts b/packages/analyticsdx-template-lint/test/testutils.ts index c2c1177d..7adaf020 100644 --- a/packages/analyticsdx-template-lint/test/testutils.ts +++ b/packages/analyticsdx-template-lint/test/testutils.ts @@ -122,7 +122,7 @@ export function generateJsonSchemaValidFilesTestSuite( return ( readdirp .promise(dir, { type: 'files' }) - .then(entries => { + .then((entries: readdirp.EntryInfo[]) => { // make a testsuite that just fails if we didn't find any test files if (entries.length <= 0) { return describe(schemaName + ' validation test', () => { @@ -137,7 +137,7 @@ export function generateJsonSchemaValidFilesTestSuite( const validator = ajv.compile(schema); const readFile = promisify(fs.readFile); - entries.forEach(entry => { + entries.forEach((entry: readdirp.EntryInfo) => { it(path.join(testFilesDir, entry.path), async () => { const json = await readFile(entry.fullPath, { encoding: 'utf-8' }).then(jsoncParse); const result = validator(json); @@ -151,7 +151,7 @@ export function generateJsonSchemaValidFilesTestSuite( } }) // make a testsuite that fails if we get an error find test files - .catch(error => { + .catch((error: unknown) => { return Promise.resolve( describe(schemaName + ' validation test', () => { it('error loading test files', () => { diff --git a/packages/analyticsdx-template-lint/tsconfig.json b/packages/analyticsdx-template-lint/tsconfig.json index 9c7b1b6c..11d0b44a 100644 --- a/packages/analyticsdx-template-lint/tsconfig.json +++ b/packages/analyticsdx-template-lint/tsconfig.json @@ -8,6 +8,8 @@ // need this for fuse.js to work right "esModuleInterop": true, "moduleResolution": "node", + "ignoreDeprecations": "6.0", + "types": ["mocha", "node"], "noImplicitAny": true, "rootDir": ".", "outDir": "out", diff --git a/packages/analyticsdx-test-utils-vscode/package.json b/packages/analyticsdx-test-utils-vscode/package.json index 665096d8..7c8bf6e1 100644 --- a/packages/analyticsdx-test-utils-vscode/package.json +++ b/packages/analyticsdx-test-utils-vscode/package.json @@ -6,26 +6,26 @@ "description": "Provides test utilities to run mocha tests", "license": "BSD-3-Clause", "devDependencies": { - "@types/chai": "4.3.11", - "@types/glob": "8.1.0", - "@types/mocha": "10.0.6", - "@types/node": "18.11.9", - "chai": "4.3.10", + "@types/chai": "4.3.20", + "@types/glob": "9.0.0", + "@types/mocha": "10.0.10", + "@types/node": "22.17.2", + "chai": "4.5.0", "decache": "4.6.2", - "glob": "10.3.10", + "glob": "13.0.6", "istanbul-lib-coverage": "3.2.2", "istanbul-lib-hook": "3.0.0", - "istanbul-lib-instrument": "6.0.1", + "istanbul-lib-instrument": "6.0.3", "istanbul-lib-report": "3.0.1", - "istanbul-lib-source-maps": "4.0.1", - "istanbul-reports": "3.1.6", - "mocha": "10.2.0", + "istanbul-lib-source-maps": "5.0.6", + "istanbul-reports": "3.2.0", + "mocha": "11.7.5", "mocha-junit-reporter": "2.2.1", "mocha-multi-reporters": "1.5.1", "mock-spawn": "0.2.6", - "shx": "0.3.4", + "shx": "0.4.0", "source-map-support": "0.5.21", - "typescript": "5.2.2" + "typescript": "6.0.3" }, "scripts": { "compile": "tsc -p ./", diff --git a/packages/analyticsdx-test-utils-vscode/src/testrunner.ts b/packages/analyticsdx-test-utils-vscode/src/testrunner.ts index f6dbb886..ce3d7e4a 100644 --- a/packages/analyticsdx-test-utils-vscode/src/testrunner.ts +++ b/packages/analyticsdx-test-utils-vscode/src/testrunner.ts @@ -90,8 +90,8 @@ function run(testsRoot: any, clb: any): any { // Glob test files const files = globSync('**/**.test.js', { cwd: testsRoot }); // Fill into Mocha - files.forEach((f): Mocha => { - return mocha.addFile(paths.join(testsRoot, f)); + files.forEach(f => { + mocha.addFile(paths.join(testsRoot, f)); }); // Run the tests let failureCount = 0; diff --git a/packages/analyticsdx-test-utils-vscode/tsconfig.json b/packages/analyticsdx-test-utils-vscode/tsconfig.json index 62281239..b3b83613 100644 --- a/packages/analyticsdx-test-utils-vscode/tsconfig.json +++ b/packages/analyticsdx-test-utils-vscode/tsconfig.json @@ -6,6 +6,8 @@ "sourceMap": true, "declaration": true, "moduleResolution": "node", + "ignoreDeprecations": "6.0", + "types": ["mocha", "node"], "noImplicitAny": true, "rootDir": ".", "outDir": "out", From 5d52936fdb1fc8641d3a43863f961e69b958abbb Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Mon, 18 May 2026 15:53:39 -0600 Subject: [PATCH 2/6] update typescript version settings this changed somewhere along the line. --- .vscode/settings.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d3bdca77..9ccf3843 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,8 +10,7 @@ "search.exclude": { "**/out": true }, - "typescript.tsdk": "./node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true, + "js/ts.tsdk.path": "./node_modules/typescript/lib", "editor.tabSize": 2, "editor.formatOnSave": true, "editor.rulers": [120], From fe715b3ba9d8480860135700753787f5f7cf18f4 Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Mon, 18 May 2026 15:54:09 -0600 Subject: [PATCH 3/6] git ignore some more things --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 7f0c716f..0e591f01 100644 --- a/.gitignore +++ b/.gitignore @@ -82,6 +82,7 @@ jspm_packages/ # SalesforceDX .sfdx/ +.sf/ # Node lock files (actually causes issues with the symlinking that lerna does, so ignore) package-lock.json @@ -92,5 +93,10 @@ package-lock.json # vim swap files *.swp +# Claude user-specific things +.agents/ +.claude/settings.local.json + # output from 'npm run license-report' analyticsdx-vscode-license-report.csv + From 03b71a864db66d6e349ce9d173a0b9e00f7e26ce Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Mon, 18 May 2026 15:55:17 -0600 Subject: [PATCH 4/6] no need to recommened git extensions devs can decide if they want those, they're not needed for working in this project. --- .vscode/extensions.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 3f91a8ee..94c7ed8f 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,9 +2,6 @@ // See https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions // for the documentation about the extensions.json format "recommendations": [ - // Git - "eamodio.gitlens", - "donjayamanne.githistory", // Linters "dbaeumer.vscode-eslint", "ms-vscode.vscode-typescript-tslint-plugin", From ac0d7aff8cf59bc401512e9339e9522ed9c135ab Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Mon, 18 May 2026 16:01:00 -0600 Subject: [PATCH 5/6] Rev workitem build for git2gus --- .git2gus/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.git2gus/config.json b/.git2gus/config.json index a03f9973..7b149b48 100644 --- a/.git2gus/config.json +++ b/.git2gus/config.json @@ -1,6 +1,6 @@ { "productTag": "a1aB00000001F81IAE", - "defaultBuild": "248", + "defaultBuild": "264", "issueTypeLabels": { "feature": "USER STORY", "enhancement": "USER STORY", From d4ad84a5f8f77666f62714f6623505a3d6f6d1c3 Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Wed, 20 May 2026 09:54:02 -0600 Subject: [PATCH 6/6] Fix CI spawn sf ENOENT crash from marketplace extension activation The marketplace salesforcedx-vscode-core v66.11.0 extension spawns 'sf' during telemetry initialization. In CI where sf is not installed, this causes an unhandled error event on the ChildProcess that crashes the test runner. Fix by disabling telemetry via --telemetry-level off in the VS Code test launch args, and providing a minimal sf stub script in all CI workflow jobs as a safety net. Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/build-and-test.yml | 14 ++++++++++++++ .github/workflows/pr-build-and-test.yml | 12 ++++++++++++ scripts/run-vscode-integration-tests.js | 4 ++++ 3 files changed, 30 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6556cb29..84a1bc13 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -21,6 +21,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + # The marketplace salesforcedx-vscode-core extension tries to spawn 'sf' during activation. + # Provide a stub so it doesn't crash with ENOENT in CI where sf is not installed. + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build run: | npm install @@ -40,6 +44,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build run: | npm install @@ -63,6 +69,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build # do --ignore-scripts so it skips the bootstrap in the extensions/, since test:vsix-integration runs # a git clean and a bootstrap to build the vsix's @@ -96,6 +104,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build run: | npm install @@ -117,6 +127,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + # Windows equivalent: create a minimal sf.cmd that exits with code 1 + run: | + echo @exit /b 1 > C:\Windows\sf.cmd - name: Build run: | npm install diff --git a/.github/workflows/pr-build-and-test.yml b/.github/workflows/pr-build-and-test.yml index 0748133a..a29ff057 100644 --- a/.github/workflows/pr-build-and-test.yml +++ b/.github/workflows/pr-build-and-test.yml @@ -20,6 +20,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + # The marketplace salesforcedx-vscode-core extension tries to spawn 'sf' during activation. + # Provide a stub so it doesn't crash with ENOENT in CI where sf is not installed. + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build run: | npm install @@ -43,6 +47,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build run: | npm install @@ -65,6 +71,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + run: sudo sh -c 'printf "#!/bin/sh\nexit 1\n" > /usr/local/bin/sf && chmod +x /usr/local/bin/sf' - name: Build # do --ignore-scripts so it skips the bootstrap in the extensions/, since test:vsix-integration runs # a git clean and a bootstrap to build the vsix's @@ -89,6 +97,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Create sf CLI stub + # Windows equivalent: create a minimal sf.cmd that exits with code 1 + run: | + echo @exit /b 1 > C:\Windows\sf.cmd - name: Build # Note: npm run lint fails silently on windows for some reason, but we really only need # to run it in one job anyways diff --git a/scripts/run-vscode-integration-tests.js b/scripts/run-vscode-integration-tests.js index a5d7a6f2..97f33e82 100755 --- a/scripts/run-vscode-integration-tests.js +++ b/scripts/run-vscode-integration-tests.js @@ -52,6 +52,10 @@ if (fs.existsSync(userDaFile)) { '--disable-extensions', // turn off workspace trust for tests (so it doesn't show the big dialog on startup) '--disable-workspace-trust', + // disable telemetry to prevent the marketplace salesforcedx-vscode-core extension from + // trying to spawn 'sf' for telemetry user id (which fails with ENOENT in CI) + '--telemetry-level', + 'off', '--sync', 'off' ]