panrelease 0.14.0 → 0.15.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/README.md CHANGED
@@ -1,20 +1,43 @@
1
- # Panrelease
1
+ # Panrelease (Node.js)
2
2
 
3
- ## Quick start
3
+ [![npm version](https://img.shields.io/npm/v/panrelease.svg?style=flat-square)](https://www.npmjs.com/package/panrelease)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
4
5
 
5
- Install using npm:
6
+ **Panrelease** is a versatile release automation tool that manages version bumping, changelog updates, and Git operations. This package provides the Node.js implementation of Panrelease, powered by WebAssembly, allowing it to run seamlessly in any Node.js environment without requiring a Rust installation.
6
7
 
7
- ```shell
8
- npm i --save-dev panrelease
8
+ ## Features
9
+
10
+ - **Semantic Versioning** - Automatic major, minor, patch, and post-release version bumping.
11
+ - **Node.js Native Support** - Direct support for `package.json` and lockfiles (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`).
12
+ - **Changelog Automation** - Updates `CHANGELOG.md` following [Keep a Changelog](https://keepachangelog.com/) format.
13
+ - **Git Integration** - Commits version changes, creates tags, and supports GPG signing.
14
+ - **Monorepo Friendly** - Can manage multiple modules in a single project.
15
+ - **WebAssembly Powered** - Fast and consistent execution across different platforms.
16
+
17
+ ## Installation
18
+
19
+ Install as a development dependency in your project:
20
+
21
+ ### npm
22
+ ```bash
23
+ npm install --save-dev panrelease
9
24
  ```
10
25
 
11
- Or yarn:
26
+ ### yarn
27
+ ```bash
28
+ yarn add --dev panrelease
29
+ ```
12
30
 
13
- ```shell
14
- yarn add -D panrelease
31
+ ### pnpm
32
+ ```bash
33
+ pnpm add --save-dev panrelease
15
34
  ```
16
35
 
17
- Write a configuration file:
36
+ ## Quick Start
37
+
38
+ ### 1. Configure Panrelease
39
+
40
+ Create a `.panproject.toml` file in your project root:
18
41
 
19
42
  ```toml
20
43
  [vcs]
@@ -23,14 +46,44 @@ software = "Git"
23
46
  [modules.root]
24
47
  path = "."
25
48
  packageManager = "Npm"
49
+ main = true
26
50
  ```
27
51
 
28
- Add custom script in your package.json
52
+ ### 2. Add a Script to package.json
29
53
 
30
54
  ```json
31
55
  {
32
56
  "scripts": {
33
- "rel": "panrelease release"
57
+ "release": "panrelease"
34
58
  }
35
59
  }
36
- ```
60
+ ```
61
+
62
+ ### 3. Run a Release
63
+
64
+ ```bash
65
+ # Release a new patch version (e.g., 1.0.0 -> 1.0.1)
66
+ npm run release -- patch
67
+
68
+ # Or run directly via npx
69
+ npx panrelease minor
70
+ ```
71
+
72
+ ## Commands
73
+
74
+ | Command | Description | Example |
75
+ |---------|-------------|---------|
76
+ | `patch` | Increment patch version | `1.0.0` -> `1.0.1` |
77
+ | `minor` | Increment minor version | `1.0.0` -> `1.1.0` |
78
+ | `major` | Increment major version | `1.0.0` -> `2.0.0` |
79
+ | `post` | Create post-release (build metadata) | `1.0.0` -> `1.0.0+r1` |
80
+ | `show` | Show current project version | `panrelease show` |
81
+ | `<version>` | Set explicit version | `panrelease 2.1.0` |
82
+
83
+ ## Documentation
84
+
85
+ For full configuration options, advanced features like **hooks**, and **strict mode**, please refer to the [Main Repository Documentation](https://github.com/dghilardi/panrelease#readme).
86
+
87
+ ## License
88
+
89
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/dghilardi/panrelease/blob/main/LICENSE) file for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panrelease",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Utility to release software",
5
5
  "keywords": [
6
6
  "cli",
@@ -17,12 +17,10 @@
17
17
  "publishConfig": {
18
18
  "registry": "https://registry.npmjs.org"
19
19
  },
20
- "main": "index.js",
20
+ "main": "pkg/panrelease.js",
21
21
  "license": "MIT",
22
22
  "bin": {
23
23
  "panrelease": "bin/index.js"
24
24
  },
25
- "scripts": {
26
- "panrelease": "./bin/index.js"
27
- }
28
- }
25
+ "scripts": {}
26
+ }
package/pkg/panrelease.js CHANGED
@@ -4,16 +4,43 @@ let wasm;
4
4
  const { execSync } = require(`child_process`);
5
5
  const { readFileSync, writeFileSync, existsSync } = require(`fs`);
6
6
  const { cwd } = require(`process`);
7
- const { TextEncoder, TextDecoder } = require(`util`);
7
+ const { TextDecoder, TextEncoder } = require(`util`);
8
+
9
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+
11
+ cachedTextDecoder.decode();
12
+
13
+ let cachedUint8Memory0 = null;
14
+
15
+ function getUint8Memory0() {
16
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
17
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
18
+ }
19
+ return cachedUint8Memory0;
20
+ }
21
+
22
+ function getStringFromWasm0(ptr, len) {
23
+ ptr = ptr >>> 0;
24
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
25
+ }
8
26
 
