diff --git a/index.js b/index.js index 0c9bbd1..b43b2aa 100644 --- a/index.js +++ b/index.js @@ -1,17 +1,15 @@ const path = require('path') -const { Print, chalk } = require('@ianwalter/print') +const { createPrint, chalk } = require('@ianwalter/print') const merge = require('@ianwalter/merge') const tempy = require('tempy') const pptrRegex = /pptr\.js$/ -let print +const print = createPrint({ level: 'info', namespace: 'bff.puppeteer' }) let fileServer module.exports = { async before (context) { - print = new Print({ level: context.logLevel }) - // Construct the default Puppeteer / Webpack configuration. const puppeteer = { args: ['--no-sandbox', '--disable-setuid-sandbox'], @@ -48,7 +46,6 @@ module.exports = { } }, async registration (file, context) { - print = new Print({ level: context.logLevel }) print.debug('bff-puppeteer registration', chalk.gray(file.relativePath)) // Add Puppeteer config to the test file context if all tests are marked as diff --git a/package.json b/package.json index 505df55..289c7dc 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "@ianwalter/bff": "9.8.2", "@ianwalter/merge": "^9.0.1", - "@ianwalter/print": "^6.0.0", + "@ianwalter/print": "^8.0.4", "common-tags": "^1.8.0", "fs-remote": "^0.1.9", "puppeteer": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index 17965e4..4f5a9aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -138,6 +138,11 @@ execa "^3.4.0" strip "^3.0.0" +"@ianwalter/dot@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@ianwalter/dot/-/dot-1.0.4.tgz#32d9f98d59382475798c65bf686e95328327bfd3" + integrity sha512-bq6q4ZXWzQfBbE29i6trTwAtmmRzSWU0D/fSPhA/tDNbxhSlXDYUxfITtq1cctqi+s4BV4PgYIjxNkLeePK1mQ== + "@ianwalter/eslint-config@^5.3.0": version "5.3.0" resolved "https://registry.yarnpkg.com/@ianwalter/eslint-config/-/eslint-config-5.3.0.tgz#47525e745966f39c456a8637b4e787201412dd19" @@ -171,11 +176,6 @@ resolved "https://registry.yarnpkg.com/@ianwalter/merge/-/merge-6.0.0.tgz#7d7facccc86fb407571c78de00a0bd2adca395cb" integrity sha512-Ohskh/vqQFgW2Abaxd3kPYz/uNqoUmCSjU8kB8SoRieQqIOyXit1pFKYW4HmcoRcDFbktpWmS1QpIBoF74DGBg== -"@ianwalter/merge@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@ianwalter/merge/-/merge-7.0.0.tgz#2fc97113eea21c1fd25132c8ddb93d3f20a83d04" - integrity sha512-PuJJiUQZSNRu6zrC6xrJx9/gX0NX9rilQ646+VBSj+X7RRBUWOogqxEUHojOJcwYTt2JzWVV9DIvvsZMkfZP5Q== - "@ianwalter/merge@^9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@ianwalter/merge/-/merge-9.0.1.tgz#bbbf15e1daec5fef7e28633d9e8060a62018a72d" @@ -243,30 +243,31 @@ marked-terminal "^4.0.0" strip-ansi "^6.0.0" -"@ianwalter/print@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@ianwalter/print/-/print-6.0.0.tgz#1dd066e936adf2ed553216aa5952fa2a95588d6e" - integrity sha512-Gde6yLSVtYdNQ1Lm7fLvNYb+apIzYyr4uiXaXfvn08NYQf6pRgCfiCmV+uQOczzsfnU7yWleE0dYIP2ZkDXzag== +"@ianwalter/print@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@ianwalter/print/-/print-7.0.0.tgz#fc19edec666817ebb67a5fd1d4500c076c3746c0" + integrity sha512-AXE7sZgEISpP0cGJY8DN/rI3G+wcDz1EL4KLEVFv2wvZwPaUQaH9qGGoacer1N9xVOGp1D8VSRJc3tJdHTu1MQ== dependencies: "@ianwalter/chromafi" "^1.0.1" "@ianwalter/clone" "^6.0.1" "@ianwalter/log" "^4.0.0" - "@ianwalter/merge" "^7.0.0" - chalk "^3.0.0" + "@ianwalter/merge" "^9.0.1" + chalk "^4.1.0" has-ansi "^4.0.0" has-emoji "^1.1.0" - marked "^0.8.2" - marked-terminal "^4.0.0" + marked "^1.1.0" + marked-terminal "^4.1.0" strip-ansi "^6.0.0" -"@ianwalter/print@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@ianwalter/print/-/print-7.0.0.tgz#fc19edec666817ebb67a5fd1d4500c076c3746c0" - integrity sha512-AXE7sZgEISpP0cGJY8DN/rI3G+wcDz1EL4KLEVFv2wvZwPaUQaH9qGGoacer1N9xVOGp1D8VSRJc3tJdHTu1MQ== +"@ianwalter/print@^8.0.4": + version "8.0.4" + resolved "https://registry.yarnpkg.com/@ianwalter/print/-/print-8.0.4.tgz#6257ce8f8e7a1d71bc1805696bfa0b521455c056" + integrity sha512-XizAXpyo7kyhGZ/PdeGF2oNqlnWmhGuI+2e5ofNOZlwn6+yuAX4Ph1Wor0dxyNi41N0ERBZcJG5slV+nNaeETw== dependencies: "@ianwalter/chromafi" "^1.0.1" + "@ianwalter/cli" "^4.1.0" "@ianwalter/clone" "^6.0.1" - "@ianwalter/log" "^4.0.0" + "@ianwalter/dot" "^1.0.4" "@ianwalter/merge" "^9.0.1" chalk "^4.1.0" has-ansi "^4.0.0" @@ -3506,11 +3507,6 @@ marked@^0.8.0: resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.0.tgz#ec5c0c9b93878dc52dd54be8d0e524097bd81a99" integrity sha512-MyUe+T/Pw4TZufHkzAfDj6HarCBWia2y27/bhuYkTaiUnfDYFnCP3KUN+9oM7Wi6JA2rymtVYbQu3spE0GCmxQ== -marked@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.2.tgz#4faad28d26ede351a7a1aaa5fec67915c869e355" - integrity sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw== - marked@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/marked/-/marked-1.1.0.tgz#62504ad4d11550c942935ccc5e39d64e5a4c4e50"