@anolilab/semantic-release-pnpm 2.0.2 → 2.0.4
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/CHANGELOG.md +35 -0
- package/dist/{index.mjs → index.js} +37 -22
- package/package.json +9 -9
- package/dist/index.d.mts +0 -123
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## @anolilab/semantic-release-pnpm [2.0.4](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@2.0.3...@anolilab/semantic-release-pnpm@2.0.4) (2025-09-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **deps:** update dependencies across multiple packages ([150593f](https://github.com/anolilab/semantic-release/commit/150593fec51e1646e8bc5d8aa9db76a8370d42c1))
|
|
6
|
+
* **deps:** update dependencies and configurations across multiple packages ([414ca97](https://github.com/anolilab/semantic-release/commit/414ca976b2432a2d9fb300c746ee1eebfa4361a1))
|
|
7
|
+
* update dependencies and configuration across multiple packages ([9c9b4cb](https://github.com/anolilab/semantic-release/commit/9c9b4cb5b1f9e172f2e1ce509491b950ae448c09))
|
|
8
|
+
* update dependencies and improve configuration ([de0cf70](https://github.com/anolilab/semantic-release/commit/de0cf702c2c5217203409b475f96061702806475))
|
|
9
|
+
* update Nx version and adjust package configurations ([d39ef78](https://github.com/anolilab/semantic-release/commit/d39ef78b608486214ca3a73c5903c00798e7c456))
|
|
10
|
+
* update package dependencies and configurations ([8241a76](https://github.com/anolilab/semantic-release/commit/8241a762582a25742d385d8cf113851ac8b9b801))
|
|
11
|
+
|
|
12
|
+
### Code Refactoring
|
|
13
|
+
|
|
14
|
+
* simplify packem configuration and improve comments ([592de5b](https://github.com/anolilab/semantic-release/commit/592de5b367a448974fc41fd7336e01ba4865a4cf))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* **@anolilab/rc:** upgraded to 2.0.4
|
|
20
|
+
|
|
21
|
+
## @anolilab/semantic-release-pnpm [2.0.3](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@2.0.2...@anolilab/semantic-release-pnpm@2.0.3) (2025-07-31)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* update dependencies and improve configuration ([91c8546](https://github.com/anolilab/semantic-release/commit/91c8546aaa2f093f0f36b407b1bd4e4be34decbc))
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
* add or update JSDoc comments ([#172](https://github.com/anolilab/semantic-release/issues/172)) ([d392c82](https://github.com/anolilab/semantic-release/commit/d392c8249ed88538f18cbbd9a337730e703cf5f8))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Dependencies
|
|
33
|
+
|
|
34
|
+
* **@anolilab/rc:** upgraded to 2.0.3
|
|
35
|
+
|
|
1
36
|
## @anolilab/semantic-release-pnpm [2.0.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@2.0.1...@anolilab/semantic-release-pnpm@2.0.2) (2025-07-02)
|
|
2
37
|
|
|
3
38
|
### Bug Fixes
|
|
@@ -12,7 +12,15 @@ import { URL } from 'node:url';
|
|
|
12
12
|
|
|
13
13
|
var __defProp$h = Object.defineProperty;
|
|
14
14
|
var __name$h = (target, value) => __defProp$h(target, "name", { value, configurable: true });
|
|
15
|
-
const getChannel = /* @__PURE__ */ __name$h((channel) =>
|
|
15
|
+
const getChannel = /* @__PURE__ */ __name$h((channel) => {
|
|
16
|
+
if (!channel) {
|
|
17
|
+
return "latest";
|
|
18
|
+
}
|
|
19
|
+
if (validRange(channel)) {
|
|
20
|
+
return `release-${channel}`;
|
|
21
|
+
}
|
|
22
|
+
return channel;
|
|
23
|
+
}, "getChannel");
|
|
16
24
|
|
|
17
25
|
var __defProp$g = Object.defineProperty;
|
|
18
26
|
var __name$g = (target, value) => __defProp$g(target, "name", { value, configurable: true });
|
|
@@ -49,7 +57,7 @@ const getRegistry = /* @__PURE__ */ __name$f(({ name, publishConfig: { registry
|
|
|
49
57
|
cwd,
|
|
50
58
|
defaults: { registry: "https://registry.npmjs.org/" }
|
|
51
59
|
}).config
|
|
52
|
-
), "
|
|
60
|
+
), "getRegistry");
|
|
53
61
|
|
|
54
62
|
var __defProp$e = Object.defineProperty;
|
|
55
63
|
var __name$e = (target, value) => __defProp$e(target, "name", { value, configurable: true });
|
|
@@ -63,12 +71,20 @@ const getReleaseInfo = /* @__PURE__ */ __name$e(({ name }, { env: { DEFAULT_NPM_
|
|
|
63
71
|
|
|
64
72
|
var __defProp$d = Object.defineProperty;
|
|
65
73
|
var __name$d = (target, value) => __defProp$d(target, "name", { value, configurable: true });
|
|
66
|
-
const reasonToNotPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) =>
|
|
74
|
+
const reasonToNotPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) => {
|
|
75
|
+
if (pluginConfig.npmPublish === false) {
|
|
76
|
+
return "npmPublish plugin option is false";
|
|
77
|
+
}
|
|
78
|
+
if (package_.private === true && package_.workspaces === void 0) {
|
|
79
|
+
return "package is private and has no workspaces";
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}, "reasonToNotPublish");
|
|
67
83
|
const shouldPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) => reasonToNotPublish(pluginConfig, package_) === null, "shouldPublish");
|
|
68
84
|
|
|
69
85
|
var __defProp$c = Object.defineProperty;
|
|
70
86
|
var __name$c = (target, value) => __defProp$c(target, "name", { value, configurable: true });
|
|
71
|
-
const
|
|
87
|
+
const addChannel$1 = /* @__PURE__ */ __name$c(async (pluginConfig, packageJson, context) => {
|
|
72
88
|
const {
|
|
73
89
|
cwd,
|
|
74
90
|
env,
|
|
@@ -95,11 +111,11 @@ const addChannelNpm = /* @__PURE__ */ __name$c(async (pluginConfig, packageJson,
|
|
|
95
111
|
}
|
|
96
112
|
logger.log(`Skip adding to npm channel as ${reasonToNotPublish(pluginConfig, packageJson)}`);
|
|
97
113
|
return false;
|
|
98
|
-
}, "
|
|
114
|
+
}, "addChannel");
|
|
99
115
|
|
|
100
116
|
var __defProp$b = Object.defineProperty;
|
|
101
117
|
var __name$b = (target, value) => __defProp$b(target, "name", { value, configurable: true });
|
|
102
|
-
const
|
|
118
|
+
const prepare$1 = /* @__PURE__ */ __name$b(async ({ pkgRoot, tarballDir }, { cwd, env, logger, nextRelease: { version }, stderr, stdout }) => {
|
|
103
119
|
const basePath = pkgRoot ? resolve(cwd, pkgRoot) : cwd;
|
|
104
120
|
logger.log("Write version %s to package.json in %s", version, basePath);
|
|
105
121
|
const versionResult = execa("pnpm", ["version", version, "--no-git-tag-version", "--allow-same-version"], {
|
|
@@ -122,11 +138,11 @@ const prepareNpm = /* @__PURE__ */ __name$b(async ({ pkgRoot, tarballDir }, { cw
|
|
|
122
138
|
await move(tarballSource, tarballDestination);
|
|
123
139
|
}
|
|
124
140
|
}
|
|
125
|
-
}, "
|
|
141
|
+
}, "prepare");
|
|
126
142
|
|
|
127
143
|
var __defProp$a = Object.defineProperty;
|
|
128
144
|
var __name$a = (target, value) => __defProp$a(target, "name", { value, configurable: true });
|
|
129
|
-
const
|
|
145
|
+
const publish$1 = /* @__PURE__ */ __name$a(async (pluginConfig, packageJson, context) => {
|
|
130
146
|
const {
|
|
131
147
|
cwd,
|
|
132
148
|
env,
|
|
@@ -171,7 +187,7 @@ const publishNpm = /* @__PURE__ */ __name$a(async (pluginConfig, packageJson, co
|
|
|
171
187
|
}
|
|
172
188
|
logger.log(`Skip publishing to npm registry as ${reasonToNotPublish(pluginConfig, packageJson)}`);
|
|
173
189
|
return false;
|
|
174
|
-
}, "
|
|
190
|
+
}, "publish");
|
|
175
191
|
|
|
176
192
|
const homepage = "https://github.com/anolilab/semantic-release/tree/main/packages/semantic-release-pnpm";
|
|
177
193
|
const packageJson = {
|
|
@@ -179,7 +195,7 @@ const packageJson = {
|
|
|
179
195
|
|
|
180
196
|
var __defProp$9 = Object.defineProperty;
|
|
181
197
|
var __name$9 = (target, value) => __defProp$9(target, "name", { value, configurable: true });
|
|
182
|
-
const linkify = /* @__PURE__ */ __name$9((file) => packageJson.homepage
|
|
198
|
+
const linkify = /* @__PURE__ */ __name$9((file) => `${packageJson.homepage}/blob/main/${file}`, "linkify");
|
|
183
199
|
const errors = {
|
|
184
200
|
EINVALIDBRANCHES: /* @__PURE__ */ __name$9((branches) => {
|
|
185
201
|
return {
|
|
@@ -278,7 +294,7 @@ var __name$8 = (target, value) => __defProp$8(target, "name", { value, configura
|
|
|
278
294
|
const getError = /* @__PURE__ */ __name$8((code, context = {}) => {
|
|
279
295
|
const { details, message } = errors[code](context);
|
|
280
296
|
return new SemanticReleaseError(message, code, details);
|
|
281
|
-
}, "
|
|
297
|
+
}, "getError");
|
|
282
298
|
|
|
283
299
|
var __defProp$7 = Object.defineProperty;
|
|
284
300
|
var __name$7 = (target, value) => __defProp$7(target, "name", { value, configurable: true });
|
|
@@ -297,7 +313,7 @@ const getPackage = /* @__PURE__ */ __name$7(async ({ pkgRoot }, { cwd }) => {
|
|
|
297
313
|
}
|
|
298
314
|
throw error;
|
|
299
315
|
}
|
|
300
|
-
}, "
|
|
316
|
+
}, "getPackage");
|
|
301
317
|
|
|
302
318
|
var __defProp$6 = Object.defineProperty;
|
|
303
319
|
var __name$6 = (target, value) => __defProp$6(target, "name", { value, configurable: true });
|
|
@@ -337,7 +353,7 @@ email = \${NPM_EMAIL}`);
|
|
|
337
353
|
const semanticError = getError("ENONPMTOKEN", { registry });
|
|
338
354
|
throw new AggregateError([semanticError], semanticError.message);
|
|
339
355
|
}
|
|
340
|
-
}, "
|
|
356
|
+
}, "setNpmrcAuth");
|
|
341
357
|
|
|
342
358
|
var __defProp$4 = Object.defineProperty;
|
|
343
359
|
var __name$4 = (target, value) => __defProp$4(target, "name", { value, configurable: true });
|
|
@@ -369,7 +385,7 @@ const verifyAuth = /* @__PURE__ */ __name$4(async (npmrc, package_, context) =>
|
|
|
369
385
|
} else {
|
|
370
386
|
logger.log(`Skipping authentication verification for non-default registry "${registry}"`);
|
|
371
387
|
}
|
|
372
|
-
}, "
|
|
388
|
+
}, "verifyAuth");
|
|
373
389
|
|
|
374
390
|
var __defProp$3 = Object.defineProperty;
|
|
375
391
|
var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
|
|
@@ -403,20 +419,19 @@ const verifyConfig = /* @__PURE__ */ __name$3((config) => (
|
|
|
403
419
|
}
|
|
404
420
|
return [...errors, getError(`EINVALID${option.toUpperCase()}`, { [option]: value })];
|
|
405
421
|
}, [])
|
|
406
|
-
), "
|
|
422
|
+
), "verifyConfig");
|
|
407
423
|
|
|
408
424
|
var __defProp$2 = Object.defineProperty;
|
|
409
425
|
var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
|
|
410
426
|
const MIN_PNPM_VERSION = "8.0.0";
|
|
411
|
-
|
|
427
|
+
const verifyPnpm = /* @__PURE__ */ __name$2(async ({ logger }) => {
|
|
412
428
|
logger.log(`Verify pnpm version is >= ${MIN_PNPM_VERSION}`);
|
|
413
429
|
const version = getPackageManagerVersion("pnpm");
|
|
414
430
|
if (gte(MIN_PNPM_VERSION, version)) {
|
|
415
431
|
const semanticError = getError("EINVALIDPNPM", { version: String(version) });
|
|
416
432
|
throw new AggregateError([semanticError], semanticError.message);
|
|
417
433
|
}
|
|
418
|
-
}
|
|
419
|
-
__name$2(verifyPnpm, "verifyPnpm");
|
|
434
|
+
}, "verifyPnpm");
|
|
420
435
|
|
|
421
436
|
var __defProp$1 = Object.defineProperty;
|
|
422
437
|
var __name$1 = (target, value) => __defProp$1(target, "name", { value, configurable: true });
|
|
@@ -468,7 +483,7 @@ const prepare = /* @__PURE__ */ __name(async (pluginConfig, context) => {
|
|
|
468
483
|
if (!verified) {
|
|
469
484
|
await verify(pluginConfig, context);
|
|
470
485
|
}
|
|
471
|
-
await
|
|
486
|
+
await prepare$1(pluginConfig, context);
|
|
472
487
|
prepared = true;
|
|
473
488
|
}, "prepare");
|
|
474
489
|
const publish = /* @__PURE__ */ __name(async (pluginConfig, context) => {
|
|
@@ -477,16 +492,16 @@ const publish = /* @__PURE__ */ __name(async (pluginConfig, context) => {
|
|
|
477
492
|
await verify(pluginConfig, context);
|
|
478
493
|
}
|
|
479
494
|
if (!prepared) {
|
|
480
|
-
await
|
|
495
|
+
await prepare$1(pluginConfig, context);
|
|
481
496
|
}
|
|
482
|
-
return await
|
|
497
|
+
return await publish$1(pluginConfig, packageJson, context);
|
|
483
498
|
}, "publish");
|
|
484
499
|
const addChannel = /* @__PURE__ */ __name(async (pluginConfig, context) => {
|
|
485
500
|
if (!verified) {
|
|
486
501
|
await verify(pluginConfig, context);
|
|
487
502
|
}
|
|
488
503
|
const packageJson = await getPackage(pluginConfig, context);
|
|
489
|
-
return await
|
|
504
|
+
return await addChannel$1(pluginConfig, packageJson, context);
|
|
490
505
|
}, "addChannel");
|
|
491
506
|
|
|
492
507
|
export { addChannel, prepare, publish, verifyConditions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/semantic-release-pnpm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Semantic-release plugin to publish a npm package with pnpm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"type": "module",
|
|
41
|
-
"main": "./dist/index.
|
|
42
|
-
"types": "./dist/index.d.
|
|
41
|
+
"main": "./dist/index.js",
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
43
|
"files": [
|
|
44
|
-
"
|
|
44
|
+
"CHANGELOG.md",
|
|
45
45
|
"README.md",
|
|
46
|
-
"
|
|
46
|
+
"dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@anolilab/rc": "2.0.
|
|
49
|
+
"@anolilab/rc": "2.0.4",
|
|
50
50
|
"@semantic-release/error": "^4.0.0",
|
|
51
|
-
"@visulima/fs": "^3.1.
|
|
52
|
-
"@visulima/package": "^3.5.
|
|
51
|
+
"@visulima/fs": "^3.1.8",
|
|
52
|
+
"@visulima/package": "^3.5.11",
|
|
53
53
|
"@visulima/path": "^1.4.0",
|
|
54
54
|
"execa": "^9.6.0",
|
|
55
55
|
"ini": "^5.0.0",
|
|
56
|
-
"normalize-url": "^8.0
|
|
56
|
+
"normalize-url": "^8.1.0",
|
|
57
57
|
"registry-auth-token": "^5.1.0",
|
|
58
58
|
"semver": "^7.7.2"
|
|
59
59
|
},
|
package/dist/index.d.mts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import stream from 'node:stream';
|
|
2
|
-
|
|
3
|
-
interface BranchObject {
|
|
4
|
-
channel?: string | false | undefined;
|
|
5
|
-
name: string;
|
|
6
|
-
prerelease?: boolean | string | undefined;
|
|
7
|
-
range?: string | undefined;
|
|
8
|
-
}
|
|
9
|
-
type BranchSpec$1 = BranchObject | string;
|
|
10
|
-
type PluginSpec<T = any> = string | [string, T];
|
|
11
|
-
interface Options {
|
|
12
|
-
[name: string]: any;
|
|
13
|
-
branches?: BranchSpec$1 | ReadonlyArray<BranchSpec$1> | undefined;
|
|
14
|
-
ci?: boolean | undefined;
|
|
15
|
-
dryRun?: boolean | undefined;
|
|
16
|
-
extends?: ReadonlyArray<string> | string | undefined;
|
|
17
|
-
plugins?: ReadonlyArray<PluginSpec> | undefined;
|
|
18
|
-
repositoryUrl?: string | undefined;
|
|
19
|
-
tagFormat?: string | undefined;
|
|
20
|
-
}
|
|
21
|
-
interface Commit {
|
|
22
|
-
author: {
|
|
23
|
-
email: string;
|
|
24
|
-
name: string;
|
|
25
|
-
short: string;
|
|
26
|
-
};
|
|
27
|
-
body: string;
|
|
28
|
-
commit: {
|
|
29
|
-
long: string;
|
|
30
|
-
short: string;
|
|
31
|
-
};
|
|
32
|
-
committer: {
|
|
33
|
-
email: string;
|
|
34
|
-
name: string;
|
|
35
|
-
short: string;
|
|
36
|
-
};
|
|
37
|
-
committerDate: string;
|
|
38
|
-
hash: string;
|
|
39
|
-
message: string;
|
|
40
|
-
subject: string;
|
|
41
|
-
tree: {
|
|
42
|
-
long: string;
|
|
43
|
-
short: string;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface CommonContext {
|
|
48
|
-
branch: BranchSpec;
|
|
49
|
-
branches: BranchSpec[];
|
|
50
|
-
cwd: string;
|
|
51
|
-
env: "object";
|
|
52
|
-
logger: {
|
|
53
|
-
error: (...message: string[]) => void;
|
|
54
|
-
log: (...message: string[]) => void;
|
|
55
|
-
success: (...message: string[]) => void;
|
|
56
|
-
};
|
|
57
|
-
options: Options;
|
|
58
|
-
stderr: stream.Writable;
|
|
59
|
-
stdout: stream.Writable;
|
|
60
|
-
}
|
|
61
|
-
type VerifyConditionsContext = CommonContext;
|
|
62
|
-
type CommonContext2 = CommonContext & {
|
|
63
|
-
releases: Release[];
|
|
64
|
-
};
|
|
65
|
-
type AddChannelContext = CommonContext2 & {
|
|
66
|
-
commits: Commit[];
|
|
67
|
-
currentRelease: Release;
|
|
68
|
-
lastRelease: Release;
|
|
69
|
-
nextRelease: Release;
|
|
70
|
-
};
|
|
71
|
-
type CommonContext3 = CommonContext2 & {
|
|
72
|
-
commits: Commit[];
|
|
73
|
-
lastRelease: Release;
|
|
74
|
-
};
|
|
75
|
-
type CommonContext4 = CommonContext3 & {
|
|
76
|
-
commits: Commit[];
|
|
77
|
-
nextRelease: Release;
|
|
78
|
-
};
|
|
79
|
-
type PrepareContext = CommonContext4;
|
|
80
|
-
type PublishContext = CommonContext4;
|
|
81
|
-
interface BranchSpec {
|
|
82
|
-
name: string;
|
|
83
|
-
tags?: Tag[];
|
|
84
|
-
}
|
|
85
|
-
interface Tag {
|
|
86
|
-
channel?: string;
|
|
87
|
-
gitHead?: string;
|
|
88
|
-
gitTag?: string;
|
|
89
|
-
version?: string;
|
|
90
|
-
}
|
|
91
|
-
interface Release {
|
|
92
|
-
channel?: string | null;
|
|
93
|
-
gitHead?: string;
|
|
94
|
-
gitTag?: string;
|
|
95
|
-
name?: string;
|
|
96
|
-
type?: "build" | "major" | "minor" | "patch" | "premajor" | "preminor" | "prepatch" | "prerelease" | undefined;
|
|
97
|
-
version: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface PluginConfig {
|
|
101
|
-
branches?: (string | {
|
|
102
|
-
name: string;
|
|
103
|
-
prerelease: boolean;
|
|
104
|
-
})[];
|
|
105
|
-
disableScripts?: boolean;
|
|
106
|
-
npmPublish?: boolean;
|
|
107
|
-
pkgRoot?: string;
|
|
108
|
-
publishBranch?: string;
|
|
109
|
-
tarballDir?: string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
interface ReleaseInfo {
|
|
113
|
-
channel: string;
|
|
114
|
-
name: string;
|
|
115
|
-
url?: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
declare const verifyConditions: (pluginConfig: PluginConfig, context: VerifyConditionsContext) => Promise<void>;
|
|
119
|
-
declare const prepare: (pluginConfig: PluginConfig, context: PrepareContext) => Promise<void>;
|
|
120
|
-
declare const publish: (pluginConfig: PluginConfig, context: PublishContext) => Promise<ReleaseInfo | false>;
|
|
121
|
-
declare const addChannel: (pluginConfig: PluginConfig, context: AddChannelContext) => Promise<ReleaseInfo | false>;
|
|
122
|
-
|
|
123
|
-
export { addChannel, prepare, publish, verifyConditions };
|