Skip to content

Commit 2e00276

Browse files
committed
chore: convert NEWS.md entries to changesets
This commit covers - `@endo/common` - `ses` - `@endo/ses-ava` - `@endo/errors` - `@endo/compartment-mapper`
1 parent 119e052 commit 2e00276

File tree

5 files changed

+72
-22
lines changed

5 files changed

+72
-22
lines changed

.changeset/beige-gifts-invent.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'ses': minor
3+
---
4+
5+
- Adds `assert.makeError` and deprecates `assert.error` as an alias, matching
6+
the API already exported from `@endo/errors`.
7+
- Before this version, the `assert` left in global scope before `lockdown`
8+
would redact errors and would be replaced by `lockdown` with a version that
9+
did _not_ redact errors if the caller opted-in with `errorTaming`
10+
set to one of the `unsafe` variants.
11+
After this version, the reverse is true: the `assert` left in global scope
12+
before `lockdown` does not redact.
13+
Then, `lockdown` replaces `assert` with a redacting `assert` unless the
14+
caller opted-out with `errorTaming` set to one of the `unsafe` variants.

.changeset/better-paths-wink.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@endo/ses-ava': minor
3+
---
4+
5+
- Introduces a `ses-ava` command for running tests with multiple AVA configurations.
6+
- Adds an `@endo/ses-ava/test.js` module for getting a `test` function
7+
appropriate for your configuration.
8+
- Adds an `@endo/ses-ava/prepare-endo-config.js` module suitable for use in the
9+
`require` clause of an AVA configuration, such that `@endo/ses-ava/test.js`
10+
exports a wrapped SES-AVA `test` function.
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
User-visible changes in `@endo/errors`:
2-
3-
# Next release
1+
---
2+
'@endo/errors': minor
3+
---
44

55
- Exports `assert.details` under its own name (i.e., `details`).
66

77
- `hideAndHardenFunction` - If a function `foo` is first frozen with `hideAndHardenFunction(foo)` rather than `freeze(foo)` or `harden(foo)`, then `foo.name` is changed from `'foo'` to `'__HIDE_foo'`. When `stackFiltering: 'concise'` or `stackFiltering: 'omit-frames'`, then (currently only on v8), the stack frames for that function are omitted from the stacks reported by our causal console.
88

99
- The new `Rejector` type supports the confirmFoo/reject pattern:
10+
1011
```js
1112
@import {FAIL, hideAndHardenFunction} from '@endo@errors';
1213
@import {Rejector} from '@endo/errors/rejector.js';
@@ -22,25 +23,7 @@ User-visible changes in `@endo/errors`:
2223
};
2324
hideAndHardenFunction(assertFoo);
2425
```
26+
2527
Both `false` and `Fail` satisfy the `Rejector` type.
2628
We also deprecate the old checkFoo/assertChecker pattern from @endo/common.
2729
The exported `isFoo` and `assertFoo` behave the same as they had when then they were using the checkFoo/assertChecker pattern, but are now internally faster and clearer.
28-
29-
# v1.1.0 (2024-02-22)
30-
31-
- `AggegateError` support
32-
- Assertion functions/methods that were parameterized by an error constructor
33-
(`makeError`, `assert`, `assert.fail`, `assert.equal`) now also accept named
34-
options `cause` and `errors` in their immediately succeeding
35-
`options` argument.
36-
- For all those, the error constructor can now be an `AggregateError`.
37-
If they do make an error instance, they encapsulate the
38-
non-uniformity of the `AggregateError` construction arguments, allowing
39-
all the error constructors to be used polymorphically
40-
(generic / interchangeable).
41-
- Adds a `GenericErrorConstructor` type to be effectively the common supertype
42-
of `ErrorConstructor` and `AggregateErrorConstructor`, for typing these
43-
error constructor parameters that handle the error constructor
44-
polymorphically.
45-
- The SES `console` now includes `error.cause` and `error.errors` in
46-
its diagnostic output for errors.

.changeset/funky-apes-fold.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@endo/compartment-mapper': major
3+
---
4+
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.
31+
- When dynamic requires are enabled via configuration, execution now takes
32+
policy into consideration when no other relationship (for example, a
33+
dependent/dependee relationship) between two Compartments exists. When policy
34+
explicitly allows access from package _A_ to _B_ and _A_ dynamically requires
35+
_B_ (via absolute path or otherwise), the operation will succeed. This can
36+
occur _if and only if_ dynamic requires are enabled _and_ a policy is
37+
provided.
38+
- Improved error messaging for policy enforcement failures.

.changeset/lazy-mammals-shake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@endo/common': minor
3+
---
4+
5+
Deprecates this package's support for the checkFoo/assertCheck pattern (`Checker`, `identChecker`) in favor of the confirm/reject pattern supported by @endo/errors/rejector.js.

0 commit comments

Comments
 (0)