@timeax/scaffold 0.0.12 → 0.0.13

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.
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "files.exclude": {
3
- "dist": true,
4
3
  ".vscode": true,
5
4
  "node_modules": true,
6
5
  ".gitattributes": true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@timeax/scaffold",
3
3
  "private": false,
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "description": "A CLI tool that scaffolds project file structures based on a user-defined, type-safe configuration file.",
6
6
  "keywords": [
7
7
  "scaffold"
@@ -22,10 +22,12 @@
22
22
  "types": "dist/index.d.ts",
23
23
  "exports": {
24
24
  ".": {
25
+ "types": "./dist/index.d.ts",
25
26
  "import": "./dist/index.mjs",
26
27
  "require": "./dist/index.cjs"
27
28
  },
28
29
  "./ast": {
30
+ "types": "./dist/ast.d.ts",
29
31
  "import": "./dist/ast.mjs",
30
32
  "require": "./dist/ast.cjs"
31
33
  }
@@ -55,4 +57,4 @@
55
57
  "esbuild": "^0.27.0",
56
58
  "minimatch": "^10.1.1"
57
59
  }
58
- }
60
+ }
@@ -11,10 +11,11 @@ function incrementPatch(version) {
11
11
  throw new Error(`[postpublish] Unsupported version format: "${version}"`);
12
12
  }
13
13
 
14
- const [majorRaw, minorRaw, patchRaw] = parts;
15
- const major = Number(majorRaw);
16
- const minor = Number(minorRaw);
17
- const patch = Number(patchRaw);
14
+ let [majorRaw, minorRaw, patchRaw] = parts;
15
+
16
+ let major = Number(majorRaw);
17
+ let minor = Number(minorRaw);
18
+ let patch = Number(patchRaw);
18
19
 
19
20
  if (Number.isNaN(major) || Number.isNaN(minor) || Number.isNaN(patch)) {
20
21
  throw new Error(
@@ -22,8 +23,17 @@ function incrementPatch(version) {
22
23
  );
23
24
  }
24
25
 
25
- const nextPatch = patch + 1;
26
- return `${major}.${minor}.${nextPatch}`;
26
+ // Single-digit patch rule:
27
+ // - If patch >= 9, roll into next minor and reset patch to 0.
28
+ // - Otherwise, just increment patch.
29
+ if (patch >= 9) {
30
+ patch = 0;
31
+ minor += 1;
32
+ } else {
33
+ patch += 1;
34
+ }
35
+
36
+ return `${major}.${minor}.${patch}`;
27
37
  }
28
38
 
29
39
  function main() {