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 missing var declaration in arduino.js #2247
Conversation
Fix not defined errors in strict mode
@EricMCornelius Oops, that’s my code too. :(. Thanks! |
What is the context that you are using the library where this came up? |
Just ran into this error on 9.16.1. When will there be a release with a fix?
|
@yyyc514 - it's being incorporated by a webpack build for a cli tool I'm working on, and was throwing the error. Truth be told, I didn't dig in too much :) |
Did you trim some of the log there? Can you share how to reproduce the error you are seeing? ARDUINO_KW isn't even part of highlight.js itself, so I'm not sure why importing that file would give any error at all... |
If there is some way to reproduce this with just node I'd love to know. So far testing with test.mjs: "use strict";
import hljs from './build/lib/highlight.js'
import cpp from "./build/lib/languages/cpp.js"
hljs.registerLanguage("cpp", cpp)
import arduino from "./build/lib/languages/arduino.js"
console.log(arduino(hljs).aliases) |
And with rollup I can't even get started since we don't export anything by default:
|
Ok, if I use rollup and |
@yyyc514 - sorry I didn't get back to you yesterday evening, but my webpack usage is quite complicated (is that redundant to state?) and wouldn't be easy to trim down to a base case. That said, glad to hear you've already found a reproducible case via rollup. Really appreciate your work and this project! |
- Adds a test to the CI pipeline that builds a "typical" consolidated Highlight.js package from the full NPM source and then checks that that build actually executes without errors Related to highlightjs#2247.
- Adds a test to the CI pipeline that builds a "typical" consolidated Highlight.js package from the full NPM source and then checks that that build actually executes without errors Related to highlightjs#2247.
- Fix “not defined” errors in strict mode for arduino.js
@fdemello Pushing 9.16.2 now. |
@yyyc514 I'll re-test with 9.16.2. I saw the error when our test suite executed.
|
- Adds a test to the CI pipeline that builds a "typical" consolidated Highlight.js package from the full NPM source and then checks that that build actually executes without errors Related to #2247.
Fixes
ARDUINO_KW is not defined
errors when executing in strict mode.