@alia.onl/server 1.0.0 → 1.0.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 +25 -0
- package/package.json +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @alia.onl/server
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### A CommonJS consumer can compile against it
|
|
6
|
+
|
|
7
|
+
1.0.0 was unusable from the consumer it was written for. Its `exports["."]`
|
|
8
|
+
carried ONE `types` entry for both conditions, pointing at `dist/index.d.ts` —
|
|
9
|
+
and in a `"type": "module"` package that is an ES module declaration, so a
|
|
10
|
+
consumer whose tsconfig says `module: Node16` got **TS1479**: *"the referenced
|
|
11
|
+
file is an ECMAScript module and cannot be imported with `require`"*.
|
|
12
|
+
|
|
13
|
+
The runtime was fine the whole time. Node read `require` → `dist/index.cjs` and
|
|
14
|
+
never looked at the types, which is why this package's own typecheck, tests and
|
|
15
|
+
build all passed, and why every bundler-based consumer would have been fine too.
|
|
16
|
+
The first backend to try it could not compile.
|
|
17
|
+
|
|
18
|
+
Each condition now carries its own `types` — `.d.ts` for `import`, `.d.cts` for
|
|
19
|
+
`require` — and `scripts/check-entrypoints.mjs` runs in CI: it asserts the
|
|
20
|
+
shipped shape, loads both entry points, and compiles a real CommonJS `node16`
|
|
21
|
+
consumer against a real `node_modules` layout. (Against a `paths` alias it
|
|
22
|
+
compiled the broken shape clean, because TypeScript applies an `exports` map
|
|
23
|
+
only when it resolves through `node_modules` — so that probe proved nothing and
|
|
24
|
+
was replaced.)
|
|
25
|
+
|
|
26
|
+
No API change.
|
|
27
|
+
|
|
3
28
|
## 1.0.0
|
|
4
29
|
|
|
5
30
|
### A server-side client, so no consumer hand-parses Alia's stream again
|
package/package.json
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alia.onl/server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Alia's server-side streaming client — one typed event stream for a backend that calls Alia's product API",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.cjs",
|
|
9
9
|
"module": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.
|
|
10
|
+
"types": "./dist/index.d.cts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/index.d.cts",
|
|
19
|
+
"default": "./dist/index.cjs"
|
|
20
|
+
}
|
|
16
21
|
},
|
|
17
22
|
"./package.json": "./package.json"
|
|
18
23
|
},
|
|
@@ -32,6 +37,7 @@
|
|
|
32
37
|
"build": "tsup",
|
|
33
38
|
"prepublishOnly": "bun run build",
|
|
34
39
|
"typecheck": "tsc --noEmit",
|
|
40
|
+
"check:entrypoints": "node scripts/check-entrypoints.mjs",
|
|
35
41
|
"test": "vitest run"
|
|
36
42
|
},
|
|
37
43
|
"keywords": [
|