create-packkit 2.6.0 → 2.6.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.6.
|
|
3
|
+
"version": "2.6.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": {
|
|
@@ -10,7 +10,10 @@ export default {
|
|
|
10
10
|
const pkg = { scripts: {}, devDependencies: {} };
|
|
11
11
|
|
|
12
12
|
if (cfg.pkgChecks) {
|
|
13
|
-
|
|
13
|
+
// ESM-only packages have no CJS resolution by design, so attw's default
|
|
14
|
+
// node16 profile flags a "false" failure — use the esm-only profile.
|
|
15
|
+
const attw = cfg.moduleFormat === 'esm' ? 'attw --pack --profile esm-only' : 'attw --pack';
|
|
16
|
+
pkg.scripts['check:pkg'] = `publint && ${attw}`;
|
|
14
17
|
pkg.devDependencies.publint = '^0.3.0';
|
|
15
18
|
pkg.devDependencies['@arethetypeswrong/cli'] = '^0.18.0';
|
|
16
19
|
}
|
|
@@ -28,7 +28,9 @@ export default {
|
|
|
28
28
|
pkg.devDependencies.husky = '^9.1.0';
|
|
29
29
|
} else if (cfg.gitHooks === 'lefthook') {
|
|
30
30
|
files['lefthook.yml'] = lefthookYml(cfg, staged);
|
|
31
|
-
|
|
31
|
+
// `|| true` so `npm install` doesn't fail before `git init` — lefthook
|
|
32
|
+
// (unlike husky/simple-git-hooks) errors hard without a .git directory.
|
|
33
|
+
pkg.scripts.prepare = 'lefthook install || true';
|
|
32
34
|
pkg.devDependencies.lefthook = '^2.0.0';
|
|
33
35
|
}
|
|
34
36
|
|