-
Notifications
You must be signed in to change notification settings - Fork 916
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 filepath generated by pika-treeshake on Windows #178
Conversation
a3ff4a6
to
b9215b2
Compare
1eff076
to
5765aef
Compare
__tests__/integration/runner.js
Outdated
@@ -60,6 +54,10 @@ for (const testName of readdirSync(__dirname)) { | |||
// NOTE: We only compare files so that we give the test runner a more detailed diff. | |||
return; | |||
} | |||
// NOTE: Skip source map on Windows, because generated source map has different newline code (CRLF). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping source map on Windows, because generated source map has different newline code (CRLF) from expected one on Windows.
I think the exact test of this is a responsibility of Rollup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, stripWhitespace() was supposed to handle this. It was meant to strip all whitespace, including CRLF.
Can we try a different regex in stripWhitespace()? If that doesn't work, then adding this fallthrough is fine.
stdout.replace(/[ \t\r\n\f]+$/gm, '');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FredKSchott The problem was the escaped newline included in json value like '\\r\\n' or '\\n'.
Stripping it in 9024577, please review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for putting in the extra time so that we get full coverage!
LGTM! Added one comment just to check before we add that fall-through to ignore source map tests. |
d60e3ed
to
6618f08
Compare
6618f08
to
9024577
Compare
No description provided.