-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
change(web): lm-worker bundling + wrapper script rework 📜 #10264
Conversation
User Test ResultsTest specification and instructions User tests are not required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, suggestions are only minor, I don't mind the wetness of the doHelp
and parameter parsing at this point. Could consider using commander
or some other command line parsing library but it hardly seems worth it at present.
// https://caniuse.com/mdn-javascript_builtins_function_name_configurable_true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it might be flipped in 18.0? Do we need an issue to track this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming I'm properly understanding you here, we will not need an issue to track this. From #10257:
keyman/common/web/es-bundling/src/configuration.mts
Lines 24 to 35 in dc7bfc1
export function forES6(config: esbuild.BuildOptions): esbuild.BuildOptions { | |
return { | |
...config, | |
target: "es6", | |
conditions: ['es6-bundling'], | |
// Even if they'd be tree-shaken out, esbuild will fall over from their presence | |
// within an imported `@keymanapp/common-types`. | |
external: ['timers', 'buffer', 'events'], | |
// Available with ES6, but not necessarily with ES5. | |
keepNames: true | |
}; | |
} |
The ES6 target's configuration will re-enable this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we ever want keepNames: false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not viable on Android 5.0 devices, so yes.
https://caniuse.com/mdn-javascript_builtins_function_name_configurable_true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prepping additional code-suggestions to apply with the others...
// https://caniuse.com/mdn-javascript_builtins_function_name_configurable_true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming I'm properly understanding you here, we will not need an issue to track this. From #10257:
keyman/common/web/es-bundling/src/configuration.mts
Lines 24 to 35 in dc7bfc1
export function forES6(config: esbuild.BuildOptions): esbuild.BuildOptions { | |
return { | |
...config, | |
target: "es6", | |
conditions: ['es6-bundling'], | |
// Even if they'd be tree-shaken out, esbuild will fall over from their presence | |
// within an imported `@keymanapp/common-types`. | |
external: ['timers', 'buffer', 'events'], | |
// Available with ES6, but not necessarily with ES5. | |
keepNames: true | |
}; | |
} |
The ES6 target's configuration will re-enable this.
Co-authored-by: Marc Durdin <[email protected]>
iOS build failure was due to the need to sign a license agreement. No need to hold this up for that. There was a temporary merge conflict upon merging #10255, but it was auto-resolvable on desktop. |
Changes in this pull request will be available for download in Keyman version 17.0.239-alpha |
This PR exists as prep-work (on the lm-worker level) toward having alternate compile targets, such as ES6 artifacts, from Web and Web-related builds. In particular, note the goal of #10257.
Notable differences within this PR:
build-wrapper.js
script.build-polyfiller.js
; before, the adjustment was made here, rather than when wrapping.@keymanapp-test-bot skip