Adds a reporting option to lockdown and repairIntrinsics.
The default behavior is "platform" which will detect the platform and
report warnings according to whether a web console, Node.js console, or
print are available.
The web platform is distinguished by the existence of window or
importScripts (WebWorker).
The Node.js behavior is to report all warnings to stderr visually
consistent with use of a console group.
SES will use print in the absence of a console.
Captures the platform console at the time lockdown or repairIntrinsics
are called, not at the time ses initializes.
The "console" option forces the web platform behavior.
On Node.js, this results in group labels being reported to stdout.
The "none" option mutes warnings.
@endo/bundle-source v3.5.0
Adds support for TypeScript type erasure using
ts-blank-space applied to
TypeScript modules with .ts, .mts, and .cts extensions, for any package
that is not under a node_modules directory, immitating node --experimental-strip-types.
As with .js extensions, the behavior of .ts is either consistent with
.mts or .cts depending on the type in package.json.
@endo/compartment-mapper v1.4.0
Adds options languageForExtension, moduleLanguageForExtension,
commonjsLanguageForExtension, and languages to mapNodeModules and
compartmentMapForNodeModules allowing for certain mappings from extension
(e.g., ts) to language (e.g., mts or cts) to depend on the each
package’s type in the way we already vary js between cjs and mjs.
These options enter through the high level functions including makeArchive
and importLocation.
The new options workspaceLanguageForExtension,
workspaceModuleLanguageForExtension, and
workspaceCommonjsLanguageForExtension apply like the above except more
specifically and for packages that are not physically located under a
node_modules directory, indicating that JavaScript has not yet been
generated from any non-JavaScript source files.
Omits unused module descriptors from compartment-map.json in 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.
ses v1.10.0
Permit Promise.try, since it has reached Stage 4.
Adds a
reporting
option tolockdown
andrepairIntrinsics
.The default behavior is
"platform"
which will detect the platform and report warnings according to whether a webconsole
, Node.jsconsole
, orprint
are available. The web platform is distinguished by the existence ofwindow
orimportScripts
(WebWorker). The Node.js behavior is to report all warnings tostderr
visually consistent with use of a console group. SES will useprint
in the absence of aconsole
. Captures the platformconsole
at the timelockdown
orrepairIntrinsics
are called, not at the timeses
initializes.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
ts-blank-space
applied to TypeScript modules with.ts
,.mts
, and.cts
extensions, for any package that is not under anode_modules
directory, immitatingnode --experimental-strip-types
. As with.js
extensions, the behavior of.ts
is either consistent with.mts
or.cts
depending on thetype
inpackage.json
.@endo/compartment-mapper v1.4.0
languageForExtension
,moduleLanguageForExtension
,commonjsLanguageForExtension
, andlanguages
tomapNodeModules
andcompartmentMapForNodeModules
allowing for certain mappings from extension (e.g.,ts
) to language (e.g.,mts
orcts
) to depend on the each package’stype
in the way we already varyjs
betweencjs
andmjs
. These options enter through the high level functions includingmakeArchive
andimportLocation
.workspaceLanguageForExtension
,workspaceModuleLanguageForExtension
, andworkspaceCommonjsLanguageForExtension
apply like the above except more specifically and for packages that are not physically located under anode_modules
directory, indicating that JavaScript has not yet been generated from any non-JavaScript source files.compartment-map.json
in archived applications, potentially reducing file sizes.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.