@adobe-commerce/aio-toolkit 1.1.0 → 1.1.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +107 -1
  3. package/package.json +6 -33
package/CHANGELOG.md CHANGED
@@ -5,6 +5,48 @@ 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.1.1] - 2026-03-28
9
+
10
+ ### 🐛 Bug Fixes
11
+
12
+ - **Fixed `ERESOLVE` installation failures introduced in v1.1.0**
13
+ - `v1.1.0` moved `cloudevents`, `dotenv`, `node-fetch`, and `openwhisk` to `peerDependencies` to avoid duplicate module installs
14
+ - This caused hard `ERESOLVE` errors for any client that had one of those packages installed at a different major version (e.g. `cloudevents@4.x` vs the required `>=8.0.0`)
15
+ - Root cause: `peerDependenciesMeta.optional: true` only suppresses the "not installed" warning — it does **not** suppress `ERESOLVE` when the package IS installed at an incompatible version
16
+ - Fix: moved these four packages back to `dependencies` where they belong
17
+
18
+ ### 🔧 Dependency Changes
19
+
20
+ | Package | v1.1.0 | v1.1.1 | Reason |
21
+ |---|---|---|---|
22
+ | `cloudevents` | `peerDependencies` (optional) | `dependencies` | Clients have v4.x — incompatible with `>=8.0.0` range; duplicate copies harmless (stateless) |
23
+ | `dotenv` | `peerDependencies` (optional) | `dependencies` | Stateless — just sets `process.env`; two copies are harmless |
24
+ | `node-fetch` | `peerDependencies` (optional) | `dependencies` | Stateless HTTP function — no singleton, no shared state |
25
+ | `openwhisk` | `peerDependencies` (optional) | `dependencies` | Creates client instances per call — no global singleton |
26
+
27
+ ### 📝 Peer Dependency Philosophy
28
+
29
+ Only packages that maintain **shared singleton state** between the toolkit and the client application belong in `peerDependencies`. Stateless utilities where duplicate copies are functionally harmless must stay in `dependencies` to avoid blocking installation.
30
+
31
+ Packages that remain in `peerDependencies` as **required** peers (all five are unconditionally imported at package load time):
32
+
33
+ | Package | Why it must be a peer dep |
34
+ |---|---|
35
+ | `@adobe/aio-sdk` | Singleton services — logger, config, state shared across the app |
36
+ | `graphql` | Schema registry singleton — two copies cause `instanceof` and type failures |
37
+ | `@adobe/aio-lib-ims` | Token cache and auth context must be a single shared instance |
38
+ | `@adobe/aio-lib-telemetry` | Single telemetry pipeline — two copies split traces and logs |
39
+ | `@opentelemetry/resources` | Resource object tied to the telemetry pipeline instance |
40
+
41
+ ### 💡 Migration Guide
42
+
43
+ ```bash
44
+ # Upgrade from v1.1.0 — no code changes required
45
+ npm install @adobe-commerce/aio-toolkit@1.1.1
46
+ ```
47
+
48
+ ---
49
+
8
50
  ## [1.1.0] - 2026-03-27
9
51
 
10
52
  ### ⚠️ Breaking Changes
package/README.md CHANGED
@@ -7,9 +7,16 @@ A comprehensive TypeScript toolkit for Adobe App Builder applications providing
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install @adobe-commerce/aio-toolkit
10
+ npm install @adobe-commerce/aio-toolkit \
11
+ @adobe/aio-sdk \
12
+ @adobe/aio-lib-ims \
13
+ @adobe/aio-lib-telemetry \
14
+ @opentelemetry/resources \
15
+ graphql
11
16
  ```
12
17
 
18
+ > **App Builder projects** already include `@adobe/aio-sdk`, `@adobe/aio-lib-ims`, and `graphql` — you only need to add the missing ones. See [Dependency Resolution](#dependency-resolution) for details.
19
+
13
20
  ## Usage
14
21
 
15
22
  The toolkit is organized into five main modules:
@@ -1744,6 +1751,105 @@ COMMERCE_ACCESS_TOKEN=commerce-access-token
1744
1751
  COMMERCE_ACCESS_TOKEN_SECRET=commerce-access-token-secret
1745
1752
  ```
