Use native private members in Heft - #5942
Open
Bharat Middha (bmiddha) wants to merge 5 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Convert private instance methods and get/set accessors in apps/heft to ECMAScript # private syntax, complementing the earlier private field conversion on this branch. Symbol-aware analysis reported 41 eligible members across 17 files with 0 skipped (private constructors are correctly excluded since they have no valid #private syntax). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
The decoupled ESLint plugin does not recognize native private methods, causing no-new-null to report false positives. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Treat PrivateIdentifier class keys like TypeScript private members so no-new-null does not report private API types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
…rivate' into bmiddha/native-private-fields-heft
Bharat Middha (bmiddha)
changed the base branch from
main
to
bmiddha/fix-no-new-null-native-private
August 20, 2026 06:05
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates Heft internals from TypeScript-only privacy to native ECMAScript #private members without changing public APIs.
Changes:
- Converts private fields, accessors, and methods to native private members.
- Updates all internal references and cross-instance access.
- Retains a temporary targeted ESLint suppression for
nullparameters.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
apps/heft/src/utilities/WatchFileSystemAdapter.ts |
Migrates watcher state to native privacy. |
apps/heft/src/utilities/GitUtilities.ts |
Migrates Git state and helpers. |
apps/heft/src/plugins/RunScriptPlugin.ts |
Privatizes the script runner. |
apps/heft/src/plugins/NodeServicePlugin.ts |
Migrates process state and helpers. |
apps/heft/src/pluginFramework/StaticFileSystemAdapter.ts |
Privatizes virtual filesystem internals. |
apps/heft/src/pluginFramework/logging/ScopedLogger.ts |
Migrates logger state and accessor. |
apps/heft/src/pluginFramework/logging/LoggingManager.ts |
Migrates logging-manager state. |
apps/heft/src/pluginFramework/InternalHeftSession.ts |
Migrates session caches and initialization. |
apps/heft/src/pluginFramework/HeftTaskSession.ts |
Privatizes task-session state. |
apps/heft/src/pluginFramework/HeftTask.ts |
Migrates task state and helpers. |
apps/heft/src/pluginFramework/HeftPluginHost.ts |
Privatizes plugin-host bookkeeping. |
apps/heft/src/pluginFramework/HeftPhaseSession.ts |
Migrates phase-session state. |
apps/heft/src/pluginFramework/HeftPhase.ts |
Migrates phase state and helpers. |
apps/heft/src/pluginFramework/HeftParameterManager.ts |
Migrates parameter caches and helpers. |
apps/heft/src/pluginFramework/HeftLifecycleSession.ts |
Privatizes lifecycle-session state. |
apps/heft/src/pluginFramework/HeftLifecycle.ts |
Migrates lifecycle state and loading. |
apps/heft/src/operations/runners/TaskOperationRunner.ts |
Privatizes task-runner state. |
apps/heft/src/operations/runners/PhaseOperationRunner.ts |
Privatizes phase-runner state. |
apps/heft/src/metrics/MetricsCollector.ts |
Migrates timing state and direct reads. |
apps/heft/src/configuration/RigPackageResolver.ts |
Migrates resolver state and helper. |
apps/heft/src/configuration/HeftPluginDefinition.ts |
Privatizes plugin-definition internals. |
apps/heft/src/configuration/HeftPluginConfiguration.ts |
Migrates definition caches and helpers. |
apps/heft/src/configuration/HeftConfiguration.ts |
Migrates configuration caches and loader. |
apps/heft/src/cli/HeftCommandLineParser.ts |
Migrates parser state and helpers. |
apps/heft/src/cli/HeftActionRunner.ts |
Migrates action-runner state and helpers. |
apps/heft/src/cli/actions/RunAction.ts |
Privatizes run-action state. |
apps/heft/src/cli/actions/PhaseAction.ts |
Privatizes phase-action state. |
apps/heft/src/cli/actions/CleanAction.ts |
Migrates clean-action state and helper. |
apps/heft/src/cli/actions/AliasAction.ts |
Privatizes alias-action state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Base automatically changed from
bmiddha/fix-no-new-null-native-private
to
main
August 21, 2026 18:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@rushstack/heftto ECMAScript#privatemembersValidation
rush build --to heftrush test --only heft(9 tests)Dependency
Stacked on #5947, which fixes
@rushstack/no-new-nullhandling for ECMAScript private members. Narrow suppressions remain because these packages consume the released decoupled plugin; they can be removed after the patched plugin is published and adopted.