@zvenigora/ng-eval-core 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,75 @@ Versions 0.1.104–0.1.107 are on npm without entries here.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## [0.9.0] - 2026-10-02
|
|
18
|
+
|
|
19
|
+
**A primitive receiver no longer skips the prototype-pollution guard —
|
|
20
|
+
[B1](../../docs/backlog-retired.md#b1).** A breaking minor. No exported symbol changes shape, but an
|
|
21
|
+
expression that read one of seven names off a string, number or boolean now throws.
|
|
22
|
+
`eval-signals` 0.2.1 and `eval-forms` 0.2.7 widen their peer ranges to admit it.
|
|
23
|
+
|
|
24
|
+
### Breaking
|
|
25
|
+
- **A string, number or boolean receiver is refused `constructor`, `__proto__`, `prototype`,
|
|
26
|
+
`__defineGetter__`, `__defineSetter__`, `__lookupGetter__` and `__lookupSetter__`**, by dot or
|
|
27
|
+
computed access, with or without `caseInsensitive`, with the error any other blocked name
|
|
28
|
+
throws: `Access to dangerous property "constructor" is blocked for security reasons`. Why: the
|
|
29
|
+
member visitor skipped the guard entirely for a primitive receiver, so `s.constructor` handed
|
|
30
|
+
back the global `String` function — callable, `s.constructor("x")` — and `s.__proto__` handed
|
|
31
|
+
back `String.prototype`, with `n.__proto__.toFixed.call(1.5, 0)` running off it. No escalation
|
|
32
|
+
past that was found (every second hop to a dangerous name was already refused, and so was every
|
|
33
|
+
write to a built-in prototype), but nothing an expression needs from a primitive goes through
|
|
34
|
+
its constructor or its prototype.
|
|
35
|
+
- **Kept readable on a primitive:** `toString`, `valueOf`, `toLocaleString`, `hasOwnProperty`,
|
|
36
|
+
`isPrototypeOf` and `propertyIsEnumerable`. They are on the blocklist for objects, but on a
|
|
37
|
+
primitive they are ordinary reads — `s.toString()`, `n.toLocaleString()`,
|
|
38
|
+
`s.hasOwnProperty("length")` work as before, as do `s.length` and `s.toUpperCase()`.
|
|
39
|
+
- **A case variant is not refused.** The names are matched exactly, and a primitive receiver is
|
|
40
|
+
never case-corrected, so under `caseInsensitive` `s.CONSTRUCTOR` is a missing property and
|
|
41
|
+
evaluates to `undefined`, as it did in 0.8.0.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [0.8.0] - 2026-10-02
|
|
46
|
+
|
|
47
|
+
**`EvalContext.getKey` resolves through `get`'s own chain —
|
|
48
|
+
[A4](../../docs/backlog-retired.md#a4) and [A10](../../docs/backlog-retired.md#a10).** A breaking
|
|
49
|
+
minor. No exported symbol changes shape — the `.d.ts` differs from 0.7.0 in documentation comments
|
|
50
|
+
only — but `getKey`'s answers change, and with them the `key` of identifier and member read events
|
|
51
|
+
and the key the write visitors assign to under `caseInsensitive`. `eval-signals` 0.2.0 and
|
|
52
|
+
`eval-forms` 0.2.6 widen their peer ranges to admit it.
|
|
53
|
+
|
|
54
|
+
### Breaking
|
|
55
|
+
- **`getKey` answers what `get` resolved, and nothing when `get` finds nothing.** It used to walk
|
|
56
|
+
its own copy of the resolution order, which disagreed with `get` in four ways; each is now
|
|
57
|
+
`get`'s answer:
|
|
58
|
+
- **A namespace is reported as the scope declares it.** With a prior scope namespaced `dog`,
|
|
59
|
+
`Dog.Says()` under `caseInsensitive` reports read keys `['dog', 'says']`, where it reported
|
|
60
|
+
`['Dog', 'says']`.
|
|
61
|
+
- **An unbound name gets no key.** With a plain-object scope pushed, `getKey` answered every
|
|
62
|
+
key as present, so a name nothing holds came back as itself; and a key held only in a source
|
|
63
|
+
`get` does not read — a wrong-case key in a case-sensitive `Registry`, a key inside a
|
|
64
|
+
non-global prior scope — came back spelled as that source holds it. All of these are now
|
|
65
|
+
`undefined`. An identifier read still reports the name as written when `getKey` answers
|
|
66
|
+
nothing.
|
|
67
|
+
- **A key only a lookup resolves is reported as written**, where `getKey` returned `undefined`
|
|
68
|
+
because it never consulted lookups. Under `caseInsensitive` the write visitors resolve their
|
|
69
|
+
target through `getKey`, so an assignment to such a key now writes, or is refused, under its
|
|
70
|
+
name: a `@zvenigora/ng-eval-signals` context's write error names `'COUNT'` rather than
|
|
71
|
+
`'undefined'`.
|
|
72
|
+
- **A spelling comes from the source that supplied the value.** Under `caseInsensitive` with a
|
|
73
|
+
case-sensitive `Registry` holding `a`, `getKey('A')` returned `'a'` while `get('A')` found
|
|
74
|
+
nothing there and went on to later sources.
|
|
75
|
+
- **A member of the context itself resolves through `getKey`'s answer.** Under `caseInsensitive`,
|
|
76
|
+
`This.COUNT` for a key only a lookup resolves, and `This.Dog` for a namespace `dog`, evaluated
|
|
77
|
+
to `undefined`: the member visitor read `get(getKey(key))`, and `getKey` answered nothing. Both
|
|
78
|
+
now resolve.
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
- `getKey`'s JSDoc states its answers, and two sentences in `getFromScopes` / `scopeHolding` that
|
|
82
|
+
described `getKey`'s drift are corrected. Those are the whole `.d.ts` difference from 0.7.0.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
17
86
|
## [0.7.0] - 2026-10-01
|
|
18
87
|
|
|
19
88
|
**Errors keep their identity, `thisArg` is applied, and three silent outcomes now throw —
|