Skip to content

Commit

Permalink
fix: signal-exit export (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 15, 2023
1 parent 49c5c82 commit 2ff2a6b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@
],
"dependencies": {
"aigle": "~1.14.1",
"browserless": "~9.10.1",
"browserless": "~9.10.2",
"cheerio": "~1.0.0-rc.12",
"dnserrors": "~2.0.3",
"exit-hook": "~2.2.1",
"html-get": "~2.10.0",
"html-urls": "~2.4.40",
"is-url-http": "~2.3.2",
"html-get": "~2.10.6",
"html-urls": "~2.4.44",
"is-url-http": "~2.3.5",
"mitt": "~3.0.0",
"reachable-url": "~1.7.1",
"require-one-of": "~1.0.16",
"signal-exit": "~4.0.2",
"time-span": "~4.0.0",
"xml-urls": "~2.1.35"
"xml-urls": "~2.1.39"
},
"devDependencies": {
"async-listen": "latest",
"ava": "latest",
"lodash": "latest",
"p-event": "4",
"test-listen": "latest"
"p-event": "4"
},
"engines": {
"node": ">= 10"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/get-browserless.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
const creatBrowserlessFactory = opts => {
const requireOneOf = require('require-one-of')
const createBrowserless = requireOneOf(['@browserless/pool', 'browserless'])
const exitHook = require('exit-hook')
const { onExit } = require('signal-exit')

const browserlessFactory = createBrowserless(opts)
exitHook(browserlessFactory.close)
onExit(browserlessFactory.close)
return browserlessFactory
}

Expand Down
18 changes: 9 additions & 9 deletions packages/core/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
process.setMaxListeners(Infinity)

const { isNumber, isString, forEach } = require('lodash')
const listen = require('test-listen')
const { listen } = require('async-listen')
const pEvent = require('p-event')
const test = require('ava')

Expand Down Expand Up @@ -37,7 +37,7 @@ test('resolve a collection of urls', async t => {
})

test('resolve DNS errors', async t => {
const url = await listen(server.dnsError())
const url = (await listen(server.dnsError())).toString()
const emitter = await urlint(url)
const data = await pEvent(emitter, 'end')

Expand All @@ -50,7 +50,7 @@ test('resolve DNS errors', async t => {
})

test('follow redirects', async t => {
const url = await listen(server.followRedirects())
const url = (await listen(server.followRedirects())).toString()
const emitter = await urlint(url)
const data = await pEvent(emitter, 'end')

Expand All @@ -75,8 +75,8 @@ test('follow redirects', async t => {
})
})

test('resolve data URIs ', async t => {
const url = await listen(server.dataUris())
test('resolve data URIs', async t => {
const url = (await listen(server.dataUris())).toString()
const emitter = await urlint(url)
const data = await pEvent(emitter, 'end')

Expand All @@ -93,8 +93,8 @@ test('resolve data URIs ', async t => {
})
})

test('resolve CDNs URLs ', async t => {
const url = await listen(server.cdnUrls())
test('resolve CDNs URLs', async t => {
const url = (await listen(server.cdnUrls())).toString()
const emitter = await urlint(url)
const data = await pEvent(emitter, 'end')

Expand All @@ -114,8 +114,8 @@ test('resolve CDNs URLs ', async t => {
})
})

test('resolve mailto ', async t => {
const url = await listen(server.mailTo())
test('resolve mailto', async t => {
const url = (await listen(server.mailTo())).toString()
const emitter = await urlint(url)
const data = await pEvent(emitter, 'end')

Expand Down

0 comments on commit 2ff2a6b

Please sign in to comment.