Skip to content

Feature/typescript v6#287

Merged
H-Weisner merged 9 commits into
mainfrom
feature/typescript-v6
Apr 7, 2026
Merged

Feature/typescript v6#287
H-Weisner merged 9 commits into
mainfrom
feature/typescript-v6

Conversation

@H-Weisner

Copy link
Copy Markdown
Contributor

What's new?

This pull request updates the project's TypeScript tooling and related dependencies to use TypeScript 6.0.2, along with an upgrade of ts-jest to 29.4.9. The changes affect both package.json and the pnpm-lock.yaml lockfile, ensuring all dependencies and peer dependencies are aligned with the new TypeScript version.

Dependency upgrades:

  • Upgraded typescript from 5.1.6 to 6.0.2 in both package.json and pnpm-lock.yaml, updating all related references and peer dependencies throughout the lockfile. [1] [2] [3] [4] [5]
  • Upgraded ts-jest from 29.1.1 to 29.4.9, including its peer dependencies and compatibility with TypeScript 6.0.2. [1] [2] [3]

Lockfile consistency:

  • Updated all dependencies, peer dependencies, and transitive dependencies in pnpm-lock.yaml to use TypeScript 6.0.2, ensuring consistency across the toolchain (including ESLint, Storybook, semantic-release, and related plugins). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

These updates ensure the project uses the latest TypeScript features and maintains compatibility with the ecosystem.

Ticket number(s) in JIRA (if internal)

ARM-XX

board

Checklist

  • [✓] does this work have all the relevant tests?
  • [✓] are your changes in Storybook?
  • [✓] does everything have jsdoc?
  • [✓] is everything exported from index.ts?

Upgrades TypeScript from 5.1.6 to 6.0.2 and ts-jest from 29.1.1 to 29.4.9 to align the build toolchain with the TypeScript 6 release. The ts-jest upgrade was required because 29.1.1 enforced a `typescript < 6` peer dependency constraint; 29.4.9 relaxes this to `< 7`. Lockfiles for both module and storybook workspaces are updated accordingly.

BREAKING CHANGE: consumers using TypeScript < 6 may encounter type incompatibilities if emitted declaration files rely on TypeScript 6 type semantics
@H-Weisner H-Weisner requested review from adamiprinciples and Copilot and removed request for Copilot April 1, 2026 18:16
Adds @types/node to provide TypeScript type definitions for Node.js built-in modules. This ensures correct typings are available for Node APIs used during build and tooling scripts.
# Conflicts:
#	module/package.json
#	module/pnpm-lock.yaml
#	storybook/package.json
#	storybook/pnpm-lock.yaml
Updates `import React from 'react'` to `import * as React from 'react'` across select component, useChildForm hook, and useSSRLayoutEffect spec. This aligns with the TypeScript ESM-compatible import style required for the TypeScript v6 upgrade, where default imports from React may not resolve correctly under stricter module resolution settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repo’s TypeScript toolchain to TypeScript 6.0.2 (and ts-jest 29.4.9 in module/), with accompanying lockfile refreshes and TS config tweaks to align with bundler-style module resolution.

Changes:

  • Bump TypeScript to 6.0.2 in module/ and storybook/ package manifests and lockfiles.
  • Upgrade ts-jest to 29.4.9 in module/ and update the lockfile dependency graph accordingly.
  • Adjust module/ TypeScript configuration (notably moduleResolution: "bundler" and removal of interop flags).

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
storybook/pnpm-lock.yaml Refresh Storybook lockfile to reflect TypeScript 6.0.2 throughout resolved dependency snapshots.
storybook/package.json Bump Storybook workspace TypeScript dependency to 6.0.2.
module/tsconfig.node.json Switch node tsconfig to bundler resolution and remove synthetic default import setting.
module/tsconfig.json Remove several compiler options (including interop-related ones) and keep bundler module resolution.
module/pnpm-lock.yaml Refresh module lockfile for TypeScript 6.0.2 + ts-jest 29.4.9; update peer/optional deps snapshots.
module/package.json Bump typescript to 6.0.2 and ts-jest to 29.4.9.
Files not reviewed (2)
  • module/pnpm-lock.yaml: Language not supported
  • storybook/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread module/tsconfig.json
