OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-identity2 commits / 4b48684

tests run under Bare (and node); declare what they import
`npm test` ran a bare `brittle`, which brittle 4 refuses ("Use brittle-bare or brittle-node"), and `test:bare` did the same through .bin. So neither script ran anything. And the suites imported node's `path` and `os`, which Bare does not provide, so they could not have run under the runtime this package ships to. - `#node:path` / `#node:os` import map, the same shape favela-peer uses (bare-path/bare-os under Bare, the builtins under node). - `npm test` = brittle-bare (the gate), `npm run test:node` = brittle-node. - devDependencies declared for what the tests import: bare-os, bare-path, and hyperbee2 (it resolved only because autobee depends on it). No source change. 10/10 tests, 37 asserts, under BOTH runners, on autobee 2.1.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4b4868430093596c569b5fccb1a61ff75772565c
by plankatron <fleeky@gmail.com> · 2026-10-12T20:59:32.000Z

Changed files (3) +21 -8

package.json +17 -4
……@@ -9,9 +9,19 @@
99 "./registry": "./lib/registry.js",
1010 "./view-shim": "./lib/view-shim.js"
1111 },
12 "imports": {
13 "#node:path": {
14 "bare": "bare-path",
15 "default": "path"
16 },
17 "#node:os": {
18 "bare": "bare-os",
19 "default": "os"
20 }
21 },
1222 "scripts": {
13 "test": "brittle test/*.test.js",
14 "test:bare": "bare ./node_modules/.bin/brittle test/*.test.js"
23 "test": "brittle-bare test/*.test.js",
24 "test:node": "brittle-node test/*.test.js"
1525 },
1626 "dependencies": {
1727 "autobee": "^2.1.0",
……@@ -21,6 +31,9 @@
2131 },
2232 "devDependencies": {
2333 "brittle": "^4.0.2",
24 "corestore": "^7.12.3"
34 "corestore": "^7.12.3",
35 "bare-os": "^3.9.3",
36 "bare-path": "^3.1.2",
37 "hyperbee2": "^2.13.2"
2538 }
26}
39}
test/contract.test.js +2 -2
……@@ -10,8 +10,8 @@
1010
1111import test from 'brittle'
1212import Corestore from 'corestore'
13import path from 'path'
14import os from 'os'
13import path from '#node:path'
14import os from '#node:os'
1515import crypto from 'hypercore-crypto'
1616import { contract } from 'hyper-identity-core/test/contract.js'
1717import { IdentityRegistry } from '../index.js'
test/view-shim.test.js +2 -2
……@@ -19,8 +19,8 @@
1919import test from 'brittle'
2020import Corestore from 'corestore'
2121import Hyperbee2 from 'hyperbee2'
22import path from 'path'
23import os from 'os'
22import path from '#node:path'
23import os from '#node:os'
2424import crypto from 'hypercore-crypto'
2525import { Hyperbee2View } from '../lib/view-shim.js'
2626