Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features needed for hypercore integration #48

Open
wants to merge 37 commits into
base: rewrite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
696583f
dependency is stored individually
chm-diederichs Jan 9, 2025
66e9960
add missing methods and correct typos
chm-diederichs Jan 9, 2025
f5e0504
support reverse block stream
chm-diederichs Jan 9, 2025
ea5ed53
close returns if already closed
chm-diederichs Jan 9, 2025
8a2885b
changes array reset to empty array
chm-diederichs Jan 9, 2025
4532229
fix package.json
chm-diederichs Jan 9, 2025
cb37780
move defaultKey to init store
mafintosh Jan 9, 2025
2fb76f7
make proper flush method
mafintosh Jan 9, 2025
374eb22
fix tons of iterator bugs
mafintosh Jan 9, 2025
e08ccb3
cleanup
mafintosh Jan 9, 2025
32194a3
safety
mafintosh Jan 9, 2025
c7d8eb8
add snapshotted getter
chm-diederichs Jan 10, 2025
66da47c
view should be shared, not tx in corestore storage
mafintosh Jan 10, 2025
4189677
defaultKey -> defaultDiscoveryKey and fix some internals
mafintosh Jan 10, 2025
9035ef1
add method for creating atomic batch
chm-diederichs Jan 10, 2025
959b414
createAtomicBatch is separate method
chm-diederichs Jan 10, 2025
30819cb
rename batch to session
chm-diederichs Jan 10, 2025
9b45748
remove unused arg
mafintosh Jan 10, 2025
e60dfae
streams take gt ranges now
mafintosh Jan 10, 2025
1e1978c
version cores also for migration
mafintosh Jan 10, 2025
b04c6fb
Add hypercore put/get/del and put/get tree-node tests + ci (#49)
HDegroote Jan 10, 2025
0767dde
Add block and tree-node (range) delete tests + a multi-hypercore test…
HDegroote Jan 10, 2025
db6b561
support corestore metadata migration
mafintosh Jan 10, 2025
6893958
fix migrations when nothing to migrate
mafintosh Jan 10, 2025
be855aa
atom can be injected for registration
chm-diederichs Jan 10, 2025
dbb9eb6
add unsafe assume session api
chm-diederichs Jan 10, 2025
1cbf48b
userData fixes: return buffers like rocks
chm-diederichs Jan 10, 2025
e3f6828
Fix bare CI (#52)
HDegroote Jan 10, 2025
c47696b
missing await
chm-diederichs Jan 10, 2025
a5eecdb
support async onflush handlers
chm-diederichs Jan 10, 2025
a7becfe
remove unnecessary method
chm-diederichs Jan 10, 2025
28c55af
core migrations are in
mafintosh Jan 10, 2025
ae4b90c
Add tests for untested tx/rx api's (#51)
HDegroote Jan 10, 2025
9337da1
ready proxies db.ready and do not return array
mafintosh Jan 10, 2025
b5ca1b9
support dropped blocks in migrations and fix some bugs
mafintosh Jan 10, 2025
eda7389
latest hyperschema
mafintosh Jan 11, 2025
bedf959
schema is not versioned
mafintosh Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci
on:
push:
branches:
- main
- rewrite-integration # temp
pull_request:
branches:
- main
- rewrite-integration # temp

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 https://github.com/actions/checkout/releases/tag/v4.1.1
- name: install node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 https://github.com/actions/setup-node/releases/tag/v3.8.2
with:
node-version: 20
- run: npm install
- run: npm test
- run: npm install -g bare-runtime
- run: npm run test:bare
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
package-lock.json
coverage/
14 changes: 9 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Hyperschema = require('hyperschema')

const SPEC = './spec/hyperschema'

const schema = Hyperschema.from(SPEC)
const schema = Hyperschema.from(SPEC, { versioned: false })
const corestore = schema.namespace('corestore')

corestore.register({
Expand Down Expand Up @@ -32,13 +32,14 @@ corestore.register({
name: 'seed',
type: 'fixed32'
}, {
name: 'defaultKey',
name: 'defaultDiscoveryKey',
type: 'fixed32'
}]
})

corestore.register({
name: 'alias',
compact: true,
fields: [{
name: 'name',
type: 'string',
Expand All @@ -53,6 +54,10 @@ corestore.register({
corestore.register({
name: 'core',
fields: [{
name: 'version',
type: 'uint',
required: true
}, {
name: 'corePointer',
type: 'uint',
required: true
Expand Down Expand Up @@ -231,7 +236,7 @@ core.register({
})

core.register({
name: 'batches',
name: 'sessions',
compact: true,
array: true,
fields: [{
Expand All @@ -246,9 +251,8 @@ core.register({
})

core.register({
name: 'dependencies',
name: 'dependency',
compact: true,
array: true,
fields: [{
name: 'dataPointer',
type: 'uint',
Expand Down
Loading
Loading