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: fix name validation regex to accept file names beginning with a period #1005

Merged
merged 2 commits into from
Feb 21, 2024
Merged

fix: fix name validation regex to accept file names beginning with a period #1005

merged 2 commits into from
Feb 21, 2024

Conversation

nileflowers
Copy link
Contributor

Hi,

I was using node-to-fsa and realized that files beginning with a period, as in hidden *nix files, throw

new TypeError(`Failed to execute '${method}' on '${klass}': Name is not allowed.`);

from src/node-to-fsa/util.ts:assertName.

I am assuming that this is not an intended behavior, if this is a correct assumption, please accept my pull request.

I modified the regex and added a regression test case.

Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

thanks!

@G-Rath
Copy link
Collaborator

G-Rath commented Feb 21, 2024

(don't worry about that CI failure - it'll get "resolved" when the commits are squashed as part of merging)

@G-Rath G-Rath merged commit 3c18dae into streamich:master Feb 21, 2024
9 of 10 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 21, 2024
## [4.7.7](v4.7.6...v4.7.7) (2024-02-21)

### Bug Fixes

* accept file names beginning with a period ([#1005](#1005)) ([3c18dae](3c18dae))
@streamich
Copy link
Owner

🎉 This PR is included in version 4.7.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants