fix(endo): Ensure conditions include default, import, and endo
MODIFY
packages/compartment-mapper/NEWS.md
packages/compartment-mapper/NEWS.md
@@ -6,6 +6,8 @@ User-visible changes to the compartment mapper:
`package.json`: When the compartment mapper encounters such a package, every
module in that package with `.js` extension including the referenced module
will be treated an ESM, as if it had the `.mjs` extension.
+- Ensures that the `"endo"`, `"import"`, and `"default"` tags (Node.js
+ conditions) are respected in `package.json` `"exports"` conditions.
# v0.7.0 (2022-03-01)

MODIFY
packages/compartment-mapper/src/archive.js
packages/compartment-mapper/src/archive.js
@@ -203,6 +203,9 @@ const digestLocation = async (powers, moduleLocation, options) => {
/** @type {Set<string>} */
const tags = new Set();
+ tags.add('endo');
+ tags.add('import');
+ tags.add('default');
const packageDescriptor = parseLocatedJson(
packageDescriptorText,

MODIFY
packages/compartment-mapper/src/node-modules.js
packages/compartment-mapper/src/node-modules.js
@@ -364,6 +364,8 @@ const graphPackages = async (
tags = new Set(tags || []);
tags.add('import');
+ tags.add('default');
+ tags.add('endo');
if (packageDescriptor === undefined) {
throw new Error(

MODIFY
packages/ses/package.json.md
packages/ses/package.json.md
@@ -99,8 +99,8 @@ The variations differ only in file name extension.
Node.js and other tools will use this file when importing `ses` as an ESM.
(JavaScript module).
We have in the past experimented with using the precompiled bundle of SES here
-(`./dist/ses.cjs`), but found that this interacted poorly with Endo,
-because an Endo bundle contains symbols that SES censors.
+(`./dist/ses.cjs` or `./dist/ses.umd.js`), but found that this interacted
+poorly with Endo, because an Endo bundle contains identifiers that SES censors.
## "require": "./dist/ses.cjs",

fix(endo): Ensure conditions include default, import, and endo