1746
1753
 
1754
+ ## Dependency Resolution
1755
+
1756
+ This toolkit carefully manages its dependency tree to avoid conflicts with packages already installed in your App Builder project.
1757
+
1758
+ ### How dependencies are split
1759
+
1760
+ #### `dependencies` — bundled with the toolkit
1761
+
1762
+ Packages installed directly by the toolkit that are either unique to it, or are stateless utilities where having two copies causes no functional harm:
1763
+
1764
+ | Package | Reason |
1765
+ |---|---|
1766
+ | `@adobe-commerce/aio-services-kit` | Companion package — not used by client projects directly |
1767
+ | `cloudevents` | Stateless event constructor — duplicate copies are harmless |
1768
+ | `dotenv` | Stateless — only sets `process.env`; two copies are harmless |
1769
+ | `got` | Internal HTTP client for Commerce API — not exposed externally |
1770
+ | `node-fetch` | Stateless HTTP function — no shared state |
1771
+ | `oauth-1.0a` | Internal OAuth 1.0a request signing — not exposed externally |
1772
+ | `openwhisk` | Creates client instances per call — no global singleton |
1773
+ | `uuid` | Pure stateless function — no conflict possible |
1774
+ | `yaml` | Stateless YAML parser — no shared state |
1775
+
1776
+ #### `peerDependencies` — must use your project's copy
1777
+
1778
+ Packages that maintain **singleton state or shared registries** — if two copies exist (one in the toolkit, one in your project), they behave as separate instances which breaks shared behaviour:
1779
+
1780
+ | Package | Why it must be shared |
1781
+ |---|---|
1782
+ | `@adobe/aio-sdk` | Singleton services — logger, config, state are shared across the app |
1783
+ | `graphql` | Schema registry is a singleton — `instanceof GraphQLSchema` and type checks fail with two copies |
1784
+ | `@adobe/aio-lib-ims` | Token cache and auth context must be the same shared instance |
1785
+ | `@adobe/aio-lib-telemetry` | Single telemetry pipeline — two copies split traces and logs |
1786
+ | `@opentelemetry/resources` | Resource object tied to the telemetry pipeline instance |
1787
+
1788
+ All five are **required** — they are unconditionally imported when the package loads (`export * from './framework'` and `export * from './commerce'` in the root `index.ts`). If any is missing, the entire package will fail to load with a `Cannot find module` error.
1789
+
1790
+ ### Installing peer dependencies
1791
+
1792
+ Install the toolkit and all required peer dependencies in one command:
1793
+
1794
+ ```bash
1795
+ npm install @adobe-commerce/aio-toolkit \
1796
+ @adobe/aio-sdk \
1797
+ @adobe/aio-lib-ims \
1798
+ @adobe/aio-lib-telemetry \
1799
+ @opentelemetry/resources \
1800
+ graphql
1801
+ ```
1802
+
1803
+ Or individually if you prefer to control versions:
1804
+
1805
+ ```bash
1806
+ npm install @adobe-commerce/aio-toolkit
1807
+
1808
+ # Required peer dependencies
1809
+ npm install @adobe/aio-sdk@^5.0.0
1810
+ npm install @adobe/aio-lib-ims@^7.0.0
1811
+ npm install @adobe/aio-lib-telemetry@^1.0.0
1812
+ npm install @opentelemetry/resources@^2.0.0
1813
+ npm install graphql@^16.0.0
1814
+ ```
1815
+
1816
+ > **Note for App Builder projects:** `@adobe/aio-sdk`, `graphql`, and `@adobe/aio-lib-ims` are almost always already present in a standard App Builder project. Run `npm list @adobe/aio-sdk graphql @adobe/aio-lib-ims` to check before installing.
1817
+
1818
+ ### Resolving `ERESOLVE` errors
1819
+
1820
+ If you see an `ERESOLVE` error when installing, it means one of the required peer dependencies is installed in your project at a version outside the supported range.
1821
+
1822
+ **Check which peer dep is conflicting:**
1823
+
1824
+ ```bash
1825
+ npm install @adobe-commerce/aio-toolkit 2>&1 | grep "Found:"
1826
+ ```
1827
+
1828
+ **Upgrade the conflicting package to a compatible version:**
1829
+
1830
+ ```bash
1831
+ # @adobe/aio-sdk must be >=5.0.0
1832
+ npm install @adobe/aio-sdk@latest
1833
+
1834
+ # graphql must be >=14.0.0
1835
+ npm install graphql@latest
1836
+
1837
+ # @adobe/aio-lib-ims must be >=7.0.0
1838
+ npm install @adobe/aio-lib-ims@latest
1839
+
1840
+ # @adobe/aio-lib-telemetry must be >=1.0.0
1841
+ npm install @adobe/aio-lib-telemetry@latest
1842
+
1843
+ # @opentelemetry/resources must be >=2.0.0
1844
+ npm install @opentelemetry/resources@latest
1845
+ ```
1846
+
1847
+ If upgrading is not immediately possible, you can bypass the check with `--legacy-peer-deps` (not recommended for production):
1848
+
1849
+ ```bash
1850
+ npm install @adobe-commerce/aio-toolkit --legacy-peer-deps
1851
+ ```
1852
+
1747
1853
  ## License
