This repository has been 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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses new aegir, swaps protons for protobufjs and adds types. BREAKING CHANGE: where there were previously no types, now there are types
- Loading branch information
1 parent
425d53c
commit 349f3c8
Showing
28 changed files
with
771 additions
and
190 deletions.
There are no files selected for viewing
This file contains 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,44 @@ | ||
'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: /^multiformats\/hashes\/digest$/ }, () => { | ||
// remove when https://github.com/evanw/esbuild/issues/187 is fixed | ||
return { path: require.resolve('multiformats/hashes/digest') } | ||
}) | ||
build.onResolve({ filter: /^multiformats$/ }, () => { | ||
// remove when https://github.com/evanw/esbuild/issues/187 is fixed | ||
return { path: require.resolve('multiformats') } | ||
}) | ||
build.onResolve({ filter: /^cborg$/ }, () => { | ||
// remove when https://github.com/evanw/esbuild/issues/187 is fixed | ||
return { path: require.resolve('cborg') } | ||
}) | ||
} | ||
} | ||
] | ||
} | ||
|
||
/** @type {import('aegir').PartialOptions} */ | ||
module.exports = { | ||
test: { | ||
browser: { | ||
config: { | ||
buildConfig: esbuild | ||
} | ||
} | ||
}, | ||
build: { | ||
config: esbuild | ||
} | ||
} |
This file contains 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 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 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 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
Oops, something went wrong.