revert: ship as CommonJS again (4.0.0) to unbreak aio app add extension - #68
Merged
AnujVishwakarma-src merged 1 commit intoSep 16, 2026
Conversation
The ESM 3.x releases broke 'aio app add extension' on the released aio-cli: the Template Registry installs this template at @latest and app-templates loads it with require(), which cannot instantiate an ESM generator ('constructor is not a constructor'). Revert the source to CommonJS (the 2.0.0 tree) and publish as 4.0.0 so @latest is CJS again. Temporary until aio-cli-plugin-app-templates loads templates via import() (adobe/aio-cli-plugin-app-templates#83) ships in a new aio-cli; this package will then be re-migrated to ESM. generator-aio-app@10 keeps the ESM 3.1.0 via its ^3 range (unaffected by this major). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
The ESM
3.xreleases brokeaio app add extensionon the released aio-cli. The Template Registry installs this template at@latest(bypassing semver pins), andaio-cli-plugin-app-templatesloads it withrequire()— which cannot instantiate an ESM generator, throwingError: constructor is not a constructor.What
Revert the source to CommonJS (the
2.0.0tree) and publish as4.0.0so@latestis CJS again andadd extensionworks. CI workflows kept as-is.generator-aio-app@10keeps the ESM3.1.0via its^3range — unaffected by this major.aio-cli-plugin-app-templatesloads templates viaimport()(fix: support ESM templates in templates:install (require → dynamic import) aio-cli-plugin-app-templates#83) and ships in a new aio-cli, this package will be re-migrated to ESM.Validated: clean install resolves CJS hub
3.0.2+ yeoman-generator5.10.0;npm test(unit + validation) passes.🤖 Generated with Claude Code