@theholocron/semantic-release-config 7.4.0 → 7.5.0

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/dist/index.d.ts CHANGED
@@ -3,9 +3,15 @@ interface ExecOptions {
3
3
  prepareCmd?: string;
4
4
  publishCmd?: string;
5
5
  }
6
+ interface NpmOptions {
7
+ access?: "public" | "restricted";
8
+ pkgRoot?: string;
9
+ tarballDir?: string;
10
+ }
6
11
  interface Options {
7
12
  branches?: Array<string | Record<string, unknown>>;
8
13
  exec?: ExecOptions;
14
+ npm?: boolean | NpmOptions;
9
15
  assets?: string[];
10
16
  }
11
17
  declare const commitAnalyzer: (string | {
@@ -44,6 +50,6 @@ declare const releaseNotesGenerator: (string | {
44
50
  /**
45
51
  * @see https://semantic-release.gitbook.io/semantic-release/usage/configuration
46
52
  */
47
- declare function defineConfig({ branches, exec, assets }?: Options): object;
53
+ declare function defineConfig({ branches, exec, npm, assets }?: Options): object;
48
54
  //#endregion
49
55
  export { commitAnalyzer, defineConfig, releaseNotesGenerator };
package/dist/index.js CHANGED
@@ -77,20 +77,24 @@ const defaultAssets = [
77
77
  "package.json",
78
78
  "packages/*/package.json"
79
79
  ];
80
+ const defaultSingleAssets = ["CHANGELOG.md", "package.json"];
80
81
  const defaultMessage = "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}\n\nSigned-off-by: Newton <5769156+iamnewton@users.noreply.github.com>";
81
82
  /**
82
83
  * @see https://semantic-release.gitbook.io/semantic-release/usage/configuration
83
84
  */
84
- function defineConfig({ branches = ["main"], exec, assets = defaultAssets } = {}) {
85
+ function defineConfig({ branches = ["main"], exec, npm, assets } = {}) {
86
+ const npmOptions = npm === true ? { access: "public" } : npm || {};
87
+ const resolvedAssets = assets ?? (npm ? defaultSingleAssets : defaultAssets);
85
88
  return {
86
89
  branches,
87
90
  plugins: [
88
91
  commitAnalyzer,
89
92
  releaseNotesGenerator,
90
93
  "@semantic-release/changelog",
94
+ ...npm ? [["@semantic-release/npm", npmOptions]] : [],
91
95
  ...exec ? [["@semantic-release/exec", exec]] : [],
92
96
  ["@semantic-release/git", {
93
- assets,
97
+ assets: resolvedAssets,
94
98
  message: defaultMessage
95
99
  }],
96
100
  "@semantic-release/github"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/semantic-release-config",
3
- "version": "7.4.0",
3
+ "version": "7.5.0",
4
4
  "description": "A semantic-release configuration for automated versioning and publishing.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/semantic-release-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -20,12 +20,12 @@
20
20
  ],
21
21
  "type": "module",
22
22
  "devDependencies": {
23
- "tsdown": "^0.22.8",
23
+ "tsdown": "^0.22.13",
24
24
  "typescript": "^5.9.3",
25
25
  "vitest": "^4.1.10",
26
26
  "@vitest/coverage-v8": "^4.1.10",
27
- "@theholocron/tsconfig": "7.4.0",
28
- "@theholocron/vitest-config": "7.4.0"
27
+ "@theholocron/tsconfig": "7.5.0",
28
+ "@theholocron/vitest-config": "7.5.0"
29
29
  },
30
30
  "exports": {
31
31
  ".": {