New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ngcc): correctly resolve UMD dependencies #44382
fix(ngcc): correctly resolve UMD dependencies #44382
Conversation
Previously, when processing UMD, ngcc assumed that the `exports` argument of the CommonJS factory call (if present) would be the first argument of the call. This is generally true for the supported UMD formats, but can change if ngcc prepends more imports (and thus factory arguments) while processing the module. This could lead to errors when trying to collect dependencies of an already processed module. (This was accidentally broken in angular#44245 (commit 2bc3522).) This commit fixes it by not making any assumptions about the position of an `exports` argument in the CommonJS factory call. Fixes angular#44380
You can preview 40459d9 at https://pr44382-40459d9.ngbuilds.io/. |
You can preview c502061 at https://pr44382-c502061.ngbuilds.io/. |
merge-assistance: The changes have been approved on the original PR (#44381). |
This PR was merged into the repository by commit b6554d7. |
Previously, when processing UMD, ngcc assumed that the `exports` argument of the CommonJS factory call (if present) would be the first argument of the call. This is generally true for the supported UMD formats, but can change if ngcc prepends more imports (and thus factory arguments) while processing the module. This could lead to errors when trying to collect dependencies of an already processed module. (This was accidentally broken in #44245 (commit 2bc3522).) This commit fixes it by not making any assumptions about the position of an `exports` argument in the CommonJS factory call. Fixes #44380 PR Close #44382
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is a backport of #44381 to the
12.2.x
branch.Previously, when processing UMD, ngcc assumed that the
exports
argument of the CommonJS factory call (if present) would be the first argument of the call. This is generally true for the supported UMD formats, but can change if ngcc prepends more imports (and thus factory arguments) while processing the module. This could lead to errors when trying to collect dependencies of an already processed module.(This was accidentally broken in #44245 (commit 2bc3522).)
This commit fixes it by not making any assumptions about the position of an
exports
argument in the CommonJS factory call.Fixes #44380.