Repository navigation
feat: migrate to ESM + yeoman-generator ^8 + Jest->Vitest (APPBLD-4615) - #85
Merged
AnujVishwakarma-src merged 2 commits intoSep 15, 2026
Conversation
BREAKING CHANGE: package is now ESM ("type": "module").
- Converts index.js from CommonJS to native ESM (__dirname via import.meta.url).
- Bumps yeoman-generator ^5.4.2 -> ^8 (ESM-only) and the hub dep
@adobe/generator-app-common-lib ^3 -> ^4 (its ESM major).
- Migrates tests from Jest to Vitest (yeoman-test ^6 -> ^11, yeoman-environment
^3 -> ^4 so the ESM generator runs under helpers.run); coverage preserved at
100% (4 tests). `resolve.dedupe: ['yeoman-generator']` keeps a single Generator
instance so `x instanceof Generator` holds.
- eslint flat config: drops eslint-plugin-jest; declares Vitest test globals and
keeps the Jest template payloads (templates/**) as CommonJS + Jest globals
(they are emitted verbatim into generated apps).
Depends on @adobe/generator-app-common-lib@4 (hub) being published.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AnujVishwakarma-src
marked this pull request as ready for review
September 15, 2026 07:41
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
/upload-coverage |
|
Coverage artifact not found. Re-run CI first, then comment |
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.
Track B — generator ESM migration (APPBLD-4615), L1 leaf
First of the 8 leaf generators. Migrates to native ESM +
yeoman-generator ^5.4.2 -> ^8(ESM-only, clears the deprecated glob/npmlog/inflight/rimraf/gauge cluster from the production tree), and consumes the ESM hub@adobe/generator-app-common-lib ^3 -> ^4.What changed
index.jsCJS -> ESM (__dirnameviaimport.meta.url).yeoman-generator ^8+ hub^4.yeoman-test ^6 -> ^11,yeoman-environment ^3 -> ^4so the ESM generator runs underhelpers.run().resolve.dedupe: ['yeoman-generator']in the Vitest config keeps a singleGeneratorinstance (sox instanceof Generatorholds).eslint-plugin-jest; adds Vitest test globals fortest/**; keepstemplates/**(the Jest test payloads emitted into generated apps) as CommonJS + Jest globals.Validation (against a locally-linked ESM hub)
index.js(identical to the Jest baseline) — including the 3 realhelpers.run()generator executions.npm run lintclean;npm run validate(tv run-checks) passes.