Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit e22501b

Browse files
committed
chore: include globals for tests to run old level
1 parent f98d385 commit e22501b

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

.aegir.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@ const path = require('path')
44

55
const esbuild = {
66
// this will inject all the named exports from 'node-globals.js' as globals
7-
inject: [path.join(__dirname, 'scripts/node-globals.js')],
8-
plugins: [
9-
{
10-
name: 'node built ins', // this will make the bundler resolve node builtins to the respective browser polyfill
11-
setup (build) {
12-
build.onResolve({ filter: /^stream$/ }, () => {
13-
return { path: require.resolve('readable-stream') }
14-
})
15-
}
16-
}
17-
]
7+
inject: [path.join(__dirname, 'scripts/node-globals.js')]
188
}
199

2010
/** @type {import('aegir').PartialOptions} */
@@ -27,7 +17,6 @@ module.exports = {
2717
}
2818
},
2919
build: {
30-
bundlesizeMax: '45kB',
31-
config: esbuild
20+
bundlesizeMax: '37kB'
3221
}
3322
}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
"level-6": "npm:level@^6.0.0",
7777
"ncp": "^2.0.0",
7878
"npm-run-all": "^4.1.5",
79-
"readable-stream": "^3.6.0",
8079
"rimraf": "^3.0.0",
8180
"sinon": "^10.0.0",
8281
"stand-in": "^4.2.0",

scripts/node-globals.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// file: node-globals.js
22
// @ts-nocheck
33
export const { Buffer } = require('buffer')
4-
export const process = require('process/browser')

0 commit comments

Comments
 (0)