message: cli: update e2e-test to include dist versions of backend packages
diff: @@ -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,14 +182,16 @@ async function overrideModuleResolutions(appDir, workspaceDir) {
  pkgJson.resolutions = pkgJson.resolutions || {};
  pkgJson.dependencies = pkgJson.dependencies || {};
  - const packageNames = await fs.readdir(resolvePath(workspaceDir, 'packages'));
  + for (const dir of ['packages', 'plugins']) {
  + const packageNames = await fs.readdir(resolvePath(workspaceDir, dir));
  for (const name of packageNames) {
  - const pkgPath = joinPath('..', 'workspace', 'packages', name);
  + const pkgPath = joinPath('..', 'workspace', dir, name);
  pkgJson.dependencies[`@backstage/${name}`] = `file:${pkgPath}`;
  pkgJson.resolutions[`@backstage/${name}`] = `file:${pkgPath}`;
  delete pkgJson.devDependencies[`@backstage/${name}`];
  }
  + }
  fs.writeJson(pkgJsonPath, pkgJson, { spaces: 2 });
  }
  