Skip to content

chore(deps): adapt to typescript 6 and strict mode#1462

Draft
CommanderStorm wants to merge 16 commits into
maplibre:mainfrom
CommanderStorm:ts-update-typescript6
Draft

chore(deps): adapt to typescript 6 and strict mode#1462
CommanderStorm wants to merge 16 commits into
maplibre:mainfrom
CommanderStorm:ts-update-typescript6

Conversation

@CommanderStorm

Copy link
Copy Markdown
Member

I asked Claude to update us to ts6, which also apparently means strict mode.

A few of the changes that were nessary seem not quite right, but I need to investigate further.

PR mostly to give notice that I am working on this

@CommanderStorm CommanderStorm changed the title chore(deps): adapt to typescript 6 chore(deps): adapt to typescript 6 and strict mdoe Jun 23, 2026
@CommanderStorm CommanderStorm changed the title chore(deps): adapt to typescript 6 and strict mdoe chore(deps): adapt to typescript 6 and strict mode Jun 23, 2026
@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.03175% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.31%. Comparing base (a4cd930) to head (d6106d7).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
ts/src/decoding/decodingUtils.ts 50.00% 1 Missing ⚠️
ts/src/decoding/geometryDecoder.ts 90.00% 1 Missing ⚠️
ts/src/decoding/integerStreamDecoder.ts 50.00% 0 Missing and 1 partial ⚠️
ts/src/encoding/integerStreamEncoder.ts 50.00% 0 Missing and 1 partial ⚠️
ts/src/mltDecoder.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1462       +/-   ##
=============================================
+ Coverage     75.42%   96.31%   +20.88%     
=============================================
  Files           219       68      -151     
  Lines         15168     4909    -10259     
  Branches       3344      785     -2559     
=============================================
- Hits          11441     4728     -6713     
+ Misses         2601      167     -2434     
+ Partials       1126       14     -1112     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

symbolLengthStream: Uint32Array | null,
nullabilityBuffer: BitVector | null,
): Vector | null {
symbolTableStream: Uint8Array | undefined,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not sure if undefined vs null is better here.

I just know that this being uneven between calle and caller makes for lots of akward conversion casts..

@CommanderStorm CommanderStorm marked this pull request as ready for review June 23, 2026 22:16
Copilot AI review requested due to automatic review settings June 23, 2026 22:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CommanderStorm CommanderStorm requested a review from HarelM June 23, 2026 22:21
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@HarelM

HarelM commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

There's too many "as something" added, which I find odd like you did I think... It would be better to avoid those if possible.

Comment thread ts/src/encoding/fastPforEncoder.ts Outdated
Comment thread ts/src/metadata/tileset/embeddedTilesetMetadataDecoder.ts Outdated
Comment thread ts/src/metadata/tileset/embeddedTilesetMetadataDecoder.ts Outdated
CommanderStorm and others added 3 commits June 24, 2026 11:36
decodeString legitimately returns undefined for columns with no
recognized string encoding (e.g. all zero-length streams); the
previous `as Vector` cast masked this. Type it `Vector | undefined`
instead of throwing, and map to null at the property-decoder call
site (its existing "absent column" signal).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CommanderStorm

Copy link
Copy Markdown
Member Author

There's too many "as something" added, which I find odd like you did I think... It would be better to avoid those if possible.

a lot more change, but sure. I updated the code to abort with better error messages on invariant violation

CommanderStorm and others added 4 commits June 24, 2026 11:48
geometryVector starts as null and `as GeometryVector | GpuVector` just
stripped it. A feature table without a geometry column is malformed, so
throw a descriptive error rather than constructing a FeatureTable with a
null geometry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CommanderStorm

Copy link
Copy Markdown
Member Author

There's too many "as something" added, which I find odd like you did I think... It would be better to avoid those if possible.

Removed them, but that forced a lot of code churn, added aborts and other things.

@HarelM

HarelM commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR is a lot to review, any chance to slice it to smaller PRs?

@CommanderStorm CommanderStorm marked this pull request as draft June 24, 2026 12:29
@CommanderStorm

Copy link
Copy Markdown
Member Author

needs breaking apart. a bit too non-atomic.

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