-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Convert let
and const
in maplibre to enable es5 test
#7077
Comments
@birkskyum please note that it is actually the second test catches these (not the es6 test). |
Okay, so the first test can be re-enabled already. For the no-new-func, I'm not sure which |
is there a |
It's coming from let supportsOffscreenCanvas;
function offscreenCanvasSupported() {
if (supportsOffscreenCanvas == null) {
supportsOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' &&
new OffscreenCanvas(1, 1).getContext('2d') &&
typeof createImageBitmap === 'function';
}
return supportsOffscreenCanvas;
} |
The errors I get mention a use of var supportsOffscreenCanvas;
function offscreenCanvasSupported() {
if (supportsOffscreenCanvas == null) {
supportsOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' &&
new OffscreenCanvas(1, 1).getContext('2d') &&
typeof createImageBitmap === 'function';
}
return supportsOffscreenCanvas;
} and i still got the errors after a fresh rebuild |
Until we publish npm run custom-bundle -- --unminified --traces choroplethmap,densitymap,scattermap But strangely I don't get an error on this custom bundle! |
Oops. It actually did throw an error with the modified script for custom |
Here is a faster command for testing: npm run custom-bundle -- --unminified --traces scattermap && node ./node_modules/eslint/bin/eslint.js --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: warn}' dist/plotly-custom.js |
Thanks @birkskyum for the note. |
@birkskyum if you recall, we had to disable the es5 tests in #7060.
I was wondering if you could simply try replacing some
const
andlet
tovar
in themaplibre
bundle (or give webpack config another try #7015 (comment)) and investigate if we could enable es5 test for a bit longer until switching to es6 in #6909?Thank you!
The text was updated successfully, but these errors were encountered: