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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unexpected reserved word when variable contains ascii #13323

Closed
1 task
alan-agius4 opened this issue May 17, 2021 · 3 comments 路 Fixed by #13325
Closed
1 task

[Bug]: Unexpected reserved word when variable contains ascii #13323

alan-agius4 opened this issue May 17, 2021 · 3 comments 路 Fixed by #13325
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser

Comments

@alan-agius4
Copy link

馃捇

  • Would you like to work on a fix?

How are you using Babel?

babel-loader (webpack)

Input code

let \u0275ResourceLoaderImpl_BaseFactory

https://babeljs.io/repl#?browsers=ie%209&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=DYUwLgBAOgrgDAJgOwFYBKIDOB7GAnAYxABlsBDAExDwEkBbAB2AH0AhMzEAMTILGzwBPIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=unambiguous&lineWrap=false&presets=env&prettier=false&targets=&version=7.14.2&externalPlugins=

Configuration file name

No response

Configuration

Can be reproduced with any config included in the repl.

Current and expected behavior

Unexpected reserved word 'let'. (1:0)

1 | let \u0275ResourceLoaderImpl_BaseFactory
| ^

Environment

System:
OS: macOS 11.2.3
Binaries:
Node: 12.20.2 - ~/.nvm/versions/node/v12.20.2/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.20.2/bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v12.20.2/bin/npm
Babel
@babel/core 7.14.0,
@babel/preset-env: 7.14.1

Possible solution

No response

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @alan-agius4! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@submarines-and
Copy link

If it helps anyone:

WORKING:
const \u0275ResourceLoaderImpl_BaseFactory = 4
let x\u0275ResourceLoaderImpl_BaseFactory
var \u0275ResourceLoaderImpl_BaseFactory
let 傻ResourceLoaderImpl_BaseFactory

So seems to only be an issue with "let" + first char being escaped unicode

@nicolo-ribaudo
Copy link
Member

This actually used to work in the past: it has been broken in 7.4.0

alan-agius4 added a commit to angular/angular-cli that referenced this issue May 18, 2021
This release contains the fix for babel/babel#13323

Closes #20814
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants