Prune unused definitions from workflow schema

Remove 10 unreachable definitions from workflow-v1.0.json:
- workflow-root, on, on-mapping (non-strict variants)
- job-if-result, step-if-result
- boolean-needs-context, number-needs-context, string-needs-context
- boolean-steps-context, number-steps-context

Saves 2,039 bytes minified (2.9%), 146 bytes gzipped (1.2%).

Also adds script/prune-schema.cjs for future maintenance.
This commit is contained in:
eric sciple
2025-12-06 22:07:34 +00:00
parent c04c1b26f4
commit 7660f61777
5 changed files with 205 additions and 2 deletions
+2 -1
View File
@@ -38,7 +38,8 @@
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint 'src/**/*.ts'",
"lint-fix": "eslint --fix 'src/**/*.ts'",
"minify-json": "node ../script/minify-json.js src/workflow-v1.0.json",
"optimize-schema": "node script/optimize-workflow-schema.js",
"minify-json": "npm run optimize-schema && node ../script/minify-json.js src/workflow-v1.0.optimized.json",
"prebuild": "npm run minify-json",
"prepublishOnly": "npm run build && npm run test",
"pretest": "npm run minify-json",