Skip to content

Use native private members in build tooling - #5940

Open
Bharat Middha (bmiddha) wants to merge 3 commits into
mainfrom
bmiddha/native-private-fields-build-tooling
Open

Use native private members in build tooling#5940
Bharat Middha (bmiddha) wants to merge 3 commits into
mainfrom
bmiddha/native-private-fields-build-tooling

Conversation

@bmiddha

@bmiddha Bharat Middha (bmiddha) commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

  • convert TypeScript-private fields, methods, and accessors across Heft and Webpack plugins to ECMAScript #private members
  • replace unsupported private-member destructuring with direct private access
  • keep package behavior and public APIs unchanged

Validation

  • built and tested all 18 affected packages
  • 75 build/test operations passed, including Webpack 4 packages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Extend the earlier private-fields conversion to also cover private
methods and get/set accessors across the heft and webpack plugin
scopes, using the same AST-driven tool. Two candidates in
SassProcessor.ts (the _cache get/set accessor pair) were left as
private because the tool's per-declaration reference tracking cannot
safely disambiguate the shared accessor symbol.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Manually convert the get/set _cache accessor pair the codemod left as
private, since both declarations and all 2 usages are plain 'this._cache'
property access within SassProcessor's own instance methods, with no
subclassing, bracket/reflection access, or external test references in
the package. The tool's skip was a limitation of its per-declaration
reference tracking (shared accessor symbol), not a real semantic hazard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
@bmiddha Bharat Middha (bmiddha) changed the title Use native private fields in build tooling Use native private members in build tooling Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant