dsh-session-ops 0.1.4 → 0.2.0

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/README.md CHANGED
@@ -107,11 +107,15 @@ import { projectKey, readSessionHeader, hasZstd } from 'dsh-session-ops/store'
107
107
  ## Development
108
108
 
109
109
  ```bash
110
- npm test # node --test: all use cases from both halves plus lib/store
110
+ npm run build # host tsc (src/ -> lib/, lib/types/), client tsc (client/ -> .client-build/),
111
+ # then scripts/build-client.mts emits the browser bundle to lib/client.js
112
+ npm test # build, then node --test on test/**/*.test.ts (Node >= 24 runs TS natively)
111
113
  ```
112
114
 
113
- `lib/` is hand-written source, not build output; `lib/client.js` is an IIFE for the browser classic
114
- script loader and can be validated with `node --check`.
115
+ All hand-written code is TypeScript now: host code in `src/`, the browser half in `client/`
116
+ (a plain classic-script IIFE for `window.__ModuleLoader__`, so it is emitted as one file rather
117
+ than bundled). `lib/**/*.js` and `lib/types/` are build output committed with the repo (so a
118
+ checkout/profile install works without a build); `test/*.ts` is run directly by Node, never emitted.
115
119
 
116
120
  ## License
117
121
 
package/README.zh.md CHANGED
@@ -100,11 +100,15 @@ import { projectKey, readSessionHeader, hasZstd } from 'dsh-session-ops/store'
100
100
  ## 开发
101
101
 
102
102
  ```bash
103
- npm test # node --test:两个半边全部用例 + lib/store 用例
103
+ npm run build # 宿主 tsc(src/ -> lib/、lib/types/)、浏览器 tsc(client/ -> .client-build/),
104
+ # 再由 scripts/build-client.mts 产出 lib/client.js
105
+ npm test # 先 build,再用 node --test 跑 test/**/*.test.ts(Node ≥24 原生执行 TS)
104
106
  ```
105
107
 
106
- `lib/` 是手写源码,不走构建;`lib/client.js` 是给浏览器经典脚本加载器用的 IIFE,
107
- 直接用 `node --check` 即可校验。
108
+ 手写代码现在全是 TypeScript:宿主在 `src/`,浏览器半边在 `client/`(给
109
+ `window.__ModuleLoader__` 用的经典脚本 IIFE,按单文件发射、不打包)。
110
+ `lib/**/*.js` 与 `lib/types/` 是随仓库入库的构建产物(checkout / profile 安装不先 build 也能用);
111
+ `test/*.ts` 由 Node 直接执行,不参与发射。
108
112
 
109
113
  ## License
110
114