9
27
  const heap = new Array(128).fill(undefined);
10
28
 
11
29
  heap.push(undefined, null, true, false);
12
30
 
13
- function getObject(idx) { return heap[idx]; }
14
-
15
31
  let heap_next = heap.length;
16
32
 
33
+ function addHeapObject(obj) {
34
+ if (heap_next === heap.length) heap.push(heap.length + 1);
35
+ const idx = heap_next;
36
+ heap_next = heap[idx];
37
+
38
+ heap[idx] = obj;
39
+ return idx;
40
+ }
41
+
42
+ function getObject(idx) { return heap[idx]; }
43
+
17
44
  function dropObject(idx) {
18
45
  if (idx < 132) return;
19
46
  heap[idx] = heap_next;
@@ -28,15 +55,6 @@ function takeObject(idx) {
28
55
 
29
56
  let WASM_VECTOR_LEN = 0;
30
57
 
31
- let cachedUint8Memory0 = null;
32
-
33
- function getUint8Memory0() {
34
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
35
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
36
- }
37
- return cachedUint8Memory0;
38
- }
39
-
40
58
  let cachedTextEncoder = new TextEncoder('utf-8');
41
59
 
42
60
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -104,24 +122,6 @@ function getInt32Memory0() {
104
122
  return cachedInt32Memory0;
105
123
  }
106
124
 
107
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
108
-
109
- cachedTextDecoder.decode();
110
-
111
- function getStringFromWasm0(ptr, len) {
112
- ptr = ptr >>> 0;
113
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
114
- }
115
-
116
- function addHeapObject(obj) {
117
- if (heap_next === heap.length) heap.push(heap.length + 1);
118
- const idx = heap_next;
119
- heap_next = heap[idx];
120
-
121
- heap[idx] = obj;
122
- return idx;
123
- }
124
-
125
125
  function debugString(val) {
126
126
  // primitive types
127
127
  const type = typeof val;
@@ -187,13 +187,6 @@ function debugString(val) {
187
187
  return className;
188
188
  }
189
189
 
190
- function passArray8ToWasm0(arg, malloc) {
191
- const ptr = malloc(arg.length * 1, 1) >>> 0;
192
- getUint8Memory0().set(arg, ptr / 1);
193
- WASM_VECTOR_LEN = arg.length;
194
- return ptr;
195
- }
196
-
197
190
  function handleError(f, args) {
198
191
  try {
199
192
  return f.apply(this, args);
@@ -201,6 +194,13 @@ function handleError(f, args) {
201
194
  wasm.__wbindgen_exn_store(addHeapObject(e));
202
195
  }
203
196
  }
197
+
198
+ function passArray8ToWasm0(arg, malloc) {
199
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
200
+ getUint8Memory0().set(arg, ptr / 1);
201
+ WASM_VECTOR_LEN = arg.length;
202
+ return ptr;
203
+ }
204
204
  /**
205
205
  * @param {Array<any>} js_args
206
206
  */
@@ -229,33 +229,24 @@ class ReifyRunArgs {
229
229
  }
230
230
  module.exports.ReifyRunArgs = ReifyRunArgs;
231
231
 
232
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
233
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
234
+ return addHeapObject(ret);
235
+ };
236
+
232
237
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
233
238
  takeObject(arg0);
234
239
  };
235
240
 
236
- module.exports.__wbg_writeFileSync_dfa398d60f0576e5 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
241
+ module.exports.__wbg_writeFileSync_d53fa3bf177530a4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
237
242
  writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
238
243
  }, arguments) };
