Skip to content

Commit 974176a

Browse files
committed
docs(compartment-mapper): update NEWS.md
1 parent dd28a19 commit 974176a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/compartment-mapper/NEWS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@ User-visible changes to `@endo/compartment-mapper`:
22

33
# Next release
44

5+
- **Breaking:** `CompartmentMapDescriptor` no longer has a `path` property.
6+
- **Breaking:** `CompartmentMapDescriptor`'s `label` property is now a
7+
_canonical name_ (a string of one or more npm package names separated by `>`).
8+
- **Breaking:** The `CompartmentMapDescriptor` returned by `captureFromMap()`
9+
now uses canonical names as the keys in its `compartments` property.
10+
- Breaking types: `CompartmentMapDescriptor`, `CompartmentDescriptor`,
11+
`ModuleConfiguration` (renamed from `ModuleDescriptor`) and `ModuleSource`
12+
have all been narrowed into discrete subtypes.
13+
- `captureFromMap()`, `loadLocation()` and `importLocation()` now accept a
14+
`moduleSourceHook` option. This hook is called when processing each module
15+
source, receiving the module source data (location, language, bytes, or error
16+
information) and the canonical name of the containing package.
17+
- `captureFromMap()` now accepts a `packageConnectionsHook` option. This hook is
18+
called for each retained compartment with its canonical name and the set of
19+
canonical names of compartments it links to (its connections). Useful for
20+
analyzing or visualizing the dependency graph.
21+
- `mapNodeModules()`, `loadLocation()`, `importLocation()`, `makeScript()`,
22+
`makeFunctor()`, and `writeScript()` now accept the following hook options:
23+
- `unknownCanonicalNameHook`: Called for each canonical name mentioned in
24+
policy but not found in the compartment map. Useful for detecting policy
25+
misconfigurations.
26+
- `packageDependenciesHook`: Called for each package with its set of
27+
dependencies. Can return partial updates to modify the dependencies,
28+
enabling dependency filtering or injection based on policy.
29+
- `packageDataHook`: Called once with data about all packages found while
30+
crawling `node_modules`, just prior to creation of a compartment map.
531
- When dynamic requires are enabled via configuration, execution now takes
632
policy into consideration when no other relationship (for example, a
733
dependent/dependee relationship) between two Compartments exists. When policy

0 commit comments

Comments
 (0)