Commit 99e0e61
authored
Forbid
* Refactor private static members to module scope; enforce no-restricted-syntax rule
Enforce the new ESLint rule in decoupled-local-node-rig that forbids
`private static` methods and properties (kept at "error" severity alongside
the existing `export *` restriction).
Convert every `private static` violation across all rig-consuming projects to
module-scoped functions and variables:
- private static method -> module-scoped function
- private static property -> module-scoped const (or let if reassigned)
Edge cases handled without changing public behavior:
- Helpers needing private instance members / private constructors kept as
private instance methods, or return data for an in-class caller to construct
(e.g. JsonSchema, LockFile, RigConfig, MinimalRushConfiguration).
- Stateful singletons (e.g. EnvironmentConfiguration) moved to module state.
- Async lazy-init caches suppressed with require-atomic-updates where needed.
- Module declarations placed to preserve TSDoc/API-Extractor doc association
and avoid no-use-before-define.
- Test seams exported where tests referenced moved members.
Full `rush build` passes with zero errors and zero warnings.
* Fix OperationBuildCache test broken by private static refactor
Moving `_tarUtilityPromise` from a `private static` field to a module-scoped
variable silently invalidated the test's `Reflect.set(OperationBuildCache,
'_tarUtilityPromise', ...)` mock injection, causing the restore test to run
the real tar/untar path (EACCES on mkdir '/repo').
Add an exported `@internal` test seam `_setTarUtilityPromiseForTesting` and
use it from the test instead of poking the class internals.
* Rush change.private static members and refactor existing usages to module scope (#5884)1 parent 5e32c62 commit 99e0e61
128 files changed
Lines changed: 7024 additions & 6966 deletions
File tree
- apps
- api-documenter/src
- nodes
- utils
- api-extractor/src
- analyzer
- api
- collector
- enhancers
- generators
- heft/src
- configuration
- plugins
- utilities
- playwright-browser-tunnel/src
- rundown/src
- rush-mcp-server/src
- pluginFramework
- utilities
- rush/src
- common/changes
- @microsoft
- api-documenter
- api-extractor-model
- api-extractor
- loader-load-themed-styles
- rush
- @rushstack
- eslint-plugin-packlets
- heft-jest-plugin
- heft
- lookup-by-path
- mcp-server
- node-core-library
- package-extractor
- playwright-browser-tunnel
- rig-package
- rundown
- terminal
- tree-pattern
- ts-command-line
- webpack4-localization-plugin
- eslint/eslint-plugin-packlets/src
- test
- heft-plugins/heft-jest-plugin/src
- libraries
- api-extractor-model/src/aedoc
- lookup-by-path/src
- node-core-library/src
- test
- package-extractor/src
- rig-package/src
- rush-lib/src
- api
- test
- cli
- logic
- base
- buildCache
- test
- deploy
- installManager
- pnpm
- setup
- test
- versionMismatch
- yarn
- pluginFramework/PluginLoader
- utilities
- rush-sdk/src
- rushell/src
- terminal/src
- tree-pattern/src
- ts-command-line/src
- parameters
- providers
- repo-scripts/repo-toolbox/src/cli/actions
- rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/profile
- vscode-extensions/rush-vscode-extension/src/logic
- webpack
- loader-load-themed-styles/src
- webpack4-localization-plugin/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | | - | |
| 660 | + | |
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | 797 | | |
805 | 798 | | |
806 | 799 | | |
| |||
1012 | 1005 | | |
1013 | 1006 | | |
1014 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
Lines changed: 29 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
177 | 204 | | |
178 | 205 | | |
179 | 206 | | |
| |||
202 | 229 | | |
203 | 230 | | |
204 | 231 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
0 commit comments