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

Newer version 3.1.0+ breaks in strict mode - Octal escape sequences are not allowed in template strings #85

Closed
zhou opened this issue Apr 24, 2020 · 3 comments
Labels

Comments

@zhou
Copy link

zhou commented Apr 24, 2020

Octal escape sequences are invalid in strict mode. We discovered this because typestyle made a major update a few weeks back and brought in free-style 3.1.0. And our app could not start and shows an error:
馃毃 /<my_app>/node_modules/typestyle/node_modules/free-style/dist.es2015/index.js: Octal escape sequences are not allowed in template strings

After some googling, we found out that:
In Line 260 and 268, patterns like \0 should be escaped: \0. For example:
260: isUnique ? u\0${(++uniqueId).toString(36)} : s\0${pid}\0${style}
should be
260: isUnique ? u\\0${(++uniqueId).toString(36)} : s\\0${pid}\\0${style}

For your reference, a related issue in Babel is here: choojs/nanohtml#141

@blakeembrey
Copy link
Owner

Sorry, can you clarify where it doesn鈥檛 work? I鈥檓 happy to catch this but I鈥檝e been using it in node and browsers for a while without any issues.

@blakeembrey
Copy link
Owner

@zhou
Copy link
Author

zhou commented Apr 26, 2020

Thanks for prompt resolution. Now we need to convey the message to typestyle to bring in the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants