@daiyam/artifact-vsx-ts 0.11.19 → 0.11.21

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/.artifactrc.yml CHANGED
@@ -1,4 +1,8 @@
1
- $schema: https://raw.githubusercontent.com/zokugun/artifact/v0.6.0/schemas/v1/package.json
1
+ $schema: https://raw.githubusercontent.com/zokugun/artifact/v0.11.0/schemas/v3/package.json
2
+
3
+ upsert:
4
+ .github/scripts/get-changelog.js:
5
+ rename: .github/scripts/get-changelog.cjs
2
6
 
3
7
  update:
4
8
  CHANGELOG.md:
@@ -1,8 +1,13 @@
1
+ /* eslint-disable no-console */
2
+
1
3
  const fs = require('fs');
2
4
  const path = require('path');
3
5
 
6
+ const EXIT_SUCCESS = 0;
7
+ const EXIT_FAILURE = 1;
8
+
4
9
  // Get version from command line argument (with 'v' prefix)
5
- const version = process.argv[2];
10
+ const [,, version] = process.argv;
6
11
 
7
12
  try {
8
13
  const changelog = fs.readFileSync(path.join(process.cwd(), 'CHANGELOG.md'), 'utf8');
@@ -14,17 +19,20 @@ try {
14
19
  const match = changelog.match(versionRegex);
15
20
 
16
21
  if(match) {
22
+ const [header] = match;
23
+
17
24
  // Remove the version header and trim whitespace
18
- const notes = match[0].replace(/^## v\d+\.\d+\.\d+ \| \d{4}-\d{2}-\d{2}\n/, '').trim();
25
+ const notes = header.replace(/^## v\d+\.\d+\.\d+ \| \d{4}-\d{2}-\d{2}\n/, '').trim();
26
+
19
27
  console.log(notes);
20
- process.exit(0);
28
+ process.exit(EXIT_SUCCESS);
21
29
  }
22
30
  else {
23
31
  console.error(`No changelog entry found for version ${version}`);
24
- process.exit(1);
32
+ process.exit(EXIT_FAILURE);
25
33
  }
26
34
  }
27
35
  catch(error) {
28
36
  console.error('Error reading CHANGELOG.md:', error);
29
- process.exit(1);
37
+ process.exit(EXIT_FAILURE);
30
38
  }
@@ -92,7 +92,7 @@ jobs:
92
92
  - name: Get Changelog
93
93
  if: env.RELEASE_EXISTS == 'no'
94
94
  run: |
95
- CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.js ${VERSION})
95
+ CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.cjs ${VERSION})
96
96
 
97
97
  # Properly handle multiline output in GitHub Actions
98
98
  EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daiyam/artifact-vsx-ts",
3
- "version": "0.11.19",
3
+ "version": "0.11.21",
4
4
  "description": "The configuration to create Visual Studio extensions and publish them on Visual Studio Marketplace and Open VSX Registry.",
5
5
  "author": {
6
6
  "name": "Baptiste Augrain",
@@ -31,5 +31,5 @@
31
31
  "project-template",
32
32
  "scaffold"
33
33
  ],
34
- "gitHead": "9ee29fc847758072bd4880ff4f5ce00f8daa6b19"
34
+ "gitHead": "174975d129f38502476804c1765d7e7adeab3c15"
35
35
  }