@majordigital/create-acorn 1.6.6 → 1.6.8

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.
@@ -116,23 +116,35 @@ async function setupPreDeploy() {
116
116
  cpSync(scriptsSrc, scriptsDest, { recursive: true, force: true });
117
117
  console.log('Pre-deploy scripts copied to scripts/.');
118
118
 
119
- console.log('Installing pre-deploy tools (Lighthouse, Playwright, linkinator)...');
120
- await runCommand('npm', ['install', '--save-dev', '--legacy-peer-deps',
121
- 'lighthouse', 'chrome-launcher', 'playwright', 'linkinator@^7'
122
- ]);
123
- console.log('');
124
-
119
+ // Write devDependencies and scripts into package.json explicitly, rather than
120
+ // relying on `npm install --save-dev` to persist them. When the packages are
121
+ // already present in node_modules, npm reports "up to date" and may skip
122
+ // updating package.json — leaving the deps unrecorded.
123
+ const preDeployDeps = {
124
+ lighthouse: '^13',
125
+ 'chrome-launcher': '^1',
126
+ playwright: '^1',
127
+ linkinator: '^7',
128
+ };
125
129
  try {
130
+ if (!pkg.devDependencies) pkg.devDependencies = {};
131
+ for (const [name, range] of Object.entries(preDeployDeps)) {
132
+ if (!pkg.devDependencies[name]) pkg.devDependencies[name] = range;
133
+ }
126
134
  if (!pkg.scripts) pkg.scripts = {};
127
135
  pkg.scripts['lighthouse'] = 'node scripts/lighthouse-audit.mjs';
128
136
  pkg.scripts['check-links'] = 'node scripts/check-links.mjs';
129
137
  pkg.scripts['cross-browser'] = 'node scripts/cross-browser-check.mjs';
130
138
  writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
131
- console.log('Added pre-deploy scripts to package.json.');
139
+ console.log('Added pre-deploy scripts and dependencies to package.json.');
132
140
  } catch {
133
- console.log('Warning: Could not add pre-deploy scripts to package.json.');
141
+ console.log('Warning: Could not update package.json with pre-deploy setup.');
134
142
  }
135
143
  console.log('');
144
+
145
+ console.log('Installing pre-deploy tools (Lighthouse, Playwright, linkinator)...');
146
+ await runCommand('npm', ['install', '--legacy-peer-deps']);
147
+ console.log('');
136
148
  }
137
149
 
138
150
  async function setupNextApp() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majordigital/create-acorn",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "Interactive starter CLI for Acorn with Storyblok/Prismic/DatoCMS, TypeScript, and Tailwind.",
5
5
  "bin": {
6
6
  "create-acorn": "bin/create-acorn.mjs",
@@ -57,6 +57,13 @@ const result = await checker.check({
57
57
  concurrency,
58
58
  timeout: 30000,
59
59
  headers,
60
+ // Retry on 5xx / connection errors. The Next.js dev server compiles routes
61
+ // on-demand, so the first hit to a page can be slow or transiently 500 —
62
+ // retrying absorbs those false positives. For reliable results, run against
63
+ // a production build (npm run build && npm run start) instead of next dev.
64
+ retry: true,
65
+ retryErrors: true,
66
+ retryErrorsCount: 3,
60
67
  linksToSkip: [
61
68
  // Skip external links to avoid false positives from rate limiting
62
69
  `^(?!(${baseUrl.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}))`,