@fffangchenghao/dsh-web-search 0.13.3 → 0.13.5

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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.5
4
+
5
+ ### Documentation
6
+ - The READMEs no longer repeat an exact test count, for the same reason they no
7
+ longer repeat a version number: every added test made the sentence false.
8
+
9
+ ## 0.13.4
10
+
11
+ ### Fixed
12
+ - **The bundle overlay could not be parsed, so the plugin never loaded.** YAML
13
+ reserves a leading `@`, and the overlay named the package as
14
+ `name: @fffangchenghao/dsh-web-search` without quotes; the Host reported
15
+ "bad indentation of a mapping entry" and dropped the entry. Every release from
16
+ 0.11.0 through 0.13.3 carried it. The name is quoted now, the README snippets
17
+ are corrected, and a test fails if a bare scoped name returns — a copy-pasted
18
+ snippet would break in exactly the same way.
19
+
3
20
  ## 0.13.3
4
21
 
5
22
  ### Documentation
package/README.md CHANGED
@@ -297,7 +297,7 @@ The package ships its own `cordis.patch.yml`, and it is one insert:
297
297
  ```yaml
298
298
  - insert:
299
299
  - id: web-search-bing
300
- name: @fffangchenghao/dsh-web-search
300
+ name: '@fffangchenghao/dsh-web-search'
301
301
  ```
302
302
 
303
303
  If you installed the package into a profile with `pnpm install` or a `link:`, that row arrives automatically. The copy in this repository also carries an empty `config: {}`; its job is to keep the row discoverable so Settings renders a card instead of "this deployment does not provide settings for this plugin".
@@ -341,7 +341,7 @@ Optionally, add a config row:
341
341
 
342
342
  ```yaml
343
343
  - id: web-search-bing
344
- name: @fffangchenghao/dsh-web-search
344
+ name: '@fffangchenghao/dsh-web-search'
345
345
  config:
346
346
  limit: 8
347
347
  wait: auto
@@ -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
@@ -297,7 +297,7 @@ npm run build
297
297
  ```yaml
298
298
  - insert:
299
299
  - id: web-search-bing
300
- name: @fffangchenghao/dsh-web-search
300
+ name: '@fffangchenghao/dsh-web-search'
301
301
  ```
302
302
 
303
303
  如果你是通过 `pnpm install` / `link:` 装进 profile 的,这一行会自动生效,不用手抄。仓库里这份 patch 还带了一个空的 `config: {}`,作用是让设置页能发现这一行、显示卡片而不是「当前部署尚未提供此插件的设置」。
@@ -341,7 +341,7 @@ pnpm install
341
341
 
342
342
  ```yaml
343
343
  - id: web-search-bing
344
- name: @fffangchenghao/dsh-web-search
344
+ name: '@fffangchenghao/dsh-web-search'
345
345
  config:
346
346
  limit: 8
347
347
  wait: auto
@@ -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/cordis.patch.yml CHANGED
@@ -3,5 +3,5 @@
3
3
  # Every key is optional and falls back to the documented default.
4
4
  - insert:
5
5
  - id: web-search-bing
6
- name: @fffangchenghao/dsh-web-search
6
+ name: '@fffangchenghao/dsh-web-search'
7
7
  config: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fffangchenghao/dsh-web-search",
3
- "version": "0.13.3",
3
+ "version": "0.13.5",
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",