From 3e63951e49067aed8019487ff0c5c6aa80046043 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 18 Jan 2023 00:43:27 +0100 Subject: [PATCH] prefer subpath over sub-path Signed-off-by: Patrik Oldsberg --- docs/local-dev/cli-build-system.md | 8 ++++---- packages/cli/src/commands/index.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/local-dev/cli-build-system.md b/docs/local-dev/cli-build-system.md index a784e0eff9..2eb695e3a3 100644 --- a/docs/local-dev/cli-build-system.md +++ b/docs/local-dev/cli-build-system.md @@ -650,9 +650,9 @@ The following is an excerpt of a typical setup of an isomorphic library package: "files": ["dist"], ``` -## Sub-path Exports +## Subpath Exports -The Backstage CLI supports implementation of sub-path exports through the `"exports"` field in `package.json`. It might for example look like this: +The Backstage CLI supports implementation of subpath exports through the `"exports"` field in `package.json`. It might for example look like this: ```json "name": "@backstage/plugin-foo", @@ -668,7 +668,7 @@ As with the rest of the Backstage CLI build system, the setup is optimized for l TypeScript support is currently handled though the `typesVersions` field, as there is not yet a module resolution mode that works well with `"exports"`. You can craft the `typesVersions` yourself, but it will also be automatically generated by the `migrate package-exports` command. -To add sub-path exports to an existing package, simply add the desired `"exports"` fields and then run the following command: +To add subpath exports to an existing package, simply add the desired `"exports"` fields and then run the following command: ```bash yarn backstage-cli package migrate package-exports @@ -676,7 +676,7 @@ yarn backstage-cli package migrate package-exports ## Experimental Type Build -> Note: Experimental type builds are deprecated and will be removed in the future. They have been replaced by [sub-path exports](#sub-path-exports). +> Note: Experimental type builds are deprecated and will be removed in the future. They have been replaced by [subpath exports](#subpath-exports). The Backstage CLI has an experimental feature where multiple different type definition files can be generated for different release stages. The release stages are marked in the [TSDoc](https://tsdoc.org/) for each individual export, using either `@public`, `@alpha`, or `@beta`. Rather than just building a single `index.d.ts` file, the build process will instead output `index.d.ts`, `index.beta.d.ts`, and `index.alpha.d.ts`. Each of these files will have exports from more unstable release stages stripped, meaning that `index.d.ts` will omit all exports marked with `@alpha` or `@beta`, while `index.beta.d.ts` will omit all exports marked with `@alpha`. diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 3eb511e06d..ddec5c6a4a 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -193,7 +193,7 @@ export function registerMigrateCommand(program: Command) { command .command('package-exports') - .description('Synchronize package sub-path export definitions') + .description('Synchronize package subpath export definitions') .action( lazy(() => import('./migrate/packageExports').then(m => m.command)), );