Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Refactor: extract shared regeneration logic into regenerate-common.ts - #3340

Merged
Yuchao Yan (msyyc) merged 7 commits into
mainfrom
refactor/extract-regenerate-common
Feb 13, 2026
Merged

Refactor: extract shared regeneration logic into regenerate-common.ts#3340
Yuchao Yan (msyyc) merged 7 commits into
mainfrom
refactor/extract-regenerate-common

Conversation

@msyyc

@msyyc Yuchao Yan (msyyc) commented Feb 13, 2026

Copy link
Copy Markdown
Member

Extract shared constants, interfaces, and utility functions from
regenerate.ts into a new regenerate-common.ts module to enable
code reuse across repos.

Extracted:
- SKIP_SPECS, SpecialFlags, BASE_AZURE_EMITTER_OPTIONS, BASE_EMITTER_OPTIONS
- TspCommand, RegenerateFlagsInput, RegenerateFlags, ProcessedEmitterOption,
  RegenerateConfig interfaces
- toPosix, getEmitterOption, getSubdirectories, defaultPackageName,
  buildOptions, runTaskPool, regenerate utility functions

regenerate.ts now imports from regenerate-common.ts and only contains
repo-specific configuration and overrides.
- Add test_model_base_flatten_compatibility.py for flatten model tests
- Add test_typetest_union_discriminated.py for discriminated union tests
- Fix 'cadl-ranch' -> 'spector' in flatten test comments
- Add cspell ignore directives for property test files
- Fix import ordering and blank lines in test files
generation-subdir is autorest-only, so guard its assertions with
existence checks to avoid failures in shared test runs.
Script syncs regenerate-common.ts, requirements.txt marker sections,
and test files from the typespec repo into autorest.python.
@msyyc
Yuchao Yan (msyyc) merged commit d53652b into main Feb 13, 2026
15 checks passed
@msyyc
Yuchao Yan (msyyc) deleted the refactor/extract-regenerate-common branch February 13, 2026 09:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants