cli: allow explicit null pluginId in package metadata
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -50,7 +50,7 @@ export interface BackstagePackageJson {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
pluginId?: string;
|
||||
pluginId?: string | null;
|
||||
|
||||
/**
|
||||
* The parent plugin package of a module. Must always and only be set for module packages.
|
||||
|
||||
@@ -277,7 +277,7 @@ export function fixPluginId(pkg: FixablePackage) {
|
||||
|
||||
const currentId = pkg.packageJson.backstage?.pluginId;
|
||||
if (currentId !== undefined) {
|
||||
if (typeof currentId !== 'string') {
|
||||
if (typeof currentId !== 'string' && currentId !== null) {
|
||||
throw new Error(
|
||||
`Invalid 'backstage.pluginId' field in "${pkg.packageJson.name}", must be a string`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user