Move `getHasYarnPlugin` and `SuccessCache` from `@backstage/cli` internal
modules to `@backstage/cli-node` as public exports, making them available
for reuse by other CLI tooling.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
- Remove cli-node/src/paths.ts compat layer, migrate all cli-node
internal usage to import targetPaths from @backstage/cli-common
- Use single-arg overrideTargetPaths('/root') where dir === rootDir
- Scope mockDir to each describe block in bump.test.ts to avoid
shared state issues with overrideTargetPaths
- Remove unnecessary overrideTargetPaths from plugin-manager.test.ts
- Remove stale findPaths mock from createApp.test.ts
- Use overrideTargetPaths in getWorkspaceRoot.test.ts and cli-node tests
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Refactor targetPaths/findOwnPaths to class-based implementations with
unified caching and .dir/.rootDir properties alongside resolve methods
- Replace jest.mock with jest.spyOn in plugin-manager.test.ts
- Remove paths compatibility wrapper from repo-tools, migrate all internal
consumers to use targetPaths from @backstage/cli-common directly
- Fix changeset package name (@techdocs/cli not @backstage/techdocs-cli)
- Add migration examples to cli-common changeset
- Update API report for cli-common
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Split the path resolution API in @backstage/cli-common into
targetPaths (cwd-based singleton) and findOwnPaths (package-relative).
Migrate all consumers across the repo away from the deprecated findPaths.
Rename TargetPaths/OwnPaths properties to resolve/resolveRoot,
removing the redundant type prefix from property names.
Make findOwnPaths calls lazy in modules - called inside functions
rather than at module scope.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Rename runParallelWorkers to runConcurrentTasks, return void
- Rename ParallelWorkerOptions to ConcurrentTasksOptions
- Rename parallelismFactor to concurrencyFactor
- Remove unused runWorkerThreads and WorkerThreadsOptions
- Rename workerData to context in WorkerQueueThreadsOptions
- Drop threadCount from public API types
- Rename env var to BACKSTAGE_CLI_CONCURRENCY
- Make cli-node changeset a patch
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Renames from BACKSTAGE_CLI_BUILD_PARALLEL to the more general
BACKSTAGE_CLI_PARALLELISM. The old name is still supported but
logs a one-time deprecation warning.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
The parallelism fields on bundler types (BundlingOptions, BuildOptions,
BackendBundlingOptions) and createDistWorkspace Options were defined but
never read — fully dead code. Likewise the parallelismSetting option on
ParallelWorkerOptions was never passed by any caller.
Also narrows the cli-node public API to only export the three runner
functions and their option types, keeping getEnvironmentParallelism and
parseParallelismOption as internal utilities.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Moves `runParallelWorkers`, `runWorkerQueueThreads`, `runWorkerThreads`,
`parseParallelismOption`, and `getEnvironmentParallelism` from the CLI
internal lib to the shared `@backstage/cli-node` package.
This is part of the ongoing effort to make CLI modules independent of
each other and the shared lib code.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
- Added integrationFor field to BackstagePackageJson type
- Created fixIntegrationFor validator that ensures:
- Field is only used on module packages
- Value is an array of strings
- All entries are valid package names
- Added validator to the publish fixers list
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
There are a few of these classes floating around
the codebase - my hope by adding these methods
here is that we can start unifying around this
shared implementation.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>