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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user