Version Packages #8
Merged
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@noxify/[email protected]
Minor Changes
5c870cc: Add support for
artifacts.reports.annotationsproperty withstring | string[]type. Import now intelligently normalizes single-element arrays to strings for cleaner generated code.5229108: Add support for default export in
dynamicInclude. Config modules can now use eitherexport default function(config: Config)or the existingexport function extendConfig(config: Config). Default export is preferred when both are present.2c0a5ba: Add support for
extendsas bothstringandstring[]. Single extends are optimized to string format in generated code for better readability.d1602ed: Add support for
artifacts.reports.dotenvproperty withstring | string[]type. Import now intelligently normalizes single-element arrays to strings for cleaner generated code.151d1fb: Add
asExtendedConfigoption to importer for function-based exportsThe
fromYaml()andimportYamlFile()functions now accept anImportOptionsparameter with anasExtendedConfigoption. When set totrue:import type { Config }instead ofimport { Config }Configinstance as parameterexport default function (config: Config) { ... return config }instead of direct config exportThis enables creating modular config extensions that can be composed together, similar to the dynamic include pattern but with full TypeScript type safety at compile time.
Example output with
asExtendedConfig: true:0453041: Add flexible job configuration options with
JobOptionsinterface andglobalOptions()method.New Features:
JobOptionsinterface: Unified options object forjob(),template(), andextends()methods with:resolveExtends?: boolean- Control whether parent templates are resolved (default:true)mergeExisting?: boolean- Control merge behavior for duplicate job names (default:true)hidden?: boolean- Mark job as template (replaces boolean parameter)globalOptions(options: GlobalOptions)method: Set default options for all jobs:resolveExtends?: boolean- Disable extends resolution globallymergeExisting?: boolean- Control default merge behaviorBenefits:
extendsreferences in output whenresolveExtends: falseExample:
0f6fffc: Add support for
rules.existsproperty withstring | string[]type to match GitLab CI specification.32286d9: Add support for
remoteflag on jobs and templatesremoteoption to exclude jobs/templates from merging and outputf7412c0: Improve script formatting in YAML import with intelligent detection of shell operators.
The import now intelligently formats
script,before_script, andafter_scriptproperties:\) → Preserved as template literals<<, pipes|, redirects>,>>,2>,<) → Preserved as template literalsThis produces more idiomatic and readable TypeScript code while preserving shell command semantics.
00274d9: Add missing
optionalproperty toneedsdefinitions (both job and pipeline needs) to match GitLab CI specification.8074252: Add missing
nameproperty toworkflowdefinition to match GitLab CI specification.Patch Changes
df32a6d: Change
dynamicIncludeconfig functions to return theConfiginstance for consistency with the fluent builder pattern.Included config files should now return the config:
99b83b0: Fixed YAML serialization of
!referencetags to output inline format without quotes, enabling proper GitLab CI reference resolution.dd6b3e7: Fixed remote flag handling - internal properties are now stripped after extends resolution to ensure remote jobs/templates are correctly excluded from merging while preserving their references.
8f94028: Fix regression in YAML import script formatting where multi-line simple script blocks produced a nested array structure (
script: [[...]]) instead of a flat array (script: [ ... ]).The importer now flattens multi-line simple commands correctly and preserves template literals only when shell operators (pipes, heredoc, redirects, continuations) are present.
6c9d68b: Improve YAML anchor handling by filtering out anchor definitions that don't contain valid job objects. This prevents type errors when importing GitLab CI files with pure anchor arrays.
0bf73bc: Disable log for importing file
1ee8b06: ensure
needsExtendsis always removed from final outputPreviously
needsExtends(internal merge-order metadata) was only deleted in certain branches of the cleanup logic, causing it to leak into the final YAML when a job had a single remoteextendsreference. Now it's unconditionally removed from all jobs during serialization.491ec44: Fix import code generation to properly handle single-element arrays for properties like
extends, optimizing output format for better code readability.83530eb: fixes problem while resolving the extends. unknown extends aren't removed now, so we can also specify remote jobs/tempates.
185d58d: Fix: remote flag is now internal-only
remoteoption for jobs/templates is now used only for merge logic and is stripped from the final YAML output.32286d9: Rename option
resolveExtendstomergeExtendsmergeExtends(wasresolveExtends).32286d9: Add tests for resolveTemplatesOnly option
75edc28: Fix script parser to preserve shell control structures
The YAML importer now correctly detects and preserves shell control structures (if/then/else/fi, for/do/done, while/do/done, until/do/done, case/esac) as template literals instead of splitting them into separate array elements.
Previously, multi-line scripts with control structures were incorrectly split:
Now they are preserved as cohesive blocks:
This ensures shell scripts with control flow are generated correctly and maintain their intended structure.