@code-yeongyu/senpi-codemode 2026.10.31-1 → 2026.10.31-2
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 +20 -0
- package/README.md +1 -1
- package/package.json +4 -4
- package/src/extension/host-facts.ts +81 -3
- package/src/extension/skill-contribution.ts +6 -6
- package/src/prompt/eval-prompt-template.ts +1 -1
- package/src/prompt/eval-prompt.ts +4 -2
- package/src/skill/bun/SKILL.md +53 -0
- package/src/skill/{bun-1-4 → bun}/references/breaking-changes.md +26 -4
- package/src/skill/{bun-1-4 → bun}/references/build.md +32 -6
- package/src/skill/bun/references/dev-tooling.md +67 -0
- package/src/skill/bun/references/http-networking.md +157 -0
- package/src/skill/bun/references/install.md +137 -0
- package/src/skill/{bun-1-4 → bun}/references/node-compat-platforms.md +16 -2
- package/src/skill/{bun-1-4 → bun}/references/performance.md +9 -3
- package/src/skill/{bun-1-4 → bun}/references/runtime-apis.md +38 -13
- package/src/skill/bun/references/security.md +74 -0
- package/src/skill/bun/references/session-recipes.md +71 -0
- package/src/skill/bun/references/test.md +132 -0
- package/src/tool/detached-cell-manager.ts +50 -3
- package/src/tool/eval-argument-validator.ts +59 -0
- package/src/tool/eval-request.ts +15 -9
- package/src/tool/eval-tool-options.ts +1 -1
- package/src/tool/eval-tool.ts +2 -0
- package/src/skill/bun-1-4/SKILL.md +0 -45
- package/src/skill/bun-1-4/references/dev-tooling.md +0 -34
- package/src/skill/bun-1-4/references/http-networking.md +0 -113
- package/src/skill/bun-1-4/references/install.md +0 -93
- package/src/skill/bun-1-4/references/security.md +0 -52
- package/src/skill/bun-1-4/references/test.md +0 -103
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Bun 1.4 Security Tightening
|
|
2
|
-
|
|
3
|
-
Blog: [#security](https://bun.com/blog/bun-v1.4#security)
|
|
4
|
-
|
|
5
|
-
1.4 tightened TLS/parsing defaults. **A connection that worked on 1.3 can now fail with a verification error — that is usually the fix working, not a bug.** Diagnose before loosening.
|
|
6
|
-
|
|
7
|
-
## checkServerIdentity runs BEFORE fetch() sends [v1.4.0]
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
await fetch("https://api.example.com/upload", {
|
|
11
|
-
method: "POST",
|
|
12
|
-
body: secretPayload,
|
|
13
|
-
tls: {
|
|
14
|
-
checkServerIdentity(hostname, cert) {
|
|
15
|
-
if (cert.fingerprint256 !== PINNED) return new Error("pin mismatch");
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
// nothing is sent until the callback returns undefined; re-runs on each redirect hop
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
If you pin a cert and the URL redirects through another host, the callback sees that cert too — accept every hop or use `redirect: "manual"`.
|
|
23
|
-
|
|
24
|
-
## tls.connect defaults servername to host [v1.3.13]
|
|
25
|
-
|
|
26
|
-
`tls.connect({ host, port })` without `servername` uses `host` for SNI + identity check (matches Node). Connecting by IP or `localhost` to a cert issued for another name now fails with `ERR_TLS_CERT_ALTNAME_INVALID` — including through drivers like `pg`/`ioredis`. Fix: pass the cert's name as `servername`, or `checkServerIdentity: () => undefined` if trusting by CA alone.
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
tls.connect({ host: "10.0.0.12", port: 5432, ca, servername: "db.internal" });
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Bun.connect / Bun.listen enforce rejectUnauthorized [v1.4.0]
|
|
33
|
-
|
|
34
|
-
`Bun.connect({ tls })`, `socket.upgradeTLS()`, and `Bun.listen()` with `requestCert: true` default to `rejectUnauthorized: true`. A self-signed dev server with no `ca` does NOT throw — the `handshake` handler runs with `socket.authorized === false`, writes return `-1`, and the socket closes without data. Pass the CA in `tls`, or `rejectUnauthorized: false` (`NODE_TLS_REJECT_UNAUTHORIZED=0` honored).
|
|
35
|
-
|
|
36
|
-
## RedisClient verifies TLS hostname [v1.3.14]
|
|
37
|
-
|
|
38
|
-
`rediss://` checks the server cert against the URL host; first command rejects with `ERR_TLS_CERT_ALTNAME_INVALID` on mismatch. Connect by the certificate's name, or pass `tls: { rejectUnauthorized: false }`.
|
|
39
|
-
|
|
40
|
-
## HTTP request parsing hardening in Bun.serve [v1.3.4]
|
|
41
|
-
|
|
42
|
-
More malformed `Content-Length` / `Transfer-Encoding` / chunked bodies get `400` + connection close, without calling your `fetch` handler or logging. Browsers/curl/proxies never send these; if a hand-written client starts seeing 400s, fix its framing headers.
|
|
43
|
-
|
|
44
|
-
## Tarball extraction hardening [v1.3.6]
|
|
45
|
-
|
|
46
|
-
`github:`/URL dependencies and `bun create` templates skip tar entries that would land outside the package directory. A post-upgrade `Cannot find module` for such a package usually means the repo has a symlink pointing outside the package — replace it with a real file or relative link.
|
|
47
|
-
|
|
48
|
-
## Also
|
|
49
|
-
|
|
50
|
-
- Registry credentials stay scoped to their configured host: never sent cross-origin, never downgraded to `http://`, never printed in errors/verbose output.
|
|
51
|
-
- `tls.createServer({ requestCert: true })` now rejects unverified client certs by default; only a literal `rejectUnauthorized: false` disables verification (`null` no longer counts).
|
|
52
|
-
- Full list: [Security hardening](https://bun.com/blog/bun-v1.4#security-hardening) in the changelog; advisories at <https://github.com/oven-sh/bun/security/advisories>.
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# bun test in 1.4
|
|
2
|
-
|
|
3
|
-
Composable CI recipe:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
bun test --changed=main # only what your branch touches
|
|
7
|
-
bun test --parallel --timings=timings.json --update-timings
|
|
8
|
-
bun test --parallel --shard=1/3 --timings=timings.json # in CI, per machine
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## --parallel: worker processes [v1.3.13, improved v1.4.0]
|
|
12
|
-
|
|
13
|
-
Blog: [#bun-test-parallel](https://bun.com/blog/bun-v1.4#bun-test-parallel)
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
bun test --parallel # N = CPU count
|
|
17
|
-
bun test --parallel=4
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- Files go to whichever worker frees up next. Coverage and JUnit output merged across workers; `--bail` stops every worker.
|
|
21
|
-
- `--parallel` implies `--isolate`; `--no-isolate` opts out.
|
|
22
|
-
- Workers expose 1-indexed `JEST_WORKER_ID` / `BUN_TEST_WORKER_ID`, so Jest setups keying DBs/ports off worker id work unchanged.
|
|
23
|
-
- Preload scripts with top-level `await` complete before any worker runs tests.
|
|
24
|
-
|
|
25
|
-
## --isolate: fresh global per file [v1.3.13, hardened v1.4.0]
|
|
26
|
-
|
|
27
|
-
Blog: [#bun-test-isolate](https://bun.com/blog/bun-v1.4#bun-test-isolate)
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
bun test --isolate
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Between files, Bun creates a new `globalThis`, clears ESM/CJS module registries, closes leaked servers/sockets/watchers/subprocesses, cancels timers, restores fake timers, and re-runs `--preload`. Transpiled source/bytecode stay cached process-wide, so only top-level code re-runs. This is how Jest/Vitest behave by default — use it to kill "passes alone, fails in the full suite" bugs. v1.4 fixed the 1.3.13 stability issues (fake-timer leaks, module-scope subprocess leaks, `process.chdir` bleed, N-API across files, debugger breakpoints).
|
|
34
|
-
|
|
35
|
-
## --shard: split across CI machines [v1.3.13]
|
|
36
|
-
|
|
37
|
-
Blog: [#bun-test-shard](https://bun.com/blog/bun-v1.4#bun-test-shard)
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
bun test --shard=1/3 # deterministic, round-robin, 1-based (matches Jest/Vitest/Playwright)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Works with `--changed` and `--randomize`; an empty shard exits 0.
|
|
44
|
-
|
|
45
|
-
## --timings: balance by wall time [v1.4.0]
|
|
46
|
-
|
|
47
|
-
Blog: [#bun-test-timings](https://bun.com/blog/bun-v1.4#bun-test-timings)
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
bun test --timings=timings.json --update-timings # record per-file durations
|
|
51
|
-
bun test --shard=1/3 --timings=timings.json # shards cut by equal time, not file count
|
|
52
|
-
bun test --parallel --timings=timings.json # workers start slowest file first (LPT scheduling)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The timings file is written slowest-first, so it doubles as a slow-test report. Files sharing imports stay together (warm module cache).
|
|
56
|
-
|
|
57
|
-
## --changed: only affected tests [v1.3.13]
|
|
58
|
-
|
|
59
|
-
Blog: [#bun-test-changed](https://bun.com/blog/bun-v1.4#bun-test-changed)
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
bun test --changed # uncommitted (unstaged + staged + untracked)
|
|
63
|
-
bun test --changed=main # diff against branch/commit/tag
|
|
64
|
-
bun test --changed --watch # re-filters on every restart
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Bun scans test imports, asks git what changed, walks the import graph backwards. tsconfig `paths` aliases (`@/*`) work. Vitest-compatible flag.
|
|
68
|
-
|
|
69
|
-
## --retry and repeats [v1.3.3]
|
|
70
|
-
|
|
71
|
-
Blog: [#bun-test-retry](https://bun.com/blog/bun-v1.4#bun-test-retry)
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
test("flaky network call", async () => { await fetch("https://example.com"); }, { retry: 5 });
|
|
75
|
-
test("stress", () => { if (Math.random() < 0.1) throw new Error("uh oh!"); }, { repeats: 20 });
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
`bun test --retry <N>` sets a suite-wide default. NOTE: prefer fixing the flake; retry is a containment tool.
|
|
79
|
-
|
|
80
|
-
## jest.useFakeTimers() [v1.3.4, improved v1.4.0]
|
|
81
|
-
|
|
82
|
-
Blog: [#jest-usefaketimers](https://bun.com/blog/bun-v1.4#jest-usefaketimers)
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
import { jest, test, expect } from "bun:test";
|
|
86
|
-
test("debounce", () => {
|
|
87
|
-
jest.useFakeTimers();
|
|
88
|
-
let called = 0;
|
|
89
|
-
setTimeout(() => called++, 1000);
|
|
90
|
-
jest.advanceTimersByTime(1000);
|
|
91
|
-
expect(called).toBe(1);
|
|
92
|
-
jest.useRealTimers();
|
|
93
|
-
});
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
- Controls `setTimeout`, `setInterval`, `Date`. `jest.setSystemTime()` works with `advanceTimersByTime()`.
|
|
97
|
-
- `@testing-library/react`'s `waitFor` detects fake timers and advances instead of sleeping. `Bun.cron` schedules can be driven by the fake clock.
|
|
98
|
-
|
|
99
|
-
## Behavior changes in 1.4 (test-related)
|
|
100
|
-
|
|
101
|
-
- `jest.resetAllMocks()` now drops implementations too (matches Jest); use `clearAllMocks()` for history-only.
|
|
102
|
-
- `expect().toContain()` compares with `===` not `Object.is` (`[NaN]` no longer contains `NaN`).
|
|
103
|
-
- `toEqual()` compares `Temporal` objects by value.
|