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

ignore dotted files and folders #8484

Merged
merged 2 commits into from
May 6, 2016

Conversation

zhengbli
Copy link
Contributor

@zhengbli zhengbli commented May 5, 2016

Fix #6861

@@ -716,7 +716,8 @@ namespace ts {
}

// Skip over any minified JavaScript files (ending in ".min.js")
if (/\.min\.js$/.test(fileName)) {
// Skip over dotted files and folders as well
if (/\.min\.js$/.test(fileName) || /[\\/]\.[\w.]/.test(fileName)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider combining into one regex, and hosting it as a variable declaration outside the function call to avoid creating a new literal every time the function is called.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mhegazy
Copy link
Contributor

mhegazy commented May 5, 2016

👍

@zhengbli zhengbli merged commit d11ee08 into microsoft:master May 6, 2016
@zhengbli zhengbli deleted the ignoreHiddenFiles branch May 6, 2016 02:22
["/apath/test.ts", "/apath/.git/a.ts", "/apath/.b.ts", "/apath/..c.ts"],
["/apath/test.ts"]
)
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't there be a test "allow dotted files and folders when explicitly requested" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

Choose a reason for hiding this comment

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

@zhengbli can you add a test for this please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added at #8501

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

4 participants