Skip to content

Fix implicit glob detection when ancestor directory contains . #47418

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

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

andrewbranch
Copy link
Member

Fixes #45721

Big thanks to @lgarron 🌟

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jan 13, 2022
Comment on lines +415 to +423

it("parses wildcard directories even when parent directories have dots", () => {
const parsed = parseConfigFileTextToJson("/foo.bar/tsconfig.json", JSON.stringify({
include: ["src"]
}));

const parsedCommand = parseJsonConfigFileContent(parsed.config, sys, "/foo.bar");
assert.deepEqual(parsedCommand.wildcardDirectories, { "/foo.bar/src": WatchDirectoryFlags.Recursive });
});
Copy link

Choose a reason for hiding this comment

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

Would it be worth adding a test for /repo/src/example.com as well? (Dot in the include path, but not in the repo path.)

Copy link
Member Author

Choose a reason for hiding this comment

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

A dot in the last component of the include path is still going to cause a problem—I’m not sure we’ve settled on what the expected behavior for that is.

@lgarron
Copy link

lgarron commented Jan 14, 2022

Thanks for the fix! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newly created files don't belong to typescript project on MacOS
4 participants