message: e2e-test: update to provide version lookup helper to template
diff: @@ -84,11 +84,23 @@ async function buildDistWorkspace(workspaceName: string, rootDir: string) {
  const path = paths.resolveOwnRoot(pkgJsonPath);
  const pkgTemplate = await fs.readFile(path, 'utf8');
  const { dependencies = {}, devDependencies = {} } = JSON.parse(
  - handlebars.compile(pkgTemplate)({
  - version: '0.0.0',
  + handlebars.compile(pkgTemplate)(
  + {
  privatePackage: true,
  scopeName: '@backstage',
  - }),
  + },
  + {
  + helpers: {
  + version(name: string) {
  + const pkg = require(`${name}/package.json`);
  + if (!pkg) {
  + throw new Error(`No version available for package ${name}`);
  + }
  + return pkg.version;
  + },
  + },
  + },
  + ),
  );
  Array<string>()
  