Skip to content

v4.0.0

Choose a tag to compare

@JoernBerkefeld JoernBerkefeld released this 17 Aug 13:42
· 6 commits to main since this release

Breaking Changes

  • Major internal restructuring. The monolithic 7,237-line src/index.js has been split into small, per-category modules, with src/index.js reduced to a thin re-export barrel. The public API is unchanged — all 17 named exports (FUNCTIONS, CANONICAL_FUNCTIONS, functionLookup, AMPSCRIPT_KEYWORDS, VERIFICATION_BLOCKED_REASONS, the MCN/email helpers, etc.) resolve identically. Released as a major version because it is a large rewrite of the internal file layout; consumers importing by package name or named export need no changes.
  • FUNCTIONS array order is now reassembled to match the original source order via src/functions/index.js; lookups are by name, so no consumer relying on the public contract is affected.

Features

  • Split FUNCTIONS into 14 per-category files under src/functions/ (content.js, data-extension.js, utility.js, string.js, encryption-encoding.js, date-time.js, marketing-cloud-api.js, microsoft-dynamics.js, mobileconnect.js, math.js, http.js, sales-service-cloud.js, social.js, einstein-email-recs.js) plus a functions/index.js concatenator.
  • Extracted language surface into keywords.js, operators.js, globals.js, and personalization.js.
  • Extracted shared enums into constants.js and all derived lookups / MCN + email helpers into derived.js.
  • Every file is now well under the grep-truncation threshold (largest ~1,120 lines), so grep / ripgrep search the source reliably again.

Chores

  • Added tests/catalog.test.mjs with permanent catalog invariants (required attributes, valid categories, unique names, lookup completeness, helper behaviour) and wired a node --test test script.

Full Changelog: v3.7.0...v4.0.0