2025-01-23
ses v1.11.0
-
Adds support for dynamic
importin conjunction with an update to@endo/module-source. -
Specifying the long-discontinued
mathTamingordateTamingoptions logs a warning.
Incubating: Please do not rely on these features as they are under development and subject to breaking changes that will not be signaled by semver.
- Adds support for an XS-specific variant of the SES shim that is triggered with the
xspackage export condition. This version of SES preserves all the features ofCompartmentprovided uniquely by the SES shim, but with the__native__constructor option, loses support for importing precompiled module records and gains support for nativeModuleSource.
@endo/module-source v1.2.0
- Supports dynamic
importwithin aModuleSourcein conjunction with a related change inses. For example,await import(specifier)can now call through to the surrounding compartment'simportHookto load and evaluate further modules. - Provides an XS-specific variant of
@endo/module-sourcethat adapts the nativeModuleSourceinstead of entraining Babel.
@endo/compartment-mapper v1.5.0
mapNodeModulesand all functions that use it now tolerate the absence of expected packages. These packages are now omitted from the generated package skeleton map. So, loading a physically missing module now occurs during the load phase instead of the mapping phase.- Adds a
strictoption to all functions thatmapNodeModulesto restore old behavior, which produces an error early if, for example, a non-optional peer dependency is missing. Peer dependencies are strictly required unlesspeerDependenciesMetahas an object with a truthyoptionalentry. Correct interpretation ofpeerDependenciesis not distributed evenly, so this behavior is no longer the default.
Incubating: Please do not rely on these features as they are under development and subject to breaking changes that will not be signaled by semver.
- The module
@endo/compartment-mapper/import-archive-parsers.jsdoes not support modules in archives in their original ESM (mjs) or CommonJS (cjs) formats because they entrain Babel and a full JavaScript lexer that are not suitable for use in all environments, specifically XS. This version introduces an elective@endo/compartment-mapper/import-archive-all-parsers.jsthat has all of the precompiled module parsers (pre-cjs-jsonandpre-mjs-json) that Endo's bundler currently produces by default and additionally parsers for original sources (mjs,cjs). Also, provided thexspackage condition,@endo/compartment-mapper/import-archive-parsers.jsnow falls through to the nativeModuleSourceand safely includesmjsandcjswithout entraining Babel, but is only supported in conjunction with the__native__option forCompartment,importArchive,parseArchive, andimportBundle. With thenodepackage condition (present by default when running ESM onnode),@endo/compartment-mapper/import-archive-parsers.jsalso now includesmjsandcjsby entraining Babel, which performs adequately on that platform. - Adds a
__native__: trueoption to all paths to import, that indicates that the application will fall through to the native implementation of Compartment, currently only available on XS, which lacks support for precompiled module sources (as exist in many archived applications, particularly Agoric smart contract bundles) and instead supports loading modules from original sources (which is not possible at runtime on XS).