From 00121006619f9d7b077a6636751ab2233521261e Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Wed, 13 Sep 2023 21:48:35 +0200 Subject: [PATCH 1/8] Add worker pool for execute tracing parallel --- package-lock.json | 128 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/processor.js | 37 +++++++------- src/tracer.js | 10 ++++ 4 files changed, 157 insertions(+), 19 deletions(-) create mode 100644 src/tracer.js diff --git a/package-lock.json b/package-lock.json index ec44183..d8299a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "oslllo-potrace": "^2.0.1", "oslllo-svg2": "^2.0.2", "oslllo-validator": "^3.1.0", + "piscina": "^4.1.0", "yargs": "^16.2.0" }, "bin": { @@ -34,6 +35,11 @@ "stopwatch-node": "^1.1.0" } }, + "node_modules/@assemblyscript/loader": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz", + "integrity": "sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==" + }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -2356,6 +2362,11 @@ "node": ">=0.10.0" } }, + "node_modules/eventemitter-asyncresource": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", + "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==" + }, "node_modules/exif-parser": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", @@ -2809,6 +2820,21 @@ "node": ">=8" } }, + "node_modules/hdr-histogram-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", + "integrity": "sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g==", + "dependencies": { + "@assemblyscript/loader": "^0.10.1", + "base64-js": "^1.2.0", + "pako": "^1.0.3" + } + }, + "node_modules/hdr-histogram-percentiles-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz", + "integrity": "sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==" + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -3771,6 +3797,37 @@ "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", "dev": true }, + "node_modules/nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "!win32" + ], + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "optional": true + }, + "node_modules/node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -4264,6 +4321,19 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/piscina": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.1.0.tgz", + "integrity": "sha512-sjbLMi3sokkie+qmtZpkfMCUJTpbxJm/wvaPzU28vmYSsTSW8xk9JcFUsbqGJdtPpIQ9tuj+iDcTtgZjwnOSig==", + "dependencies": { + "eventemitter-asyncresource": "^1.0.0", + "hdr-histogram-js": "^2.0.1", + "hdr-histogram-percentiles-obj": "^3.0.0" + }, + "optionalDependencies": { + "nice-napi": "^1.0.2" + } + }, "node_modules/pixelmatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", @@ -5357,6 +5427,11 @@ } }, "dependencies": { + "@assemblyscript/loader": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz", + "integrity": "sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==" + }, "@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -7054,6 +7129,11 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "eventemitter-asyncresource": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", + "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==" + }, "exif-parser": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", @@ -7387,6 +7467,21 @@ } } }, + "hdr-histogram-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", + "integrity": "sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g==", + "requires": { + "@assemblyscript/loader": "^0.10.1", + "base64-js": "^1.2.0", + "pako": "^1.0.3" + } + }, + "hdr-histogram-percentiles-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz", + "integrity": "sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==" + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -8127,6 +8222,28 @@ "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", "dev": true }, + "nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "optional": true, + "requires": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "optional": true + }, + "node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", + "optional": true + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -8519,6 +8636,17 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, + "piscina": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.1.0.tgz", + "integrity": "sha512-sjbLMi3sokkie+qmtZpkfMCUJTpbxJm/wvaPzU28vmYSsTSW8xk9JcFUsbqGJdtPpIQ9tuj+iDcTtgZjwnOSig==", + "requires": { + "eventemitter-asyncresource": "^1.0.0", + "hdr-histogram-js": "^2.0.1", + "hdr-histogram-percentiles-obj": "^3.0.0", + "nice-napi": "^1.0.2" + } + }, "pixelmatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", diff --git a/package.json b/package.json index 52e20e6..923d3ce 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "oslllo-potrace": "^2.0.1", "oslllo-svg2": "^2.0.2", "oslllo-validator": "^3.1.0", + "piscina": "^4.1.0", "yargs": "^16.2.0" }, "devDependencies": { diff --git a/src/processor.js b/src/processor.js index b72a4a2..211b4f5 100755 --- a/src/processor.js +++ b/src/processor.js @@ -1,10 +1,13 @@ "use strict"; -const fs = require("fs"); const path = require("path"); -const Svg = require("./svg"); const is = require("oslllo-validator"); const Progress = require("./progress"); +const Piscina = require("piscina"); + +const workerPool = new Piscina({ + filename: path.resolve(__dirname, "tracer.js") +}); const Processor = function (fixer) { this.fixer = fixer; @@ -34,14 +37,23 @@ Processor.prototype = { try { this.setup(); var svgs = this.source; + + const resolution = this.fixer.options.get("traceResolution"); + svgs = svgs.map((source) => { var destination = path.join(this.destination, path.basename(source)); - return { source, destination }; + return { source, destination, resolution }; }); - for (var i = 0; i < svgs.length; i++) { - await this.instance(svgs[i]); - } + + const workerPromises = svgs.map(async (svg) => { + await workerPool.run(svg); + // eslint-disable-next-line no-empty-function + this.tick(() => {}); + }); + + await Promise.all(workerPromises); + this.teardown(); resolve(this.fixer); } catch (err) { @@ -68,19 +80,6 @@ Processor.prototype = { this.progress.stop(); } }, - instance: function ({ source, destination }) { - return new Promise(async (resolve, reject) => { - try { - var resolution = this.fixer.options.get("traceResolution"); - var svg = new Svg(source, resolution); - var fixed = await svg.process(); - fs.writeFileSync(destination, fixed); - this.tick(() => resolve()); - } catch (err) { - reject(err); - } - }); - }, }; module.exports = Processor; diff --git a/src/tracer.js b/src/tracer.js new file mode 100644 index 0000000..892060e --- /dev/null +++ b/src/tracer.js @@ -0,0 +1,10 @@ +"use strict"; + +const fs = require("fs"); +const Svg = require("./svg"); + +module.exports = async ({ source, destination, resolution }) => { + const svg = new Svg(source, resolution); + const fixed = await svg.process(); + fs.writeFileSync(destination, fixed); +}; From 4ad7b35461ea1d187a49720840ef39e031a849cd Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Wed, 13 Sep 2023 21:50:24 +0200 Subject: [PATCH 2/8] switch to fs promises in worker file --- src/tracer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracer.js b/src/tracer.js index 892060e..30b7dd9 100644 --- a/src/tracer.js +++ b/src/tracer.js @@ -1,10 +1,10 @@ "use strict"; -const fs = require("fs"); +const fs = require("fs/promises"); const Svg = require("./svg"); module.exports = async ({ source, destination, resolution }) => { const svg = new Svg(source, resolution); const fixed = await svg.process(); - fs.writeFileSync(destination, fixed); + await fs.writeFile(destination, fixed); }; From c3c391584818700a6328b2783e65e10e22aab5ef Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 10:05:17 +0200 Subject: [PATCH 3/8] Update node versions --- .github/workflows/cd.release.yml | 2 +- .github/workflows/ci.coverage.yml | 4 ++-- .github/workflows/ci.test.yml | 2 +- .npmrc | 1 + package.json | 3 +++ 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/cd.release.yml b/.github/workflows/cd.release.yml index 86f92f1..eb1d0db 100755 --- a/.github/workflows/cd.release.yml +++ b/.github/workflows/cd.release.yml @@ -22,7 +22,7 @@ jobs: if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 18 registry-url: 'https://registry.npmjs.org' if: ${{ steps.release.outputs.release_created }} # if you are using Yarn, substitute the command below with `yarn install --frozen-lockfile` diff --git a/.github/workflows/ci.coverage.yml b/.github/workflows/ci.coverage.yml index aad1f23..93194e7 100755 --- a/.github/workflows/ci.coverage.yml +++ b/.github/workflows/ci.coverage.yml @@ -11,10 +11,10 @@ jobs: - uses: actions/checkout@v1 - - name: Use Node.js 10.x + - name: Use Node.js 18.x uses: actions/setup-node@v1 with: - node-version: 10.x + node-version: 18 - name: npm install, npm test, npm run coverage run: | diff --git a/.github/workflows/ci.test.yml b/.github/workflows/ci.test.yml index 7b920cf..0113aee 100755 --- a/.github/workflows/ci.test.yml +++ b/.github/workflows/ci.test.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - node-version: [10.x, 12.x, 14.x] + node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4fd0219 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true \ No newline at end of file diff --git a/package.json b/package.json index 923d3ce..03d9272 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,8 @@ "mocha-lcov-reporter": "^1.3.0", "nyc": "^15.1.0", "stopwatch-node": "^1.1.0" + }, + "engines" : { + "node" : ">=16.0.0" } } From 1729424c831269d05c21fbf0c8ae94949cf40a08 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 10:21:17 +0200 Subject: [PATCH 4/8] update browser list and remove empty function --- package-lock.json | 19 +++++++++++++------ package.json | 4 ++-- src/processor.js | 6 +++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8299a9..083fed6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,9 @@ "mocha-lcov-reporter": "^1.3.0", "nyc": "^15.1.0", "stopwatch-node": "^1.1.0" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@assemblyscript/loader": { @@ -1700,9 +1703,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001367", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz", - "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==", + "version": "1.0.30001534", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", + "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", "dev": true, "funding": [ { @@ -1712,6 +1715,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -6629,9 +6636,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001367", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz", - "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==", + "version": "1.0.30001534", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", + "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", "dev": true }, "caseless": { diff --git a/package.json b/package.json index 03d9272..a0fa455 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "nyc": "^15.1.0", "stopwatch-node": "^1.1.0" }, - "engines" : { - "node" : ">=16.0.0" + "engines": { + "node": ">=16.0.0" } } diff --git a/src/processor.js b/src/processor.js index 211b4f5..878fbaa 100755 --- a/src/processor.js +++ b/src/processor.js @@ -48,8 +48,7 @@ Processor.prototype = { const workerPromises = svgs.map(async (svg) => { await workerPool.run(svg); - // eslint-disable-next-line no-empty-function - this.tick(() => {}); + this.tick(); }); await Promise.all(workerPromises); @@ -73,7 +72,8 @@ Processor.prototype = { if (is.defined(this.progress)) { this.progress.tick(); } - callback(); + + return callback?.(); }, teardown: function () { if (is.defined(this.progress)) { From a6dd48700bdef5893f7099bb5c0c4c28cdcd9125 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 10:26:26 +0200 Subject: [PATCH 5/8] Try to fix windows ci test --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a0fa455..6bef131 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ ], "scripts": { "debug": "node scripts/debug.js", - "lint": "node_modules/.bin/eslint -- src test ./", - "lint:fix": "node_modules/.bin/eslint --fix src test ./", + "lint": "./node_modules/.bin/eslint -- src test ./", + "lint:fix": "./node_modules/.bin/eslint --fix src test ./", "test:only": "nyc mocha test/main.test.js && mocha test/output.test.js", "test": "nyc mocha test/main.test.js && mocha test/output.test.js && npm run lint", - "coverage": "node_modules/.bin/nyc report --reporter=lcovonly" + "coverage": "./node_modules/.bin/nyc report --reporter=lcovonly" }, "repository": { "type": "git", From 5506f5b6d92a8d9ea76c97e0b7e809efaf7a2642 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 10:29:15 +0200 Subject: [PATCH 6/8] Try to fix windows build - part 2 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6bef131..6d01bbd 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ ], "scripts": { "debug": "node scripts/debug.js", - "lint": "./node_modules/.bin/eslint -- src test ./", - "lint:fix": "./node_modules/.bin/eslint --fix src test ./", + "lint": "eslint -- src test ./", + "lint:fix": "eslint --fix src test ./", "test:only": "nyc mocha test/main.test.js && mocha test/output.test.js", "test": "nyc mocha test/main.test.js && mocha test/output.test.js && npm run lint", - "coverage": "./node_modules/.bin/nyc report --reporter=lcovonly" + "coverage": "nyc report --reporter=lcovonly" }, "repository": { "type": "git", From 06da39b5290b0ac96bd6138b1bb3812d9649f64b Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 10:35:27 +0200 Subject: [PATCH 7/8] revert tick callback changes --- src/processor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/processor.js b/src/processor.js index 878fbaa..211b4f5 100755 --- a/src/processor.js +++ b/src/processor.js @@ -48,7 +48,8 @@ Processor.prototype = { const workerPromises = svgs.map(async (svg) => { await workerPool.run(svg); - this.tick(); + // eslint-disable-next-line no-empty-function + this.tick(() => {}); }); await Promise.all(workerPromises); @@ -72,8 +73,7 @@ Processor.prototype = { if (is.defined(this.progress)) { this.progress.tick(); } - - return callback?.(); + callback(); }, teardown: function () { if (is.defined(this.progress)) { From ba6fb494f9d6ccd910c21a451df24eeee6fe2638 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 14 Sep 2023 11:19:51 +0200 Subject: [PATCH 8/8] increase timeout time for macos testing --- test/src/test.cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/test.cli.js b/test/src/test.cli.js index 838f9be..d257e35 100755 --- a/test/src/test.cli.js +++ b/test/src/test.cli.js @@ -5,7 +5,7 @@ const { emptyDir, isEmptyDir } = require("."); const { exec } = require("child_process"); const { assert, path2 } = require("./helper"); -const timeout = 20000; +const timeout = 30000; var destination = "temp"; if (!fs.existsSync(destination)) {