Skip to content

Use native String.prototype.isWellFormed - #2398

Merged
kmcginnes merged 1 commit into
mainfrom
use-native-is-well-formed
Oct 9, 2026
Merged

kmcginnes merged 1 commit into
mainfrom
use-native-is-well-formed

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

String.prototype.isWellFormed has been Baseline Widely available since 2026-04-24 (Chrome 111, Firefox 119, Safari 16.4). With the floor at Firefox 124 since #2394, the regex fallback added in #2245 is no longer needed.

 packages/graph-explorer/
 ├── tsconfig.json
-│     "lib": ["ES2023", "DOM", "DOM.Iterable"]
+│     "lib": ["ES2023", "ES2024.String", "DOM", "DOM.Iterable"]
 └── src/
     ├── connector/queryValueError.ts   isWellFormedString(value) → value.isWellFormed()
     ├── core/icons/iconSource.ts       isWellFormedString(value) → value.isWellFormed()
     └── utils/
-        ├── isWellFormedString.ts
-        └── isWellFormedString.test.ts
  • ES2024.String adds only isWellFormed and toWellFormed, so the rest of ES2024 stays blocked. That matters because some of it, such as resizable ArrayBuffer (Firefox 128), is still outside the floor.

Evidence

After: the existing lone-surrogate cases still pass against the native method: queryValueError.test.ts (lone high, lone low, valid pair), iconSource.test.ts (lone surrogate), and the fragments.test.ts property test.

Merge Danger

Door: two-way

Impact: browser support

Related

@kmcginnes kmcginnes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approved

Base automatically changed from pin-browser-floor to main October 9, 2026 00:24
@kmcginnes
kmcginnes force-pushed the use-native-is-well-formed branch from 94ff706 to e161677 Compare October 9, 2026 00:57
@kmcginnes
kmcginnes force-pushed the use-native-is-well-formed branch from e161677 to e4ec5e9 Compare October 9, 2026 01:14
@kmcginnes
kmcginnes merged commit b452d86 into main Oct 9, 2026
4 checks passed
@kmcginnes
kmcginnes deleted the use-native-is-well-formed branch October 9, 2026 01:17
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.

1 participant