File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88jobs :
99 check :
1010 runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ node-version : [24]
1114 steps :
1215 - uses : actions/checkout@v4
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : ${{ matrix.node-version }}
1319 - uses : oven-sh/setup-bun@v2
1420 with :
1521 bun-version : latest
1824 - run : bun test ./src
1925 - run : bunx prettier --check src
2026 - run : bun run build
27+ - name : Pack and import on Node
28+ run : |
29+ set -euo pipefail
30+ tgz=$(npm pack)
31+ repo="$PWD"
32+ work=$(mktemp -d)
33+ cd "$work"
34+ npm init -y
35+ npm install "$repo/$tgz"
36+ node --input-type=module -e "import { rerankDocuments } from '@corbits/reranking'; if (typeof rerankDocuments !== 'function') process.exit(1)"
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ Semver. Released manually with `bun run build && npm publish` once CI is green.
114114
115115## Development
116116
117+ Requires Node.js >= 24 and Bun >= 1.2.0.
118+
117119``` bash
118120bun install
119121bun test ./src
Original file line number Diff line number Diff line change 4949 "url" : " https://github.com/corbitsdev/corbits-reranking/issues"
5050 },
5151 "engines" : {
52- "bun" : " >=1.2.0"
52+ "bun" : " >=1.2.0" ,
53+ "node" : " >=24"
5354 }
5455}
Original file line number Diff line number Diff line change 11import { type } from "arktype" ;
22import type { BuiltRequest } from "@intx/inference" ;
33
4- import type { RetryAfterExtractor } from "./request" ;
4+ import type { RetryAfterExtractor } from "./request.js " ;
55
66/**
77 * A document offered to the reranker. `id` is the caller's own handle — the
Original file line number Diff line number Diff line change 33 RerankConfigSchema ,
44 type RerankConfig ,
55 type RerankOptions ,
6- } from "./rerank" ;
6+ } from "./rerank.js " ;
77export {
88 rerankAdapters ,
99 rerankAdapterRegistry ,
@@ -16,11 +16,11 @@ export {
1616 type RerankRequestConfig ,
1717 type RerankResponseParser ,
1818 type RerankResult ,
19- } from "./adapters" ;
19+ } from "./adapters.js " ;
2020export {
2121 runJSONRequest ,
2222 extractRetryAfterMs ,
2323 ModelRequestError ,
2424 type RetryAfterExtractor ,
2525 type RunRequestOptions ,
26- } from "./request" ;
26+ } from "./request.js " ;
Original file line number Diff line number Diff line change 77 type RerankAPIStyle ,
88 type RerankDoc ,
99 type RerankResult ,
10- } from "./adapters" ;
11- import { runJSONRequest , type RequestDependencies } from "./request" ;
10+ } from "./adapters.js " ;
11+ import { runJSONRequest , type RequestDependencies } from "./request.js " ;
1212
1313export const RerankConfigSchema = type ( {
1414 /** Provider root, e.g. `http://localhost:8085` for a TEI server. */
You can’t perform that action at this time.
0 commit comments