1748
1854
 
1749
1855
  See the LICENSE file (in package) for license rights and limitations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe-commerce/aio-toolkit",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A comprehensive TypeScript toolkit for Adobe App Builder applications providing standardized Adobe Commerce integrations, I/O Events orchestration, file storage utilities, authentication helpers, and robust backend development tools with 100% test coverage.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -60,8 +60,12 @@
60
60
  "license": "SEE LICENSE IN LICENSE",
61
61
  "dependencies": {
62
62
  "@adobe-commerce/aio-services-kit": "^1.0.0",
63
+ "cloudevents": "^8.0.2",
64
+ "dotenv": "^17.3.1",
63
65
  "got": "^11.8.6",
66
+ "node-fetch": "^2.7.0",
64
67
  "oauth-1.0a": "^2.2.6",
68
+ "openwhisk": "^3.21.8",
65
69
  "uuid": "^10.0.0",
66
70
  "yaml": "^2.0.0"
67
71
  },
@@ -85,8 +89,6 @@
85
89
  "@types/uuid": "^10.0.0",
86
90
  "@typescript-eslint/eslint-plugin": "^6.13.0",
87
91
  "@typescript-eslint/parser": "^6.13.0",
88
- "cloudevents": "^8.0.2",
89
- "dotenv": "^17.3.1",
90
92
  "eslint": "^8.55.0",
91
93
  "eslint-config-prettier": "^9.1.0",
92
94
  "eslint-plugin-prettier": "^5.0.1",
@@ -94,8 +96,6 @@
94
96
  "husky": "^9.1.7",
95
97
  "jest": "^30.1.3",
96
98
  "lint-staged": "^16.1.6",
97
- "node-fetch": "^2.7.0",
98
- "openwhisk": "^3.21.8",
99
99
  "prettier": "^3.1.0",
100
100
  "ts-jest": "^29.4.1",
101
101
  "tsup": "^8.5.0",
@@ -106,36 +106,9 @@
106
106
  "@adobe/aio-lib-telemetry": ">=1.0.0",
107
107
  "@adobe/aio-sdk": ">=5.0.0",
108
108
  "@opentelemetry/resources": ">=2.0.0",
109
- "cloudevents": ">=8.0.0",
110
- "dotenv": ">=16.0.0",
111
- "graphql": ">=16.0.0",
112
- "node-fetch": ">=2.6.0",
113
- "openwhisk": ">=3.0.0",
109
+ "graphql": ">=14.0.0",
114
110
  "typescript": ">=4.9.0"
115
111
  },
116
- "peerDependenciesMeta": {
117
- "@adobe/aio-lib-ims": {
118
- "optional": true
119
- },
120
- "@adobe/aio-lib-telemetry": {
121
- "optional": true
122
- },
123
- "@opentelemetry/resources": {
124
- "optional": true
125
- },
126
- "cloudevents": {
127
- "optional": true
128
- },
129
- "dotenv": {
130
- "optional": true
131
- },
132
- "node-fetch": {
133
- "optional": true
134
- },
135
- "openwhisk": {
136
- "optional": true
137
- }
138
- },
139
112
  "engines": {
140
113
  "node": ">=18.0.0"
141
114
  },