fix: move run-install-scripts under runtimes.node#36029
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Remove top-level `run-install-scripts` from FrontmatterConfig struct - Update resolveRunInstallScripts() to accept only runtimes map (no global frontmatter check) - Remove hasTopLevelRunInstallScripts() from import_field_extractor.go - Remove top-level property from main_workflow_schema.json - Regenerate frontmatter-full.md and autocomplete-data.json from schema - Update tests to reflect new signature and remove global-form cases - Update syntax.md and compiler-threat-detection-spec.md docs - Add scripts/codemod-run-install-scripts.js to migrate existing workflows Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… check) - Detect tab-based indent in addition to space-based - Consume consecutive blank lines after removed top-level field - Check for runtimes.node.run-install-scripts specifically (not any indented match) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
fix: move run-install-scripts under runtimes.node, add codemod
fix: move run-install-scripts under runtimes.node
May 31, 2026
Copilot created this pull request from a session on behalf of
pelikhan
May 31, 2026 00:44
View session
Collaborator
|
@copilot the codemods must be implement in go and run as part of the fix command |
Contributor
|
|
1 similar comment
Contributor
|
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done. The codemod is now implemented in Go as The codemod handles all migration cases:
Committed in 8f8e636. |
pelikhan
approved these changes
May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run-install-scriptsonly affects npm install commands, which are exclusively generated by the Node.js runtime. Having it as a top-level frontmatter field was misleading — it belongs underruntimes.node.Parser / types
RunInstallScripts *boolfromFrontmatterConfig(top-level struct)frontmatterparameter fromresolveRunInstallScripts()— onlyruntimes.node.run-install-scriptsand the merged-imports flag are checkedhasTopLevelRunInstallScripts()fromimport_field_extractor.goSchema & generated docs
run-install-scriptsfrommain_workflow_schema.jsonfrontmatter-full.mdandautocomplete-data.jsonBefore / after
Codemod
The migration is implemented as a Go codemod (
getRunInstallScriptsToRuntimesNodeCodemod) registered in thefixcommand registry, so it runs automatically viagh aw fix. It handles all cases:runtimes:block → appends a newruntimes.nodeblockruntimes:exists withoutnode:→ inserts anode:sub-blockruntimes.nodeexists → injects the field into the existing block