Skip to content

Do not delete "fake" source map comments from strings#9960

Merged
nicolo-ribaudo merged 1 commit intobabel:masterfrom
nicolo-ribaudo:sourcemap-comment-strings
Aug 14, 2019
Merged

Do not delete "fake" source map comments from strings#9960
nicolo-ribaudo merged 1 commit intobabel:masterfrom
nicolo-ribaudo:sourcemap-comment-strings

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Q                       A
Fixed Issues? Fixes #9790, fixes #9956
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Commit message:

Instead of using convert-source-map's removeComments method before parsing the file, we can first parse the file with @babel/parser and then analyze the comments.
This is needed because it is not possible to reliabily detect comments in JavaScript without fully parsing the file: thlorenz/convert-source-map#63

Instead of using `convert-source-map`'s `removeComments` method before
parsing the file, we can first parse the file with `@babel/parser` and then
analyze the comments.
This is needed because it is not possible to reliabily detect comments in
JavaScript without fully parsing the file:
thlorenz/convert-source-map#63
@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: sourcemaps labels May 8, 2019
@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10774/

1 similar comment
@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10774/

@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

@tanhauhau @JLHwung I noticed your 👍s on this PR. Does it mean that you have reviewed it? I'm asking because you are both more involved than the "casual 👍ers" 😅

@JLHwung
Copy link
Copy Markdown
Contributor

JLHwung commented Jul 15, 2019

@nicolo-ribaudo 🤦‍♂️ Sometimes I thumb up for epic PRs (especially merged). But this one looks good to me.

@nicolo-ribaudo nicolo-ribaudo merged commit f0c2364 into babel:master Aug 14, 2019
@nicolo-ribaudo nicolo-ribaudo deleted the sourcemap-comment-strings branch August 14, 2019 15:05
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Nov 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: sourcemaps outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Unterminated template" thrown with CSS source map inside template literal Babel parses and removes sourceMappingURL from input

4 participants