Address PR review comments

- 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>
This commit is contained in:
Patrik Oldsberg
2026-02-22 13:47:49 +01:00
parent 70fc178697
commit 07816d67f3
68 changed files with 394 additions and 321 deletions
+4 -4
View File
@@ -21,16 +21,16 @@ const ownPaths = findOwnPaths(__dirname);
/* eslint-disable-next-line no-restricted-syntax */
export const paths = {
get ownDir() {
return ownPaths.resolve();
return ownPaths.dir;
},
get ownRoot() {
return ownPaths.resolveRoot();
return ownPaths.rootDir;
},
get targetDir() {
return targetPaths.resolve();
return targetPaths.dir;
},
get targetRoot() {
return targetPaths.resolveRoot();
return targetPaths.rootDir;
},
resolveOwn: ownPaths.resolve,
resolveOwnRoot: ownPaths.resolveRoot,