create-packkit 2.0.0 → 2.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-packkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Highly configurable scaffolder for modern npm packages and CLIs — pick your stack (TS/JS, bundler, tests, linter, CI, releases) from a CLI or a web configurator.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,9 @@ export default {
|
|
|
34
34
|
|
|
35
35
|
if (needsLintStaged) {
|
|
36
36
|
pkg['lint-staged'] = staged;
|
|
37
|
-
|
|
37
|
+
// Held at 16: v17 requires Node >=22.22.1, which would silently drop
|
|
38
|
+
// Node 20 LTS support for every generated project. See NODE_FLOOR.
|
|
39
|
+
pkg.devDependencies['lint-staged'] = '^16.2.0';
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
return { files, pkg };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
// Always-on: base package.json descriptive fields + the source entry + README.
|
|
2
2
|
|
|
3
|
+
// The real minimum patch for each major, driven by our template deps (eslint 10,
|
|
4
|
+
// jsdom 29, vite 8 need ^20.19; vite/others need ^22.12). `>=20` would be a lie —
|
|
5
|
+
// a user on 20.17 hits EBADENGINE and transitive syntax errors. Keep this honest.
|
|
6
|
+
export const NODE_FLOOR = { 18: '18.18.0', 20: '20.19.0', 22: '22.12.0', 24: '24.0.0' };
|
|
7
|
+
const nodeFloor = (v) => NODE_FLOOR[v] || `${v}.0.0`;
|
|
8
|
+
|
|
3
9
|
export default {
|
|
4
10
|
id: 'meta',
|
|
5
11
|
active: () => true,
|
|
@@ -10,7 +16,7 @@ export default {
|
|
|
10
16
|
version: '0.0.0',
|
|
11
17
|
description: cfg.description || '',
|
|
12
18
|
type: cfg.moduleFormat === 'cjs' ? 'commonjs' : 'module',
|
|
13
|
-
engines: { node: `>=${cfg.nodeVersion}` },
|
|
19
|
+
engines: { node: `>=${nodeFloor(cfg.nodeVersion)}` },
|
|
14
20
|
scripts: {},
|
|
15
21
|
};
|
|
16
22
|
|
|
@@ -33,8 +39,8 @@ export default {
|
|
|
33
39
|
// README
|
|
34
40
|
files['README.md'] = readme(cfg);
|
|
35
41
|
|
|
36
|
-
// Node version pin
|
|
37
|
-
files['.nvmrc'] = `${cfg.nodeVersion}\n`;
|
|
42
|
+
// Node version pin — the honest floor, so `nvm use` can't land below it.
|
|
43
|
+
files['.nvmrc'] = `${nodeFloor(cfg.nodeVersion)}\n`;
|
|
38
44
|
|
|
39
45
|
// A typecheck script for TS projects — framework-aware (plain tsc can't
|
|
40
46
|
// resolve .vue/.svelte modules).
|
package/src/core/options.js
CHANGED
|
@@ -61,9 +61,9 @@ export const OPTIONS = {
|
|
|
61
61
|
nodeVersion: {
|
|
62
62
|
group: 'core', type: 'select', label: 'Node version', default: '20',
|
|
63
63
|
choices: [
|
|
64
|
-
{ value: '
|
|
65
|
-
{ value: '
|
|
66
|
-
{ value: '
|
|
64
|
+
{ value: '20', label: '20 (LTS, ≥20.19)' },
|
|
65
|
+
{ value: '22', label: '22 (LTS, ≥22.12)' },
|
|
66
|
+
{ value: '24', label: '24 (Current)' },
|
|
67
67
|
],
|
|
68
68
|
},
|
|
69
69
|
|