cdk-real-drift 0.4.11 → 0.4.12
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/dist/cli.js +16 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9992,13 +9992,25 @@ function carryForwardUnreadable(recorded, existing, findings) {
|
|
|
9992
9992
|
/**
|
|
9993
9993
|
* The single source of truth for "is this baseline value equal to the current
|
|
9994
9994
|
* value?". `applyBaseline` (suppress vs surface) and `splitRecordedByBaseline`
|
|
9995
|
-
* (unchanged vs changed) MUST share this exact predicate.
|
|
9995
|
+
* (unchanged vs changed) MUST share this exact predicate. BOTH sides are
|
|
9996
9996
|
* re-canonicalized through the CURRENT pipeline so a baseline written under older
|
|
9997
|
-
* normalization rules still matches today's canonical live value (R6)
|
|
9998
|
-
*
|
|
9997
|
+
* normalization rules still matches today's canonical live value (R6).
|
|
9998
|
+
*
|
|
9999
|
+
* #807: canonicalize the CURRENT side too, not just the baseline side. The caller's
|
|
10000
|
+
* `currentCanonicalValue` is only canonical at the OUTER value — a free-form-map
|
|
10001
|
+
* ENTRY (a Lambda env var, a Glue `Parameters` value, a Docker label) whose value is
|
|
10002
|
+
* a JSON- or policy-shaped STRING keeps its ancestry-lost RAW string. Canonicalizing
|
|
10003
|
+
* just the baseline side then policy-parses / JSON-minifies / key-sorts that bare
|
|
10004
|
+
* string on the recorded side while the live side stays raw, so `deepEqual` is false
|
|
10005
|
+
* forever — the predicate is not reflexive (`baselineValueMatches(v, v)` is false)
|
|
10006
|
+
* and a re-record never converges. Running the SAME `canonicalizeForCompare` on both
|
|
10007
|
+
* sides restores reflexivity for the whole free-form-string class (and composes
|
|
10008
|
+
* cleanly with #767's identity-sort case). Idempotency of the pipeline means an
|
|
10009
|
+
* already-canonical live value is unchanged, so this never weakens real change
|
|
10010
|
+
* detection: two values that differ after canonicalization still compare unequal.
|
|
9999
10011
|
*/
|
|
10000
10012
|
function baselineValueMatches(baselineValue, currentCanonicalValue) {
|
|
10001
|
-
return deepEqual(canonicalizeForCompare(baselineValue), currentCanonicalValue);
|
|
10013
|
+
return deepEqual(canonicalizeForCompare(baselineValue), canonicalizeForCompare(currentCanonicalValue));
|
|
10002
10014
|
}
|
|
10003
10015
|
const DELTA_IDENTITY_FIELDS = [
|
|
10004
10016
|
"Key",
|