@backstage/cli-module-migrate 0.1.1-next.0 → 0.1.1-next.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,15 @@
1
1
  # @backstage/cli-module-migrate
2
2
 
3
+ ## 0.1.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 482ceed: Migrated from `assertError` to `toError` for error handling.
8
+ - Updated dependencies
9
+ - @backstage/errors@1.3.0-next.0
10
+ - @backstage/cli-common@0.2.1-next.1
11
+ - @backstage/cli-node@0.3.1-next.1
12
+
3
13
  ## 0.1.1-next.0
4
14
 
5
15
  ### Patch Changes
@@ -16,7 +16,6 @@ function detectYarnVersion(dir) {
16
16
  });
17
17
  return stdout.trim().startsWith("1.") ? "classic" : "berry";
18
18
  } catch (error) {
19
- errors.assertError(error);
20
19
  throw new errors.ForwardedError("Failed to determine yarn version", error);
21
20
  }
22
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"yarn.cjs.js","sources":["../../../src/lib/versioning/yarn.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assertError, ForwardedError } from '@backstage/errors';\nimport { runOutput } from '@backstage/cli-common';\n\nconst versions = new Map<string, Promise<'classic' | 'berry'>>();\n\nexport function detectYarnVersion(dir?: string): Promise<'classic' | 'berry'> {\n const cwd = dir ?? process.cwd();\n if (versions.has(cwd)) {\n return versions.get(cwd)!;\n }\n\n const promise = Promise.resolve().then(async () => {\n try {\n const stdout = await runOutput(['yarn', '--version'], {\n cwd,\n });\n return stdout.trim().startsWith('1.') ? 'classic' : 'berry';\n } catch (error) {\n assertError(error);\n throw new ForwardedError('Failed to determine yarn version', error);\n }\n });\n\n versions.set(cwd, promise);\n return promise;\n}\n"],"names":["runOutput","assertError","ForwardedError"],"mappings":";;;;;AAmBA,MAAM,QAAA,uBAAe,GAAA,EAA0C;AAExD,SAAS,kBAAkB,GAAA,EAA4C;AAC5E,EAAA,MAAM,GAAA,GAAa,OAAA,CAAQ,GAAA,EAAI;AAC/B,EAAA,IAAI,QAAA,CAAS,GAAA,CAAI,GAAG,CAAA,EAAG;AACrB,IAAA,OAAO,QAAA,CAAS,IAAI,GAAG,CAAA;AAAA,EACzB;AAEA,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,OAAA,EAAQ,CAAE,KAAK,YAAY;AACjD,IAAA,IAAI;AACF,MAAA,MAAM,SAAS,MAAMA,mBAAA,CAAU,CAAC,MAAA,EAAQ,WAAW,CAAA,EAAG;AAAA,QACpD;AAAA,OACD,CAAA;AACD,MAAA,OAAO,OAAO,IAAA,EAAK,CAAE,UAAA,CAAW,IAAI,IAAI,SAAA,GAAY,OAAA;AAAA,IACtD,SAAS,KAAA,EAAO;AACd,MAAAC,kBAAA,CAAY,KAAK,CAAA;AACjB,MAAA,MAAM,IAAIC,qBAAA,CAAe,kCAAA,EAAoC,KAAK,CAAA;AAAA,IACpE;AAAA,EACF,CAAC,CAAA;AAED,EAAA,QAAA,CAAS,GAAA,CAAI,KAAK,OAAO,CAAA;AACzB,EAAA,OAAO,OAAA;AACT;;;;"}
1
+ {"version":3,"file":"yarn.cjs.js","sources":["../../../src/lib/versioning/yarn.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ForwardedError } from '@backstage/errors';\nimport { runOutput } from '@backstage/cli-common';\n\nconst versions = new Map<string, Promise<'classic' | 'berry'>>();\n\nexport function detectYarnVersion(dir?: string): Promise<'classic' | 'berry'> {\n const cwd = dir ?? process.cwd();\n if (versions.has(cwd)) {\n return versions.get(cwd)!;\n }\n\n const promise = Promise.resolve().then(async () => {\n try {\n const stdout = await runOutput(['yarn', '--version'], {\n cwd,\n });\n return stdout.trim().startsWith('1.') ? 'classic' : 'berry';\n } catch (error) {\n throw new ForwardedError('Failed to determine yarn version', error);\n }\n });\n\n versions.set(cwd, promise);\n return promise;\n}\n"],"names":["runOutput","ForwardedError"],"mappings":";;;;;AAmBA,MAAM,QAAA,uBAAe,GAAA,EAA0C;AAExD,SAAS,kBAAkB,GAAA,EAA4C;AAC5E,EAAA,MAAM,GAAA,GAAa,OAAA,CAAQ,GAAA,EAAI;AAC/B,EAAA,IAAI,QAAA,CAAS,GAAA,CAAI,GAAG,CAAA,EAAG;AACrB,IAAA,OAAO,QAAA,CAAS,IAAI,GAAG,CAAA;AAAA,EACzB;AAEA,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,OAAA,EAAQ,CAAE,KAAK,YAAY;AACjD,IAAA,IAAI;AACF,MAAA,MAAM,SAAS,MAAMA,mBAAA,CAAU,CAAC,MAAA,EAAQ,WAAW,CAAA,EAAG;AAAA,QACpD;AAAA,OACD,CAAA;AACD,MAAA,OAAO,OAAO,IAAA,EAAK,CAAE,UAAA,CAAW,IAAI,IAAI,SAAA,GAAY,OAAA;AAAA,IACtD,SAAS,KAAA,EAAO;AACd,MAAA,MAAM,IAAIC,qBAAA,CAAe,kCAAA,EAAoC,KAAK,CAAA;AAAA,IACpE;AAAA,EACF,CAAC,CAAA;AAED,EAAA,QAAA,CAAS,GAAA,CAAI,KAAK,OAAO,CAAA;AACzB,EAAA,OAAO,OAAA;AACT;;;;"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "@backstage/cli-module-migrate";
6
- var version = "0.1.1-next.0";
6
+ var version = "0.1.1-next.1";
7
7
  var description = "CLI module for Backstage CLI";
8
8
  var backstage = {
9
9
  role: "cli-module"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli-module-migrate",
3
- "version": "0.1.1-next.0",
3
+ "version": "0.1.1-next.1",
4
4
  "description": "CLI module for Backstage CLI",
5
5
  "backstage": {
6
6
  "role": "cli-module"
@@ -32,9 +32,9 @@
32
32
  "test": "backstage-cli package test"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/cli-common": "0.2.1-next.0",
36
- "@backstage/cli-node": "0.3.1-next.0",
37
- "@backstage/errors": "1.2.7",
35
+ "@backstage/cli-common": "0.2.1-next.1",
36
+ "@backstage/cli-node": "0.3.1-next.1",
37
+ "@backstage/errors": "1.3.0-next.0",
38
38
  "@backstage/release-manifests": "0.0.13",
39
39
  "@manypkg/get-packages": "^1.1.3",
40
40
  "chalk": "^4.0.0",
@@ -46,9 +46,9 @@
46
46
  "semver": "^7.5.3"
47
47
  },
48
48
  "devDependencies": {
49
- "@backstage/backend-test-utils": "1.11.2-next.0",
50
- "@backstage/cli": "0.36.1-next.0",
51
- "@backstage/test-utils": "1.7.17-next.0",
49
+ "@backstage/backend-test-utils": "1.11.2-next.2",
50
+ "@backstage/cli": "0.36.1-next.2",
51
+ "@backstage/test-utils": "1.7.17-next.2",
52
52
  "@types/fs-extra": "^11.0.0",
53
53
  "@types/semver": "^7",
54
54
  "msw": "^1.0.0"