Skip to content

feat(compartment-mapper): support dynamic imports of absolute paths & windows paths - #3338

Open
boneskull wants to merge 1 commit into
masterfrom
boneskull/absolute-import-resolution
Open

feat(compartment-mapper): support dynamic imports of absolute paths & windows paths#3338
boneskull wants to merge 1 commit into
masterfrom
boneskull/absolute-import-resolution

Conversation

@boneskull

Copy link
Copy Markdown
Member

Description

This adds support for dynamically importing absolute paths (via import()) to @endo/compartment-mapper.

It also adds support for Windows-style paths in both the dynamic import() and require() use-cases, depending on supplied ReadPowers.

Added relevant sections to README.md and reformatted (fixing headers & the like).

Security Considerations

Consumers are encouraged to provide the minimum set of capabilities (ReadPowers) necessary for desired functionality (though this is nothing new).

Scaling Considerations

n/a

Documentation Considerations

Changes (as well as undocumented current behavior) have been documented in @endo/compartment-mapper's README.md.

Testing Considerations

None that I can think of at the moment.

Compatibility Considerations

This is backwards-compatible.

Upgrade Considerations

  • Adopting support for dynamic import() of POSIX absolute paths requires additional ReadPowers (isAbsolute, fileURLToPath).
  • Adopting support for dynamic import() or dynamic require() of Windows absolute paths requires further additional ReadPowers (pathToFileURL).

… windows paths

This adds support for dynamically importing absolute paths (via `import()`) to `@endo/compartment-mapper`.

It also adds support for Windows-style paths in both the dynamic `import()` and `require()` use-cases, depending on supplied `ReadPowers`.

Added relevant sections to `README.md` and reformatted (fixing headers & the like).
@boneskull
boneskull requested review from kriskowal and naugtur August 6, 2026 01:13
@boneskull boneskull self-assigned this Aug 6, 2026
@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93cad3b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@endo/compartment-mapper Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@boneskull boneskull added lavamoat ecosystem-compatibility Tracks a compatibility issue in a third-party package or packages. labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-compatibility Tracks a compatibility issue in a third-party package or packages. lavamoat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant