Skip to content
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(core): normalize path in tree when accessing recorded changes #17016

Merged
merged 1 commit into from
May 15, 2023

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented May 15, 2023

Current Behavior

When filtering deleted files in the children function of the Tree, the paths are not normalized. In Windows, this prevents the files to match so the children function returns deleted files.

Expected Behavior

The paths used to access the recorded changes in the Tree should always be normalized. Fixing this caused another issue to surface. The delete function was not handling the root dir correctly and causing an infinite loop (an edge case where there are no files in the root).

Related Issue(s)

Fixes #17011

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2023 8:23am

@AgentEnder AgentEnder merged commit 9b4ba3a into nrwl:master May 15, 2023
@leosvelperez leosvelperez deleted the core/normalize-path-in-tree branch May 16, 2023 07:23
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter used in the tree.children doesn't work on windows machine
2 participants