@ethima/semantic-release-configuration 7.0.0 → 8.0.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/LICENSE +1 -1
- package/package.json +4 -4
- package/src/configuration.js +20 -1
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c) 2022-
|
|
1
|
+
Copyright (c) 2022-2024 Joris Kraak <me@joriskraak.nl>
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
4
|
this software and associated documentation files (the "Software"), to deal in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethima/semantic-release-configuration",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "A shareable semantic release configuration supporting a range of languages and platforms supported by the Ethima organization.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"@semantic-release/changelog": "6.0.3",
|
|
26
26
|
"@semantic-release/git": "10.0.1",
|
|
27
27
|
"@semantic-release/github": "9.2.6",
|
|
28
|
-
"@semantic-release/gitlab": "13.0.
|
|
28
|
+
"@semantic-release/gitlab": "13.0.2",
|
|
29
29
|
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
30
|
-
"cosmiconfig": "
|
|
30
|
+
"cosmiconfig": "9.0.0",
|
|
31
31
|
"execa": "8.0.1",
|
|
32
32
|
"semantic-release-replace-plugin": "1.2.7"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"ava": "6.
|
|
35
|
+
"ava": "6.1.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"semantic-release": ">= 22.0.7"
|
package/src/configuration.js
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
|
+
import { accessSync } from "node:fs";
|
|
1
2
|
import { cosmiconfigSync } from "cosmiconfig";
|
|
2
3
|
import { env } from "node:process";
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Helper function to synchronously check whether a file exists on disk, e.g.
|
|
7
|
+
* used to check for default files that should be removed from lists if they
|
|
8
|
+
* are not present.
|
|
9
|
+
*/
|
|
10
|
+
function fileExists(filename) {
|
|
11
|
+
try {
|
|
12
|
+
accessSync(filename);
|
|
13
|
+
return true;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
4
19
|
const CONFIGURATION_DEFAULTS = {
|
|
5
20
|
// The character(s) to use to separate the prefix for maintenance and
|
|
6
21
|
// prerelease branches from the version pattern
|
|
7
22
|
branch_prefix_separator: env.BRANCH_PREFIX_SEPARATOR || "-",
|
|
8
23
|
changelog_filename: "CHANGELOG.md",
|
|
9
|
-
|
|
24
|
+
// Files that may contain versioned templates which will be updated upon
|
|
25
|
+
// release. These are conditionally included to ensure downstream operations
|
|
26
|
+
// to not have to guard against files in this list not being present, e.g.
|
|
27
|
+
// when staging for commits
|
|
28
|
+
files_with_versioned_templates: ["README.md"].filter(fileExists),
|
|
10
29
|
// The branch prefix for patterned maintenance branches
|
|
11
30
|
maintenance_branch_prefix: env.MAINTENANCE_BRANCH_PREFIX || "release",
|
|
12
31
|
// The branch prefix for patterned prerelease branches
|