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.