@fffangchenghao/dsh-web-search 0.13.4 → 0.13.6

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.6
4
+
5
+ ### Fixed
6
+ - **The browser half registered under the old nickname.** The Host matches a
7
+ client bundle by package name, so `__ModuleLoader__.load({ id:
8
+ 'dsh-web-search-bing' })` was rejected with "loaded without registering
9
+ @fffangchenghao/dsh-web-search via __ModuleLoader__.load" and the Settings
10
+ page never appeared. The id is the package name now, and a test evaluates the
11
+ bundle against a stub loader and fails if the two ever diverge.
12
+
13
+ ## 0.13.5
14
+
15
+ ### Documentation
16
+ - The READMEs no longer repeat an exact test count, for the same reason they no
17
+ longer repeat a version number: every added test made the sentence false.
18
+
3
19
  ## 0.13.4
4
20
 
5
21
  ### Fixed
package/README.md CHANGED
@@ -853,14 +853,14 @@ Resolution order: the `proxy` setting → the environment (`DSH_WEB_SEARCH_PROXY
853
853
  ### Development and tests
854
854
 
855
855
  ```sh
856
- node --test test/*.test.ts # the offline suite (349 tests, one live case skipped by default)
856
+ node --test test/*.test.ts # the whole offline suite (one live case is skipped by default)
857
857
  node --test test/proxy.test.ts # one file
858
858
  npm run typecheck # tsc --noEmit
859
859
  npm run build # compile src/ to lib/
860
860
  npm run check # typecheck + tests
861
861
  ```
862
862
 
863
- The suite runs offline by default, 349 tests, 348 passing — the 349th is the live paging check, skipped unless `READ_PAGE_LIVE=1`: parser tests replay captured fixtures from `test/fixtures/` (normal and empty responses for all eight dedicated sources), transport tests open no sockets, proxy tests cover `parseProxy`, `proxyFromEnv` and the pure response framer, time-window tests pin the date with an injected `now`, and the newer suites cover Markdown extraction (`markdown.test.ts`), batch search (`search-many.test.ts`), chunked reading (`read-page.test.ts`), the disk snapshot (`cache-persist.test.ts`), optional JS rendering (`render-js.test.ts`) and benchmark scoring/replay (`bench-metrics.test.ts`, `bench-replay.test.ts`). One live-network test in `read-page.test.ts` is skipped by default; run it with `READ_PAGE_LIVE=1 node --test test/read-page.test.ts`.
863
+ The suite runs offline by default and passes in full; the one live paging check is skipped unless `READ_PAGE_LIVE=1`: parser tests replay captured fixtures from `test/fixtures/` (normal and empty responses for all eight dedicated sources), transport tests open no sockets, proxy tests cover `parseProxy`, `proxyFromEnv` and the pure response framer, time-window tests pin the date with an injected `now`, and the newer suites cover Markdown extraction (`markdown.test.ts`), batch search (`search-many.test.ts`), chunked reading (`read-page.test.ts`), the disk snapshot (`cache-persist.test.ts`), optional JS rendering (`render-js.test.ts`) and benchmark scoring/replay (`bench-metrics.test.ts`, `bench-replay.test.ts`). One live-network test in `read-page.test.ts` is skipped by default; run it with `READ_PAGE_LIVE=1 node --test test/read-page.test.ts`.
864
864
 
865
865
  CI (`.github/workflows/ci.yml`) runs `npm ci`, `npm run typecheck`, `npm test` and `npm run build` on Node 24 for Ubuntu and macOS, then checks that the build emitted `lib/index.js` and `lib/index.d.ts` and that both `apply` and `Config` import.
866
866
 
package/README.zh-CN.md CHANGED
@@ -853,14 +853,14 @@ Node 的全局 `fetch` 既不读 macOS 系统代理,也不读 `HTTPS_PROXY`—
853
853
  ### 开发与测试
854
854
 
855
855
  ```sh
856
- node --test test/*.test.ts # 离线测试(349 条,1 条联网用例默认跳过)
856
+ node --test test/*.test.ts # 全部离线测试(联网用例默认跳过)
857
857
  node --test test/proxy.test.ts # 单个文件
858
858
  npm run typecheck # tsc --noEmit
859
859
  npm run build # 编译 src/ 到 lib/
860
860
  npm run check # typecheck + 测试
861
861
  ```
862
862
 
863
- 测试默认全程离线,349 条中 348 条通过,第 349 条是联网分段验证,默认跳过(`READ_PAGE_LIVE=1` 时才跑):解析器测试回放 `test/fixtures/` 里抓下来的真实响应(含八个专用源的正常/空响应),传输测试不开 socket,代理测试只验 `parseProxy`、`proxyFromEnv` 和纯函数式的响应分帧,时间窗测试用注入的 `now` 固定日期;新增的几组覆盖 Markdown 正文提取(`markdown.test.ts`)、批量查询(`search-many.test.ts`)、分段续读(`read-page.test.ts`)、硬盘快照(`cache-persist.test.ts`)、可选 JS 渲染(`render-js.test.ts`)和基准计分/重放(`bench-metrics.test.ts`、`bench-replay.test.ts`)。其中 `read-page.test.ts` 有一条真实联网用例默认跳过,联网验证时用 `READ_PAGE_LIVE=1 node --test test/read-page.test.ts` 运行。
863
+ 测试默认全程离线、全部通过;唯一需要联网的分段验证默认跳过(`READ_PAGE_LIVE=1` 时才跑):解析器测试回放 `test/fixtures/` 里抓下来的真实响应(含八个专用源的正常/空响应),传输测试不开 socket,代理测试只验 `parseProxy`、`proxyFromEnv` 和纯函数式的响应分帧,时间窗测试用注入的 `now` 固定日期;新增的几组覆盖 Markdown 正文提取(`markdown.test.ts`)、批量查询(`search-many.test.ts`)、分段续读(`read-page.test.ts`)、硬盘快照(`cache-persist.test.ts`)、可选 JS 渲染(`render-js.test.ts`)和基准计分/重放(`bench-metrics.test.ts`、`bench-replay.test.ts`)。其中 `read-page.test.ts` 有一条真实联网用例默认跳过,联网验证时用 `READ_PAGE_LIVE=1 node --test test/read-page.test.ts` 运行。
864
864
 
865
865
  CI(`.github/workflows/ci.yml`)在 Node 24 的 Ubuntu 与 macOS 上跑 `npm ci`、`npm run typecheck`、`npm test`、`npm run build`,并检查构建确实产出了 `lib/index.js` 和 `lib/index.d.ts`,且 `apply` 与 `Config` 都可导入。
866
866
 
package/client.js CHANGED
@@ -33,7 +33,7 @@
33
33
  if (loader === null || typeof loader !== 'object' || typeof loader.load !== 'function') return;
34
34
 
35
35
  loader.load({
36
- id: 'dsh-web-search-bing',
36
+ id: '@fffangchenghao/dsh-web-search',
37
37
  factory: function (require) {
38
38
  try {
39
39
  var React = require('react');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fffangchenghao/dsh-web-search",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "description": "DSH bundle: a key-free web search provider. Leads with the anonymous AnySearch API and falls back to public result pages (DuckDuckGo, Bing, 360), merged by reciprocal-rank fusion with a bilingual region policy, an engine cooldown and a TTL cache.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",