@oneaddress/partner-sdk 1.6.2 → 1.6.3
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 +42 -0
- package/package.json +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.6.3] - 2026-08-21
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **A CommonJS TypeScript project could not resolve the types at all.** Found
|
|
15
|
+
by scaffolding `npx @oneaddress/setup`'s own `ts-node` template and running
|
|
16
|
+
`tsc` on what it produced:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
src/server.ts(32,8): error TS1479: The current file is a CommonJS module
|
|
20
|
+
whose imports will produce 'require' calls; however, the referenced file is
|
|
21
|
+
an ECMAScript module and cannot be imported with 'require'.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The cause was the SHAPE of the exports map, not a missing file. `types` sat
|
|
25
|
+
at the top of the `"."` condition pointing at `index.d.mts`, so a `require`
|
|
26
|
+
consumer matched the runtime on `index.js` (correct, CommonJS) and the types
|
|
27
|
+
on `index.d.mts` (ESM). **`dist/index.d.ts` was being built and published the
|
|
28
|
+
whole time and was simply unreachable.** Conditions now nest, with `types`
|
|
29
|
+
inside `import` and `require`, one declaration file per format.
|
|
30
|
+
|
|
31
|
+
Runtime was never affected: `require('@oneaddress/partner-sdk')` returned all
|
|
32
|
+
34 exports before this change and returns them after. Only type resolution
|
|
33
|
+
was broken, which is why it survived — and our own setup wizard emits a
|
|
34
|
+
CommonJS project, so the scaffolded happy path produced the one configuration
|
|
35
|
+
that fails.
|
|
36
|
+
|
|
37
|
+
Note TS1479's own suggested remedies make it worse here. "Use a dynamic
|
|
38
|
+
`import()`" and "add `type: module`" are advice for a package that is
|
|
39
|
+
genuinely ESM-only, and this one is dual-format.
|
|
40
|
+
|
|
41
|
+
**This is the second time the published declarations have been unusable to
|
|
42
|
+
TypeScript partners while every runtime path worked** (the first was
|
|
43
|
+
`TS2307` on unresolved workspace re-exports, 27 Jul 2026). Both were
|
|
44
|
+
invisible from inside the monorepo, where every test imports from source and
|
|
45
|
+
both apps are ESM. `src/dist-exports.test.ts` now compiles a real CommonJS
|
|
46
|
+
consumer and a real ESM consumer against the built artifacts, rather than
|
|
47
|
+
asserting on the shape of the JSON — the resolution rules connecting an
|
|
48
|
+
exports map to "a partner can type-check" are precisely the part that was got
|
|
49
|
+
wrong. Mutation-checked: restoring the old map reproduces TS1479 on the
|
|
50
|
+
CommonJS case and leaves the ESM case green.
|
|
51
|
+
|
|
10
52
|
## [1.6.2] - 2026-08-21
|
|
11
53
|
|
|
12
54
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneaddress/partner-sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Official OneAddress partner integration SDK — webhook verification, address decryption (legacy + D5 session-envelope), LOA validation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
12
17
|
},
|
|
13
18
|
"./edge": {
|
|
14
|
-
"
|
|
15
|
-
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/edge.d.mts",
|
|
21
|
+
"default": "./dist/edge.mjs"
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
},
|
|
18
25
|
"files": [
|