build(deps-dev): bump typescript from 5.9.3 to 6.0.3 - #4445
build(deps-dev): bump typescript from 5.9.3 to 6.0.3#4445dependabot[bot] wants to merge 14 commits into
Conversation
|
By approving this PR, you are confirming that you have adequately and effectively reviewed this change. Searchable Hashes
The above information was added by dependabot-augmentor. |
05266e1 to
2c234bf
Compare
|
Dependabot (@dependabot) rebase |
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v5.9.3...v6.0.3) --- updated-dependencies: - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2c234bf to
9676dd8
Compare
TypeScript 6.0 deprecated target=ES5 (TS5107). Updated to ES2022 which is fully supported by all browserslist targets (Chrome 109+, Safari 16+). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
…mpatibility TypeScript 6.0 deprecated moduleResolution=node (node10). Updated to bundler to match tsconfig.base.json and silence TS5107. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
…rn/typescript-6.0.3 Resolved conflicts: - package.json: kept TS 6.0.3 + webpack 5.103.0 from PR, added @typescript-eslint overrides - package-lock.json: regenerated with resolved dependencies Conflicts arose because main has diverged since the PR was created. TS6 compatibility fixes are complete and verified.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
dependabot's lock file regeneration stripped resolved/integrity fields from all @nx/nx-linux-* and @nx/nx-darwin-* optional packages, causing 'WorkspaceContext is not a constructor' on CI (linux x64 runner). Manually restored all 7 platform-specific NX 22.7.1 binding entries with correct resolved URLs and integrity hashes from npm registry.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
…/integrity dependabot regenerated the lock file with --package-lock-only which stripped resolved/integrity from all 3000+ packages. This caused sass-embedded native binaries to fail with 'unavailable in pure JS mode' (after the previous NX WorkspaceContext fix). Rebuilt the lock file by taking main's complete lock as the base and applying only the 91 actual version changes (18 changed, 73 new packages) introduced by the TypeScript 6 upgrade. Fetched resolved URLs and integrity hashes for all changed/new packages from the npm registry.
webpack 5.103.0 (this PR) doesn't nest es-module-lexer or mime-db, but our rebuilt lock inherited those from main's webpack 5.107.2. This caused npm ci to fail with 'lock file's es-module-lexer@1.5.3 does not satisfy es-module-lexer@1.7.0'. Also removed 25 other packages that exist only in main's lock and are not present in the original dependabot dependency tree.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
Previous attempt applied dependabot's unintended webpack downgrades (webpack 5.107.2->5.103.0, enhanced-resolve, loader-runner, etc). These were side-effects of dependabot's lock regeneration, not required by the TypeScript 6 upgrade. Now using main as the complete base and only applying the 9 genuinely TS6-related changes (@typescript-eslint/* upgrades + typescript itself) plus 73 new nested typescript/tsquery copies introduced by the upgrade.
…ted packages dependabot downgraded webpack ^5.107.2 -> ^5.103.0 in package.json as an unintended side-effect; restored to main's version. The webpack version should not change in a TypeScript-only bump. Also removed 6 packages from the @vitest/eslint-plugin subtree that npm hoists to the top level once the @typescript-eslint/utils and typescript-estree overrides (^8.59.4) take effect, matching the dependency tree npm actually resolves. The two overrides are required: TS6 is outside the supported range of typescript-estree 7.x, so 8.x is needed. package.json now differs from main only by: - typescript ^5.9.2 -> ^6.0.3 - two @typescript-eslint overrides (TS6 compatibility)
ws 8.18.3 -> 8.21.0 is required by @module-federation/dts-plugin@2.5.1 (pulled in via @nx/module-federation in the TS6 tree), which pins ws to 8.21.0. I had wrongly kept ws at main's 8.18.3 alongside the genuine webpack downgrades, causing npm ci to fail with 'lock file's ws@8.18.3 does not satisfy ws@8.21.0'. Verified the full lock is consistent: 'npm install --package-lock-only --dry-run' reports 'up to date', and the only version difference from the original dependabot resolution (besides the 8 intentional webpack-ecosystem reverts) is now resolved.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
Two classes of errors surfaced by tsc 6 during 'tsc --project
tsconfig.declaration.json':
1. TS2591 'Cannot find name process/require' (10 errors across 4 files):
TS6 no longer auto-loads all @types/* when moduleResolution is bundler.
Added explicit "types": ["node", "webpack-env"] to the declaration
config — node provides process/require, webpack-env provides
require.context (used by bpk-component-icon/all.tsx).
2. TS2345 EffectCallback (BpkFloatingNotification.tsx): the useEffect
cleanup '() => timer && clearTimeout(timer)' returned a non-void value
('() => void | 0'), which TS6 rejects as an EffectCallback. Rewrote it
as a statement body that returns nothing.
Verified locally against typescript 6.0.3: all 11 errors eliminated, no
new errors introduced.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
TypeScript 6 promotes deprecated-option warnings to hard errors during 'tsc --build' (the typecheck target): - TS5101: 'baseUrl' is deprecated (will stop functioning in TS 7.0) - TS5107: 'esModuleInterop=false' is deprecated Added "ignoreDeprecations": "6.0" to tsconfig.base.json. All project tsconfigs (packages/backpack-web, libs/backpack-storybook-host) extend this base, so the single setting silences the 3 typecheck errors across all of them. Verified locally with typescript 6.0.3: 'tsc --build' for both backpack-storybook-host and backpack-web report 0 deprecation errors.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
…file as CJS
Under TypeScript 6, ts.transpileModule with no 'module' option preserves
ESM 'import' syntax (TS5 defaulted to CommonJS). Danger executes the
transpiled dangerfile.ts via module._compile (CJS), so the preserved
'import { commonFileWarnings } from danger-plugin-toolbox' is loaded
through node's ESM interop. danger-plugin-toolbox declares type:module
but ships CommonJS content, so the named export fails to resolve:
'does not provide an export named commonFileWarnings'.
Danger's transpiler reads the root tsconfig.json and forces module=commonjs
for .ts files ONLY when a 'module' field is present. The root config had
none (it inherited module from tsconfig.base.json, which Danger does not
follow via 'extends'). Adding an explicit "module": "esnext" makes
Danger emit CommonJS require() for the dangerfile, matching the TS5
behaviour, while staying compatible with moduleResolution: bundler (no
TS5095) and not affecting backpack-web (which extends tsconfig.base.json,
not the root).
Verified with typescript 6.0.3 + node 22.19.0 via 'danger pr': the
dangerfile loads and runs cleanly; storybook-host/utils typecheck (the
only configs extending the root) stay at 0 errors.
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
…Deprecations TypeScript 6 promotes two deprecated options to hard errors: - TS5101: 'baseUrl' - not needed since no 'paths' mappings exist in this project - TS5107: 'esModuleInterop=false' - removed from storybook-host and storybook-utils, which now inherit esModuleInterop:true from the root tsconfig.json Removing these is cleaner than silencing them with ignoreDeprecations. Verified locally with typescript 6.0.3 + node 22.19.0: storybook-host, storybook-utils and backpack-web typecheck all pass (A/B tested against the ignoreDeprecations approach — identical results).
|
Visit https://backpack.github.io/storybook-prs/4445 to see this build running in a browser. |
Dev Release PublishedVersion: Install with: You can also use the dev tag to install the latest dev release: Published from commit 7410c8a by GC Zhu (@gc-skyscanner). |
|
Marked it as minor, since we already tested it in consumer, won't have impact on them |
|
A newer version of typescript exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
Bumps typescript from 5.9.3 to 6.0.3.
Release notes
Sourced from typescript's releases.
Commits
050880cBump version to 6.0.3 and LKGeeae9dd🤖 Pick PR #63401 (Also check package name validity in...) into release-6.0 (#...ad1c695🤖 Pick PR #63368 (Harden ATA package name filtering) into release-6.0 (#63372)0725fb4🤖 Pick PR #63310 (Mark class property initializers as...) into release-6.0 (#...607a22aBump version to 6.0.2 and LKG9e72ab7🤖 Pick PR #63239 (Fix missing lib files in reused pro...) into release-6.0 (#...35ff23d🤖 Pick PR #63163 (Port anyFunctionType subtype fix an...) into release-6.0 (#...e175b69Bump version to 6.0.1-rc and LKGaf4caacUpdate LKG8efd7e8Merge remote-tracking branch 'origin/main' into release-6.0