239
244
 
240
- module.exports.__wbg_log_e9b70fc156898f33 = function(arg0, arg1) {
245
+ module.exports.__wbg_log_40820bb423827392 = function(arg0, arg1) {
241
246
  console.log(getStringFromWasm0(arg0, arg1));
242
247
  };
243
248
 
244
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
245
- const obj = getObject(arg1);
246
- const ret = typeof(obj) === 'string' ? obj : undefined;
247
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
- var len1 = WASM_VECTOR_LEN;
249
- getInt32Memory0()[arg0 / 4 + 1] = len1;
250
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
251
- };
252
-
253
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
254
- const ret = new Error(getStringFromWasm0(arg0, arg1));
255
- return addHeapObject(ret);
256
- };
257
-
258
- module.exports.__wbg_execSync_3821530c3c68494c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
249
+ module.exports.__wbg_execSync_da9d050d9e50647c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
259
250
  let deferred0_0;
260
251
  let deferred0_1;
261
252
  try {
@@ -271,12 +262,12 @@ module.exports.__wbg_execSync_3821530c3c68494c = function() { return handleError
271
262
  }
272
263
  }, arguments) };
273
264
 
274
- module.exports.__wbg_existsSync_67f2bec9d1cdcdf0 = function() { return handleError(function (arg0, arg1) {
265
+ module.exports.__wbg_existsSync_22ae2f041ddeff9b = function() { return handleError(function (arg0, arg1) {
275
266
  const ret = existsSync(getStringFromWasm0(arg0, arg1));
276
267
  return ret;
277
268
  }, arguments) };
278
269
 
279
- module.exports.__wbg_cwd_910b2c84dc4c2152 = function(arg0) {
270
+ module.exports.__wbg_cwd_9754a8d7cd20c152 = function(arg0) {
280
271
  const ret = cwd();
281
272
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
273
  const len1 = WASM_VECTOR_LEN;
@@ -284,7 +275,7 @@ module.exports.__wbg_cwd_910b2c84dc4c2152 = function(arg0) {
284
275
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
285
276
  };
286
277
 
287
- module.exports.__wbg_readFileSync_59db60323489d25b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
278
+ module.exports.__wbg_readFileSync_8595c687544b2a1c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
288
279
  const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
289
280
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
290
281
  const len1 = WASM_VECTOR_LEN;
@@ -292,6 +283,15 @@ module.exports.__wbg_readFileSync_59db60323489d25b = function() { return handleE
292
283
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
293
284
  }, arguments) };
294
285
 
286
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
287
+ const obj = getObject(arg1);
288
+ const ret = typeof(obj) === 'string' ? obj : undefined;
289
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
290
+ var len1 = WASM_VECTOR_LEN;
291
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
292
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
293
+ };
294
+
295
295
  module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
296
296
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
297
297
  };
Binary file
@@ -5,5 +5,5 @@ export function __wbg_reifyrunargs_free(a: number): void;
5
5
  export function run(a: number): void;
6
6
  export function __wbindgen_malloc(a: number, b: number): number;
7
7
  export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
8
- export function __wbindgen_free(a: number, b: number, c: number): void;
9
8
  export function __wbindgen_exn_store(a: number): void;
9
+ export function __wbindgen_free(a: number, b: number, c: number): void;