Skip to content

all: Update esbuild and tsx across packages#2341

Merged
bwateratmsft merged 6 commits into
mainfrom
copilot/update-esbuild-and-tsx
Jun 16, 2026
Merged

all: Update esbuild and tsx across packages#2341
bwateratmsft merged 6 commits into
mainfrom
copilot/update-esbuild-and-tsx

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Ensures each package resolves a single esbuild@0.28.1 (aligning with the prior eng bump #2340) instead of two copies — a 0.28.x copy plus an esbuild 0.27.x copy bundled by tsx@4.21.0.

Rather than using overrides, this migrates every package to @microsoft/vscode-azext-eng@^1.1.0-alpha.1 (the latest alpha tag), which already declares esbuild ^0.28.0 and makes tsx an optional dependency. Applied to webview, github, utils, appsettings, azure, and appservice:

  • Bumped @microsoft/vscode-azext-eng to ^1.1.0-alpha.1 in each package.
  • Added "tsx": "*" to the dev dependencies of utils, azure, and appservice, whose tests run under vscode-test (its base mocha config does require: ['tsx']).
  • github and appsettings have no tests and no esbuild usage, so they get neither tsx nor a direct esbuild.
  • webview runs mocha directly but keeps import=tsx plus "tsx": "*", because its unit tests import @fluentui/react-components (CommonJS) at runtime, which Node's native --experimental-transform-types cannot load.
  • Regenerated each package-lock.json so only the eng/tsx/esbuild resolutions change, leaving unrelated dependencies pinned.

The eng bump pulls a newer typescript-eslint, which surfaced new lint errors. These are fixed in azure, appservice, and utils while preserving public API and behavior (e.g. removing async but keeping Promise<T> return types via Promise.resolve, and replacing unsafe any access with typed access). Where a caught error may contain PII (masking.ts), the preserve-caught-error lint is suppressed with a justification rather than attaching { cause }; in timeout.ts the caught value is rejected as-is with clearTimeout moved into a finally; and intentional patterns (e.g. the temporary intersection types in tempTypes.ts) are kept with targeted eslint-disable comments.

Not changed: eng (already on esbuild 0.28.1) and auth (already migrated to the new eng version).

Each package now resolves a single esbuild@0.28.1 and tsx@4.22.4, with no nested esbuild copy, and all six packages build and lint cleanly.

Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 17:49
Copilot AI requested a review from bwateratmsft June 16, 2026 17:50
@bwateratmsft bwateratmsft changed the title Update esbuild and tsx across packages all: Update esbuild and tsx across packages Jun 16, 2026
@bwateratmsft

Copy link
Copy Markdown
Contributor

@copilot instead of using overrides like this, start over and upgrade to @microsoft/vscode-azext-eng@1.1.0-alpha.1 (the latest alpha tag). tsx becomes an optional dependency in that version, so "tsx": "*" will be needed in the dev dependencies where tests are run in VSCode. If they are run in Mocha directly, tsx is not needed and should not be added as a dev dependency. Instead, they should use the following Mocha options in package.json:

    "mocha": {
        "node-option": [
            "experimental-transform-types",
            "disable-warning=ExperimentalWarning",
            "import=@microsoft/vscode-azext-eng/mocha"
        ],
        // ...
    },

The update may introduce new lint errors, so deal with those as well as needed.

Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 18:27
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 18:48

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot instead of using overrides like this, start over and upgrade to @microsoft/vscode-azext-eng@1.1.0-alpha.1 (the latest alpha tag). tsx becomes an optional dependency in t...

Reworked to drop the overrides and migrate every package to @microsoft/vscode-azext-eng@^1.1.0-alpha.1 instead (a4632ff). Each package now resolves a single esbuild@0.28.1 (+ tsx@4.22.4 where needed) with no nested esbuild copy.

  • utils, azure, appservice run tests via vscode-test, whose base mocha config does require: ['tsx'], so they get "tsx": "*" in devDependencies.
  • github and appsettings have no tests and no esbuild usage, so they get neither (eng's eslint/typescript don't need them).
  • webview is an exception: it runs mocha directly, but its unit tests import @fluentui/react-components (CommonJS) at runtime, which Node's native --experimental-transform-types can't load (cjs-module-lexer can't see the named exports, and Node can't load .tsx). So webview keeps import=tsx plus "tsx": "*".

The eng bump pulled a newer typescript-eslint, which surfaced new lint errors. I fixed those in azure, appservice, and utils while preserving public API and behavior (e.g. removing async but keeping Promise<T> return types via Promise.resolve, adding { cause } to rethrown errors, replacing unsafe any access with typed access). All six packages build and lint clean.

Comment thread utils/src/masking.ts Outdated
Comment thread utils/src/AzExtOutputChannel.ts Outdated
Comment thread utils/src/utils/timeout.ts Outdated
Comment thread utils/src/tree/AzExtTreeDataProvider.ts Outdated
Comment thread utils/src/tree/AzExtTreeDataProvider.ts Outdated
Comment thread utils/src/tree/AzExtParentTreeItem.ts Outdated
Comment thread utils/src/pickTreeItem/quickPickAzureResource/tempTypes.ts
Comment thread appservice/test/getDeployFsPath.test.ts Outdated
Comment thread appservice/src/utils/azureUtils.ts Outdated
Comment thread utils/src/userInput/showQuickPick.ts Outdated
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 19:16
Copilot AI requested a review from bwateratmsft June 16, 2026 19:17
Copilot AI review requested due to automatic review settings June 16, 2026 19:20
Copilot AI removed the request for review from Copilot June 16, 2026 19:20
Replace verbose async IIFE wrappers with cleaner equivalents: use
Promise.race in rejectOnTimeout, and async listeners plus a loadItems
helper in showQuickPick.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 19:38
@bwateratmsft bwateratmsft marked this pull request as ready for review June 16, 2026 19:38
@bwateratmsft bwateratmsft requested a review from a team as a code owner June 16, 2026 19:38

This comment was marked as resolved.

@bwateratmsft bwateratmsft merged commit 64f1b38 into main Jun 16, 2026
10 checks passed
@bwateratmsft bwateratmsft deleted the copilot/update-esbuild-and-tsx branch June 16, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants