Releases: endojs/endo
2025-07-11
@endo/immutable-arraybuffer 1.1.2
- Removes
@endo/immutable-arraybufer/shim-hermes.jsand absorbs the necessary features into@endo/immutable-arraybuffer/shim.js. We are not qualifying this as a breaking change since the feature did not exist long enough to become relied upon.
@endo/marshal 1.8.0
- Introduces an environment variable config option
ENDO_RANK_STRINGSto change the rank ordering of strings from the current (incorrect) ordering by UTF-16 code unit used by JavaScript's<and.sort()operations to (correct and OCapN-conformant) ordering by Unicode code point. It currently defaults to "utf16-code-unit-order", matching the previously-unconditional behavior.
@endo/pass-style 1.6.3
- The exported function name
isObjectis ambiguous. It is unclear whether it includes functions or not. (It does.) To avoid this confusion, we're deprecatingisObjectand suggesting to use the new exportisPrimitiveinstead, that has the opposite answer. IOW, for allx,isObject(x) === !isPrimitive(x)
@endo/patterns 1.7.0
@endo/marshalintroduces an environment variable config optionENDO_RANK_STRINGSto change the rank ordering of strings from the current (incorrect) ordering by UTF-16 code unit used by JavaScript's<and.sort()operations to (correct and OCapN-conformant) ordering by Unicode code point. It currently defaults to "utf16-code-unit-order", matching the previously-unconditional behavior.@endo/patternsprovides acompareKeyspartial order that delegates some ordering, including strings, to the rank ordering provided by@endo/marshal. So when theENDO_RANK_STRINGSdefault is not overridden, thencompareKeysalso follows the (incorrect) UTF-16 code unit order. But when it is overridden, thencompareKeysalso follows the (correct) Unicode code-point order.
- In errors explaining why a specimen does not match a pattern, sometimes the error message contains a quoted form of a nested pattern. This quoting was done with
q, producing an uninformative rendering of these nested patterns. Now this quoting is done withqp, which renders these nested patterns into readable Justin source code.
2026-06-17 Releases Suplemental
@endo/pass-style 1.6.2
- Fixes so that the package initializes on platforms that lack
ArrayBuffer.prototype.transferToImmutable.
@endo/compartment-mapper 1.6.2
- Produces a stub for
require.extensionsin CommonJS modules to increase ecosystem compatibility.
@endo/immutable-arraybuffer 1.1.1
- Captures
structuredCloneearly so that scuttling all properties ofglobalThisafter initializing@endo/immutable-arraybufferor@endo/immutable-arraybuffer/shim.jsdoes not interfere with this module's designed behavior.
2025-06-17 Release
@endo/pass-style v1.6.1
BROKEN BUT PATCHED in 1.6.2, contains a fix but published with broken
dependency versions.
Inadvertently published without amending workspace protocol dependencies.
- Fixes so that the package initializes on platforms that lack
ArrayBuffer.prototype.transferToImmutableand recognizes immutable
ArrayBuffers as having a pass-style ofbyteArrayon platforms have a
sliceToImmutable, even if that is emulated with a shim usingslice, even
if they lacktransferToImmutable.
2025-06-02 Releases
@endo/pass-style v1.6.0
BROKEN BUT PATCHED in 1.6.1, this version introduced a dependence on the
underlying platform supporting ArrayBuffer.prototype.transferToImmutable.
The patch restores the ability to use pass-style on older platforms without
the immutable ArrayBuffer shim (as entrained by ses).
- Introduces support for
byteArray.
ses v1.13.0
-
Two new
stackFiltering:options are added'omit-frames'-- Only omit likely uninteresting frames. Keep original paths.'shorten-paths'-- Only shorten paths to text likely clickable in an IDE
This fills out the matrix of what should have been orthogonal options. The existing
'concise'setting both omits likely uninteresting frames and shortens their paths. The existing'verbose'setting does neither. -
Uses the
@endo/immutable-arraybuffershim to addArrayBuffer.p.immutable,ArrayBuffer.p.transferToImmutable, andArrayBuffer.p.sliceToImmutableto ses, in order to emulate the Immutable ArrayBuffer proposal. These make an ArrayBuffer-like object whose contents cannot be mutated. However, due to limitations of the shim- Unlike
ArrayBufferandSharedArrayBufferthis shim's ArrayBuffer-like object cannot be transfered or cloned between JS threads. - Unlike
ArrayBufferandSharedArrayBuffer, this shim's ArrayBuffer-like object cannot be used as the backing store of TypeArrays or DataViews. - The shim depends on the platform providing either
structuredCloneorArray.prototype.transfer. Node <= 16 and provides neither, causing the shim to fail to initialize, and therefore SES to fail to initialize on such platforms. - Current Hermes has even stronger constraints, lacking
structuredClone,transfer, private fields, and evenclasssyntax. This requires other coping strategies. See #2785 - Even after the upcoming
transferToImmutableproposal is implemented by the platform, the current code will still replace it with the shim implementation, in accord with shim best practices. See #2311 (comment) . It will require a later manual step to delete the shim or have it avoid overriting a platform implementation, after manual analysis of the compat implications.
- Unlike
-
The evalTaming option
'safe-eval'now can only throw errorSES_DIRECT_EVAL. This allows SES to initialize with'unsafe-eval'or'no-eval'on hosts with no direct eval available such as Hermes for a successful lockdown that tolerates it's language features.The module name
ses/hermescan now be required to calllockdownandrepairIntrinsicsonly,Compartmentis not yet available.It is currently compatible with Hermes v0.12.0, we plan to support v0.13.0 then subsequent Hermes tags or side-by-side versions built for React Native depending on ecosystem usage and official support, then Static Hermes when released.
Also
ses/hermescan now be hooked into bundlers such as Metro to run Hardened JS.
@endo/compartment-mapper v1.6.1
- The
devflag formapNodeModules()is no longer deprecated. The concept of a "condition" (conditional exports) is disinct from the flag's original meaning (instructsmapNodeModules()to considerdevDependencieswhen graphing packages). Users who have switched to using adevelopmentcondition fordev's purpose are encouraged to switch back to using thedevflag instead. In a future release, the presence of adevelopmentcondition will no longer mimic an enableddevflag and will only be considered when evaluating conditional exports.
@endo/evasive-transform v2.0.0
- The
sourceTypeoption is now restricted toscriptandmoduleonly. Function signature types have changed to be more precise.
@endo/bundle-source v4.1.0
- The
'endoZipBase64'moduleFormat now utilizes theimportHookoption to exit dependencies whose specifiers return a truthy value.
@endo/import-bundle v1.5.0
- The
'endoZipBase64'moduleFormat now utilizes theimportHookoption.
@endo/marshal v1.7.0
@endo/marshalnow also exports aqpfunction meaning "quote passable"
that renders its passable argument as a quasi-quoted Justin expression.
This can be used withX,Failetc the same way you currently useq.
Since Justin is a subset of HardenedJS, there's no need for the quasi-quoted
form to explain what language it is in.
2025-03-24
ses v1.12.0
-
The
evalTaming:option values are renamed:- from
'safeEval','unsafeEval', and'noEval' - to
'safe-eval','unsafe-eval', and'no-eval'
in order to follow the convention that lockdown option values use kebob-case rather than camelCase. To avoid breaking old programs during the transition, the old names are deprecated, but continue to work for now.
- from
-
Evaluating a non-lexical name that is also absent on the global object of a compartment no longer throws a
ReferenceErrorand instead producesundefinedbecause it proves impossible to do so without revealing what properties exist on the hostglobalThisto compartmentalized code with a shim. This is a divergence from the expected behavior of a native Hardened JavaScript implementation, like XS.
@endo/patterns v1.5.0
-
New pattern:
M.containerHas(elementPatt, bound = 1n)motivated to support want patterns in Zoe, to pull out onlyboundnumber of elements that matchelementPatt.boundmust be a positive bigint. -
Closely related,
@endo/patternsnow exportscontainerHasSplitto support ERTP's use ofM.containerHason non-fungible (set,copySet) and semifungible (copyBag) assets, respectively. See Agoric/agoric-sdk#10952 .
@endo/import-bundle v1.4.0
- Adds support for
testformat bundles, which simply return a promise for an object that resembles a module exports namespace with the objects specified on the symbol-named property@exports, which is deliberately not JSON serializable or passable. - Adds a
typedImportBundle<ExpectedExportsNamespace>function with a proper type signature, to provide a narrower signature thananywithout disrupting existing usage.
@endo/bundle-source v4.0.0
- Replaces the implementation for the
nestedEvaluateandgetExportformats with one based on Endo's Compartment Mapper instead of Rollup, in order to obviate the need to reconcile source map transforms between Rollup and the underlying Babel generator. As a consequence, we no longer generate a source map for the bundle, but Babel ensures that we preserve line and column numbers between the original source and the bundled source.
@endo/compartment-mapper v1.6.0
-
Accommodates CommonJS modules that use
definePropertyonexports. -
Divides the role of
makeBundleintomakeScriptandmakeFunctor. The newmakeScriptreplacesmakeBundlewithout breaking changes, producing a JavaScript string that is suitable as a<script>tag in a web page. -
The new
makeFunctorproduces a JavaScript string that, when evaluated, produces a partially applied function, so the caller can provide runtime options. -
Both
makeScriptandmakeFunctornow acceptformat,useEvaluateandsourceUrlPrefixoptions. -
The functor produced by
makeFunctornow acceptsevaluate,require, andsourceUrlPrefixruntime options. -
Both
makeScriptandmakeFunctornow accept aformatoption. Specifiying the"cjs"format allows the bundle to exit to the host's CommonJSrequirefor host modules. -
Adds
sourceDirnameto compartment descriptors in the compartment maps generated bymapNodeModulesand uses these to provide better source URL comments for bundles generated bymakeScriptandmakeFunctor, by default.
These changes collectively allow us to replace the implementation of nestedEvaluate and getExports formats in @endo/bundle-source, including the preservation of useful line numbers and file names in stack traces.
mapNodeModules,importLocationandloadLocationnow accept alogoption for users to define a custom logging function. As of this writing, onlymapNodeModuleswill potentially call this function if provided. Expansion of log messaging and support for thelogoption in more APIs is expected in the future.
@endo/evasive-transform v1.4.0
- Adds a
sourceMapoption so that the generated sourcemap can project back to the original source code withoutunmapLoc. - Removes support for sourcemap
unmapLocbecause it is not used by contemporary Endo packages. The option is now ignored.
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).
2024-11-13
ses v1.10.0
-
Permit Promise.try, since it has reached Stage 4.
-
Adds a
reportingoption tolockdownandrepairIntrinsics.The default behavior is
"platform"which will detect the platform and report warnings according to whether a webconsole, Node.jsconsole, orprintare available. The web platform is distinguished by the existence ofwindoworimportScripts(WebWorker). The Node.js behavior is to report all warnings tostderrvisually consistent with use of a console group. SES will useprintin the absence of aconsole. Captures the platformconsoleat the timelockdownorrepairIntrinsicsare called, not at the timesesinitializes.The
"console"option forces the web platform behavior. On Node.js, this results in group labels being reported tostdout.The
"none"option mutes warnings.
@endo/bundle-source v3.5.0
- Adds support for TypeScript type erasure using
ts-blank-spaceapplied to TypeScript modules with.ts,.mts, and.ctsextensions, for any package that is not under anode_modulesdirectory, immitatingnode --experimental-strip-types. As with.jsextensions, the behavior of.tsis either consistent with.mtsor.ctsdepending on thetypeinpackage.json.
@endo/compartment-mapper v1.4.0
- Adds options
languageForExtension,moduleLanguageForExtension,commonjsLanguageForExtension, andlanguagestomapNodeModulesandcompartmentMapForNodeModulesallowing for certain mappings from extension (e.g.,ts) to language (e.g.,mtsorcts) to depend on the each package’stypein the way we already varyjsbetweencjsandmjs. These options enter through the high level functions includingmakeArchiveandimportLocation. - The new options
workspaceLanguageForExtension,workspaceModuleLanguageForExtension, andworkspaceCommonjsLanguageForExtensionapply like the above except more specifically and for packages that are not physically located under anode_modulesdirectory, indicating that JavaScript has not yet been generated from any non-JavaScript source files. - Omits unused module descriptors from
compartment-map.jsonin archived applications, potentially reducing file sizes. - Fixes an issue where errors thrown from exit module hooks (
importHook) would be thrown at parse-time when the parser uses heuristic import analysis instead of at runtime. Such errors will now be thrown at runtime, as originally intended. To those who expected the previous behavior: if you exist, please exercise caution when upgrading.