Skip to content

chore(typescript): update typescript to version 5.9.2#6397

Merged
OS-jacobbell merged 6 commits intomainfrom
FW-6763
Oct 9, 2025
Merged

chore(typescript): update typescript to version 5.9.2#6397
OS-jacobbell merged 6 commits intomainfrom
FW-6763

Conversation

@OS-jacobbell
Copy link
Copy Markdown
Contributor

Fix new type errors. Add types array to tsconfig.json to fix a new issue with dts-bundle-generator + babel.
(timocov/dts-bundle-generator#347)

What is the current behavior?

GitHub Issue Number: N/A

What is the new behavior?

Functions passed to array maps now require an explicit type.

release-utils.ts
New typescript version detects that semver.inc returns string | null. The throw condition calls the same functions as the code below, but typescript is unable to detect that. Moving the throw to the bottom proves to typescript that getNewVersion will not return null.

tsconfig.json
Updating to typescript >5.5.4 causes a new issue with dts-bundle-generator + babel, as shown in this issue: timocov/dts-bundle-generator#347
The package author recommends adding "types": [] to the tsconfig. This will load types only for what's needed. Do Stencil users depend on these types?

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

Fix new type errors. Add types array to tsconfig.json to fix a new
issue with dts-bundle-generator + babel.
(timocov/dts-bundle-generator#347)
@OS-jacobbell OS-jacobbell requested a review from a team as a code owner September 26, 2025 18:31
@johnjenkins
Copy link
Copy Markdown
Contributor

johnjenkins commented Sep 30, 2025

hey @OS-jacobbell - think this all looks fine.
The tests are failing for 2 main reasons I think -

  1. The new inclusion of types is causing type failures with external things like lodash and node bits - not sure on the best way to fix those.
  2. Formatting (need to run npm run prettier and npm lint --fix

@OS-jacobbell
Copy link
Copy Markdown
Contributor Author

OS-jacobbell commented Oct 6, 2025

Changed HTMLStencilElement to omit autocorrect boolean type from HTMLElement and redefine it as 'on | 'off'. This is consistent with the autocorrect HTML attribute.

Updated Node version for support of updated typescript. Typed arrays no longer inheriting from ArrayBuffer was a breaking change for Node.

For some reason import syntax stopped being compiled to require syntax in the bundler tests, so I changed it to require directly. Karma refers to itself as deprecated and not accepting bug fixes, so it might be time to replace it.

…r typescript 5.9 compatibility

Omit autocorrect from HTMLElement and redefine it as 'on' | 'off'.
Update node version to address breaking change with typed arrays in new typescript version.
Window.location's setter now takes a string, so update MockDocument.location's setter to match.
Co-authored-by: John Jenkins <johnljenkins@Hotmail.com>
Copy link
Copy Markdown
Contributor

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

This generally looks okay to me, great work!

Add ~ to typescript version to accept patch updates.
Update Node types version to match necessary version update in bundler test.
Copy link
Copy Markdown
Contributor

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@OS-jacobbell OS-jacobbell added this pull request to the merge queue Oct 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 9, 2025
@OS-jacobbell OS-jacobbell added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit fb16240 Oct 9, 2025
69 checks passed
@OS-jacobbell OS-jacobbell deleted the FW-6763 branch October 9, 2025 15:57
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