@adobe-commerce/aio-toolkit 1.0.9 → 1.0.11

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
@@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.11] - 2026-01-04
9
+
10
+ ### 🐛 Bug Fixes
11
+
12
+ - **fix(telemetry):** Revert lazy-loading pattern from v1.0.10 that caused missing logs in New Relic
13
+ - Lazy-loaded logger proxy was causing race conditions where early logs used fallback Core.Logger
14
+ - Logs (`-started`, `-headers`, `-body`) were not being sent to OpenTelemetry/New Relic
15
+ - Only late logs (like `-completed`) appeared because telemetry logger loaded after initial execution
16
+ - Reverted to synchronous imports for `@adobe/aio-lib-telemetry` and `NewRelicTelemetry`
17
+ - Ensures telemetry logger is immediately available and properly connected to trace context
18
+
19
+ - **fix(telemetry):** Add automatic postinstall script to fix @adobe/aio-lib-telemetry exports bug
20
+ - **Problem**: `@adobe/aio-lib-telemetry@1.1.2` has incorrect exports configuration causing `ERR_PACKAGE_PATH_NOT_EXPORTED` error
21
+ - **Root Cause**: Package uses `"import"` instead of `"default"` in both import and require conditions
22
+ - **Solution**: Custom postinstall script (`scripts/postinstall.js`) automatically patches the telemetry package.json
23
+ - **Impact**: Zero configuration required by client projects - patch applies automatically during npm install
24
+ - **Compatibility**: Works with both CommonJS (require) and ESM (import) in TypeScript and JavaScript projects
25
+ - Added `@adobe/aio-lib-telemetry`, `@adobe/aio-lib-ims` to tsup external dependencies to prevent bundling
26
+ - Postinstall script runs automatically when toolkit is installed as a dependency
27
+ - Gracefully handles cases where telemetry package is not present
28
+ - No breaking changes - completely transparent to end users
29
+
30
+ ### 📝 Technical Details
31
+
32
+ - Reverted changes from release v1.0.10 (commit d8229f7)
33
+ - Restored synchronous telemetry initialization pattern from v1.0.9
34
+ - All telemetry-related imports are now synchronous to prevent race conditions
35
+ - Added `scripts/postinstall.js` to automatically fix third-party package exports bug
36
+ - Updated `tsup.config.ts` to externalize Adobe SDK packages instead of bundling
37
+ - Postinstall script detects and patches telemetry package in client project's node_modules
38
+
39
+ ## [1.0.10] - 2026-01-01
40
+
41
+ ### 🐛 Bug Fixes
42
+
43
+ - **fix(telemetry):** Resolve ERR_PACKAGE_PATH_NOT_EXPORTED error with lazy-loading pattern
44
+ - **Note:** This version introduced a regression with missing logs in New Relic
45
+ - **Recommendation:** Skip this version and use v1.0.11 instead
46
+
8
47
  ## [1.0.9] - 2025-12-23
9
48
 
10
49
  ### ⚠️ Deprecations
package/dist/index.js CHANGED
@@ -190,7 +190,7 @@ var init_global_utils = __esm({
190
190
  init_version();
191
191
  init_semver();
192
192
  major = VERSION.split(".")[0];
193
- GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
193
+ GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for("opentelemetry.js.api." + major);
194
194
  _global = _globalThis;
195
195
  __name(registerGlobal, "registerGlobal");
196
196
  __name(getGlobal, "getGlobal");