@mongez/pkgist 1.0.2 → 1.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/README.md +25 -13
- package/builder.ts +2 -22
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/publish/npm-publisher.ts +1 -1
- package/src/build/family-builder.ts +0 -76
- package/src/build/index.ts +0 -4
- package/src/build/package-builder.ts +0 -155
- package/src/build/parallel-builder.ts +0 -36
package/README.md
CHANGED
|
@@ -13,33 +13,45 @@ A build, version, and publish tool for TypeScript/React npm packages. Powered by
|
|
|
13
13
|
- **npm publish** — publishes from the build directory, not the source
|
|
14
14
|
- **Dry-run mode** — prints every step without touching disk, git, or npm
|
|
15
15
|
- **Concurrency** — builds multiple packages in parallel
|
|
16
|
-
- **TypeScript config** — `
|
|
16
|
+
- **TypeScript config** — `pkgist.config.ts` with full type safety via `defineConfig`
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
|
|
24
|
-
npm install
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
# Global — use the CLI anywhere
|
|
24
|
+
npm install -g @mongez/pkgist
|
|
25
|
+
|
|
26
|
+
# Or as a dev dependency in your monorepo root
|
|
27
|
+
npm install -D @mongez/pkgist
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add a script to your root `package.json` for convenience:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"scripts": {
|
|
35
|
+
"release": "pkgist build:all",
|
|
36
|
+
"release:dry": "pkgist build:all --dry-run"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
```
|
|
28
40
|
|
|
29
41
|
---
|
|
30
42
|
|
|
31
43
|
## Configuration
|
|
32
44
|
|
|
33
|
-
Create a `
|
|
45
|
+
Create a `pkgist.config.ts` in your project root (auto-discovered; `builder.ts` also works):
|
|
34
46
|
|
|
35
47
|
```ts
|
|
36
48
|
import { defineConfig } from "@mongez/pkgist";
|
|
37
49
|
|
|
38
50
|
export default defineConfig({
|
|
39
51
|
settings: {
|
|
40
|
-
concurrency: 8,
|
|
41
|
-
buildDir: "../builds",
|
|
42
|
-
sourcesDir: "../sources", // where source snapshots are archived
|
|
52
|
+
concurrency: 8, // parallel build limit (default: 4)
|
|
53
|
+
buildDir: "../builds", // where compiled packages are written
|
|
54
|
+
sourcesDir: "../sources", // optional: where source snapshots are archived
|
|
43
55
|
},
|
|
44
56
|
|
|
45
57
|
// Standalone: each package versions independently
|
|
@@ -75,7 +87,7 @@ Every entry in `standalone[]` and `families[].packages[]` accepts:
|
|
|
75
87
|
| Option | Type | Default | Description |
|
|
76
88
|
|---|---|---|---|
|
|
77
89
|
| `name` | `string` | **required** | npm package name |
|
|
78
|
-
| `root` | `string` | **required** | Path to package root, relative to `
|
|
90
|
+
| `root` | `string` | **required** | Path to package root, relative to `pkgist.config.ts` |
|
|
79
91
|
| `type` | `"typescript" \| "react"` | `"typescript"` | React packages get JSX support |
|
|
80
92
|
| `formats` | `("esm" \| "cjs")[]` | `["esm", "cjs"]` | Output formats |
|
|
81
93
|
| `mainType` | `"cjs" \| "esm"` | `"cjs"` | Primary format (affects `main` field in package.json) |
|
|
@@ -95,13 +107,13 @@ Every entry in `standalone[]` and `families[].packages[]` accepts:
|
|
|
95
107
|
|
|
96
108
|
| Option | Type | Default | Description |
|
|
97
109
|
|---|---|---|---|
|
|
98
|
-
| `version` | `"auto" \| string` | `"auto"` | `"auto"`
|
|
110
|
+
| `version` | `"auto" \| "patch" \| "minor" \| "major" \| string` | `"auto"` | `"auto"`/`"patch"` bumps the patch digit; `"minor"` bumps minor; `"major"` bumps major; any semver string uses that version exactly |
|
|
99
111
|
|
|
100
112
|
### Family-level options
|
|
101
113
|
|
|
102
114
|
| Option | Type | Default | Description |
|
|
103
115
|
|---|---|---|---|
|
|
104
|
-
| `version` | `"auto" \| string` | `"auto"` |
|
|
116
|
+
| `version` | `"auto" \| "patch" \| "minor" \| "major" \| string` | `"auto"` | Same strategies as standalone; applied to the highest current version across all family members |
|
|
105
117
|
| `commit` | `string` | — | Commit message applied to all packages (overrides per-package) |
|
|
106
118
|
|
|
107
119
|
---
|
|
@@ -200,7 +212,7 @@ Available on all `build` commands:
|
|
|
200
212
|
| `--no-publish` | Skip `npm publish` |
|
|
201
213
|
| `--no-git` | Skip git add / commit / push / tag |
|
|
202
214
|
| `--concurrency <n>` | Override the parallel build limit |
|
|
203
|
-
| `--config <path>` | Path to config file (default: `builder.ts` in cwd) |
|
|
215
|
+
| `--config <path>` | Path to config file (default: auto-discovers `pkgist.config.ts` / `builder.ts` in cwd) |
|
|
204
216
|
| `--verbose` | Show debug-level log lines |
|
|
205
217
|
|
|
206
218
|
---
|
package/builder.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { defineConfig } from "@mongez/pkgist";
|
|
2
2
|
|
|
3
|
-
const RELEASE_COMMIT = "Added skills and improved build output";
|
|
4
|
-
|
|
5
3
|
export default defineConfig({
|
|
6
4
|
settings: {
|
|
7
5
|
concurrency: 8,
|
|
@@ -14,13 +12,12 @@ export default defineConfig({
|
|
|
14
12
|
name: "@mongez/reinforcements",
|
|
15
13
|
root: "../@mongez/reinforcements",
|
|
16
14
|
version: "auto",
|
|
17
|
-
commit: RELEASE_COMMIT,
|
|
18
15
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
19
16
|
},
|
|
20
17
|
{
|
|
21
18
|
name: "@mongez/agent-kit",
|
|
22
19
|
root: "../@mongez/agent-kit",
|
|
23
|
-
commit: "
|
|
20
|
+
commit: "Enhanced docs",
|
|
24
21
|
entries: ["index.ts", "cli/index.ts"],
|
|
25
22
|
clone: ["README.md", "bin", "skills", "llms.txt", "llms-full.txt"],
|
|
26
23
|
},
|
|
@@ -28,77 +25,66 @@ export default defineConfig({
|
|
|
28
25
|
name: "@mongez/supportive-is",
|
|
29
26
|
root: "../@mongez/supportive-is",
|
|
30
27
|
version: "minor",
|
|
31
|
-
commit: RELEASE_COMMIT,
|
|
32
28
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
33
29
|
},
|
|
34
30
|
{
|
|
35
31
|
name: "@mongez/cache",
|
|
36
32
|
root: "../@mongez/cache",
|
|
37
33
|
version: "minor",
|
|
38
|
-
commit: RELEASE_COMMIT,
|
|
39
34
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
40
35
|
},
|
|
41
36
|
{
|
|
42
37
|
name: "@mongez/events",
|
|
43
38
|
root: "../@mongez/events",
|
|
44
39
|
version: "auto",
|
|
45
|
-
commit: RELEASE_COMMIT,
|
|
46
40
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
47
41
|
},
|
|
48
42
|
{
|
|
49
43
|
name: "@mongez/collection",
|
|
50
44
|
root: "../@mongez/collection",
|
|
51
45
|
version: "minor",
|
|
52
|
-
commit: RELEASE_COMMIT,
|
|
53
46
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
54
47
|
},
|
|
55
48
|
{
|
|
56
49
|
name: "@mongez/concat-route",
|
|
57
50
|
root: "../@mongez/concat-route",
|
|
58
51
|
version: "minor",
|
|
59
|
-
commit: RELEASE_COMMIT,
|
|
60
52
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
61
53
|
},
|
|
62
54
|
{
|
|
63
55
|
name: "@mongez/query-string",
|
|
64
56
|
root: "../@mongez/query-string",
|
|
65
57
|
version: "minor",
|
|
66
|
-
commit: RELEASE_COMMIT,
|
|
67
58
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
68
59
|
},
|
|
69
60
|
{
|
|
70
61
|
name: "@mongez/dotenv",
|
|
71
62
|
root: "../@mongez/dotenv",
|
|
72
63
|
version: "minor",
|
|
73
|
-
commit: RELEASE_COMMIT,
|
|
74
64
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
75
65
|
},
|
|
76
66
|
{
|
|
77
67
|
name: "@mongez/encryption",
|
|
78
68
|
root: "../@mongez/encryption",
|
|
79
69
|
version: "minor",
|
|
80
|
-
commit: RELEASE_COMMIT,
|
|
81
70
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
82
71
|
},
|
|
83
72
|
{
|
|
84
73
|
name: "@mongez/config",
|
|
85
74
|
root: "../@mongez/config",
|
|
86
75
|
version: "minor",
|
|
87
|
-
commit: RELEASE_COMMIT,
|
|
88
76
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
89
77
|
},
|
|
90
78
|
{
|
|
91
79
|
name: "@mongez/dom",
|
|
92
80
|
root: "../@mongez/dom",
|
|
93
81
|
version: "minor",
|
|
94
|
-
commit: RELEASE_COMMIT,
|
|
95
82
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
96
83
|
},
|
|
97
84
|
{
|
|
98
85
|
name: "@mongez/user",
|
|
99
86
|
root: "../@mongez/user",
|
|
100
87
|
version: "minor",
|
|
101
|
-
commit: RELEASE_COMMIT,
|
|
102
88
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
103
89
|
},
|
|
104
90
|
{
|
|
@@ -106,7 +92,6 @@ export default defineConfig({
|
|
|
106
92
|
root: "../@mongez/react-router",
|
|
107
93
|
type: "react",
|
|
108
94
|
version: "minor",
|
|
109
|
-
commit: RELEASE_COMMIT,
|
|
110
95
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
111
96
|
},
|
|
112
97
|
{
|
|
@@ -114,7 +99,6 @@ export default defineConfig({
|
|
|
114
99
|
root: "../@mongez/react-helmet",
|
|
115
100
|
type: "react",
|
|
116
101
|
version: "minor",
|
|
117
|
-
commit: RELEASE_COMMIT,
|
|
118
102
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
119
103
|
},
|
|
120
104
|
{
|
|
@@ -122,7 +106,6 @@ export default defineConfig({
|
|
|
122
106
|
root: "../@mongez/react-form",
|
|
123
107
|
type: "react",
|
|
124
108
|
version: "minor",
|
|
125
|
-
commit: RELEASE_COMMIT,
|
|
126
109
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
127
110
|
},
|
|
128
111
|
{
|
|
@@ -131,7 +114,6 @@ export default defineConfig({
|
|
|
131
114
|
mainType: "esm",
|
|
132
115
|
formats: ["esm"],
|
|
133
116
|
version: "minor",
|
|
134
|
-
commit: RELEASE_COMMIT,
|
|
135
117
|
clone: ["README.md", "skills", "llms.txt", "llms-full.txt"],
|
|
136
118
|
},
|
|
137
119
|
],
|
|
@@ -139,8 +121,7 @@ export default defineConfig({
|
|
|
139
121
|
families: [
|
|
140
122
|
{
|
|
141
123
|
name: "atom",
|
|
142
|
-
version: "
|
|
143
|
-
commit: RELEASE_COMMIT,
|
|
124
|
+
version: "patch",
|
|
144
125
|
packages: [
|
|
145
126
|
{
|
|
146
127
|
name: "@mongez/atom",
|
|
@@ -164,7 +145,6 @@ export default defineConfig({
|
|
|
164
145
|
{
|
|
165
146
|
name: "localization",
|
|
166
147
|
version: "minor",
|
|
167
|
-
commit: RELEASE_COMMIT,
|
|
168
148
|
packages: [
|
|
169
149
|
{
|
|
170
150
|
name: "@mongez/localization",
|
package/dist/cli.js
CHANGED
|
@@ -685,7 +685,7 @@ async function publishPackage(pkg, buildPath, dryRun) {
|
|
|
685
685
|
"npm-publish",
|
|
686
686
|
pkg.name,
|
|
687
687
|
"npm",
|
|
688
|
-
["publish", "--access", access],
|
|
688
|
+
["publish", "--access", access, "--registry", "https://registry.npmjs.org"],
|
|
689
689
|
buildPath
|
|
690
690
|
);
|
|
691
691
|
logger.success(`Published ${pkg.name}`);
|