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

move glob exclude patterns to ignoreList #69

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

apellerano-pw
Copy link
Contributor

@apellerano-pw apellerano-pw commented Oct 14, 2024

!(foo) style clauses don't work if the codemod is extended to support incremental pod conversion. Take #61 where a --pod flag is desired. Running --pods my-pod-a would generate a search path like:

app/my-pod-a/!(components)/**/template.hbs

but this is incorrect if you have a file structure like

my-project/
  app/
    my-pod-a/
      route.js
      template.hbs

since there's no folder in between my-pod-a and ** which matches !(components).

The exclusion can be expressed instead with ignoreList so that there's no additional folders required by /!(foo)/. This makes the codemod more extensible.

I wasn't able to reproduce the issue with --pod-path alone like originally theorized in #61. This is because there will always be a pod-name folder to match /!(foo)/.

Copy link
Owner

@ijlee2 ijlee2 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ijlee2 ijlee2 added the enhance: code Issue asks for new feature or refactor label Oct 15, 2024
@ijlee2 ijlee2 merged commit 03a9b5d into ijlee2:main Oct 15, 2024
2 checks passed
@apellerano-pw apellerano-pw deleted the move-ignore-clauses branch October 15, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance: code Issue asks for new feature or refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants