Skip to content

Commit

Permalink
Concurrency min/max 8/16 #258
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 19, 2024
1 parent a32188f commit 99869a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"ava": "^6.2.0",
"eslint": "^9.17.0",
"globals": "^15.14.0",
"graceful-fs": "^4.2.11",
"pixelmatch": "^5.3.0"
},
"ava": {
Expand Down
2 changes: 1 addition & 1 deletion src/global-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const DEFAULTS = {
formats: ["webp", "jpeg"], // "png", "svg", "avif"

// Via https://github.com/11ty/eleventy-img/issues/258
concurrency: Math.max(Math.min(8, os.availableParallelism()), 16),
concurrency: Math.min(Math.max(8, os.availableParallelism()), 16)

urlPath: "/img/",
outputDir: "img/",
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require("node:path");
const fs = require("graceful-fs");
const fs = require("node:fs");
const { URL } = require("node:url");

const test = require("ava");
Expand Down

0 comments on commit 99869a0

Please sign in to comment.