@docupace/pipeline 1.0.110 → 1.0.111

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
  # @docupace/pipeline
2
2
 
3
+ ## 1.0.111
4
+
5
+ ### Patch Changes
6
+
7
+ - 471bab7: Fix pipeline
8
+
3
9
  ## 1.0.110
4
10
 
5
11
  ### Patch Changes
@@ -16,7 +16,7 @@ definitions:
16
16
  - npm config set //registry.npmjs.org/:_authToken $DOCUPACE_NPM_TOKEN
17
17
  - pnpm install --frozen-lockfile
18
18
  - export HOME=/tmp
19
- - node src/changeset/cli.js version-commit-tag
19
+ - node src/changeset/cli.js version-commit-tag --ignore-install-error
20
20
 
21
21
  pipelines:
22
22
  pull-requests:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.110",
3
+ "version": "1.0.111",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -148,9 +148,13 @@ program
148
148
  program
149
149
  .command('version-commit-tag')
150
150
  .description('Run versioning and commit-and-tag in sequence')
151
- .action(async () => {
151
+ .option(
152
+ '--ignore-install-error',
153
+ 'Ignore errors from pnpm install and return early',
154
+ )
155
+ .action(async (options) => {
152
156
  console.log('📦 Running all steps...');
153
- const releases = await versionCommand();
157
+ const releases = await versionCommand(false, options.ignoreInstallError);
154
158
  await updateJiraWithVersion(releases);
155
159
  await updateWikiWithVersion(releases);
156
160
  await commitTagCommand(releases);
@@ -65,7 +65,10 @@ export async function versionStatus(sinceBranch) {
65
65
  return jsonOutput.releases;
66
66
  }
67
67
 
68
- export async function versionCommand(closeVersion = false) {
68
+ export async function versionCommand(
69
+ closeVersion = false,
70
+ ignoreInstallError = false,
71
+ ) {
69
72
  console.log('📦 Running Changeset versioning...');
70
73
  if (!process.env.IS_DEV) {
71
74
  await setGitInfo();
@@ -73,7 +76,20 @@ export async function versionCommand(closeVersion = false) {
73
76
  await $`mv pnpm-lock.yaml pnpm-lock.yaml.bak`;
74
77
  await fs.promises.writeFile('package.json', changeSetPackage);
75
78
  await $`npm config set //registry.npmjs.org/:_authToken ${process.env.DOCUPACE_NPM_TOKEN}`;
76
- await $`pnpm install`;
79
+ try {
80
+ await $`pnpm install`;
81
+ } catch (error) {
82
+ if (ignoreInstallError) {
83
+ console.log(
84
+ `⚠️ pnpm install failed: ${error.message}. Ignoring error and returning.`,
85
+ );
86
+ await $`rm -f package.json pnpm-lock.yaml`;
87
+ await $`mv package.json.bak package.json`;
88
+ await $`mv pnpm-lock.yaml.bak pnpm-lock.yaml`;
89
+ return [];
90
+ }
91
+ throw error;
92
+ }
77
93
  await $`rm package.json pnpm-lock.yaml`;
78
94
  await $`mv package.json.bak package.json`;
79
95
  await $`mv pnpm-lock.yaml.bak pnpm-lock.yaml`;