"preserveConstEnums": false,
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module/tsconfig.json removes esModuleInterop / allowSyntheticDefaultImports, but the codebase contains default imports from CommonJS-style modules (e.g. multiple import React from 'react' usages). With these flags removed, TypeScript will typically error on those imports. Either restore one of these interop options (preferred if you want to keep default-import style), or update the affected imports to namespace imports (e.g. import * as React from 'react') consistently across the module.

Suggested change
"resolveJsonModule": true,
"resolveJsonModule": true,
"esModuleInterop": true,

Copilot uses AI. Check for mistakes.
Comment thread module/tsconfig.node.json
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
"moduleResolution": "bundler"

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module/tsconfig.node.json drops allowSyntheticDefaultImports, but vite.config.ts uses default imports like import path from 'path'. Without allowSyntheticDefaultImports or esModuleInterop, this commonly fails type-checking in TS. Consider re-adding the interop option for the node tsconfig, or change the imports in vite.config.ts to namespace imports.

Suggested change
"moduleResolution": "bundler"
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true

Copilot uses AI. Check for mistakes.
Comment thread module/pnpm-lock.yaml
Comment on lines 11821 to +11825
- supports-color

typescript@5.8.2: {}

typescript@5.9.3: {}
typescript@6.0.2: {}

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the lockfile has been updated so transitive dependencies use TypeScript 6.0.2 for toolchain consistency, but pnpm-lock.yaml still includes typescript@5.8.2 (pulled in via @microsoft/api-extractor). If this is intentional, the description should be adjusted; otherwise consider upgrading the relevant tooling so it can depend on TypeScript 6 to avoid multiple compiler versions in the install.

Copilot uses AI. Check for mistakes.
Converts all `import * as React from 'react'` statements to `import React from 'react'` across components, hooks, form, and type files. Also disables the `import-x/default` ESLint rule and enables `esModuleInterop`-compatible resolution in tsconfig to support the new import style. This aligns with React 19 conventions and the ongoing TypeScript v6 upgrade.
…t line

Merges separate named type imports (HTMLInputTypeAttribute, LabelHTMLAttributes, act) onto the same line as the default React import across components and tests. Reduces import verbosity and aligns with idiomatic TypeScript import style.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 70 out of 72 changed files in this pull request and generated 3 comments.

Files not reviewed (2)
  • module/pnpm-lock.yaml: Language not supported
  • storybook/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 4 to 5
import React from 'react';
import { LabelHTMLAttributes } from 'react';

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two separate imports from 'react' in this file (a default import plus a named import), which will violate the configured import-x/no-duplicates rule. Combine them into a single import (and consider marking LabelHTMLAttributes as type-only) to satisfy the linter.

Suggested change
import React from 'react';
import { LabelHTMLAttributes } from 'react';
import React, { type LabelHTMLAttributes } from 'react';

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 4
import React from 'react';
import { HTMLInputTypeAttribute } from 'react';

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file now imports from 'react' twice (import React ... and a separate named import). With import-x/no-duplicates enabled, this will fail linting. Please merge these into a single import (and make HTMLInputTypeAttribute type-only if applicable).

Suggested change
import React from 'react';
import { HTMLInputTypeAttribute } from 'react';
import React, { type HTMLInputTypeAttribute } from 'react';

Copilot uses AI. Check for mistakes.
Comment thread module/src/hooks/useContentMemo.spec.ts Outdated
Comment on lines 2 to 3
import React from 'react';
import { act } from 'react';

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two imports from 'react' here (import React ... and import { act } ...), which will trip import-x/no-duplicates. Merge into a single import from 'react' to keep lint passing.

Copilot uses AI. Check for mistakes.
@H-Weisner H-Weisner merged commit d3d935b into main Apr 7, 2026
8 of 10 checks passed
@H-Weisner H-Weisner deleted the feature/typescript-v6 branch April 7, 2026 13:55
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.

2 participants