This repository was archived by the owner on Oct 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add types #66
Merged
Merged
feat: add types #66
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
46f7fde
chore: update deps
achingbrain 8097641
chore: fix up config
achingbrain 6c991d3
chore: update build config
achingbrain 8e4db3c
chore: increase timeout
achingbrain 2b20e87
chore: expect uint8arrays
achingbrain 454291d
chore: swap cbor for borc
achingbrain f8ca6fc
chore: remove debug
achingbrain 5ffbe21
chore: use correct cli arg
achingbrain f90a683
chore: run on ubuntu 18.09
achingbrain 8677cc6
chore: swap borc for cborg and add types
achingbrain 022e976
chore: add missing dep
achingbrain 4ab4c14
chore: remove protons
achingbrain 17aeace
chore: batch up imported blocks
achingbrain 567ca55
chore: missing dep
achingbrain c4bd087
chore: print output to keep ci alive
achingbrain 2c32fd1
chore: print output to keep ci alive
achingbrain a4f3d95
chore: skip test in browser that exceeds quota size
achingbrain bca8d35
chore: add missing dep
achingbrain 19b0a1c
chore: print storage quota detals
achingbrain 7e12f6a
chore: delete indexdb db after tests
achingbrain eb2ee9a
chore: fix browser tests
achingbrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,36 @@ | ||
| 'use strict' | ||
|
|
||
| module.exports = { | ||
| karma: { | ||
| // multi-bucket pinset migrations are slow | ||
| browserNoActivityTimeout: 240 * 1000 | ||
| }, | ||
| webpack: { | ||
| node: { | ||
| // this is needed until level stops using node buffers in browser code | ||
| Buffer: true, | ||
| const path = require('path') | ||
|
|
||
| // needed by cbor, binary-parse-stream and nofilter | ||
| stream: true | ||
| const esbuild = { | ||
| // this will inject all the named exports from 'node-globals.js' as globals | ||
| inject: [path.join(__dirname, 'scripts/node-globals.js')], | ||
| plugins: [ | ||
| { | ||
| name: 'node built ins', // this will make the bundler resolve node builtins to the respective browser polyfill | ||
| setup (build) { | ||
| build.onResolve({ filter: /^stream$/ }, () => { | ||
| return { path: require.resolve('readable-stream') } | ||
| }) | ||
| build.onResolve({ filter: /^assert$/ }, () => { | ||
| return { path: require.resolve('assert') } | ||
| }) | ||
| build.onResolve({ filter: /^util$/ }, () => { | ||
| return { path: require.resolve('util') } | ||
| }) | ||
| build.onResolve({ filter: /^events$/ }, () => { | ||
| return { path: require.resolve('events') } | ||
| }) | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| module.exports = { | ||
| test: { | ||
| browser: esbuild | ||
| }, | ||
| build: { | ||
| config: esbuild | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // file: node-globals.js | ||
| // @ts-nocheck | ||
| export const { Buffer } = require('buffer') | ||
| export const process = require('process/browser') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.