diff --git a/.changeset/loud-pumas-yell.md b/.changeset/loud-pumas-yell.md deleted file mode 100644 index 205df2b..0000000 --- a/.changeset/loud-pumas-yell.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@stackmade/gtm-as-code": patch ---- - -Fixes `deepEqual` (used by `plan`/`drift`/`apply` to detect changes) reporting a permanent phantom -`update` on any GTM resource whose config never sets an optional field: Zod materializes an -optional key with value `undefined` on the desired side, the remote payload (from `fromGtmPayload`) -never carries that key at all, and `deepEqual`'s key-count comparison treated the two as different -objects forever — discovered adopting a real container where every `gtm.variables`/`gtm.triggers` -entry without a `folder` showed `~ update` with no visible field diff (`printFieldDiff`'s -`JSON.stringify`-based comparison already treated the two as equal, so the mismatch was silent). -`deepEqual` now ignores keys whose value is `undefined` on either side before comparing key counts. diff --git a/CHANGELOG.md b/CHANGELOG.md index 362a780..0da5262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # @stackmade/gtm-as-code +## 0.8.1 + +### Patch Changes + +- 302c04d: Fixes `deepEqual` (used by `plan`/`drift`/`apply` to detect changes) reporting a permanent phantom + `update` on any GTM resource whose config never sets an optional field: Zod materializes an + optional key with value `undefined` on the desired side, the remote payload (from `fromGtmPayload`) + never carries that key at all, and `deepEqual`'s key-count comparison treated the two as different + objects forever — discovered adopting a real container where every `gtm.variables`/`gtm.triggers` + entry without a `folder` showed `~ update` with no visible field diff (`printFieldDiff`'s + `JSON.stringify`-based comparison already treated the two as equal, so the mismatch was silent). + `deepEqual` now ignores keys whose value is `undefined` on either side before comparing key counts. + ## 0.8.0 ### Minor Changes diff --git a/package.json b/package.json index 06c8de3..730e397 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stackmade/gtm-as-code", - "version": "0.8.0", + "version": "0.8.1", "description": "GTM & GA4 as code — define Google Tag Manager and Analytics 4 config in YAML, plan/apply like Terraform.", "license": "MIT", "type": "module",