cli: update e2e-test to include dist versions of backend packages
This commit is contained in:
@@ -73,6 +73,8 @@ async function buildDistWorkspace(workspaceName, rootDir) {
|
||||
'@backstage/core',
|
||||
'@backstage/dev-utils',
|
||||
'@backstage/test-utils',
|
||||
// We don't use the backend itself, but want all of its dependencies
|
||||
'example-backend',
|
||||
]);
|
||||
|
||||
print('Pinning yarn version in workspace');
|
||||
@@ -180,13 +182,15 @@ async function overrideModuleResolutions(appDir, workspaceDir) {
|
||||
pkgJson.resolutions = pkgJson.resolutions || {};
|
||||
pkgJson.dependencies = pkgJson.dependencies || {};
|
||||
|
||||
const packageNames = await fs.readdir(resolvePath(workspaceDir, 'packages'));
|
||||
for (const name of packageNames) {
|
||||
const pkgPath = joinPath('..', 'workspace', 'packages', name);
|
||||
for (const dir of ['packages', 'plugins']) {
|
||||
const packageNames = await fs.readdir(resolvePath(workspaceDir, dir));
|
||||
for (const name of packageNames) {
|
||||
const pkgPath = joinPath('..', 'workspace', dir, name);
|
||||
|
||||
pkgJson.dependencies[`@backstage/${name}`] = `file:${pkgPath}`;
|
||||
pkgJson.resolutions[`@backstage/${name}`] = `file:${pkgPath}`;
|
||||
delete pkgJson.devDependencies[`@backstage/${name}`];
|
||||
pkgJson.dependencies[`@backstage/${name}`] = `file:${pkgPath}`;
|
||||
pkgJson.resolutions[`@backstage/${name}`] = `file:${pkgPath}`;
|
||||
delete pkgJson.devDependencies[`@backstage/${name}`];
|
||||
}
|
||||
}
|
||||
fs.writeJson(pkgJsonPath, pkgJson, { spaces: 2 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user