Skip to content

Commit 2337eec

Browse files
committed
refactor(scripts): update script paths and remove load.cjs wrapper
Update package.json to call scripts directly instead of through load.cjs wrapper. Update check.mjs to reference new validation script paths in scripts/validate/ subdirectory. This removes unnecessary indirection and aligns with standard Node.js script execution patterns.
1 parent f95d2a9 commit 2337eec

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@
2929
},
3030
"sideEffects": false,
3131
"scripts": {
32-
"build": "node scripts/load.cjs build",
33-
"bump": "node scripts/load.cjs bump",
34-
"check": "node scripts/load.cjs check",
35-
"clean": "node scripts/load.cjs clean",
36-
"cover": "node scripts/load.cjs cover",
37-
"fix": "node scripts/load.cjs fix",
38-
"lint": "node scripts/load.cjs lint",
32+
"build": "node scripts/build.mjs",
33+
"bump": "node scripts/bump.mjs",
34+
"check": "node scripts/check.mjs",
35+
"clean": "node scripts/clean.mjs",
36+
"cover": "node scripts/cover.mjs",
37+
"fix": "node scripts/fix.mjs",
38+
"lint": "node scripts/lint.mjs",
3939
"precommit": "pnpm run check --lint --staged",
4040
"prepare": "husky",
4141
"prepublishOnly": "echo 'ERROR: Use GitHub Actions workflow for publishing' && exit 1",
42-
"publish": "node scripts/load.cjs publish",
43-
"claude": "node scripts/load.cjs claude",
44-
"test": "node scripts/load.cjs test",
42+
"publish": "node scripts/publish.mjs",
43+
"claude": "node scripts/claude.mjs",
44+
"test": "node scripts/test.mjs",
4545
"type": "tsgo --noEmit -p .config/tsconfig.check.json",
46-
"update": "node scripts/load.cjs update",
47-
"update:data:npm": "node scripts/load.cjs update-data-npm"
46+
"update": "node scripts/update.mjs",
47+
"update:data:npm": "node scripts/update-data-npm.mjs"
4848
},
4949
"devDependencies": {
5050
"@babel/parser": "^7.28.5",

scripts/check.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ async function main() {
206206
logger.progress('Validating no link: dependencies')
207207
}
208208
exitCode = await runCommandQuiet('node', [
209-
'scripts/validate-no-link-deps.mjs',
209+
'scripts/validate/no-link-deps.mjs',
210210
]).then(r => r.exitCode)
211211
if (exitCode !== 0) {
212212
if (!quiet) {
@@ -227,7 +227,7 @@ async function main() {
227227
logger.progress('Validating bundle dependencies')
228228
}
229229
exitCode = await runCommandQuiet('node', [
230-
'scripts/validate-bundle-deps.mjs',
230+
'scripts/validate/bundle-deps.mjs',
231231
]).then(r => r.exitCode)
232232
if (exitCode !== 0) {
233233
if (!quiet) {
@@ -248,7 +248,7 @@ async function main() {
248248
logger.progress('Validating esbuild minify setting')
249249
}
250250
exitCode = await runCommandQuiet('node', [
251-
'scripts/validate-esbuild-minify.mjs',
251+
'scripts/validate/esbuild-minify.mjs',
252252
]).then(r => r.exitCode)
253253
if (exitCode !== 0) {
254254
if (!quiet) {
@@ -269,7 +269,7 @@ async function main() {
269269
logger.progress('Validating no CDN references')
270270
}
271271
exitCode = await runCommandQuiet('node', [
272-
'scripts/validate-no-cdn-refs.mjs',
272+
'scripts/validate/no-cdn-refs.mjs',
273273
]).then(r => r.exitCode)
274274
if (exitCode !== 0) {
275275
if (!quiet) {
@@ -290,7 +290,7 @@ async function main() {
290290
logger.progress('Validating markdown filenames')
291291
}
292292
exitCode = await runCommandQuiet('node', [
293-
'scripts/validate-markdown-filenames.mjs',
293+
'scripts/validate/markdown-filenames.mjs',
294294
]).then(r => r.exitCode)
295295
if (exitCode !== 0) {
296296
if (!quiet) {
@@ -311,7 +311,7 @@ async function main() {
311311
logger.progress('Validating file sizes')
312312
}
313313
exitCode = await runCommandQuiet('node', [
314-
'scripts/validate-file-size.mjs',
314+
'scripts/validate/file-size.mjs',
315315
]).then(r => r.exitCode)
316316
if (exitCode !== 0) {
317317
if (!quiet) {
@@ -332,7 +332,7 @@ async function main() {
332332
logger.progress('Validating file count')
333333
}
334334
exitCode = await runCommandQuiet('node', [
335-
'scripts/validate-file-count.mjs',
335+
'scripts/validate/file-count.mjs',
336336
]).then(r => r.exitCode)
337337
if (exitCode !== 0) {
338338
if (!quiet) {

0 commit comments

Comments
 (0)