Skip to content

Replace unicode_hack.js w/ regex uni chars, ship THIRD-PARTY-LICENSES.md at the package root - #406

Draft
damyanpetev wants to merge 2 commits into
dpetev/bootstrap-and-user-scriptsfrom
dpetev/unicode-cleaup-thuird-party-notices
Draft

Replace unicode_hack.js w/ regex uni chars, ship THIRD-PARTY-LICENSES.md at the package root#406
damyanpetev wants to merge 2 commits into
dpetev/bootstrap-and-user-scriptsfrom
dpetev/unicode-cleaup-thuird-party-notices

Conversation

@damyanpetev

@damyanpetev damyanpetev commented Sep 10, 2026

Copy link
Copy Markdown
Member

Why

  • igniteui-core/stringExtended.ts carried unicode_hack.js, a 2010-era polyfill that emulated \p{…} regex escapes with hand-generated Unicode 6.x character tables. Native property escapes have been in every supported engine since ES2018, and the tables were stale (hundreds of misclassified BMP code points per category, no astral coverage).
  • The license manifest that feat: vite/ESM build, zero-hook initializer, public api.js module #404 introduced was written into wwwroot, so it was packed and served as a static web asset. It is package documentation, not something a page should fetch.

What changed

  • The four character-class helpers (isLetter, isLetterOrDigit, isDigit, isNumber) are one-line /\p{…}/u tests; the tables, the translator, unicode_hack and netRegexToJS are deleted. The core chunk shrinks by about 11 KB gzip and the in-source legal notice is gone, so the npm test assertion that guarded it has nothing left to check.
  • THIRD-PARTY-LICENSES.md moves to the NuGet package root next to LICENSE and README. Rolldown only emits inside outDir, so the vite build moves the file next to the csproj in closeBundle, and the csproj packs it when present. .gitignore covers it like wwwroot.

Verification

  • npm run build, npm test, and the .NET suite pass.
  • dotnet pack listing: the manifest is at the package root and absent from staticwebassets/.

🤖 Generated with Claude Code

@damyanpetev damyanpetev changed the title Replace unicode_hack.j , ship THIRD-PARTY-LICENSES.md at the package root Replace unicode_hack.js w/ regex uni chars, ship THIRD-PARTY-LICENSES.md at the package root Sep 10, 2026
@damyanpetev
damyanpetev marked this pull request as draft September 10, 2026 06:33
@damyanpetev
damyanpetev requested a balanced review from Copilot September 10, 2026 06:33
@damyanpetev damyanpetev added 🧱 ci: build CI build related issues and PRs refactoring labels Sep 10, 2026
@damyanpetev
damyanpetev added this pull request to stack #407 September 10, 2026 06:34

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.

🟡 Changes recommended

The new unanchored regexes alter first-character classification behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Replaces the legacy Unicode implementation with native regex properties and packages dependency licenses at the NuGet package root.

Changes:

  • Uses Unicode property escapes for character classification.
  • Moves and packages the generated third-party license manifest.
  • Updates static-asset validation and generated-file exclusions.
File summaries
File Description
vite.config.mts Moves the generated license manifest outside wwwroot.
tests/js/static-web-assets.test.mjs Verifies the manifest’s new location.
src/src/ig/igniteui-core/stringExtended.ts Replaces legacy Unicode tables with regexes.
src/IgniteUI.Blazor.Lite.csproj Adds the manifest to the NuGet package root.
.gitignore Ignores the generated manifest.
Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/src/ig/igniteui-core/stringExtended.ts Outdated
@damyanpetev
damyanpetev force-pushed the dpetev/unicode-cleaup-thuird-party-notices branch from e0e6ec7 to b5f8d1d Compare September 10, 2026 07:17
@damyanpetev
damyanpetev requested a balanced review from Copilot September 10, 2026 07:35

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.

🟢 Approval recommended

The Unicode modernization and packaging changes are consistent, complete, and covered by existing build validation.

Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@damyanpetev
damyanpetev force-pushed the dpetev/unicode-cleaup-thuird-party-notices branch from b5f8d1d to 7296a34 Compare September 10, 2026 09:04
@damyanpetev
damyanpetev force-pushed the dpetev/unicode-cleaup-thuird-party-notices branch from 7296a34 to 3eace90 Compare September 10, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 ci: build CI build related issues and PRs refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants