diff --git a/README.md b/README.md index e3b2b20..107c657 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ sharp [command..] Commands: + sharp affine Perform an affine transform on an image sharp bandbool Perform a bitwise boolean operation on all input image channels (bands) to produce a single channel output image @@ -17,25 +18,27 @@ Commands: image sharp clahe Perform contrast limiting adaptive histogram equalization CLAHE - sharp composite Composite image over the processed (resized, + sharp composite [images..] Composite image(s) over the processed (resized, extracted etc.) image - sharp convolve Convolve the image with the specified kernel - sharp ensureAlpha Ensure alpha channel, if missing + sharp convolve Convolve the image with the specified kernel + sharp ensureAlpha [alpha] Ensure the output image has an alpha transparency + channel sharp extend Extends/pads the edges of the image with the provided background colour sharp extract Extract a region of the image - sharp extractChannel Extract a single channel from a multi-channel image + sharp extractChannel Extract a single channel from a multi-channel image sharp flatten [background] Merge alpha transparency channel, if any, with a background sharp flip Flip the image about the vertical Y axis sharp flop Flop the image about the horizontal X axis - sharp gamma [factor] [factorOut] Apply a gamma correction by reducing the encoding + sharp gamma [gamma] [gammaOut] Apply a gamma correction by reducing the encoding (darken) pre-resize then increasing the encoding (brighten) post-resize sharp greyscale Convert to 8-bit greyscale; 256 shades of grey [aliases: grayscale] sharp joinChannel Join one or more channels to the image - sharp linear [multiplier] [offset] Apply the linear formula a × input + b to the image + sharp linear [multiplier..] Apply the linear formula a × input + b to the image + to adjust image levels sharp median [size] Apply median filter sharp modulate Transforms the image using brightness, saturation, hue rotation, and lightness @@ -45,9 +48,9 @@ Commands: [aliases: normalize] sharp pipelineColourspace Set the pipeline colourspace [aliases: pipelineColorspace] - sharp recomb Recomb the image with the specified matrix + sharp recomb Recomb the image with the specified matrix sharp removeAlpha Remove alpha channel, if any - sharp resize [height] Resize image to width × height + sharp resize [width] [height] Resize image to width, height, or width × height sharp rotate [angle] Rotate the output image sharp sharpen [sigma] Sharpen the image sharp threshold [value] Any pixel value greather than or equal to the @@ -57,81 +60,84 @@ Commands: preserving the image luminance sharp tile [size] Use tile-based deep zoom (image pyramid) output sharp toColourspace Set the output colourspace [aliases: toColorspace] - sharp trim [threshold] Trim "boring" pixels from all edges that contain - values within a percentage similarity of the top-left - pixel + sharp trim [threshold] Trim pixels from all edges that contain values + similar to the given background color, which defaults + to that of the top-left pixel Global Options - --compressionLevel, -c zlib compression level [number] [default: 6] - --delay Delay(s) between animation frames [number] - --density DPI for vector images [number] [default: 72] - --format, -f Force output to a given format + -c, --compressionLevel zlib compression level [number] [default: 6] + --delay Delay(s) between animation frames [number] + --density DPI for vector images [number] [default: 72] + -f, --format Force output to a given format [choices: "input", "avif", "gif", "heif", "jpeg", "jpg", "png", "raw", "tiff", "webp"] [default: "input"] - --input, -i Path to (an) image file(s) [array] [required] [default: stdin] - --level Level to extract from a multi-level input [number] - --loop Number of animation iterations [number] [default: 0] - --output, -o Directory or URI template to write the image files to + -i, --input Path to (an) image file(s) [array] [required] [default: stdin] + --level Level to extract from a multi-level input [number] + --loop Number of animation iterations [number] [default: 0] + -o, --output Directory or URI template to write the image files to [string] [required] [default: stdout] - --page Page number to start extracting from for multi-page input [number] - --pages Number of pages to extract for multi-page input [number] [default: 1] - --progressive, -p Use progressive (interlace) scan [boolean] - --quality, -q Quality [number] [default: 80] - --timeout Number of seconds after which processing will be stopped + --page Page number to start extracting from for multi-page input [number] + --pages Number of pages to extract for multi-page input [number] [default: 1] + -p, --progressive Use progressive (interlace) scan [boolean] + -q, --quality Quality [number] [default: 80] + --timeout Number of seconds after which processing will be stopped [number] [default: 0] - --withMetadata, -m Include all metadata (EXIF, XMP, IPTC) from the input image in the output + -m, --withMetadata Include all metadata (EXIF, XMP, IPTC) from the input image in the output image [boolean] Optimization Options - --adaptiveFiltering Use adaptive row filtering [boolean] - --alphaQuality Quality of alpha layer [number] [default: 80] - --bitdepth Squash 8-bit images down to 1, 2, or 4 bit - [number] [choices: 1, 2, 4, 8] [default: 8] - --chromaSubsampling Set to "4:4:4" to prevent chroma subsampling when - quality <= 90 [string] [default: 4:4:4 (AVIF) / 4:2:0] - --colors, --colours Maximum number of palette entries[number] [default: 256] - --compression Compression options - [string] [choices: "ccittfax4", "deflate", "jpeg", "jp2k", "lzw", "none", "packbits", "webp", - "zstd"] [default: "jpeg"] - --dither Level of Floyd-Steinberg error diffusion + --adaptiveFiltering Use adaptive row filtering [boolean] + --alphaQuality Quality of alpha layer [number] [default: 80] + --bitdepth Squash 8-bit images down to 1, 2, or 4 bit + [choices: 1, 2, 4, 8] [default: 8] + --chromaSubsampling Set to "4:4:4" to prevent chroma subsampling when + quality <= 90 + [string] [default: 4:4:4 (AVIF) / 4:2:0] + --colors, --colours Maximum number of palette entries + [number] [default: 256] + --compression Compression options + [choices: "ccittfax4", "deflate", "jpeg", "jp2k", "lzw", "none", "packbits", "webp", "zstd"] + [default: "jpeg"] + --dither Level of Floyd-Steinberg error diffusion [number] [default: 1.0] - --effort Level of CPU effort to reduce file size + --effort Level of CPU effort to reduce file size [number] [default: 7 (GIF, PNG) / 4] - --hcompression Compression format - [string] [choices: "hevc", "av1"] [default: "av1"] - --lossless Use lossless compression mode [boolean] - --minSize Prevent use of animation key frames to minimize file - size [boolean] - --mixed Allow mixture of lossy and lossless animation frames + --hcompression Compression format + [choices: "hevc", "av1"] [default: "av1"] + --lossless Use lossless compression mode [boolean] + --minSize Prevent use of animation key frames to minimize file + size [boolean] + --mixed Allow mixture of lossy and lossless animation frames [boolean] - --mozjpeg Use mozjpeg defaults [boolean] - --nearLossless Use near_lossless compression mode [boolean] - --optimise, --optimize Apply optimiseScans, overshootDeringing, and - trellisQuantisation [boolean] - --optimiseCoding, --optimizeCoding Optimise Huffman coding tables [boolean] [default: true] - --optimiseScans, --optimizeScans Optimise progressive scans [boolean] - --overshootDeringing Apply overshoot deringing [boolean] - --palette Quantise to a palette-based image with alpha - transparency support [boolean] - --predictor Compression predictor - [string] [choices: "float", "horizontal", "none"] [default: "horizontal"] - --pyramid Write an image pyramid [boolean] - --quantisationTable, --quantizationTable Quantization table to use [number] [default: 0] - --reoptimise, --reoptimize Always generate new palettes (slow) [boolean] - --resolutionUnit Resolution unit - [string] [choices: "cm", "inch"] [default: inch] - --smartSubsample High quality chroma subsampling [boolean] - --tileBackground Background colour, parsed by the color module + --mozjpeg Use mozjpeg defaults [boolean] + --nearLossless Use near_lossless compression mode [boolean] + --optimise, --optimize Apply optimiseScans, overshootDeringing, and + trellisQuantisation [boolean] + --optimiseCoding, --optimizeCoding Optimise Huffman coding tables + [boolean] [default: true] + --optimiseScans, --optimizeScans Optimise progressive scans [boolean] + --overshootDeringing Apply overshoot deringing [boolean] + --palette Quantise to a palette-based image with alpha + transparency support [boolean] + --predictor Compression predictor + [choices: "float", "horizontal", "none"] [default: "horizontal"] + --pyramid Write an image pyramid [boolean] + --quantisationTable, --quantizationTable Quantization table to use [number] [default: 0] + --reoptimise, --reoptimize Always generate new palettes (slow) [boolean] + --resolutionUnit Resolution unit + [choices: "cm", "inch"] [default: inch] + --smartSubsample High quality chroma subsampling [boolean] + --tileBackground Background colour, parsed by the color module [string] [default: rgba(255, 255, 255, 1)] - --tileHeight Vertical tile size [number] - --tileWidth Horizontal tile size [number] - --trellisQuantisation Apply trellis quantisation [boolean] - --xres Horizontal resolution [number] [default: 1.0] - --yres Vertical resolution [number] [default: 1.0] + --tileHeight Vertical tile size [number] + --tileWidth Horizontal tile size [number] + --trellisQuantisation Apply trellis quantisation [boolean] + --xres Horizontal resolution [number] [default: 1.0] + --yres Vertical resolution [number] [default: 1.0] Misc. Options - --help, -h Show help [boolean] - --version, -v Show version number [boolean] + -h, --help Show help [boolean] + -v, --version Show version number [boolean] Examples: sharp -i ./input.jpg -o ./out resize 300 200 out/input.jpg will be a 300 pixels wide and diff --git a/lib/cli.js b/lib/cli.js index bdec483..3debef5 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -49,7 +49,6 @@ const options = { desc: 'zlib compression level', defaultDescription: 6, group: _global, - nargs: 1, type: 'number' }, @@ -57,7 +56,6 @@ const options = { delay: { desc: 'Delay(s) between animation frames', group: _global, - nargs: 1, type: 'number' }, @@ -66,7 +64,6 @@ const options = { desc: 'DPI for vector images', defaultDescription: 72, group: _global, - nargs: 1, type: 'number' }, @@ -76,8 +73,7 @@ const options = { choices: ['input', ...constants.FORMAT], default: 'input', desc: 'Force output to a given format', - group: _global, - nargs: 1 + group: _global }, // @see https://sharp.pixelplumbing.com/api-constructor/ @@ -96,7 +92,6 @@ const options = { desc: 'Level to extract from a multi-level input', defaultDescription: 0, group: _global, - nargs: 1, type: 'number' }, @@ -105,7 +100,6 @@ const options = { default: 0, desc: 'Number of animation iterations', group: _global, - nargs: 1, type: 'number' }, @@ -116,7 +110,6 @@ const options = { demand: IS_TEXT_TERMINAL, desc: 'Directory or URI template to write the image files to', group: _global, - nargs: 1, type: 'string' }, @@ -125,7 +118,6 @@ const options = { defaultDescription: 0, desc: 'Page number to start extracting from for multi-page input', group: _global, - nargs: 1, type: 'number' }, @@ -134,7 +126,6 @@ const options = { defaultDescription: 1, desc: 'Number of pages to extract for multi-page input', group: _global, - nargs: 1, type: 'number' }, @@ -156,7 +147,6 @@ const options = { desc: 'Quality', defaultDescription: '80', group: _global, - nargs: 1, type: 'number' }, @@ -165,7 +155,6 @@ const options = { defaultDescription: '0', desc: 'Number of seconds after which processing will be stopped', group: _global, - nargs: 1, type: 'number' }, @@ -192,7 +181,6 @@ const options = { desc: 'Quality of alpha layer', defaultDescription: '80', group: optimize, - nargs: 1, type: 'number' }, @@ -201,9 +189,7 @@ const options = { choices: [1, 2, 4, 8], defaultDescription: 8, desc: 'Squash 8-bit images down to 1, 2, or 4 bit', - group: optimize, - nargs: 1, - type: 'number' + group: optimize }, // @see https://sharp.pixelplumbing.com/api-output#avif @@ -212,7 +198,6 @@ const options = { desc: 'Set to "4:4:4" to prevent chroma subsampling when quality <= 90', defaultDescription: '4:4:4 (AVIF) / 4:2:0', group: optimize, - nargs: 1, type: 'string' }, @@ -223,7 +208,6 @@ const options = { defaultDescription: 256, desc: 'Maximum number of palette entries', group: optimize, - nargs: 1, type: 'number' }, @@ -232,9 +216,7 @@ const options = { choices: constants.TIFF_COMPRESSION, default: 'jpeg', desc: 'Compression options', - group: optimize, - nargs: 1, - type: 'string' + group: optimize }, // @see https://sharp.pixelplumbing.com/api-output#gif @@ -243,7 +225,6 @@ const options = { desc: 'Level of Floyd-Steinberg error diffusion', defaultDescription: '1.0', group: optimize, - nargs: 1, type: 'number' }, @@ -256,7 +237,6 @@ const options = { defaultDescription: '7 (GIF, PNG) / 4', desc: 'Level of CPU effort to reduce file size', group: optimize, - nargs: 1, type: 'number' }, @@ -265,9 +245,7 @@ const options = { choices: constants.HEIF_COMPRESSION, default: 'av1', desc: 'Compression format', - group: optimize, - nargs: 1, - type: 'string' + group: optimize }, // @see https://sharp.pixelplumbing.com/api-output#avif @@ -351,9 +329,7 @@ const options = { choices: constants.TIFF_PREDICTOR, default: 'horizontal', desc: 'Compression predictor', - group: optimize, - nargs: 1, - type: 'string' + group: optimize }, // @see https://sharp.pixelplumbing.com/api-output#tiff @@ -369,7 +345,6 @@ const options = { defaultDescription: '0', desc: 'Quantization table to use', group: optimize, - nargs: 1, type: 'number' }, @@ -386,9 +361,7 @@ const options = { choices: constants.RESOLUTION_UNIT, defaultDescription: 'inch', desc: 'Resolution unit', - group: optimize, - nargs: 1, - type: 'string' + group: optimize }, // @see https://sharp.pixelplumbing.com/api-output#webp @@ -454,6 +427,7 @@ const cli = yargs .example('$0 -i ./input.jpg -o ./out -mq90 rotate 180 -- resize 300 -- flatten "#ff6600" -- composite ./overlay.png --gravity southeast -- sharpen', 'out/input.jpg will be an upside down, 300px wide, alpha channel flattened onto orange background, composited with overlay.png with SE gravity, sharpened, with metadata, 90% quality version of input.jpg') .epilog('For more information on available options, please visit https://sharp.pixelplumbing.com/') .showHelpOnFail(false) + .wrap(100) // Built-in options. .help().alias('help', 'h') diff --git a/package-lock.json b/package-lock.json index 442e3e2..a8dca0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ } }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -553,23 +553,34 @@ "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } } }, "@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" } }, "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, "@types/json5": { @@ -578,12 +589,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "acorn": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", @@ -639,9 +644,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -2022,9 +2027,9 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", + "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==", "dev": true, "requires": { "graceful-fs": "^4.2.0", @@ -2188,12 +2193,6 @@ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3003,52 +3002,34 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", - "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "4.2.1", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.1", + "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -3066,25 +3047,10 @@ "wrap-ansi": "^7.0.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -3114,12 +3080,6 @@ "path-exists": "^4.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -3145,12 +3105,6 @@ } } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3170,12 +3124,23 @@ } }, "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "ms": { @@ -3208,52 +3173,12 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3303,9 +3228,9 @@ } }, "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "napi-build-utils": { @@ -3320,16 +3245,38 @@ "dev": true }, "nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.3.tgz", + "integrity": "sha512-U597iWTTBBYIV72986jyU382/MMZ70ApWcRmkoF1AZ75bpqOtI3Gugv/6+0jLgoDOabmcSwYBkSSAWIp1eA5cg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } + } + } } }, "node-abi": { @@ -4166,16 +4113,16 @@ } }, "sinon": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", - "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.0.tgz", + "integrity": "sha512-pV97G1GbslaSJoSdy2F2z8uh5F+uPGp3ddOzA4JsBOUBLEQRz2OAqlKGRFTSh2KiqUCmHkzyAeu7R4x1Hx0wwg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", + "@sinonjs/commons": "^2.0.0", "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", + "@sinonjs/samsam": "^7.0.1", "diff": "^5.0.0", - "nise": "^5.1.1", + "nise": "^5.1.2", "supports-color": "^7.2.0" }, "dependencies": { @@ -4721,9 +4668,9 @@ "dev": true }, "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { diff --git a/package.json b/package.json index 8a1f552..d69a37c 100644 --- a/package.json +++ b/package.json @@ -34,11 +34,11 @@ "yargs": "^17.6.2" }, "devDependencies": { - "fs-extra": "10.1.x", - "mocha": "9.2.x", + "fs-extra": "11.1.x", + "mocha": "10.1.x", "must": "0.13.x", "nyc": "15.1.x", - "sinon": "13.0.x", + "sinon": "15.0.x", "snazzy": "9.0.x", "standard": "17.0.x", "tempy": "1.0.x"