@backstage/cli 0.28.0 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.28.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c5276b6: Fixed an issue with the `--successCache` flag for `repo test` where the tree hash for the wrong package directory would sometimes be used to generate the cache key.
8
+
3
9
  ## 0.28.0
4
10
 
5
11
  ### Minor Changes
@@ -37,23 +37,30 @@ function writeCache(dir, cache) {
37
37
  fs__default.default.writeJsonSync(path.resolve(dir, CACHE_FILE_NAME), cache, { spaces: 2 });
38
38
  }
39
39
  async function readPackageTreeHashes(graph) {
40
- const pkgs = Array.from(graph.values());
40
+ const pkgs = Array.from(graph.values()).map((pkg) => ({
41
+ ...pkg,
42
+ path: path.relative(paths.paths.targetRoot, pkg.dir)
43
+ }));
41
44
  const output = await run.runPlain(
42
45
  "git",
43
46
  "ls-tree",
44
- "--object-only",
47
+ '--format="%(objectname)=%(path)"',
45
48
  "HEAD",
46
49
  "--",
47
- ...pkgs.map((pkg) => path.relative(paths.paths.targetRoot, pkg.dir))
50
+ ...pkgs.map((pkg) => pkg.path)
48
51
  );
49
- const treeShaList = output.trim().split(/\r?\n/);
50
- if (treeShaList.length !== pkgs.length) {
51
- throw new Error(
52
- `Error listing project git tree hashes, output length does not equal input length`
53
- );
54
- }
55
52
  const map = new Map(
56
- pkgs.map((pkg, i) => [pkg.packageJson.name, treeShaList[i]])
53
+ output.trim().split(/\r?\n/).map((line) => {
54
+ const [itemSha, ...itemPathParts] = line.split("=");
55
+ const itemPath = itemPathParts.join("=");
56
+ const pkg = pkgs.find((p) => p.path === itemPath);
57
+ if (!pkg) {
58
+ throw new Error(
59
+ `Unexpectedly missing tree sha entry for path ${itemPath}`
60
+ );
61
+ }
62
+ return [pkg.packageJson.name, itemSha];
63
+ })
57
64
  );
58
65
  return (pkgName) => {
59
66
  const sha = map.get(pkgName);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.5.1";
3
+ var version = "0.5.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.0.1";
3
+ var version = "1.0.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.28.0";
3
+ var version = "0.28.1";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.1.13";
3
+ var version = "0.1.14";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -162,7 +162,7 @@
162
162
  "devDependencies": {
163
163
  "@backstage/backend-common": "^0.25.0",
164
164
  "@backstage/backend-plugin-api": "^1.0.1",
165
- "@backstage/backend-test-utils": "^1.0.1",
165
+ "@backstage/backend-test-utils": "^1.0.2",
166
166
  "@backstage/catalog-client": "^1.7.1",
167
167
  "@backstage/config": "^1.2.0",
168
168
  "@backstage/core-app-api": "^1.15.1",
@@ -174,7 +174,7 @@
174
174
  "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.1",
175
175
  "@backstage/plugin-catalog-node": "^1.13.1",
176
176
  "@backstage/plugin-scaffolder-node": "^0.5.0",
177
- "@backstage/plugin-scaffolder-node-test-utils": "^0.1.13",
177
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.1.14",
178
178
  "@backstage/test-utils": "^1.7.0",
179
179
  "@backstage/theme": "^0.6.0",
180
180
  "@rspack/core": "^1.0.10",