diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index ac57216d..00000000 --- a/.eslintrc +++ /dev/null @@ -1,41 +0,0 @@ -{ - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "env": { - "browser": true, - "node": true - }, - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "prettier"], - "rules": { - "indent": ["error", 2], - "linebreak-style": ["error", "unix"], - "quotes": ["error", "single"], - "semi": ["error", "never"], - "complexity": ["error", 10], - "max-statements": ["error", 23], - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/interface-name-prefix": "off", - "@typescript-eslint/member-delimiter-style": [ - "error", - { - "multiline": { "delimiter": "none" } - } - ], - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/consistent-type-imports": "error" - }, - "overrides": [ - { - "files": ["*.js"], - "rules": { - "@typescript-eslint/no-var-requires": "off" - } - } - ] -} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index cce9d3c0..00000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "semi": false -} diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 00000000..9c807385 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,3 @@ +tabWidth: 2 +semi: false +singleQuote: true diff --git a/.vscode/settings.json b/.vscode/settings.json index 9eba9289..4d987b9b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.fixAll.eslint": true + "source.fixAll": "explicit", + "source.fixAll.eslint": "explicit" }, "[typescript]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" diff --git a/Readme.md b/Readme.md index 8e18099e..b02c008d 100644 --- a/Readme.md +++ b/Readme.md @@ -16,8 +16,9 @@ A [Node](https://nodejs.org/en/) module to get dimensions of any image file - ICNS - ICO - J2C -- JP2 +- JPEG-2000 (JP2) - JPEG +- JPEG-XL - KTX (1 and 2) - PNG - PNM (PAM, PBM, PFM, PGM, PPM) diff --git a/bin/image-size.js b/bin/image-size.js index 1a00f23b..f8ba6769 100755 --- a/bin/image-size.js +++ b/bin/image-size.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint-disable @typescript-eslint/no-var-requires */ 'use strict' const fs = require('fs') @@ -28,18 +29,22 @@ files.forEach(function (image) { const greyImage = colorize(image, grey) const size = imageSize(image) const sizes = size.images || [size] - sizes.forEach(size => { + sizes.forEach((size) => { let greyType = '' if (size.type) { greyType = colorize(' (' + size.type + ')', grey) } console.info( - colorize(size.width, green) + greyX + colorize(size.height, green) - + ' - ' + greyImage + greyType + colorize(size.width, green) + + greyX + + colorize(size.height, green) + + ' - ' + + greyImage + + greyType, ) }) } else { - console.error('file doesn\'t exist - ', image) + console.error("file doesn't exist - ", image) } } catch (e) { // console.error(e.stack) diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..531c3e42 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,20 @@ +// @ts-check +import globals from 'globals' +import eslint from '@eslint/js' +import ts_eslint from 'typescript-eslint' +import prettierRecommended from 'eslint-plugin-prettier/recommended' + +export default ts_eslint.config( + eslint.configs.recommended, + ...ts_eslint.configs.strict, + ...ts_eslint.configs.stylistic, + { + languageOptions: { + globals: { + ...globals.node, + ...globals.browser, + }, + }, + }, + prettierRecommended, +) diff --git a/lib/detector.ts b/lib/detector.ts index b6e380b8..9e6ac8ab 100644 --- a/lib/detector.ts +++ b/lib/detector.ts @@ -4,7 +4,7 @@ import { typeHandlers } from './types/index' const keys = Object.keys(typeHandlers) as imageType[] // This map helps avoid validating for every single image type -const firstBytes: { [byte: number]: imageType } = { +const firstBytes: Record = { 0x38: 'psd', 0x42: 'bmp', 0x44: 'dds', diff --git a/lib/index.ts b/lib/index.ts index d3cfd13f..cdfd3126 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -15,7 +15,7 @@ const MaxInputSize = 512 * 1024 // This queue is for async `fs` operations, to avoid reaching file-descriptor limits const queue = new Queue({ concurrency: 100, autostart: true }) -type Options = { +interface Options { disabledFS: boolean disabledTypes: imageType[] } @@ -53,7 +53,7 @@ function lookup(input: Uint8Array, filepath?: string): ISizeCalculationResult { // throw up, if we don't understand the file throw new TypeError( - 'unsupported file type: ' + type + ' (file: ' + filepath + ')' + 'unsupported file type: ' + type + ' (file: ' + filepath + ')', ) } @@ -114,8 +114,8 @@ export function imageSize(input: string, callback: CallbackFn): void */ export function imageSize( input: Uint8Array | string, - callback?: CallbackFn -): ISizeCalculationResult | void { + callback?: CallbackFn, +): ISizeCalculationResult | undefined { // Handle Uint8Array input if (input instanceof Uint8Array) { return lookup(input) @@ -132,9 +132,9 @@ export function imageSize( queue.push(() => readFileAsync(filepath) .then((input) => - process.nextTick(callback, null, lookup(input, filepath)) + process.nextTick(callback, null, lookup(input, filepath)), ) - .catch(callback) + .catch(callback), ) } else { const input = readFileSync(filepath) diff --git a/lib/types/heif.ts b/lib/types/heif.ts index fad36cd4..772b668c 100644 --- a/lib/types/heif.ts +++ b/lib/types/heif.ts @@ -4,7 +4,7 @@ import { findBox, readUInt32BE, toUTF8String } from './utils' const brandMap = { avif: 'avif', mif1: 'heif', - msf1: 'heif', // hief-sequence + msf1: 'heif', // heif-sequence heic: 'heic', heix: 'heic', hevc: 'heic', // heic-sequence @@ -12,25 +12,30 @@ const brandMap = { } export const HEIF: IImage = { - validate(buffer) { - const ftype = toUTF8String(buffer, 4, 8) - const brand = toUTF8String(buffer, 8, 12) - return 'ftyp' === ftype && brand in brandMap + validate(input) { + const boxType = toUTF8String(input, 4, 8) + if (boxType !== 'ftyp') return false + + const ftypBox = findBox(input, 'ftyp', 0) + if (!ftypBox) return false + + const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12) + return brand in brandMap }, - calculate(buffer) { + calculate(input) { // Based on https://nokiatech.github.io/heif/technical.html - const metaBox = findBox(buffer, 'meta', 0) - const iprpBox = metaBox && findBox(buffer, 'iprp', metaBox.offset + 12) - const ipcoBox = iprpBox && findBox(buffer, 'ipco', iprpBox.offset + 8) - const ispeBox = ipcoBox && findBox(buffer, 'ispe', ipcoBox.offset + 8) + const metaBox = findBox(input, 'meta', 0) + const iprpBox = metaBox && findBox(input, 'iprp', metaBox.offset + 12) + const ipcoBox = iprpBox && findBox(input, 'ipco', iprpBox.offset + 8) + const ispeBox = ipcoBox && findBox(input, 'ispe', ipcoBox.offset + 8) if (ispeBox) { return { - height: readUInt32BE(buffer, ispeBox.offset + 16), - width: readUInt32BE(buffer, ispeBox.offset + 12), - type: toUTF8String(buffer, 8, 12), + height: readUInt32BE(input, ispeBox.offset + 16), + width: readUInt32BE(input, ispeBox.offset + 12), + type: toUTF8String(input, 8, 12), } } throw new TypeError('Invalid HEIF, no size found') - } + }, } diff --git a/lib/types/icns.ts b/lib/types/icns.ts index d5cf62af..35b96ffb 100644 --- a/lib/types/icns.ts +++ b/lib/types/icns.ts @@ -22,7 +22,7 @@ const FILE_LENGTH_OFFSET = 4 // MSB => BIG ENDIAN */ const ENTRY_LENGTH_OFFSET = 4 // MSB => BIG ENDIAN -const ICON_TYPE_SIZE: { [key: string]: number } = { +const ICON_TYPE_SIZE: Record = { ICON: 32, 'ICN#': 32, // m => 16 x 16 @@ -67,7 +67,7 @@ const ICON_TYPE_SIZE: { [key: string]: number } = { function readImageHeader( input: Uint8Array, - imageOffset: number + imageOffset: number, ): [string, number] { const imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET return [ diff --git a/lib/types/index.ts b/lib/types/index.ts index b49af7ad..0ed6516f 100644 --- a/lib/types/index.ts +++ b/lib/types/index.ts @@ -9,6 +9,8 @@ import { ICO } from './ico' import { J2C } from './j2c' import { JP2 } from './jp2' import { JPG } from './jpg' +import { JXL } from './jxl' +import { JXLStream } from './jxl-stream' import { KTX } from './ktx' import { PNG } from './png' import { PNM } from './pnm' @@ -29,6 +31,8 @@ export const typeHandlers = { j2c: J2C, jp2: JP2, jpg: JPG, + jxl: JXL, + 'jxl-stream': JXLStream, ktx: KTX, png: PNG, pnm: PNM, diff --git a/lib/types/interface.ts b/lib/types/interface.ts index 7ed35458..b5dd8273 100644 --- a/lib/types/interface.ts +++ b/lib/types/interface.ts @@ -1,4 +1,4 @@ -export type ISize = { +export interface ISize { width: number | undefined height: number | undefined orientation?: number @@ -9,7 +9,7 @@ export type ISizeCalculationResult = { images?: ISize[] } & ISize -export type IImage = { +export interface IImage { validate: (input: Uint8Array) => boolean calculate: (input: Uint8Array, filepath?: string) => ISizeCalculationResult } diff --git a/lib/types/j2c.ts b/lib/types/j2c.ts index c47cdfba..815d9be0 100644 --- a/lib/types/j2c.ts +++ b/lib/types/j2c.ts @@ -1,9 +1,9 @@ import type { IImage } from './interface' -import { toHexString, readUInt32BE } from './utils' +import { readUInt32BE } from './utils' export const J2C: IImage = { // TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC - validate: (input) => toHexString(input, 0, 4) === 'ff4fff51', + validate: (input) => readUInt32BE(input, 0) === 0xff4fff51, calculate: (input) => ({ height: readUInt32BE(input, 12), diff --git a/lib/types/jp2.ts b/lib/types/jp2.ts index 05fb5ad9..f5e3547b 100644 --- a/lib/types/jp2.ts +++ b/lib/types/jp2.ts @@ -1,12 +1,16 @@ import type { IImage } from './interface' -import { readUInt32BE, findBox } from './utils' +import { readUInt32BE, findBox, toUTF8String } from './utils' export const JP2: IImage = { validate(input) { - if (readUInt32BE(input, 4) !== 0x6a502020 || readUInt32BE(input, 0) < 1) return false + const boxType = toUTF8String(input, 4, 8) + if (boxType !== 'jP ') return false + const ftypBox = findBox(input, 'ftyp', 0) if (!ftypBox) return false - return readUInt32BE(input, ftypBox.offset + 4) === 0x66747970 + + const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12) + return brand === 'jp2 ' }, calculate(input) { diff --git a/lib/types/jpg.ts b/lib/types/jpg.ts index cc832e87..36136140 100644 --- a/lib/types/jpg.ts +++ b/lib/types/jpg.ts @@ -88,7 +88,7 @@ function validateExifBlock(input: Uint8Array, index: number) { const byteAlign = toHexString( exifBlock, EXIF_HEADER_BYTES, - EXIF_HEADER_BYTES + TIFF_BYTE_ALIGN_BYTES + EXIF_HEADER_BYTES + TIFF_BYTE_ALIGN_BYTES, ) // Ignore Empty EXIF. Validate byte alignment diff --git a/lib/types/jxl-stream.ts b/lib/types/jxl-stream.ts new file mode 100644 index 00000000..9fcac645 --- /dev/null +++ b/lib/types/jxl-stream.ts @@ -0,0 +1,52 @@ +import type { IImage } from './interface' +import { toHexString } from './utils' +import { BitReader } from '../utils/bit-reader' + +function calculateImageDimension( + reader: BitReader, + isSmallImage: boolean, +): number { + if (isSmallImage) { + // Small images are multiples of 8 pixels, up to 256 pixels + return 8 * (1 + reader.getBits(5)) + } else { + // Larger images use a variable bit-length encoding + const sizeClass = reader.getBits(2) + const extraBits = [9, 13, 18, 30][sizeClass] + return 1 + reader.getBits(extraBits) + } +} + +function calculateImageWidth( + reader: BitReader, + isSmallImage: boolean, + widthMode: number, + height: number, +): number { + if (isSmallImage && widthMode === 0) { + // Small square images + return 8 * (1 + reader.getBits(5)) + } else if (widthMode === 0) { + // Non-small images with explicitly coded width + return calculateImageDimension(reader, false) + } else { + // Images with width derived from height and aspect ratio + const aspectRatios = [1, 1.2, 4 / 3, 1.5, 16 / 9, 5 / 4, 2] + return Math.floor(height * aspectRatios[widthMode - 1]) + } +} + +export const JXLStream: IImage = { + validate: (input) => { + return toHexString(input, 0, 2) === 'ff0a' + }, + + calculate(input) { + const reader = new BitReader(input, 'little-endian') + const isSmallImage = reader.getBits(1) === 1 + const height = calculateImageDimension(reader, isSmallImage) + const widthMode = reader.getBits(3) + const width = calculateImageWidth(reader, isSmallImage, widthMode, height) + return { width, height } + }, +} diff --git a/lib/types/jxl.ts b/lib/types/jxl.ts new file mode 100644 index 00000000..ae5d988d --- /dev/null +++ b/lib/types/jxl.ts @@ -0,0 +1,67 @@ +import type { IImage, ISize } from './interface' +import { findBox, toUTF8String } from './utils' +import { JXLStream } from './jxl-stream' + +/** Extracts the codestream from a containerized JPEG XL image */ +function extractCodestream(input: Uint8Array): Uint8Array | undefined { + const jxlcBox = findBox(input, 'jxlc', 0) + if (jxlcBox) { + return input.slice(jxlcBox.offset + 8, jxlcBox.offset + jxlcBox.size) + } + + const partialStreams = extractPartialStreams(input) + if (partialStreams.length > 0) { + return concatenateCodestreams(partialStreams) + } + + return undefined +} + +/** Extracts partial codestreams from jxlp boxes */ +function extractPartialStreams(input: Uint8Array): Uint8Array[] { + const partialStreams: Uint8Array[] = [] + let offset = 0 + while (offset < input.length) { + const jxlpBox = findBox(input, 'jxlp', offset) + if (!jxlpBox) break + partialStreams.push( + input.slice(jxlpBox.offset + 12, jxlpBox.offset + jxlpBox.size), + ) + offset = jxlpBox.offset + jxlpBox.size + } + return partialStreams +} + +/** Concatenates partial codestreams into a single codestream */ +function concatenateCodestreams(partialCodestreams: Uint8Array[]): Uint8Array { + const totalLength = partialCodestreams.reduce( + (acc, curr) => acc + curr.length, + 0, + ) + const codestream = new Uint8Array(totalLength) + let position = 0 + for (const partial of partialCodestreams) { + codestream.set(partial, position) + position += partial.length + } + return codestream +} + +export const JXL: IImage = { + validate: (input: Uint8Array): boolean => { + const boxType = toUTF8String(input, 4, 8) + if (boxType !== 'JXL ') return false + + const ftypBox = findBox(input, 'ftyp', 0) + if (!ftypBox) return false + + const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12) + return brand === 'jxl ' + }, + + calculate(input: Uint8Array): ISize { + const codestream = extractCodestream(input) + if (codestream) return JXLStream.calculate(codestream) + throw new Error('No codestream found in JXL container') + }, +} diff --git a/lib/types/ktx.ts b/lib/types/ktx.ts index 63136005..ef30c1aa 100644 --- a/lib/types/ktx.ts +++ b/lib/types/ktx.ts @@ -10,10 +10,10 @@ export const KTX: IImage = { calculate: (input) => { const type = input[5] === 0x31 ? 'ktx' : 'ktx2' const offset = type === 'ktx' ? 36 : 20 - return ({ + return { height: readUInt32LE(input, offset + 4), width: readUInt32LE(input, offset), type, - }) + } }, } diff --git a/lib/types/pnm.ts b/lib/types/pnm.ts index da35f342..1dcc468e 100644 --- a/lib/types/pnm.ts +++ b/lib/types/pnm.ts @@ -15,7 +15,7 @@ const PNMTypes = { type ValidSignature = keyof typeof PNMTypes type Handler = (type: string[]) => ISize -const handlers: { [type: string]: Handler } = { +const handlers: Record = { default: (lines) => { let dimensions: string[] = [] @@ -38,7 +38,7 @@ const handlers: { [type: string]: Handler } = { } }, pam: (lines) => { - const size: { [key: string]: number } = {} + const size: Record = {} while (lines.length > 0) { const line = lines.shift() as string if (line.length > 16 || line.charCodeAt(0) > 128) { diff --git a/lib/types/svg.ts b/lib/types/svg.ts index 54d07a53..f985819e 100644 --- a/lib/types/svg.ts +++ b/lib/types/svg.ts @@ -1,7 +1,7 @@ import type { IImage, ISize } from './interface' import { toUTF8String } from './utils' -type IAttributes = { +interface IAttributes { width: number | null height: number | null viewbox?: IAttributes | null @@ -17,7 +17,7 @@ const extractorRegExps = { } const INCH_CM = 2.54 -const units: { [unit: string]: number } = { +const units: Record = { in: 96, cm: 96 / INCH_CM, em: 16, @@ -30,7 +30,7 @@ const units: { [unit: string]: number } = { } const unitsReg = new RegExp( - `^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join('|')})?$` + `^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join('|')})?$`, ) function parseLength(len: string) { diff --git a/lib/types/tiff.ts b/lib/types/tiff.ts index 97d88925..937e3630 100644 --- a/lib/types/tiff.ts +++ b/lib/types/tiff.ts @@ -40,7 +40,7 @@ function nextTag(input: Uint8Array) { // Extract IFD tags from TIFF metadata function extractTags(input: Uint8Array, isBigEndian: boolean) { - const tags: { [key: number]: number } = {} + const tags: Record = {} let temp: Uint8Array | undefined = input while (temp && temp.length) { @@ -88,7 +88,7 @@ export const TIFF: IImage = { calculate(input, filepath) { if (!filepath) { - throw new TypeError('Tiff doesn\'t support buffer') + throw new TypeError("Tiff doesn't support buffer") } // Determine BE/LE diff --git a/lib/types/utils.ts b/lib/types/utils.ts index 2c5aa930..5ba040fa 100644 --- a/lib/types/utils.ts +++ b/lib/types/utils.ts @@ -2,7 +2,7 @@ const decoder = new TextDecoder() export const toUTF8String = ( input: Uint8Array, start = 0, - end = input.length + end = input.length, ) => decoder.decode(input.slice(start, end)) export const toHexString = (input: Uint8Array, start = 0, end = input.length) => @@ -55,7 +55,7 @@ export function readUInt( input: Uint8Array, bits: 16 | 32, offset: number, - isBigEndian: boolean + isBigEndian: boolean, ): number { offset = offset || 0 const endian = isBigEndian ? 'BE' : 'LE' @@ -63,22 +63,24 @@ export function readUInt( return methods[methodName](input, offset) } -function readBox(buffer: Uint8Array, offset: number) { - if (buffer.length - offset < 4) return - const boxSize = readUInt32BE(buffer, offset) - if (buffer.length - offset < boxSize) return +function readBox(input: Uint8Array, offset: number) { + if (input.length - offset < 4) return + const boxSize = readUInt32BE(input, offset) + if (input.length - offset < boxSize) return return { - name: toUTF8String(buffer, 4 + offset, 8 + offset), + name: toUTF8String(input, 4 + offset, 8 + offset), offset, size: boxSize, } } -export function findBox(buffer: Uint8Array, boxName: string, offset: number) { - while (offset < buffer.length) { - const box = readBox(buffer, offset) +export function findBox(input: Uint8Array, boxName: string, offset: number) { + while (offset < input.length) { + const box = readBox(input, offset) if (!box) break if (box.name === boxName) return box - offset += box.size + // Fix the infinite loop by ensuring offset always increases + // If box.size is 0, advance by at least 8 bytes (the size of the box header) + offset += box.size > 0 ? box.size : 8 } } diff --git a/lib/utils/bit-reader.ts b/lib/utils/bit-reader.ts new file mode 100644 index 00000000..cbe4f1a1 --- /dev/null +++ b/lib/utils/bit-reader.ts @@ -0,0 +1,48 @@ +/** This class helps read Uint8Array bit-by-bit */ +export class BitReader { + // Skip the first 16 bits (2 bytes) of signature + private byteOffset = 2 + private bitOffset = 0 + + constructor( + private readonly input: Uint8Array, + private readonly endianness: 'big-endian' | 'little-endian', + ) {} + + /** Reads a specified number of bits, and move the offset */ + getBits(length = 1): number { + let result = 0 + let bitsRead = 0 + + while (bitsRead < length) { + if (this.byteOffset >= this.input.length) { + throw new Error('Reached end of input') + } + + const currentByte = this.input[this.byteOffset] + const bitsLeft = 8 - this.bitOffset + const bitsToRead = Math.min(length - bitsRead, bitsLeft) + + if (this.endianness === 'little-endian') { + const mask = (1 << bitsToRead) - 1 + const bits = (currentByte >> this.bitOffset) & mask + result |= bits << bitsRead + } else { + const mask = + ((1 << bitsToRead) - 1) << (8 - this.bitOffset - bitsToRead) + const bits = (currentByte & mask) >> (8 - this.bitOffset - bitsToRead) + result = (result << bitsToRead) | bits + } + + bitsRead += bitsToRead + this.bitOffset += bitsToRead + + if (this.bitOffset === 8) { + this.byteOffset++ + this.bitOffset = 0 + } + } + + return result + } +} diff --git a/package.json b/package.json index 3879c769..c241dd15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-size", - "version": "1.1.1", + "version": "1.2.1", "description": "get dimensions of any image file", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,8 +14,8 @@ "packageManager": "yarn@4.0.2", "bin": "bin/image-size.js", "scripts": { - "lint": "eslint --ext .ts,.js bin lib specs", - "format": "prettier --write lib specs", + "lint": "eslint bin lib specs", + "format": "prettier --write lib specs eslint.config.mjs", "test": "nyc mocha", "clean": "rm -rf dist docs", "generate-docs": "typedoc", @@ -38,6 +38,7 @@ "icns", "ico", "jpeg", + "jxl", "png", "psd", "svg", @@ -49,25 +50,26 @@ "author": "netroy (http://netroy.in/)", "license": "MIT", "devDependencies": { - "@types/chai": "4.3.11", + "@eslint/js": "9.5.0", + "@types/chai": "4.3.16", + "@types/eslint__js": "8.42.3", "@types/glob": "8.1.0", - "@types/mocha": "10.0.6", - "@types/node": "18.19.3", - "@types/sinon": "17.0.2", - "@typescript-eslint/eslint-plugin": "6.16.0", - "@typescript-eslint/parser": "6.16.0", - "chai": "4.3.10", - "eslint": "8.56.0", + "@types/mocha": "10.0.7", + "@types/node": "18.19.39", + "@types/sinon": "17.0.3", + "chai": "4.4.1", + "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", - "eslint-plugin-prettier": "5.1.2", - "glob": "10.3.10", + "eslint-plugin-prettier": "5.1.3", + "glob": "10.4.2", "mocha": "10.2.0", "nyc": "15.1.0", - "prettier": "3.1.1", + "prettier": "3.3.2", "sinon": "17.0.1", "ts-node": "10.9.2", - "typedoc": "0.25.4", - "typescript": "5.3.3" + "typedoc": "0.25.13", + "typescript": "5.4.5", + "typescript-eslint": "7.13.1" }, "nyc": { "include": "lib", diff --git a/specs/bit-reader.spec.ts b/specs/bit-reader.spec.ts new file mode 100644 index 00000000..af21a551 --- /dev/null +++ b/specs/bit-reader.spec.ts @@ -0,0 +1,130 @@ +import { expect } from 'chai' +import { BitReader } from '../lib/utils/bit-reader' + +describe('BitReader', () => { + describe('Big-endian mode', () => { + it('should read single bits correctly', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'big-endian') + + expect(reader.getBits()).to.equal(1) + expect(reader.getBits()).to.equal(0) + expect(reader.getBits()).to.equal(1) + expect(reader.getBits()).to.equal(0) + }) + + it('should read multiple bits correctly', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'big-endian') + + expect(reader.getBits(3)).to.equal(0b101) + expect(reader.getBits(5)).to.equal(0b01010) + expect(reader.getBits(8)).to.equal(0b11001100) + }) + + it('should handle reading across byte boundaries', () => { + const input = new Uint8Array([ + 0xff, 0xff, 0b10101010, 0b11001100, 0b00110011, + ]) + const reader = new BitReader(input, 'big-endian') + + expect(reader.getBits(12)).to.equal(0b101010101100) + expect(reader.getBits(12)).to.equal(0b110000110011) + }) + + it('should throw an error when reaching end of input', () => { + const input = new Uint8Array([0b10101010]) + const reader = new BitReader(input, 'big-endian') + + expect(() => reader.getBits(9)).to.throw('Reached end of input') + }) + }) + + describe('Little-endian mode', () => { + it('should read single bits correctly', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'little-endian') + + expect(reader.getBits()).to.equal(0) + expect(reader.getBits()).to.equal(1) + expect(reader.getBits()).to.equal(0) + expect(reader.getBits()).to.equal(1) + }) + + it('should read multiple bits correctly', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'little-endian') + + expect(reader.getBits(3)).to.equal(0b010) + expect(reader.getBits(5)).to.equal(0b10101) + expect(reader.getBits(8)).to.equal(0b11001100) + }) + + it('should handle reading across byte boundaries', () => { + const input = new Uint8Array([ + 0xff, 0xff, 0b10101010, 0b11001100, 0b00110011, + ]) + const reader = new BitReader(input, 'little-endian') + + expect(reader.getBits(12)).to.equal(0b110010101010) + expect(reader.getBits(12)).to.equal(0b001100111100) + }) + + it('should throw an error when reaching end of input', () => { + const input = new Uint8Array([0b10101010]) + const reader = new BitReader(input, 'little-endian') + + expect(() => reader.getBits(9)).to.throw('Reached end of input') + }) + }) + + describe('Byte offset handling', () => { + it('should start reading from the third byte by default', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'big-endian') + + expect(reader.getBits(8)).to.equal(0b10101010) + }) + }) + + describe('Edge cases', () => { + it('should handle reading 0 bits', () => { + const input = new Uint8Array([0b10101010]) + const reader = new BitReader(input, 'big-endian') + expect(reader.getBits(0)).to.equal(0) + }) + + it('should handle reading all bits from input', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'big-endian') + expect(reader.getBits(16)).to.equal(0b1010101011001100) + expect(() => reader.getBits(1)).to.throw('Reached end of input') + }) + + it('should handle reading bits at byte boundary', () => { + const input = new Uint8Array([0xff, 0xff, 0b10101010, 0b11001100]) + const reader = new BitReader(input, 'big-endian') + expect(reader.getBits(8)).to.equal(0b10101010) + expect(reader.getBits(8)).to.equal(0b11001100) + }) + + it('should handle reading bits across multiple bytes', () => { + const input = new Uint8Array([ + 0xff, 0xff, 0b10101010, 0b11001100, 0b00110011, + ]) + const reader = new BitReader(input, 'big-endian') + expect(reader.getBits(20)).to.equal(0b10101010110011000011) + }) + + it('should handle alternating between small and large bit reads', () => { + const input = new Uint8Array([ + 0xff, 0xff, 0b10101010, 0b11001100, 0b00110011, + ]) + const reader = new BitReader(input, 'big-endian') + expect(reader.getBits(3)).to.equal(0b101) + expect(reader.getBits(10)).to.equal(0b0101011001) + expect(reader.getBits(2)).to.equal(0b10) + expect(reader.getBits(9)).to.equal(0b000110011) + }) + }) +}) diff --git a/specs/fs-close.spec.ts b/specs/fs-close.spec.ts index 90af0ad7..ffcb8e80 100644 --- a/specs/fs-close.spec.ts +++ b/specs/fs-close.spec.ts @@ -31,7 +31,7 @@ describe('after done reading from files', () => { imageSize('specs/images/valid/jpg/large.jpg') expect(() => readFromClosed(spy.returnValues[0])).to.throw( Error, - 'bad file descriptor' + 'bad file descriptor', ) spy.restore() }) @@ -74,11 +74,11 @@ describe('when Uint8Array allocation fails', () => { it('sync', () => { const spy = sinon.spy(fs, 'openSync') expect(() => imageSize('specs/images/valid/jpg/large.jpg')).to.throw( - RangeError + RangeError, ) expect(() => readFromClosed(spy.returnValues[0])).to.throw( Error, - 'bad file descriptor' + 'bad file descriptor', ) spy.restore() }) diff --git a/specs/images/valid/jxl-stream/large_16_9.jxl b/specs/images/valid/jxl-stream/large_16_9.jxl new file mode 100644 index 00000000..8a10fc4d Binary files /dev/null and b/specs/images/valid/jxl-stream/large_16_9.jxl differ diff --git a/specs/images/valid/jxl-stream/large_explicit.jxl b/specs/images/valid/jxl-stream/large_explicit.jxl new file mode 100644 index 00000000..ff0b9c0c Binary files /dev/null and b/specs/images/valid/jxl-stream/large_explicit.jxl differ diff --git a/specs/images/valid/jxl-stream/max_small.jxl b/specs/images/valid/jxl-stream/max_small.jxl new file mode 100644 index 00000000..191e2f59 Binary files /dev/null and b/specs/images/valid/jxl-stream/max_small.jxl differ diff --git a/specs/images/valid/jxl-stream/min_large.jxl b/specs/images/valid/jxl-stream/min_large.jxl new file mode 100644 index 00000000..c99f9556 Binary files /dev/null and b/specs/images/valid/jxl-stream/min_large.jxl differ diff --git a/specs/images/valid/jxl-stream/sample.jxl.stream b/specs/images/valid/jxl-stream/sample.jxl.stream new file mode 100644 index 00000000..ad7bc7e2 Binary files /dev/null and b/specs/images/valid/jxl-stream/sample.jxl.stream differ diff --git a/specs/images/valid/jxl-stream/small_rect.jxl b/specs/images/valid/jxl-stream/small_rect.jxl new file mode 100644 index 00000000..e19d2d9c Binary files /dev/null and b/specs/images/valid/jxl-stream/small_rect.jxl differ diff --git a/specs/images/valid/jxl-stream/small_square.jxl b/specs/images/valid/jxl-stream/small_square.jxl new file mode 100644 index 00000000..37670a77 Binary files /dev/null and b/specs/images/valid/jxl-stream/small_square.jxl differ diff --git a/specs/images/valid/jxl/sample.jxl b/specs/images/valid/jxl/sample.jxl new file mode 100644 index 00000000..3303eeec Binary files /dev/null and b/specs/images/valid/jxl/sample.jxl differ diff --git a/specs/others.spec.ts b/specs/others.spec.ts index c3ef211a..91201669 100644 --- a/specs/others.spec.ts +++ b/specs/others.spec.ts @@ -16,7 +16,7 @@ describe('Invalid invocation', () => { readSync(descriptor, buffer, 0, bufferSize, 0) expect(() => imageSize(buffer)).to.throw( TypeError, - 'Tiff doesn\'t support buffer' + "Tiff doesn't support buffer", ) }) }) @@ -28,14 +28,14 @@ describe('Invalid invocation', () => { it('should throw', () => { expect(() => imageSize('specs/images/valid/jpg/sample.jpg')).to.throw( TypeError, - 'disabled file type: jpg' + 'disabled file type: jpg', ) expect(() => imageSize('specs/images/valid/bmp/sample.bmp')).to.throw( TypeError, - 'disabled file type: bmp' + 'disabled file type: bmp', ) expect(() => - imageSize('specs/images/valid/png/sample.png') + imageSize('specs/images/valid/png/sample.png'), ).to.not.throw() }) }) @@ -47,7 +47,7 @@ describe('Invalid invocation', () => { it('should only allow Uint8Array inputs', () => { expect(() => imageSize('specs/images/valid/jpg/sample.jpg')).to.throw( TypeError, - 'invalid invocation. input should be a Uint8Array' + 'invalid invocation. input should be a Uint8Array', ) }) }) @@ -86,6 +86,8 @@ describe('.types property', () => { 'j2c', 'jp2', 'jpg', + 'jxl', + 'jxl-stream', 'ktx', 'png', 'pnm', diff --git a/specs/valid.spec.ts b/specs/valid.spec.ts index fe9d4bfc..d9d01298 100644 --- a/specs/valid.spec.ts +++ b/specs/valid.spec.ts @@ -8,7 +8,7 @@ import type { ISizeCalculationResult } from '../lib/types/interface' const bufferSize = 8192 -const sizes: { [key: string]: ISizeCalculationResult } = { +const sizes: Record = { default: { width: 123, height: 456, @@ -100,12 +100,36 @@ const sizes: { [key: string]: ISizeCalculationResult } = { width: 128, height: 68, }, + 'specs/images/valid/jxl-stream/small_square.jxl': { + width: 64, + height: 64, + }, + 'specs/images/valid/jxl-stream/small_rect.jxl': { + width: 120, + height: 80, + }, + 'specs/images/valid/jxl-stream/large_explicit.jxl': { + width: 3000, + height: 2000, + }, + 'specs/images/valid/jxl-stream/large_16_9.jxl': { + width: 1920, + height: 1080, + }, + 'specs/images/valid/jxl-stream/max_small.jxl': { + width: 256, + height: 256, + }, + 'specs/images/valid/jxl-stream/min_large.jxl': { + width: 257, + height: 257, + }, } // Test all valid files describe('Valid images', () => { const validFiles = globSync('specs/images/valid/**/*.*').filter( - (file) => extname(file) !== '.md' + (file) => extname(file) !== '.md', ) validFiles.forEach((file) => @@ -171,6 +195,6 @@ describe('Valid images', () => { } } }) - }) + }), ) }) diff --git a/tsconfig.json b/tsconfig.json index 9701f6c4..50ecf956 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,8 @@ "removeComments": false, "strict": true, "alwaysStrict": true, - "moduleResolution": "node" + "moduleResolution": "node", + "lib": ["ES2021", "DOM"], }, "include": [ "lib/**/*" diff --git a/yarn.lock b/yarn.lock index c4025163..dd5998f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -246,7 +246,14 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.10.0": + version: 4.10.1 + resolution: "@eslint-community/regexpp@npm:4.10.1" + checksum: 54f13817caf90545502d7a19e1b61df79087aee9584342ffc558b6d067530764a47f1c484f493f43e2c70cfdff59ccfd5f26df2af298c4ad528469e599bd1d53 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 8c36169c815fc5d726078e8c71a5b592957ee60d08c6470f9ce0187c8046af1a00afbda0a065cc40ff18d5d83f82aed9793c6818f7304a74a7488dc9f3ecbd42 @@ -270,10 +277,17 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.56.0": - version: 8.56.0 - resolution: "@eslint/js@npm:8.56.0" - checksum: 97a4b5ccf7e24f4d205a1fb0f21cdcd610348ecf685f6798a48dd41ba443f2c1eedd3050ff5a0b8f30b8cf6501ab512aa9b76e531db15e59c9ebaa41f3162e37 +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 + languageName: node + linkType: hard + +"@eslint/js@npm:9.5.0": + version: 9.5.0 + resolution: "@eslint/js@npm:9.5.0" + checksum: 206364e3a074eaaeccc2b9e1e3f129539106a81ec634f32c51bc1699e0c4a47ab3e6480a6484a198bca6406888ba8f2917c35a87296680905d146075b5ed2738 languageName: node linkType: hard @@ -284,14 +298,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13": - version: 0.11.13 - resolution: "@humanwhocodes/config-array@npm:0.11.13" +"@humanwhocodes/config-array@npm:^0.11.14": + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.1" - debug: "npm:^4.1.1" + "@humanwhocodes/object-schema": "npm:^2.0.2" + debug: "npm:^4.3.1" minimatch: "npm:^3.0.5" - checksum: 9f655e1df7efa5a86822cd149ca5cef57240bb8ffd728f0c07cc682cc0a15c6bdce68425fbfd58f9b3e8b16f79b3fd8cb1e96b10c434c9a76f20b2a89f213272 + checksum: 3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a languageName: node linkType: hard @@ -302,10 +316,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.1": - version: 2.0.1 - resolution: "@humanwhocodes/object-schema@npm:2.0.1" - checksum: dbddfd0465aecf92ed845ec30d06dba3f7bb2496d544b33b53dac7abc40370c0e46b8787b268d24a366730d5eeb5336ac88967232072a183905ee4abf7df4dab +"@humanwhocodes/object-schema@npm:^2.0.2": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: 05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 languageName: node linkType: hard @@ -517,37 +531,63 @@ __metadata: linkType: hard "@tsconfig/node10@npm:^1.0.7": - version: 1.0.8 - resolution: "@tsconfig/node10@npm:1.0.8" - checksum: b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a + version: 1.0.11 + resolution: "@tsconfig/node10@npm:1.0.11" + checksum: 51fe47d55fe1b80ec35e6e5ed30a13665fd3a531945350aa74a14a1e82875fb60b350c2f2a5e72a64831b1b6bc02acb6760c30b3738b54954ec2dea82db7a267 languageName: node linkType: hard "@tsconfig/node12@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node12@npm:1.0.9" - checksum: a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9 + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a languageName: node linkType: hard "@tsconfig/node14@npm:^1.0.0": - version: 1.0.1 - resolution: "@tsconfig/node14@npm:1.0.1" - checksum: 976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d languageName: node linkType: hard "@tsconfig/node16@npm:^1.0.2": - version: 1.0.2 - resolution: "@tsconfig/node16@npm:1.0.2" - checksum: ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff + languageName: node + linkType: hard + +"@types/chai@npm:4.3.16": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f languageName: node linkType: hard -"@types/chai@npm:4.3.11": - version: 4.3.11 - resolution: "@types/chai@npm:4.3.11" - checksum: c83a00359684bf06114d5ad0ffa62c78b2fbfe09a985eda56e55cd3c191fe176052aef6e297a8c8a3608efb8ea7a44598cf7e0ae1a3a9311af892417e95b0b28 +"@types/eslint@npm:*": + version: 8.56.10 + resolution: "@types/eslint@npm:8.56.10" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 0cdd914b944ebba51c35827d3ef95bc3e16eb82b4c2741f6437fa57cdb00a4407c77f89c220afe9e4c9566982ec8a0fb9b97c956ac3bd4623a3b6af32eed8424 + languageName: node + linkType: hard + +"@types/eslint__js@npm:8.42.3": + version: 8.42.3 + resolution: "@types/eslint__js@npm:8.42.3" + dependencies: + "@types/eslint": "npm:*" + checksum: e31f19de642d35a664695d0cab873ce6de19b8a3506755835b91f8a49a8c41099dcace449df49f1a486de6fa6565d21ceb1fa33be6004fc7adef9226e5d256a1 + languageName: node + linkType: hard + +"@types/estree@npm:*": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: 7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 languageName: node linkType: hard @@ -561,7 +601,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.12": +"@types/json-schema@npm:*": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 @@ -575,10 +615,10 @@ __metadata: languageName: node linkType: hard -"@types/mocha@npm:10.0.6": - version: 10.0.6 - resolution: "@types/mocha@npm:10.0.6" - checksum: fc73626e81e89c32d06b7ff9b72c4177b46d579cdd932f796614adc026852d84cb849d743473ba572cb4d9ea6d8c04e3749552d326c26495ec1c4b46e6e0a0c0 +"@types/mocha@npm:10.0.7": + version: 10.0.7 + resolution: "@types/mocha@npm:10.0.7" + checksum: 4494871e8a867633d818b00d6f29d47379f9e23655b89ca728166ff2f0a406b97d376fcc3e7a570a3840f72abb03c886c5e66f50ae0f018376e4dc10ed179564 languageName: node linkType: hard @@ -589,28 +629,21 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.19.3": - version: 18.19.3 - resolution: "@types/node@npm:18.19.3" +"@types/node@npm:18.19.39": + version: 18.19.39 + resolution: "@types/node@npm:18.19.39" dependencies: undici-types: "npm:~5.26.4" - checksum: b95d0c0be342275e27d882bb6ca73c0b757d1672a121cae1fc3249eda4f86a8abeb5745e5c5c1150914bcfda323a3fc51526cd34e2097f8355bf7cbf12fa6bcb + checksum: d2fe84adf087a4184217b666f675e99678060d15f84882a4a1c3e49c3dca521a7e99a201a3c073c2b60b00419f1f4c3b357d8f7397f65e400dc3b77b0145a1da languageName: node linkType: hard -"@types/semver@npm:^7.5.0": - version: 7.5.6 - resolution: "@types/semver@npm:7.5.6" - checksum: e77282b17f74354e17e771c0035cccb54b94cc53d0433fa7e9ba9d23fd5d7edcd14b6c8b7327d58bbd89e83b1c5eda71dfe408e06b929007e2b89586e9b63459 - languageName: node - linkType: hard - -"@types/sinon@npm:17.0.2": - version: 17.0.2 - resolution: "@types/sinon@npm:17.0.2" +"@types/sinon@npm:17.0.3": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" dependencies: "@types/sinonjs__fake-timers": "npm:*" - checksum: 03e4c99f249123e8fd2f1f7a74a084c0a09420b06b4d9a385989eb14276ec7ca8ef8415dcf70292140b3e9d7c2fb04ab923b0218a2f7f70c8276d3ff5649df97 + checksum: 3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 languageName: node linkType: hard @@ -621,126 +654,121 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/eslint-plugin@npm:6.16.0" +"@typescript-eslint/eslint-plugin@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/eslint-plugin@npm:7.13.1" dependencies: - "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:6.16.0" - "@typescript-eslint/type-utils": "npm:6.16.0" - "@typescript-eslint/utils": "npm:6.16.0" - "@typescript-eslint/visitor-keys": "npm:6.16.0" - debug: "npm:^4.3.4" + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/type-utils": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.4" + ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + "@typescript-eslint/parser": ^7.0.0 + eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 4bedce948ac3c20492a59813ee5d4f1f2306310857864dfaac2736f6c38e18785002c36844fd64c9fbdf3059fc390b29412be105fd7a118177f1eeeb1eb533f7 + checksum: 37fff8c302f93f5f88fc8d6e6c9151a7d1873a3c8af6e15547d737bdc066a6b8887fa54bcd8eb4e4ca6a11494051801c8e957eea8d8b4d4b078a477df6f10692 languageName: node linkType: hard -"@typescript-eslint/parser@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/parser@npm:6.16.0" +"@typescript-eslint/parser@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/parser@npm:7.13.1" dependencies: - "@typescript-eslint/scope-manager": "npm:6.16.0" - "@typescript-eslint/types": "npm:6.16.0" - "@typescript-eslint/typescript-estree": "npm:6.16.0" - "@typescript-eslint/visitor-keys": "npm:6.16.0" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/typescript-estree": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" debug: "npm:^4.3.4" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 3d941ce345dc2ce29957e2110957662873d514b094b8939923c3281d858c11cd1f9058db862644afe14f68d087770f39a0a1f9e523a2013ed5d2fdf3421b34d0 + checksum: a76cfcf97c289110403b50a377e925f29cda74340de0526f68b0c34199ce643d9c31803e492217e0f3df28361d3019ced4806f974ea70529c559b26b70cec7ef languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/scope-manager@npm:6.16.0" +"@typescript-eslint/scope-manager@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/scope-manager@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:6.16.0" - "@typescript-eslint/visitor-keys": "npm:6.16.0" - checksum: 3360aae4b85f5c31d20ad48d771cc09a6f8f6b1811b00d94f06e55b5a09c610ac75631b1c4edecb3bec682d41351b87e7d14d42bee84aa032064d0e13463035b + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" + checksum: fea9ab8f72ace1dd55d835037efe038c70021275581855820cdb7fc4b01e8afb51723856537adff1fdb0ea3899c1f8b593fd75c34b5087ca2ef2f7c72e610050 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/type-utils@npm:6.16.0" +"@typescript-eslint/type-utils@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/type-utils@npm:7.13.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:6.16.0" - "@typescript-eslint/utils": "npm:6.16.0" + "@typescript-eslint/typescript-estree": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 5964b87a87252bed278a248eb568902babd7c34defd3af8c3df371926d96aec716f33f1dc14bde170e93f73ed1b0af6e591e647853d0f33f378e2c7b3b73fc5b + checksum: cc03cd44e125933511ea657e386c5cf427eb6a386fdb110cba0858598195fb4f8c71173b00b187f388a6713e16b919a2037a86e0be10f4c40c18bcbdbe06d5de languageName: node linkType: hard -"@typescript-eslint/types@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/types@npm:6.16.0" - checksum: 236ca318c2440c95068e5d4d147e2bfed62447775e18695e21c8ca04a341a74d01c37ed2b417629b7bf2fb91ad4fd5e2a6570215d16fc24dd1507ce6973b4e22 +"@typescript-eslint/types@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/types@npm:7.13.1" + checksum: 006a5518608184c1d017b27fb4f66ce28bc75f89e2380ac42969ebdf0dc726af1cfcdf4ba36ce2858e9f6907d6f4295d3453859d7e9a35bc7855d4ebc900955d languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.16.0" +"@typescript-eslint/typescript-estree@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/typescript-estree@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:6.16.0" - "@typescript-eslint/visitor-keys": "npm:6.16.0" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 8e1ef03ecabaf3791b11240a51217836dbb74850e458258db77ac5eab5508cd9c63fb671924993d1e7654718c0c857c3550d51ecba0845fe489d143bb858e1b1 + checksum: 5c68b5faa962e5f984067aa91770486af817858d2fa35b54a44fa4d5c0c612ba23b52b191d8051d9e4439e5425251e32861c81239e9400a29de057f8360537fb languageName: node linkType: hard -"@typescript-eslint/utils@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/utils@npm:6.16.0" +"@typescript-eslint/utils@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/utils@npm:7.13.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:6.16.0" - "@typescript-eslint/types": "npm:6.16.0" - "@typescript-eslint/typescript-estree": "npm:6.16.0" - semver: "npm:^7.5.4" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/typescript-estree": "npm:7.13.1" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 84dd02f7c8e47fae699cc222da5cbea08b28c6e1cc7827860430bc86c2a17ee3f86e198a4356902b95930f85785aa662266ea9c476f69bf80c6a5f648e55f9f4 + eslint: ^8.56.0 + checksum: e1bc916dcb567c6b35819f635a84561e015f40b28d650b987f74c79b013ec43fb4f5b61199d4039fcdf9480281f945f622650cba2e68739600822da05808a706 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:6.16.0": - version: 6.16.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.16.0" +"@typescript-eslint/visitor-keys@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/visitor-keys@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:6.16.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 19e559f14ea0092585a374b8c5f1aca9b6b271fc23909d9857de9cf71a1e1d3abc0afd237e9c02d7a5fbdfe8e3be7853cf9fedf40a6f16bac3495cb7f4e67982 + "@typescript-eslint/types": "npm:7.13.1" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 811e9642851359b5197d45a9878143c4c608aaef887a20c26f57f8b012ce9e316d232b82a311bdd52a2af0c8b8da5d4bd9401ce565fc7bdb43cd44556e76d225 languageName: node linkType: hard @@ -1075,9 +1103,9 @@ __metadata: languageName: node linkType: hard -"chai@npm:4.3.10": - version: 4.3.10 - resolution: "chai@npm:4.3.10" +"chai@npm:4.4.1": + version: 4.4.1 + resolution: "chai@npm:4.4.1" dependencies: assertion-error: "npm:^1.1.0" check-error: "npm:^1.0.3" @@ -1086,7 +1114,7 @@ __metadata: loupe: "npm:^2.3.6" pathval: "npm:^1.1.1" type-detect: "npm:^4.0.8" - checksum: 9e545fd60f5efee4f06f7ad62f7b1b142932b08fbb3454db69defd511e7c58771ce51843764212da1e129b2c9d1b029fbf5f98da030fe67a95a0853e8679524f + checksum: c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae languageName: node linkType: hard @@ -1451,9 +1479,9 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:5.1.2": - version: 5.1.2 - resolution: "eslint-plugin-prettier@npm:5.1.2" +"eslint-plugin-prettier@npm:5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" dependencies: prettier-linter-helpers: "npm:^1.0.0" synckit: "npm:^0.8.6" @@ -1467,7 +1495,7 @@ __metadata: optional: true eslint-config-prettier: optional: true - checksum: 2d99eabbf6fb146fef85c84bd37acede2e26be6d908bf9efd663e6d7cb82cb6d9dfca9aab5f39bdc1c4987d5f88400f1756f5e8ac93db70cd1073ff1e873f2e4 + checksum: 4f26a30444adc61ed692cdb5a9f7e8d9f5794f0917151051e66755ce032a08c3cc72c8b5d56101412e90f6d77035bd8194ea8731e9c16aacdd5ae345a8dae188 languageName: node linkType: hard @@ -1502,15 +1530,15 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.56.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" +"eslint@npm:8.57.0": + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.56.0" - "@humanwhocodes/config-array": "npm:^0.11.13" + "@eslint/js": "npm:8.57.0" + "@humanwhocodes/config-array": "npm:^0.11.14" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" "@ungap/structured-clone": "npm:^1.2.0" @@ -1546,7 +1574,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: ef6193c6e4cef20774b985a5cc2fd4bf6d3c4decd423117cbc4a0196617861745db291217ad3c537bc3a160650cca965bc818f55e1f3e446af1fcb293f9940a5 + checksum: 00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 languageName: node linkType: hard @@ -1860,18 +1888,19 @@ __metadata: languageName: node linkType: hard -"glob@npm:10.3.10": - version: 10.3.10 - resolution: "glob@npm:10.3.10" +"glob@npm:10.4.2": + version: 10.4.2 + resolution: "glob@npm:10.4.2" dependencies: foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.5" - minimatch: "npm:^9.0.1" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry: "npm:^1.10.1" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 38bdb2c9ce75eb5ed168f309d4ed05b0798f640b637034800a6bf306f39d35409bf278b0eaaffaec07591085d3acb7184a201eae791468f0f617771c2486a6a8 + checksum: e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 languageName: node linkType: hard @@ -2042,10 +2071,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.4": - version: 5.3.0 - resolution: "ignore@npm:5.3.0" - checksum: 51594355cea4c6ad6b28b3b85eb81afa7b988a1871feefd7062baf136c95aa06760ee934fa9590e43d967bd377ce84a4cf6135fbeb6063e063f1182a0e9a3bcd +"ignore@npm:^5.3.1": + version: 5.3.1 + resolution: "ignore@npm:5.3.1" + checksum: 0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 languageName: node linkType: hard @@ -2053,26 +2082,27 @@ __metadata: version: 0.0.0-use.local resolution: "image-size@workspace:." dependencies: - "@types/chai": "npm:4.3.11" + "@eslint/js": "npm:9.5.0" + "@types/chai": "npm:4.3.16" + "@types/eslint__js": "npm:8.42.3" "@types/glob": "npm:8.1.0" - "@types/mocha": "npm:10.0.6" - "@types/node": "npm:18.19.3" - "@types/sinon": "npm:17.0.2" - "@typescript-eslint/eslint-plugin": "npm:6.16.0" - "@typescript-eslint/parser": "npm:6.16.0" - chai: "npm:4.3.10" - eslint: "npm:8.56.0" + "@types/mocha": "npm:10.0.7" + "@types/node": "npm:18.19.39" + "@types/sinon": "npm:17.0.3" + chai: "npm:4.4.1" + eslint: "npm:8.57.0" eslint-config-prettier: "npm:9.1.0" - eslint-plugin-prettier: "npm:5.1.2" - glob: "npm:10.3.10" + eslint-plugin-prettier: "npm:5.1.3" + glob: "npm:10.4.2" mocha: "npm:10.2.0" nyc: "npm:15.1.0" - prettier: "npm:3.1.1" + prettier: "npm:3.3.2" queue: "npm:6.0.2" sinon: "npm:17.0.1" ts-node: "npm:10.9.2" - typedoc: "npm:0.25.4" - typescript: "npm:5.3.3" + typedoc: "npm:0.25.13" + typescript: "npm:5.4.5" + typescript-eslint: "npm:7.13.1" bin: image-size: bin/image-size.js languageName: unknown @@ -2319,16 +2349,16 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" +"jackspeak@npm:^3.1.2": + version: 3.4.0 + resolution: "jackspeak@npm:3.4.0" dependencies: "@isaacs/cliui": "npm:^8.0.2" "@pkgjs/parseargs": "npm:^0.11.0" dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 6e6490d676af8c94a7b5b29b8fd5629f21346911ebe2e32931c2a54210134408171c24cee1a109df2ec19894ad04a429402a8438cbf5cc2794585d35428ace76 + checksum: 5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b languageName: node linkType: hard @@ -2485,6 +2515,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.2.0": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: ff1a496d30b5eaec2c9079080965bb0cede203cf878371f7033a007f1e54cd4aa13cc8abf7ccec4c994a83a22ed5476e83a55bb57cc07e6c1547a42937e42c37 + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -2494,13 +2531,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.1.0 - resolution: "lru-cache@npm:10.1.0" - checksum: 207278d6fa711fb1f94a0835d4d4737441d2475302482a14785b10515e4c906a57ebf9f35bf060740c9560e91c7c1ad5a04fd7ed030972a9ba18bce2a228e95b - languageName: node - linkType: hard - "lunr@npm:^2.3.9": version: 2.3.9 resolution: "lunr@npm:2.3.9" @@ -2583,15 +2613,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:9.0.3, minimatch@npm:^9.0.3": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 - languageName: node - linkType: hard - "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -2601,12 +2622,21 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.1 - resolution: "minimatch@npm:9.0.1" +"minimatch@npm:^9.0.3": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" dependencies: brace-expansion: "npm:^2.0.1" - checksum: b4e98f4dc740dcf33999a99af23ae6e5e1c47632f296dc95cb649a282150f92378d41434bf64af4ea2e5975255a757d031c3bf014bad9214544ac57d97f3ba63 + checksum: 4cdc18d112b164084513e890d6323370db14c22249d536ad1854539577a895e690a27513dc346392f61a4a50afbbd8abc88f3f25558bfbbbb862cd56508b20f5 languageName: node linkType: hard @@ -2684,6 +2714,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + "minizlib@npm:^2.0.0, minizlib@npm:^2.1.1": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -2977,6 +3014,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -3014,13 +3058,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.1": - version: 1.10.1 - resolution: "path-scurry@npm:1.10.1" +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" dependencies: - lru-cache: "npm:^9.1.1 || ^10.0.0" + lru-cache: "npm:^10.2.0" minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: eebfb8304fef1d4f7e1486df987e4fd77413de4fce16508dea69fcf8eb318c09a6b15a7a2f4c22877cec1cb7ecbd3071d18ca9de79eeece0df874a00f1f0bdc8 + checksum: 5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 languageName: node linkType: hard @@ -3079,12 +3123,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.1.1": - version: 3.1.1 - resolution: "prettier@npm:3.1.1" +"prettier@npm:3.3.2": + version: 3.3.2 + resolution: "prettier@npm:3.3.2" bin: prettier: bin/prettier.cjs - checksum: 26a249f321b97d26c04483f1bf2eeb22e082a76f4222a2c922bebdc60111691aad4ec3979610e83942e0b956058ec361d9e9c81c185172264eb6db9aa678082b + checksum: 83214e154afa5aa9b664c2506640212323eb1376b13379b2413dc351b7de0687629dca3f00ff2ec895ebd7e3a2adb7d7e231b6c77606e2358137f2150807405b languageName: node linkType: hard @@ -3298,14 +3342,12 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.4": - version: 7.5.4 - resolution: "semver@npm:7.5.4" - dependencies: - lru-cache: "npm:^6.0.0" +"semver@npm:^7.6.0": + version: 7.6.2 + resolution: "semver@npm:7.6.2" bin: semver: bin/semver.js - checksum: 985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac + checksum: 296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 languageName: node linkType: hard @@ -3341,15 +3383,15 @@ __metadata: languageName: node linkType: hard -"shiki@npm:^0.14.1": - version: 0.14.2 - resolution: "shiki@npm:0.14.2" +"shiki@npm:^0.14.7": + version: 0.14.7 + resolution: "shiki@npm:0.14.7" dependencies: ansi-sequence-parser: "npm:^1.1.0" jsonc-parser: "npm:^3.2.0" vscode-oniguruma: "npm:^1.7.0" vscode-textmate: "npm:^8.0.0" - checksum: f540b1bdbacdd252bfef9e678a826a9c397765f6e8a0ff655420802075f25cbcea3e47f1fb72a42460eb4224849956be22025c6fc6c26fd7197880626946e8a0 + checksum: be3f2444c65bd0c57802026f171cb42ad571d361ee885be0c292b60785f68c70f19b69310f5ffe7f7a93db4c5ef50211e0a0248794bc6bb48d242bc43fe72a62 languageName: node linkType: hard @@ -3608,12 +3650,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.0.1": - version: 1.0.3 - resolution: "ts-api-utils@npm:1.0.3" +"ts-api-utils@npm:^1.3.0": + version: 1.3.0 + resolution: "ts-api-utils@npm:1.3.0" peerDependencies: typescript: ">=4.2.0" - checksum: 1350a5110eb1e534e9a6178f4081fb8a4fcc439749e19f4ad699baec9090fcb90fe532d5e191d91a062dc6e454a14a8d7eb2ad202f57135a30c4a44a3024f039 + checksum: 3ee44faa24410cd649b5c864e068d438aa437ef64e9e4a66a41646a6d3024d3097a695eeb3fb26ee364705d3cb9653a65756d009e6a53badb6066a5f447bf7ed languageName: node linkType: hard @@ -3701,39 +3743,55 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:0.25.4": - version: 0.25.4 - resolution: "typedoc@npm:0.25.4" +"typedoc@npm:0.25.13": + version: 0.25.13 + resolution: "typedoc@npm:0.25.13" dependencies: lunr: "npm:^2.3.9" marked: "npm:^4.3.0" minimatch: "npm:^9.0.3" - shiki: "npm:^0.14.1" + shiki: "npm:^0.14.7" peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x bin: typedoc: bin/typedoc - checksum: 638f63d751ba86f1b0e04a303501b88b6e97ba093f82c3fa72a555c207e16fd316ec76c13f7d628e9ee26296f80fddc45b87d4b13714925c5e726047adb76d22 + checksum: 3c82603894b5830c4b027b4f4f9ca70f770b6752c6512a42e780c40cb67fe4c9a144e34a837bb35aab14a125e00a5893e1e6feac1ec86a2add80f46833b279d4 + languageName: node + linkType: hard + +"typescript-eslint@npm:7.13.1": + version: 7.13.1 + resolution: "typescript-eslint@npm:7.13.1" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:7.13.1" + "@typescript-eslint/parser": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 01f4578c6174b5266f8082fbf069218145eae7cd175982c0460508c32dd0461f96c71c33727c4140e80f8ed1d649d9e2fd28ee9eaf6a5f4fd9707cc3461a95d1 languageName: node linkType: hard -"typescript@npm:5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:5.4.5": + version: 5.4.5 + resolution: "typescript@npm:5.4.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + checksum: d04a9e27e6d83861f2126665aa8d84847e8ebabcea9125b9ebc30370b98cb38b5dff2508d74e2326a744938191a83a69aa9fddab41f193ffa43eabfdf3f190a5 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A5.4.5#optional!builtin": + version: 5.4.5 + resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + checksum: 584be8bac7112ad49a9eb9992f71d542b1ff2fafb5bb315e1c196145e8feab589f1d7223cfb2d5df6770789582e6918f8287d1f2f89911b38eb80e29c560ad00 languageName: node linkType: hard