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 #3142: undecorate: allow white spaces in cwd #3145

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

urugator
Copy link
Collaborator

Fixes #3142

@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2021

🦋 Changeset detected

Latest commit: 70ca189

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx-undecorate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@urugator urugator changed the title Fix #3142 Fix: undcorate: empty space in cwd #3142 Oct 13, 2021
@urugator urugator changed the title Fix: undcorate: empty space in cwd #3142 Fix: undecorate: empty space in cwd #3142 Oct 13, 2021
@@ -58,7 +57,7 @@ test("run cli with --parseTsAsNonJsx #2754", () => {
}
`)

mkdirSync(dirname(testNonJsxFile))
mkdirSync(dirname(testNonJsxFile), { recursive: true })
Copy link
Collaborator Author

@urugator urugator Oct 13, 2021

Choose a reason for hiding this comment

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

recursive: true just to silent the EEXIST error, which prevents re-running test without manually deleting the directory first

Copy link
Member

Choose a reason for hiding this comment

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

I think that has become the default on Node a while back IIRC, so you might be on an older version? Anyway, no harm in there.

@urugator urugator changed the title Fix: undecorate: empty space in cwd #3142 Fix: undecorate: spaces in cwd #3142 Oct 13, 2021
@urugator urugator changed the title Fix: undecorate: spaces in cwd #3142 Fix: undecorate: white spaces in cwd #3142 Oct 13, 2021
@urugator urugator changed the title Fix: undecorate: white spaces in cwd #3142 Fix #3142: undecorate: allow white spaces in cwd Oct 13, 2021
@urugator urugator requested a review from mweststrate October 13, 2021 21:44
@@ -107,11 +107,11 @@ function interpret_cli_args() {
spawnBin("jscodeshift", [
"--extensions=js,jsx,ts,tsx",
...process.argv.filter(arg => arg.startsWith("--")),
"-t", path.join(__dirname, "src", "undecorate.ts"),

"-t", `"${path.join(__dirname, "src", "undecorate.ts")}"`,
Copy link
Member

Choose a reason for hiding this comment

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

Argh, I was hoping this was the exact problem that passing an argument array would fix. Anyway, thanks for finding this!

@mweststrate mweststrate merged commit 6273bfb into mobxjs:main Oct 14, 2021
@github-actions github-actions bot mentioned this pull request Oct 14, 2021
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.

mobx-undecorate fails when path contains space
2 participants