@ethima/semantic-release-configuration 6.0.0 → 7.0.0-rc.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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@ethima/semantic-release-configuration",
3
- "version": "6.0.0",
3
+ "version": "7.0.0-rc.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": {
7
7
  "type": "git",
8
8
  "url": "git+ssh://git@gitlab.com/ethima/semantic-release-configuration.git"
9
9
  },
10
+ "type": "module",
10
11
  "scripts": {
11
12
  "test": "ava"
12
13
  },
@@ -32,6 +33,9 @@
32
33
  "devDependencies": {
33
34
  "ava": "6.0.1"
34
35
  },
36
+ "peerDependencies": {
37
+ "semantic-release": ">= 22.0.7"
38
+ },
35
39
  "engines": {
36
40
  "node": ">= 20.8.1"
37
41
  }
package/src/branches.js CHANGED
@@ -28,7 +28,7 @@ function determinePrefixedBranchType(
28
28
  * @return array An array containing the determined branch configuration as the
29
29
  * sole entry.
30
30
  */
31
- function BranchesConfiguration(branch, configuration) {
31
+ export function BranchesConfiguration(branch, configuration) {
32
32
  if (configuration.primary_release_branch === branch) {
33
33
  return [branch];
34
34
  }
@@ -78,5 +78,3 @@ function BranchesConfiguration(branch, configuration) {
78
78
 
79
79
  return [];
80
80
  }
81
-
82
- module.exports = BranchesConfiguration;
@@ -1,5 +1,5 @@
1
- const { cosmiconfigSync } = require("cosmiconfig");
2
- const { env } = require("node:process");
1
+ import { cosmiconfigSync } from "cosmiconfig";
2
+ import { env } from "node:process";
3
3
 
4
4
  const CONFIGURATION_DEFAULTS = {
5
5
  // The character(s) to use to separate the prefix for maintenance and
@@ -27,6 +27,7 @@ const ethimaConfig = cosmiconfigSync("ethima").search();
27
27
  // sufficient for the current configuration needs, which tend to be simple
28
28
  // values and doing a deep merge would add currently unnecessary complexity.
29
29
  // This can be revisited once the need arises
30
- const CONFIGURATION = { ...CONFIGURATION_DEFAULTS, ...ethimaConfig?.config };
31
-
32
- module.exports = CONFIGURATION;
30
+ export const CONFIGURATION = {
31
+ ...CONFIGURATION_DEFAULTS,
32
+ ...ethimaConfig?.config,
33
+ };
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
- const { accessSync } = require("node:fs");
2
- const { env } = require("node:process");
1
+ import { accessSync } from "node:fs";
2
+ import { env } from "node:process";
3
3
 
4
- const BranchesConfiguration = require("./branches.js");
5
- const CONFIGURATION = require("./configuration.js");
6
- const VersionedTemplatesConfiguration = require("./versioned-templates.js");
4
+ import { BranchesConfiguration } from "./branches.js";
5
+ import { CONFIGURATION } from "./configuration.js";
6
+ import { VersionedTemplatesConfiguration } from "./versioned-templates.js";
7
7
 
8
8
  const GIT_ASSETS = [
9
9
  CONFIGURATION.changelog_filename,
@@ -109,4 +109,4 @@ const SEMANTIC_RELEASE_CONFIGURATION = {
109
109
  ],
110
110
  };
111
111
 
112
- module.exports = SEMANTIC_RELEASE_CONFIGURATION;
112
+ export default SEMANTIC_RELEASE_CONFIGURATION;
@@ -1,4 +1,4 @@
1
- const { extname } = require("node:path");
1
+ import { extname } from "node:path";
2
2
 
3
3
  /**
4
4
  * The default configuration for tokens used by the {@link buildReplacement}
@@ -96,8 +96,8 @@ function buildReplacement(
96
96
  template,
97
97
  template_end,
98
98
  replacement_end,
99
- _, // Index of match start
100
- _, // Searched text
99
+ __, // Index of match start
100
+ ___, // Searched text
101
101
  filename,
102
102
  context,
103
103
  ) {
@@ -224,7 +224,7 @@ function stripTemplateContinuationTokens(
224
224
  * `semantic-release-replace-plugin` set up to replace specific tokens with the
225
225
  * next semantic release version in the provided {@param files}.
226
226
  */
227
- function VersionedTemplatesConfiguration(files) {
227
+ export function VersionedTemplatesConfiguration(files) {
228
228
  return [
229
229
  "semantic-release-replace-plugin",
230
230
  {
@@ -239,5 +239,3 @@ function VersionedTemplatesConfiguration(files) {
239
239
  },
240
240
  ];
241
241
  }
242
-
243
- module.exports = VersionedTemplatesConfiguration;