@daiyam/artifact-npm 0.8.20 → 0.8.22
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
|
@@ -5,7 +5,10 @@ upsert:
|
|
|
5
5
|
if_exists: overwrite
|
|
6
6
|
|
|
7
7
|
.github/scripts/get-changelog.js:
|
|
8
|
-
|
|
8
|
+
if_exists: remove
|
|
9
|
+
|
|
10
|
+
.github/scripts/get-changelog.cjs:
|
|
11
|
+
if_exists: remove
|
|
9
12
|
|
|
10
13
|
update:
|
|
11
14
|
CHANGELOG.md:
|
|
@@ -15,3 +18,6 @@ update:
|
|
|
15
18
|
# transforms:
|
|
16
19
|
# - description: Remove release-it from overrides
|
|
17
20
|
# jq: 'del(.overrides["release-it"])'
|
|
21
|
+
|
|
22
|
+
variables:
|
|
23
|
+
REPOSITORY_SLUG: =package.json.repository.url |> toGitUrl |> _.full_name
|
|
@@ -98,7 +98,7 @@ jobs:
|
|
|
98
98
|
- name: Get Changelog
|
|
99
99
|
if: env.RELEASE_EXISTS == 'no'
|
|
100
100
|
run: |
|
|
101
|
-
CHANGELOG_ENTRY=$(
|
|
101
|
+
CHANGELOG_ENTRY=$(npx @zokugun/extract-changelog get ${VERSION})
|
|
102
102
|
|
|
103
103
|
# Properly handle multiline output in GitHub Actions
|
|
104
104
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
package/configs/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
All notable changes to this project will be documented in this file.
|
|
5
|
+
|
|
6
|
+
The format is based on [Keep a Changelog][keepachangelog], and this project adheres to [Semantic Versioning][semver].
|
|
7
|
+
|
|
8
|
+
[Unreleased]
|
|
9
|
+
------------
|
|
10
|
+
|
|
11
|
+
### Added
|
|
2
12
|
|
|
3
|
-
## v0.1.0 | 20XX-XX-XX
|
|
4
13
|
- initial release
|
|
14
|
+
|
|
15
|
+
[keepachangelog]: https://keepachangelog.com/en/2.0.0/
|
|
16
|
+
[semver]: https://semver.org/spec/v2.0.0.html
|
|
17
|
+
[unreleased]: https://github.com/#[[vars.REPOSITORY_SLUG]]/compare/0.0.0...HEAD
|
package/configs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daiyam/artifact-npm",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.22",
|
|
4
4
|
"description": "The configuration to create node modules and publish them on npm.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baptiste Augrain",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"project-template",
|
|
32
32
|
"scaffold"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "306028f50ac9d5efc62b90bebdd2c02d1eadf2cd"
|
|
35
35
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
const EXIT_SUCCESS = 0;
|
|
8
|
-
const EXIT_FAILURE = 1;
|
|
9
|
-
|
|
10
|
-
// Get version from command line argument (with 'v' prefix)
|
|
11
|
-
const [,, version] = process.argv;
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const changelog = fs.readFileSync(path.join(process.cwd(), 'CHANGELOG.md'), 'utf8');
|
|
15
|
-
|
|
16
|
-
// Regular expression to match a version section with the date
|
|
17
|
-
// Matches from "## v0.8.1 | 2025-04-23" until the next ## or end of file
|
|
18
|
-
const versionRegex = new RegExp(`## ${version} \\| \\d{4}-\\d{2}-\\d{2}[^#]*(?=## |$)`, 's');
|
|
19
|
-
|
|
20
|
-
const match = changelog.match(versionRegex);
|
|
21
|
-
|
|
22
|
-
if(match) {
|
|
23
|
-
const [header] = match;
|
|
24
|
-
|
|
25
|
-
// Remove the version header and trim whitespace
|
|
26
|
-
const notes = header.replace(/^## v\d+\.\d+\.\d+ \| \d{4}-\d{2}-\d{2}\n/, '').trim();
|
|
27
|
-
|
|
28
|
-
console.log(notes);
|
|
29
|
-
process.exit(EXIT_SUCCESS);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
console.error(`No changelog entry found for version ${version}`);
|
|
33
|
-
process.exit(EXIT_FAILURE);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
catch(error) {
|
|
37
|
-
console.error('Error reading CHANGELOG.md:', error);
|
|
38
|
-
process.exit(EXIT_FAILURE);
|
|
39
|
-
}
|