all: Update esbuild and tsx across packages#2341
Conversation
|
@copilot instead of using overrides like this, start over and upgrade to "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. |
Reworked to drop the
The eng bump pulled a newer typescript-eslint, which surfaced new lint errors. I fixed those in |
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>
Description
Ensures each package resolves a single
esbuild@0.28.1(aligning with the priorengbump #2340) instead of two copies — a 0.28.x copy plus an esbuild0.27.xcopy bundled bytsx@4.21.0.Rather than using
overrides, this migrates every package to@microsoft/vscode-azext-eng@^1.1.0-alpha.1(the latestalphatag), which already declaresesbuild ^0.28.0and makestsxan optional dependency. Applied towebview,github,utils,appsettings,azure, andappservice:@microsoft/vscode-azext-engto^1.1.0-alpha.1in each package."tsx": "*"to the dev dependencies ofutils,azure, andappservice, whose tests run under vscode-test (its base mocha config doesrequire: ['tsx']).githubandappsettingshave no tests and no esbuild usage, so they get neithertsxnor a directesbuild.webviewruns mocha directly but keepsimport=tsxplus"tsx": "*", because its unit tests import@fluentui/react-components(CommonJS) at runtime, which Node's native--experimental-transform-typescannot load.package-lock.jsonso 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 inazure,appservice, andutilswhile preserving public API and behavior (e.g. removingasyncbut keepingPromise<T>return types viaPromise.resolve, and replacing unsafeanyaccess with typed access). Where a caught error may contain PII (masking.ts), thepreserve-caught-errorlint is suppressed with a justification rather than attaching{ cause }; intimeout.tsthe caught value is rejected as-is withclearTimeoutmoved into afinally; and intentional patterns (e.g. the temporary intersection types intempTypes.ts) are kept with targetedeslint-disablecomments.Not changed:
eng(already on esbuild 0.28.1) andauth(already migrated to the new eng version).Each package now resolves a single
esbuild@0.28.1andtsx@4.22.4, with no nested esbuild copy, and all six packages build and lint cleanly.