From 5aa120214e4ad4f26e2a3eed3a93ac798f576c1b Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 15 Apr 2021 12:19:23 +0100 Subject: [PATCH] chore: update deps (#69) --- .aegir.js | 22 +++++++++++++++++----- package.json | 9 ++++++--- scripts/node-globals.js | 2 ++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 scripts/node-globals.js diff --git a/.aegir.js b/.aegir.js index f176614..75cd7af 100644 --- a/.aegir.js +++ b/.aegir.js @@ -1,10 +1,22 @@ 'use strict' +const path = require('path') + +/** @type {import('aegir').Options["build"]["config"]} */ +const esbuild = { + inject: [path.join(__dirname, './scripts/node-globals.js')] +} + +/** @type {import('aegir').PartialOptions} */ module.exports = { - webpack: { - node: { - // this is needed until level stops using node buffers in browser code - Buffer: true + build: { + bundlesizeMax: '65KB' + }, + test: { + browser: { + config: { + buildConfig: esbuild + } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index efc45b2..3397a56 100644 --- a/package.json +++ b/package.json @@ -43,16 +43,19 @@ "homepage": "https://github.com/ipfs/js-datastore-level#readme", "dependencies": { "datastore-core": "^3.0.0", - "interface-datastore": "^3.0.3", + "interface-datastore": "^3.0.6", "level": "^6.0.1" }, "devDependencies": { - "aegir": "^30.3.0", + "aegir": "^33.1.0", + "assert": "^2.0.0", + "buffer": "^6.0.3", "chai": "^4.2.0", "cids": "^1.1.5", "dirty-chai": "^2.0.1", "level-mem": "^5.0.1", - "rimraf": "^3.0.0" + "rimraf": "^3.0.0", + "util": "^0.12.3" }, "eslintConfig": { "extends": "ipfs" diff --git a/scripts/node-globals.js b/scripts/node-globals.js new file mode 100644 index 0000000..ee3c67f --- /dev/null +++ b/scripts/node-globals.js @@ -0,0 +1,2 @@ +// @ts-nocheck +export const { Buffer } = require('buffer') \ No newline at end of file