Skip to content

fix(@angular-devkit/build-angular): several fixes for commonjs warnings #18081

Merged
filipesilva merged 2 commits intoangular:masterfrom
alan-agius4:allowed-deps-pkg-name
Jul 1, 2020
Merged

fix(@angular-devkit/build-angular): several fixes for commonjs warnings #18081
filipesilva merged 2 commits intoangular:masterfrom
alan-agius4:allowed-deps-pkg-name

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

@alan-agius4 alan-agius4 commented Jun 30, 2020

fix(@angular-devkit/build-angular): match allowed dependencies against the package name

With this change we add the functionality to also match an allowed dependency against a package name. The package name is retrieved from the rawRequest.

Previously, users needed to add the request path which in some case might be a deep import. Ex: zone.js/dist/zone-error. With this change adding the package name example zone.js will suffice.

Closes: #18058

fix(@angular-devkit/build-angular): show warning when using non global locale data

When using the localize option directly importing locale data from @angular/common is not needed because the Angular CLI will automatically include locale data. When not using the localize option, most likely users meant to import the global variant of the local data.

See: https://angular.io/guide/i18n#import-global-variants-of-the-locale-data

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Jun 30, 2020
@alan-agius4 alan-agius4 requested review from clydin and removed request for clydin June 30, 2020 12:08
@alan-agius4 alan-agius4 changed the title fix(@angular-devkit/build-angular): match allowed dependencies against the package name fix(@angular-devkit/build-angular): CommonJsUsageWarnPlugin Jul 1, 2020
@angular angular deleted a comment from googlebot Jul 1, 2020
@alan-agius4 alan-agius4 changed the title fix(@angular-devkit/build-angular): CommonJsUsageWarnPlugin fix(@angular-devkit/build-angular): several fixes for commonjs warnings Jul 1, 2020
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release and removed target: patch This PR is targeted for the next patch release labels Jul 1, 2020
@alan-agius4 alan-agius4 closed this Jul 1, 2020
@alan-agius4 alan-agius4 reopened this Jul 1, 2020
…t the package name

With this change we add the functionality to also match an allowed dependency against a package name. The package name is retrieved from the rawRequest.

Previously, users needed to add the request path which in some case might be a deep import. Ex: `zone.js/dist/zone-error`. With this change adding the package name example `zone.js` will suffice.

Closes: #18058
…l locale data

When using the `localize` option directly importing locale data from `@angular/common` is not needed because the Angular CLI  will automatically include locale data. When not using the `localize` option, most likely users meant to import the global variant of the local data.

See: https://angular.io/guide/i18n#import-global-variants-of-the-locale-data
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 1, 2020
@filipesilva filipesilva merged commit c578c73 into angular:master Jul 1, 2020
@alan-agius4 alan-agius4 deleted the allowed-deps-pkg-name branch July 1, 2020 13:10
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow globs in allowedCommonJsDependencies

4 participants