# @backstage/cli-common

## 0.2.2

### Patch Changes

- Updated dependencies
  - @backstage/errors@1.3.1

## 0.2.2-next.0

### Patch Changes

- Updated dependencies
  - @backstage/errors@1.3.1-next.0

## 0.2.1

### Patch Changes

- 482ceed: Migrated from `assertError` to `toError` for error handling.
- e928e73: chore(deps): bump `undici` from 7.22.0 to 7.24.0
- 46ff470: Deprecated `bootstrapEnvProxyAgents()` in favor of Node.js built-in proxy support. Set `NODE_USE_ENV_PROXY=1` alongside your `HTTP_PROXY`/`HTTPS_PROXY` environment variables instead. See the [corporate proxy guide](https://backstage.io/docs/tutorials/corporate-proxy/) for details. This function will be removed in a future release.
- Updated dependencies
  - @backstage/errors@1.3.0

## 0.2.1-next.1

### Patch Changes

- 482ceed: Migrated from `assertError` to `toError` for error handling.
- Updated dependencies
  - @backstage/errors@1.3.0-next.0

## 0.2.1-next.0

### Patch Changes

- e928e73: chore(deps): bump `undici` from 7.22.0 to 7.24.0
- Updated dependencies
  - @backstage/errors@1.2.7

## 0.2.0

### Minor Changes

- 56bd494: Added `targetPaths` and `findOwnPaths` as replacements for `findPaths`, with a cleaner separation between target project paths and package-relative paths.

  To migrate existing `findPaths` usage:

  ```ts
  // Before
  import { findPaths } from '@backstage/cli-common';
  const paths = findPaths(__dirname);

  // After — for target project paths (cwd-based):
  import { targetPaths } from '@backstage/cli-common';
  // paths.targetDir    → targetPaths.dir
  // paths.targetRoot   → targetPaths.rootDir
  // paths.resolveTarget('src')      → targetPaths.resolve('src')
  // paths.resolveTargetRoot('yarn.lock') → targetPaths.resolveRoot('yarn.lock')

  // After — for package-relative paths:
  import { findOwnPaths } from '@backstage/cli-common';
  const own = findOwnPaths(__dirname);
  // paths.ownDir       → own.dir
  // paths.ownRoot      → own.rootDir
  // paths.resolveOwn('config/jest.js')    → own.resolve('config/jest.js')
  // paths.resolveOwnRoot('tsconfig.json') → own.resolveRoot('tsconfig.json')
  ```

### Patch Changes

- e44b6a9: The `findOwnRootDir` utility now searches for the monorepo root by traversing up the directory tree looking for a `package.json` with `workspaces`, instead of assuming a fixed `../..` relative path. If no workspaces root is found during this traversal, `findOwnRootDir` now throws to enforce stricter validation of the repository layout.
- 9361965: Fixed `runCheck` to ignore stdio of the spawned process, preventing unwanted output from leaking to the terminal.

## 0.2.0-next.2

### Patch Changes

- 9361965: Fixed `runCheck` to ignore stdio of the spawned process, preventing unwanted output from leaking to the terminal.

## 0.2.0-next.1

### Patch Changes

- e44b6a9: The `findOwnRootDir` utility now searches for the monorepo root by traversing up the directory tree looking for a `package.json` with `workspaces`, instead of assuming a fixed `../..` relative path. If no workspaces root is found during this traversal, `findOwnRootDir` now throws to enforce stricter validation of the repository layout.
- Updated dependencies
  - @backstage/errors@1.2.7

## 0.2.0-next.0

### Minor Changes

- 56bd494: Added `targetPaths` and `findOwnPaths` as replacements for `findPaths`, with a cleaner separation between target project paths and package-relative paths.

  To migrate existing `findPaths` usage:

  ```ts
  // Before
  import { findPaths } from '@backstage/cli-common';
  const paths = findPaths(__dirname);

  // After — for target project paths (cwd-based):
  import { targetPaths } from '@backstage/cli-common';
  // paths.targetDir    → targetPaths.dir
  // paths.targetRoot   → targetPaths.rootDir
  // paths.resolveTarget('src')      → targetPaths.resolve('src')
  // paths.resolveTargetRoot('yarn.lock') → targetPaths.resolveRoot('yarn.lock')

  // After — for package-relative paths:
  import { findOwnPaths } from '@backstage/cli-common';
  const own = findOwnPaths(__dirname);
  // paths.ownDir       → own.dir
  // paths.ownRoot      → own.rootDir
  // paths.resolveOwn('config/jest.js')    → own.resolve('config/jest.js')
  // paths.resolveOwnRoot('tsconfig.json') → own.resolveRoot('tsconfig.json')
  ```

### Patch Changes

- Updated dependencies
  - @backstage/errors@1.2.7

## 0.1.18

### Patch Changes

- 7455dae: Use node prefix on native imports

## 0.1.18-next.0

### Patch Changes

- 7455dae: Use node prefix on native imports
- Updated dependencies
  - @backstage/errors@1.2.7

## 0.1.17

### Patch Changes

- ae4dd5d: Move some of the symlink resolution to `isChildPath`

## 0.1.16

### Patch Changes

- 5cfb2a4: Added new `run`, `runOutput`, and `runCheck` utilities to help run child processes in a safe and portable way.
- c8c2329: Add proxy configuration from env-vars to create-app tasks
- 2bae83a: Bumped dev dependencies `@types/node`

## 0.1.16-next.2

### Patch Changes

- 2bae83a: Bumped dev dependencies `@types/node`
- Updated dependencies
  - @backstage/errors@1.2.7

## 0.1.16-next.1

### Patch Changes

- 5cfb2a4: Added new `run`, `runOutput`, and `runCheck` utilities to help run child processes in a safe and portable way.

## 0.1.16-next.0

### Patch Changes

- c8c2329: Add proxy configuration from env-vars to create-app tasks

## 0.1.15

### Patch Changes

- 702f41d: Bumped dev dependencies `@types/node`

## 0.1.15-next.0

### Patch Changes

- 702f41d: Bumped dev dependencies `@types/node`

## 0.1.14

### Patch Changes

- 142abb0: The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`.

## 0.1.14-next.0

### Patch Changes

- 142abb0: The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`.

## 0.1.13

### Patch Changes

- de42eebaaf: Bumped dev dependencies `@types/node` and `mock-fs`.

## 0.1.13-next.0

### Patch Changes

- de42eebaaf: Bumped dev dependencies `@types/node` and `mock-fs`.

## 0.1.12

### Patch Changes

- 482dae5de1c: Updated link to docs.

## 0.1.12-next.0

### Patch Changes

- 482dae5de1c: Updated link to docs.

## 0.1.11

### Patch Changes

- 8015ff1258: Tweaked wording to use inclusive terminology

## 0.1.11-next.0

### Patch Changes

- 8015ff1258: Tweaked wording to use inclusive terminology

## 0.1.10

### Patch Changes

- 7d47def9c4: Removed dependency on `@types/jest`.

## 0.1.10-next.0

### Patch Changes

- 7d47def9c4: Removed dependency on `@types/jest`.

## 0.1.9

### Patch Changes

- 6e830352d4: Updated dependency `@types/node` to `^16.0.0`.

## 0.1.9-next.0

### Patch Changes

- 6e830352d4: Updated dependency `@types/node` to `^16.0.0`.

## 0.1.8

### Patch Changes

- Fix for the previous release with missing type declarations.

## 0.1.7

### Patch Changes

- c77c5c7eb6: Added `backstage.role` to `package.json`

## 0.1.6

### Patch Changes

- 677bfc2dd0: Keep backstage.json in sync

  The `versions:bump` script now takes care about updating the `version` property inside `backstage.json` file. The file is created if is not present.

## 0.1.5

### Patch Changes

- c2d50a0073: Add docs to the last export of cli-common

## 0.1.4

### Patch Changes

- ca0559444c: Avoid usage of `.to*Case()`, preferring `.toLocale*Case('en-US')` instead.

## 0.1.3

### Patch Changes

- d1da88a19: Properly export all used types.

## 0.1.2

### Patch Changes

- ab5cc376f: Add new `isChildPath` export
