v4.0.0
Breaking Changes
- Major internal restructuring. The monolithic 7,237-line
src/index.jshas been split into small, per-category modules, withsrc/index.jsreduced 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. FUNCTIONSarray order is now reassembled to match the original source order viasrc/functions/index.js; lookups are by name, so no consumer relying on the public contract is affected.
Features
- Split
FUNCTIONSinto 14 per-category files undersrc/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 afunctions/index.jsconcatenator. - Extracted language surface into
keywords.js,operators.js,globals.js, andpersonalization.js. - Extracted shared enums into
constants.jsand all derived lookups / MCN + email helpers intoderived.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.mjswith permanent catalog invariants (required attributes, valid categories, unique names, lookup completeness, helper behaviour) and wired anode --testtestscript.
Full Changelog: v3.7.0...v4.0.0