-
Notifications
You must be signed in to change notification settings - Fork 72
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
refactor(ses): Replace Rollup with Endo bundle #715
Conversation
045639f
to
39f16c1
Compare
39f16c1
to
ef841fe
Compare
ef841fe
to
2ae4f67
Compare
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
await write('dist/ses.cjs', bundle); | ||
await write('dist/ses.mjs', bundle); | ||
await write('dist/ses.umd.js', bundle); | ||
await write('dist/ses.umd.min.js', terse); | ||
|
||
await write('dist/lockdown.cjs', bundle); | ||
await write('dist/lockdown.mjs', bundle); | ||
await write('dist/lockdown.umd.js', bundle); | ||
await write('dist/lockdown.umd.min.js', terse); |
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.
The fact that there are only two, but with eight names, is amusing. No change suggested.
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.
True. This is the effect of architectural drift in this case. Before I changed the SES shim to effect its API strictly using globals, there was a difference between the CJS, MJS, and UMD treatments. Rollup continued to emphasize the difference in its configuration options, but the difference amounted to nothing except a vestigial SES
global introduced by the UMD version. The lockdown versions were of course briefly different. We’re retaining all of these only to ease the migration path. In the end, we really only need ses.cjs
(with the CJS extension strictly to navigate RESM to NESM portability) and ses.umd.min.js
.
@@ -0,0 +1,37 @@ | |||
import '../index.js'; | |||
import fs from 'fs'; |
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.
We should adopt some convention that we can check, for making sources of static authority stand out in our source files. Just noting. No change suggested at this time. Attn @dckc
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 should also be a script that we run with Endo instead of Node, and it should be counted a design goal for Endo to accommodate injection of an attenuated FS and a decent DX for granting that capability to the script. For example, there might be some reasonable default filesystem attenuation for any Endo script run in the context of developer tools for a package, or at least a convenient piece of boilerplate we can add to package.json to grant that limited authority.
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.
"DX"?
This change replaces the Rollup based bundle distribution files with bundles generated using the compartment mapper’s rudimentary bundler.
One negative consequence is that the minified bundle size increases by 2⨉ to 85KB.
Refs #175
merge target must be changed to
master
before merge