Skip to content

feat(@angular-devkit/build-angular): add wildcard option for allowedCommonJsDependencies #26047

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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

domske
Copy link
Contributor

@domske domske commented Oct 16, 2023

PR Checklist

PR Type

  • Feature

What is the current behavior?

The allowedCommonJsDependencies property suppresses warnings if CJS/AMD modules are used.
The developer can then search for alternative dependencies or expand this list.
If there are many affected dependencies that the developer needs to use without alternatives, it’s a lot of effort to constantly maintain this list. It would be helpful if there is an option to allow all dependencies…

Closes #25784

What is the new behavior?

The current behavior remains unchanged, but gives developers the option to allow all CJS/AMD dependencies by using asterisk (*) as entry in allowedCommonJsDependencies .

Does this PR introduce a breaking change?

  • No

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 16, 2023
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

Please also include the change https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts and update the description of allowedCommonJsDependencies in the various schema to method the wildcard behaviour.

The commit message is invalid please update the scope, add a body and footer.

feat(@angular-devkit/build-angular): add wildcard option for `allowedCommonJsDependencies`

This commit adds the functionality to that when a wildcard `*` is provided to `allowedCommonJsDependencies` CJS/AMD warnings usages is skipped.

Closes #25784

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: minor This PR is targeted for the next minor release labels Oct 17, 2023
…CommonJsDependencies`

This commit adds the functionality to that when a wildcard `*` is provided to `allowedCommonJsDependencies` CJS/AMD warnings usages is skipped.

Closes angular#25784
@domske domske force-pushed the option-allow-all-cjs-amd-deps branch from 4822c6e to a13f2b6 Compare October 18, 2023 19:49
@domske
Copy link
Contributor Author

domske commented Oct 18, 2023

Good point, thanks. I resolved everything and squashed the commits. Ok?

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 18, 2023
@domske domske changed the title feat(@angular-devkit): asterisk option for allowedCommonJsDependencies feat(@angular-devkit): add wildcard option for allowedCommonJsDependencies Oct 18, 2023
@domske domske changed the title feat(@angular-devkit): add wildcard option for allowedCommonJsDependencies feat(@angular-devkit/build-angular): add wildcard option for allowedCommonJsDependencies Oct 18, 2023
@dgp1130 dgp1130 merged commit 4784155 into angular:main Oct 19, 2023
@domske domske deleted the option-allow-all-cjs-amd-deps branch October 19, 2023 08:48
@angular-automatic-lock-bot
Copy link

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 Nov 19, 2023
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable CommonJS/AMD warnings.
3 participants