fabrique 2.0.9 → 2.0.11

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/CONTRIBUTING.md CHANGED
@@ -63,32 +63,33 @@ yarn install
63
63
 
64
64
  ## Release Workflow
65
65
 
66
+ > The `release.yml` workflow runs on `pull_request` and `push` events on the `main` and `develop` branches.
67
+ > It invokes the `yarn fb:ci:release` used to build and publish the package.
68
+ > Note that the `publish` step runs only if the equivalent stable version (`x.y.z`) does not already exist on npm
69
+
66
70
  ### 1. Pull Request to `main` or `develop`
67
71
 
68
- - The `release.yml` workflow runs on `pull_request`
69
- - The `yarn fb:ci:release` step runs **only if** the PR has the `dev` label
70
- - Impacted packages are published as:
71
- - `x.y.z-dev.<timestamp>`
72
+ - The `dev` label is added to the PR
73
+ - Impacted packages are published as: `x.y.z-dev.<timestamp>`
72
74
  - npm dist-tag: `dev`
73
75
 
76
+ > Use the `dev` versions only if required.
77
+
74
78
  ### 2. Push to `develop`
75
79
 
76
- - Impacted packages are published as:
77
- - `x.y.z-rc.<timestamp>`
80
+ - Impacted packages are published as: `x.y.z-rc.<timestamp>`
78
81
  - npm dist-tag: `rc`
79
82
 
80
83
  ### 3. Push to `main`
81
84
 
82
- - Stable publication:
83
- - `x.y.z`
85
+ - Stable publication: `x.y.z`
84
86
  - npm dist-tag: `latest`
85
- - Only if `name@x.y.z` does not already exist on npm
86
87
 
87
88
  ### Graph
88
89
 
89
90
  ```mermaid
90
91
  flowchart LR
91
- EVENT("EVENT")
92
+ EVENT("WORKFLOW TRIGGER")
92
93
  HAS_DEV_TAG{"has &quotdev&quot tag ?"}
93
94
  SKIP_BUILD(["skip build"])
94
95
  BUILD_DEV_PACKAGES["build &quotdev&quot package"]
@@ -115,6 +116,6 @@ flowchart LR
115
116
 
116
117
  ## Important Rules
117
118
 
118
- - if the version already exists on npm: the release is skipped
119
+ - if an equivalent **stable** version already exists on npm: the release is skipped
119
120
  - the `package.json` file in the repo must keep stable versions (`x.y.z`)
120
121
  - `-dev` / `-rc` suffixes are generated in CI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fabrique",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "type": "module",
5
5
  "description": "CLI to build a library",
6
6
  "keywords": [],
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@inquirer/prompts": "^8.5.2",
24
- "chalk": "^5.6.2",
24
+ "chalk": "^6.0.0",
25
25
  "commander": "^15.0.0",
26
26
  "zod": "^4.4.3"
27
27
  }
@@ -30,7 +30,7 @@ jobs:
30
30
 
31
31
  steps:
32
32
  - name: Checkout repository
33
- uses: actions/checkout@v6
33
+ uses: actions/checkout@v7
34
34
  with:
35
35
  fetch-depth: 0
36
36
 
@@ -38,7 +38,7 @@ jobs:
38
38
  run: corepack enable
39
39
 
40
40
  - name: Setup Node.js
41
- uses: actions/setup-node@v6
41
+ uses: actions/setup-node@v7
42
42
  with:
43
43
  node-version: '24'
44
44
  registry-url: 'https://registry.npmjs.org'
@@ -69,32 +69,33 @@ yarn install
69
69
 
70
70
  ## Release Workflow
71
71
 
72
+ > The `release.yml` workflow runs on `pull_request` and `push` events on the `main` and `develop` branches.
73
+ > It invokes the `yarn fb:ci:release` used to build and publish the package.
74
+ > Note that the `publish` step runs only if the equivalent stable version (`x.y.z`) does not already exist on npm
75
+
72
76
  ### 1. Pull Request to `main` or `develop`
73
77
 
74
- - The `release.yml` workflow runs on `pull_request`
75
- - The `yarn fb:ci:release` step runs **only if** the PR has the `dev` label
76
- - Impacted packages are published as:
77
- - `x.y.z-dev.<timestamp>`
78
+ - The `dev` label is added to the PR
79
+ - Impacted packages are published as: `x.y.z-dev.<timestamp>`
78
80
  - npm dist-tag: `dev`
79
81
 
82
+ > Use the `dev` versions only if required.
83
+
80
84
  ### 2. Push to `develop`
81
85
 
82
- - Impacted packages are published as:
83
- - `x.y.z-rc.<timestamp>`
86
+ - Impacted packages are published as: `x.y.z-rc.<timestamp>`
84
87
  - npm dist-tag: `rc`
85
88
 
86
89
  ### 3. Push to `main`
87
90
 
88
- - Stable publication:
89
- - `x.y.z`
91
+ - Stable publication: `x.y.z`
90
92
  - npm dist-tag: `latest`
91
- - Only if `name@x.y.z` does not already exist on npm
92
93
 
93
94
  ### Graph
94
95
 
95
96
  ```mermaid
96
97
  flowchart LR
97
- EVENT("EVENT")
98
+ EVENT("WORKFLOW TRIGGER")
98
99
  HAS_DEV_TAG{"has &quotdev&quot tag ?"}
99
100
  SKIP_BUILD(["skip build"])
100
101
  BUILD_DEV_PACKAGES["build &quotdev&quot package"]
@@ -121,6 +122,6 @@ flowchart LR
121
122
 
122
123
  ## Important Rules
123
124
 
124
- - if the version already exists on npm: the release is skipped
125
+ - if an equivalent **stable** version already exists on npm: the release is skipped
125
126
  - the `package.json` file in the repo must keep stable versions (`x.y.z`)
126
127
  - `-dev` / `-rc` suffixes are generated in CI
@@ -16,7 +16,7 @@
16
16
  "fb:manual:release": "fabrique release",
17
17
  "fb:ci:release": "fabrique ci release",
18
18
  "=== FB: TEST ===": "",
19
- "fb:test": "vitest",
19
+ "fb:test": "vitest run",
20
20
  "fb:test:coverage": "vitest run --coverage",
21
21
  "fb:bench": "vitest bench",
22
22
  "=== FB: DOC ===": "",
@@ -32,7 +32,7 @@
32
32
  "url": "{{giturl}}"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/node": "^26.1.1",
35
+ "@types/node": "^26.1.2",
36
36
  "@vitest/coverage-istanbul": "^4.1.10",
37
37
  "prettier": "^3.9.6",
38
38
  "prettier-plugin-organize-imports": "^4.3.0",