Skip to content

Commit

Permalink
Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5 (#8762)
Browse files Browse the repository at this point in the history
* Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.10.4 to 7.10.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.5/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Revert changes from #8688

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
  • Loading branch information
dependabot[bot] and fisker committed Jul 15, 2020
1 parent 0e70864 commit f0285dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@angular/compiler": "10.0.3",
"@babel/code-frame": "7.10.4",
"@babel/parser": "7.10.4",
"@babel/parser": "7.10.5",
"@glimmer/syntax": "0.54.1",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "3.6.1",
Expand Down
13 changes: 1 addition & 12 deletions src/language-js/parser-babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,7 @@ function createParse(parseMethod, ...pluginCombinations) {
babelOptions({ sourceType, extraPlugins })
)
);
} catch (_error) {
// babel@7.10.4 throws `undefined`, when parsing
// ```js
// alert(
// <!-- comment
// 'hello world'
// )
// ```
// #8688

const error = _error || { message: "Unknown error" };

} catch (error) {
throw createError(
// babel error prints (l:c) with cols that are zero indexed
// so we need our custom error
Expand Down
8 changes: 6 additions & 2 deletions tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`html-like-comments.js error test 1`] = `
"Unknown error (0:0)
"Unexpected token (3:1)
1 | // Only support HTML-like comment in HTML
2 | alert(
3 | <!-- comment"
> 3 | <!-- comment
| ^
4 | 'hello world'
5 | )
6 | "
`;

exports[`module-attributes.js error test 1`] = `
Expand Down
7 changes: 1 addition & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,7 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/parser@7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz#9eedf27e1998d87739fb5028a5120557c06a1a64"
integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==

"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.10.5":
"@babel/parser@7.10.5", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.10.5":
version "7.10.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.5.tgz#e7c6bf5a7deff957cec9f04b551e2762909d826b"
integrity sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==
Expand Down

0 comments on commit f0285dc

Please sign in to comment.