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

Ensure addMany actions strip extensions correctly on dot files #366

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

alarner
Copy link
Contributor

@alarner alarner commented Jan 13, 2023

Fixes #324

Nodes path.parse does not treat dot files as an extension. For example path.parse('.gitignore') results in the following:

{ root: '', dir: '', base: '.gitignore', ext: '', name: '.gitignore' }

Because ext is an empty string rather than '.gitignore', extensions were not being stripped properly from dot files due to the path.parse(maybeFile.name).ext !== "" clause.

@alarner
Copy link
Contributor Author

alarner commented Jan 27, 2023

Is there anything I process need to follow to get this reviewed?

Copy link
Member

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

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

Code changes LGTM, thank you for the contribution.

Waiting for CI, then will merge + release

@crutchcorn crutchcorn merged commit 4140c53 into plopjs:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stripExtensions doesn't work with dot files
2 participants