@adobe-commerce/aio-toolkit 1.0.18 → 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.
- package/CHANGELOG.md +105 -0
- package/README.md +107 -1
- package/dist/aio-toolkit-onboard-events/bin/cli.js +1 -7445
- package/dist/aio-toolkit-onboard-events/bin/cli.js.map +1 -1
- package/dist/index.js +2 -558
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -558
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,111 @@ 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
|
+
|
|
50
|
+
## [1.1.0] - 2026-03-27
|
|
51
|
+
|
|
52
|
+
### ⚠️ Breaking Changes
|
|
53
|
+
|
|
54
|
+
- **Peer dependency restructuring to resolve duplicate module conflicts**
|
|
55
|
+
- The following packages have been moved from `dependencies` to `peerDependencies`:
|
|
56
|
+
- `@adobe/aio-sdk` (>=5.0.0) — required peer
|
|
57
|
+
- `graphql` (>=16.0.0) — required peer
|
|
58
|
+
- `@adobe/aio-lib-ims` (>=7.0.0) — optional peer
|
|
59
|
+
- `@adobe/aio-lib-telemetry` (>=1.0.0) — optional peer
|
|
60
|
+
- `cloudevents` (>=8.0.0) — optional peer
|
|
61
|
+
- `dotenv` (>=16.0.0) — optional peer
|
|
62
|
+
- `node-fetch` (>=2.6.0) — optional peer
|
|
63
|
+
- `openwhisk` (>=3.0.0) — optional peer
|
|
64
|
+
- `@opentelemetry/resources` (>=1.0.0) — optional peer
|
|
65
|
+
- App Builder projects already have these packages installed — no additional installs required for the vast majority of users
|
|
66
|
+
- If you get `Cannot find module` errors after upgrading, install the missing package directly in your project
|
|
67
|
+
|
|
68
|
+
### 🐛 Bug Fixes
|
|
69
|
+
|
|
70
|
+
- **Fixed missing `yaml` dependency**
|
|
71
|
+
- `yaml` was used at runtime in `OnboardConfig` (YAML config file parsing) but was not declared in `package.json`
|
|
72
|
+
- This was relying on a transitive install which is fragile and unreliable across package managers
|
|
73
|
+
- `yaml: ^2.0.0` is now a proper direct `dependency`
|
|
74
|
+
|
|
75
|
+
### 🔧 Dependency Changes
|
|
76
|
+
|
|
77
|
+
| Package | Before | After | Reason |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| `@adobe/aio-sdk` | `dependencies` | `peerDependencies` | Singleton services break with duplicate instances |
|
|
80
|
+
| `@adobe/aio-lib-ims` | `dependencies` | `peerDependencies` (optional) | Shared auth token context |
|
|
81
|
+
| `@adobe/aio-lib-telemetry` | `dependencies` | `peerDependencies` (optional) | Shared telemetry pipeline |
|
|
82
|
+
| `graphql` | `dependencies` | `peerDependencies` | Schema singleton — two copies cause type incompatibility |
|
|
83
|
+
| `cloudevents` | `dependencies` | `peerDependencies` (optional) | App Builder I/O Events projects always install this |
|
|
84
|
+
| `dotenv` | `dependencies` | `peerDependencies` (optional) | Every App Builder project loads `.env` files |
|
|
85
|
+
| `node-fetch` | `dependencies` | `peerDependencies` (optional) | Common fetch polyfill; v2/v3 split causes conflicts |
|
|
86
|
+
| `openwhisk` | `dependencies` | `peerDependencies` (optional) | App Builder Runtime projects always install this |
|
|
87
|
+
| `@opentelemetry/resources` | *(missing)* | `peerDependencies` (optional) | Runtime import in telemetry code; provided by `aio-lib-telemetry` |
|
|
88
|
+
| `yaml` | *(missing)* | `dependencies` | Runtime import in `OnboardConfig` — was undeclared |
|
|
89
|
+
| `got` | `dependencies` | `dependencies` | Internal HTTP client — kept as direct dep |
|
|
90
|
+
| `oauth-1.0a` | `dependencies` | `dependencies` | Internal OAuth signing — kept as direct dep |
|
|
91
|
+
| `uuid` | `dependencies` | `dependencies` | Stateless, no conflict risk — kept as direct dep |
|
|
92
|
+
|
|
93
|
+
### 💡 Migration Guide
|
|
94
|
+
|
|
95
|
+
Most App Builder projects already have all moved packages installed and **require no changes**:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Standard upgrade — works for most users
|
|
99
|
+
npm install @adobe-commerce/aio-toolkit@1.1.0
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If you encounter `Cannot find module` errors for any of the optional peer dependencies, install them explicitly:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Install only the ones you use
|
|
106
|
+
npm install @adobe/aio-sdk graphql dotenv
|
|
107
|
+
npm install cloudevents node-fetch openwhisk # if used
|
|
108
|
+
npm install @adobe/aio-lib-ims @adobe/aio-lib-telemetry # if used
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
8
113
|
## [1.0.18] - 2026-03-03
|
|
9
114
|
|
|
10
115
|
### 🔒 Security Fixes
|
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.
|