Skip to content

fix(@angular-devkit/build-angular): normalize exclude path#26245

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
akhilbiju:fix/normalize-test-ignore-paths
Nov 7, 2023
Merged

fix(@angular-devkit/build-angular): normalize exclude path#26245
alan-agius4 merged 1 commit into
angular:mainfrom
akhilbiju:fix/normalize-test-ignore-paths

Conversation

@akhilbiju
Copy link
Copy Markdown
Contributor

@akhilbiju akhilbiju commented Nov 6, 2023

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

The issue arises from passing exclude paths directly to the glob method, which can confuse users when they provide relative project roots or backslashes. This problem doesn't occur with include paths because those are automatically normalized.

Issue Number: #26239

What is the new behavior?

The exclude paths are now normalized for common user errors, such as the use of backslashes or relative project roots. This also unifies, to a certain extent, how include and exclude paths are transformed internally by the builder.

The remaining normalization steps for include are already informed to the developer, so now all the normalization for include & exclude are either unified or documented.
image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@alan-agius4 alan-agius4 self-requested a review November 6, 2023 14:20
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Nov 6, 2023
@akhilbiju akhilbiju force-pushed the fix/normalize-test-ignore-paths branch 2 times, most recently from 36640d5 to 8e77fc3 Compare November 6, 2023 22:40
@akhilbiju
Copy link
Copy Markdown
Contributor Author

Update:

  1. Fixed lint errors
  2. Refactored code
  3. Squashed all the commits into one

fix(@angular-devkit/build-angular): normalize exclude path
@akhilbiju akhilbiju force-pushed the fix/normalize-test-ignore-paths branch from 5c2ec31 to eb978d5 Compare November 7, 2023 07:37
@akhilbiju
Copy link
Copy Markdown
Contributor Author

Update:

  1. Added tests
  2. Fixed format issues
  3. Rebased the branch

@alan-agius4 -> Please, review.

Copy link
Copy Markdown
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 linked an issue Nov 7, 2023 that may be closed by this pull request
1 task
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker labels Nov 7, 2023
@akhilbiju
Copy link
Copy Markdown
Contributor Author

@alan-agius4 -> I hope we are good to merge this?

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Nov 7, 2023
@alan-agius4
Copy link
Copy Markdown
Collaborator

@akhilbiju, yes, CI is green.

@alan-agius4 alan-agius4 merged commit 31f0286 into angular:main Nov 7, 2023
@akhilbiju akhilbiju deleted the fix/normalize-test-ignore-paths branch November 9, 2023 12:00
@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 Dec 10, 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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The karma builder config for include & export behaves different

2 participants