e2e: Skip version lookup for non @backstage packages

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-04-04 14:59:59 +02:00
parent ba6dccc7d7
commit d02c070f8f
+8
View File
@@ -111,6 +111,10 @@ async function buildDistWorkspace(workspaceName: string, rootDir: string) {
{
helpers: {
version(name: string) {
// Ignore non Backstage packages
if (!name.startsWith('@backstage/')) {
return '^0.0.0';
}
const pkge = require(`${name}/package.json`);
if (!pkge) {
throw new Error(`No version available for package ${name}`);
@@ -118,6 +122,10 @@ async function buildDistWorkspace(workspaceName: string, rootDir: string) {
return pkge.version;
},
versionQuery(name: string, hint: string) {
// Ignore non Backstage packages
if (!name.startsWith('@backstage/')) {
return '^0.0.0';
}
const pkgData = require(`${name}/package.json`);
if (!pkgData) {
if (typeof hint !== 'string') {