diff --git a/.changeset/hip-fans-decide.md b/.changeset/hip-fans-decide.md new file mode 100644 index 0000000000..ecdf6d8a4d --- /dev/null +++ b/.changeset/hip-fans-decide.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli-node': patch +--- + +Add definition for the new `backstage.inline` field in `package.json`. diff --git a/packages/cli-node/api-report.md b/packages/cli-node/api-report.md index 9f7e525048..f22583dd25 100644 --- a/packages/cli-node/api-report.md +++ b/packages/cli-node/api-report.md @@ -18,6 +18,7 @@ export interface BackstagePackageJson { backstage?: { role?: PackageRole; moved?: string; + inline?: boolean; pluginId?: string | null; pluginPackage?: string; pluginPackages?: string[]; diff --git a/packages/cli-node/src/monorepo/PackageGraph.ts b/packages/cli-node/src/monorepo/PackageGraph.ts index c8877803d5..69ec99c2dd 100644 --- a/packages/cli-node/src/monorepo/PackageGraph.ts +++ b/packages/cli-node/src/monorepo/PackageGraph.ts @@ -47,6 +47,15 @@ export interface BackstagePackageJson { role?: PackageRole; moved?: string; + /** + * If set to `true`, the package will be treated as an internal package + * where any imports will be inlined into the consuming package. + * + * When set to `true`, the top-level `private` field must be set to `true` + * as well. + */ + inline?: boolean; + /** * The ID of the plugin if this is a plugin package. Must always be set for plugin and module packages, and may be set for library packages. A `null` value means that the package is explicitly not a plugin package. */