From 2dd2aed788b994f74d0c6e3c6748e772d1131ea8 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sat, 6 Jun 2026 18:08:37 +0200 Subject: [PATCH 1/7] added knip --- knip.json | 31 + package.json | 5 +- .../tests/Gemma4ParserStrategy.test.d.ts | 2 + .../tests/Gemma4ParserStrategy.test.d.ts.map | 1 + packages/transformers/package.json | 3 +- .../transformers/scripts/build/constants.mjs | 2 +- .../transformers/src/models/modeling_utils.js | 22 +- .../src/models/whisper/common_whisper.js | 2 +- packages/transformers/src/utils/audio.js | 4 +- packages/transformers/src/utils/constants.js | 4 +- packages/transformers/src/utils/core.js | 65 -- packages/transformers/src/utils/dtypes.js | 4 +- packages/transformers/src/utils/hub.js | 4 +- .../transformers/tests/tokenizers.test.js | 2 +- pnpm-lock.yaml | 571 +++++++++++++++++- 15 files changed, 630 insertions(+), 92 deletions(-) create mode 100644 knip.json create mode 100644 packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts create mode 100644 packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map diff --git a/knip.json b/knip.json new file mode 100644 index 000000000..a433ce239 --- /dev/null +++ b/knip.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://unpkg.com/knip@6/schema.json", + "tags": ["-lintignore"], + "ignoreBinaries": ["doc-builder", "python"], + "ignoreWorkspaces": ["packages/transformers-agent"], + "workspaces": { + ".": { + "entry": ["scripts/*.mjs"], + "project": ["scripts/**/*.mjs"] + }, + "packages/transformers": { + "entry": [ + "src/models/registry.js", + "tests/**/*.js", + "scripts/*.mjs", + "docs/scripts/**/*.js", + "docs/plugins/**/*.js" + ], + "project": [ + "src/**/*.{js,ts}", + "tests/**/*.js", + "scripts/**/*.mjs", + "docs/scripts/**/*.js", + "docs/plugins/**/*.js", + "!coverage/**", + "!dist/**", + "!types/**" + ] + } + } +} diff --git a/package.json b/package.json index af64a6fab..110594902 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "test": "pnpm -r test", "format": "prettier --write .", "format:check": "prettier --check .", - "dev": "node scripts/dev.mjs" + "dev": "node scripts/dev.mjs", + "knip": "knip" }, "repository": { "type": "git", @@ -23,6 +24,8 @@ }, "homepage": "https://github.com/huggingface/transformers.js#readme", "devDependencies": { + "@types/node": "^24.10.9", + "knip": "^6.15.0", "prettier": "3.8.1", "typescript": "5.9.3" }, diff --git a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts new file mode 100644 index 000000000..10daedc0b --- /dev/null +++ b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Gemma4ParserStrategy.test.d.ts.map \ No newline at end of file diff --git a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map new file mode 100644 index 000000000..360a174e0 --- /dev/null +++ b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Gemma4ParserStrategy.test.d.ts","sourceRoot":"","sources":["../../Gemma4ParserStrategy.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/transformers/package.json b/packages/transformers/package.json index 8ea694b11..c1cd8ca3c 100644 --- a/packages/transformers/package.json +++ b/packages/transformers/package.json @@ -57,17 +57,18 @@ "dependencies": { "@huggingface/jinja": "^0.5.6", "@huggingface/tokenizers": "^0.1.3", + "onnxruntime-common": "1.24.3", "onnxruntime-node": "1.24.3", "onnxruntime-web": "1.26.0-dev.20260416-b7804b056c", "sharp": "^0.34.5" }, "devDependencies": { + "@jest/globals": "30.2.0", "@types/jest": "^30.0.0", "@types/node": "^24.1.0", "@webgpu/types": "^0.1.69", "esbuild": "^0.27.2", "jest": "^30.2.0", - "jest-environment-node": "^30.2.0", "jsdoc-to-markdown": "^9.1.3", "typescript": "5.9.3" }, diff --git a/packages/transformers/scripts/build/constants.mjs b/packages/transformers/scripts/build/constants.mjs index f8b2a3373..765203f5e 100644 --- a/packages/transformers/scripts/build/constants.mjs +++ b/packages/transformers/scripts/build/constants.mjs @@ -1,7 +1,7 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; -export const DIST_FOLDER = "dist"; +const DIST_FOLDER = "dist"; export const NODE_IGNORE_MODULES = ["onnxruntime-web"]; export const NODE_EXTERNAL_MODULES = [ "onnxruntime-common", diff --git a/packages/transformers/src/models/modeling_utils.js b/packages/transformers/src/models/modeling_utils.js index ec9f17487..f9fe9558a 100644 --- a/packages/transformers/src/models/modeling_utils.js +++ b/packages/transformers/src/models/modeling_utils.js @@ -86,7 +86,7 @@ export function boolTensor(value) { return new Tensor('bool', [value], [1]); } -export { getSessionsConfig, getTextOnlySessions, MODEL_TYPES } from './session_config.js'; +export { MODEL_TYPES } from './session_config.js'; /** * Runtime-only model type configuration (forward functions, generation flags). @@ -1101,7 +1101,7 @@ export class PreTrainedModel extends Callable { * @returns {Promise} Promise that resolves with the output of the seq2seq model. * @private */ -export async function seq2seq_forward(self, model_inputs) { +async function seq2seq_forward(self, model_inputs) { let { encoder_outputs, input_ids, decoder_input_ids, decoder_attention_mask, ...other_decoder_inputs } = model_inputs; // Encode if needed @@ -1164,7 +1164,7 @@ export async function encoder_forward(self, model_inputs) { return await sessionRun(session, encoderFeeds); } -export async function auto_encoder_forward(self, model_inputs) { +async function auto_encoder_forward(self, model_inputs) { const encoded = await self.encode(model_inputs); const decoded = await self.decode(encoded); return decoded; @@ -1219,7 +1219,7 @@ export function getPastKeyValues(decoderResults, pastKeyValues) { * @param {Object} model_output The output of the model. * @returns {{cross_attentions?: Tensor[]}} An object containing attentions. */ -export function getAttentions(model_output) { +function getAttentions(model_output) { const attentions = {}; for (const attnName of ['cross_attentions', 'encoder_attentions', 'decoder_attentions']) { @@ -1376,7 +1376,7 @@ export async function decoder_forward(self, model_inputs, is_encoder_decoder = f * @returns {Promise} The model's output tensor * @private */ -export async function generic_text_to_text_forward( +async function generic_text_to_text_forward( self, { // Generic parameters: @@ -1489,7 +1489,7 @@ export async function generic_text_to_text_forward( * @returns {Promise} The model's output tensor. * @private */ -export async function audio_text_to_text_forward(self, params) { +async function audio_text_to_text_forward(self, params) { return await generic_text_to_text_forward(self, { ...params, modality_input_names: ['audio_values', 'input_features'], @@ -1506,7 +1506,7 @@ export async function audio_text_to_text_forward(self, params) { * @returns {Promise} The model's output tensor. * @private */ -export async function image_text_to_text_forward(self, params) { +async function image_text_to_text_forward(self, params) { return await generic_text_to_text_forward(self, { ...params, modality_input_names: ['pixel_values'], @@ -1559,7 +1559,7 @@ export function cumsum_masked_fill(attention_mask, start_index = 0) { * position_ids = position_ids[:, -input_ids.shape[1] :] * ``` */ -export function create_position_ids(model_inputs, past_key_values = null, start_index = 0) { +function create_position_ids(model_inputs, past_key_values = null, start_index = 0) { const { input_ids, inputs_embeds, attention_mask } = model_inputs; const { data, dims } = cumsum_masked_fill(attention_mask, start_index); @@ -1631,7 +1631,7 @@ export function encoder_decoder_prepare_inputs_for_generation(self, input_ids, m }; } -export function multimodal_text_to_text_prepare_inputs_for_generation(self, ...args) { +function multimodal_text_to_text_prepare_inputs_for_generation(self, ...args) { if (self.config.is_encoder_decoder) { return encoder_decoder_prepare_inputs_for_generation(self, ...args); } else { @@ -1639,7 +1639,7 @@ export function multimodal_text_to_text_prepare_inputs_for_generation(self, ...a } } -export function default_merge_input_ids_with_features({ +function default_merge_input_ids_with_features({ modality_token_id, inputs_embeds, modality_features, @@ -1714,7 +1714,7 @@ export function default_merge_input_ids_with_audio_features({ * @returns {Promise>} A Promise that resolves to a dictionary of configuration objects. * @private */ -export async function get_optional_configs(pretrained_model_name_or_path, names, options) { +async function get_optional_configs(pretrained_model_name_or_path, names, options) { return Object.fromEntries( await Promise.all( Object.keys(names).map(async (name) => { diff --git a/packages/transformers/src/models/whisper/common_whisper.js b/packages/transformers/src/models/whisper/common_whisper.js index 28025283c..c77375035 100644 --- a/packages/transformers/src/models/whisper/common_whisper.js +++ b/packages/transformers/src/models/whisper/common_whisper.js @@ -103,7 +103,7 @@ const WHISPER_LANGUAGES = [ // @ts-ignore export const WHISPER_LANGUAGE_MAPPING = new Map(WHISPER_LANGUAGES); // @ts-ignore -export const WHISPER_TO_LANGUAGE_CODE_MAPPING = new Map([ +const WHISPER_TO_LANGUAGE_CODE_MAPPING = new Map([ ...WHISPER_LANGUAGES.map(([k, v]) => [v, k]), ...[ ['burmese', 'my'], diff --git a/packages/transformers/src/utils/audio.js b/packages/transformers/src/utils/audio.js index c2af80753..9fec8153b 100644 --- a/packages/transformers/src/utils/audio.js +++ b/packages/transformers/src/utils/audio.js @@ -77,7 +77,9 @@ export async function load_audio(url, sampling_rate) { /** * @deprecated Use {@link load_audio} instead. */ -export const read_audio = load_audio; +export async function read_audio(url, sampling_rate) { + return await load_audio(url, sampling_rate); +} /** * Helper function to generate windows that are special cases of the generalized cosine window. diff --git a/packages/transformers/src/utils/constants.js b/packages/transformers/src/utils/constants.js index 2acf16c35..7f750e7d3 100644 --- a/packages/transformers/src/utils/constants.js +++ b/packages/transformers/src/utils/constants.js @@ -1,8 +1,6 @@ export const GITHUB_ISSUE_URL = 'https://github.com/huggingface/transformers.js/issues/new/choose'; -export const CONFIG_NAME = 'config.json'; export const FEATURE_EXTRACTOR_NAME = 'preprocessor_config.json'; -export const IMAGE_PROCESSOR_NAME = FEATURE_EXTRACTOR_NAME; +export const IMAGE_PROCESSOR_NAME = 'preprocessor_config.json'; export const PROCESSOR_NAME = 'processor_config.json'; export const CHAT_TEMPLATE_NAME = 'chat_template.jinja'; -export const GENERATION_CONFIG_NAME = 'generation_config.json'; diff --git a/packages/transformers/src/utils/core.js b/packages/transformers/src/utils/core.js index 3304d5f90..0c7045e47 100644 --- a/packages/transformers/src/utils/core.js +++ b/packages/transformers/src/utils/core.js @@ -141,39 +141,6 @@ export class DefaultProgressCallback extends Callable { } } -/** - * Reverses the keys and values of an object. - * - * @param {Object} data The object to reverse. - * @returns {Object} The reversed object. - * @see https://ultimatecourses.com/blog/reverse-object-keys-and-values-in-javascript - */ -export function reverseDictionary(data) { - // https://ultimatecourses.com/blog/reverse-object-keys-and-values-in-javascript - return Object.fromEntries(Object.entries(data).map(([key, value]) => [value, key])); -} - -/** - * Escapes regular expression special characters from a string by replacing them with their escaped counterparts. - * - * @param {string} string The string to escape. - * @returns {string} The escaped string. - */ -export function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string -} - -/** - * Check if a value is a typed array. - * @param {*} val The value to check. - * @returns {boolean} True if the value is a `TypedArray`, false otherwise. - * - * Adapted from https://stackoverflow.com/a/71091338/13989043 - */ -export function isTypedArray(val) { - return val?.prototype?.__proto__?.constructor?.name === 'TypedArray'; -} - /** * Check if a value is an integer. * @param {*} x The value to check. @@ -208,26 +175,6 @@ export function calculateDimensions(arr) { return dimensions; } -/** - * Replicate python's .pop() method for objects. - * @param {Object} obj The object to pop from. - * @param {string} key The key to pop. - * @param {*} defaultValue The default value to return if the key does not exist. - * @returns {*} The value of the popped key. - * @throws {Error} If the key does not exist and no default value is provided. - */ -export function pop(obj, key, defaultValue = undefined) { - const value = obj[key]; - if (value !== undefined) { - delete obj[key]; - return value; - } - if (defaultValue === undefined) { - throw Error(`Key ${key} does not exist in object.`); - } - return defaultValue; -} - /** * Efficiently merge arrays, creating a new copy. * Adapted from https://stackoverflow.com/a/6768642/13989043 @@ -277,18 +224,6 @@ export function pick(o, props) { ); } -/** - * Calculate the length of a string, taking multi-byte characters into account. - * This mimics the behavior of Python's `len` function. - * @param {string} s The string to calculate the length of. - * @returns {number} The length of the string. - */ -export function len(s) { - let length = 0; - for (const c of s) ++length; - return length; -} - /** * Count the occurrences of a value in an array or string. * This mimics the behavior of Python's `count` method. diff --git a/packages/transformers/src/utils/dtypes.js b/packages/transformers/src/utils/dtypes.js index ff026f747..7fbf5d88d 100644 --- a/packages/transformers/src/utils/dtypes.js +++ b/packages/transformers/src/utils/dtypes.js @@ -49,8 +49,8 @@ export const DATA_TYPES = Object.freeze({ }); /** @typedef {keyof typeof DATA_TYPES} DataType */ -export const DEFAULT_DEVICE_DTYPE = DATA_TYPES.fp32; -export const DEFAULT_DEVICE_DTYPE_MAPPING = Object.freeze({ +const DEFAULT_DEVICE_DTYPE = DATA_TYPES.fp32; +const DEFAULT_DEVICE_DTYPE_MAPPING = Object.freeze({ // NOTE: If not specified, will default to fp32 [DEVICE_TYPES.wasm]: DATA_TYPES.q8, }); diff --git a/packages/transformers/src/utils/hub.js b/packages/transformers/src/utils/hub.js index 09f42e168..9be63153f 100755 --- a/packages/transformers/src/utils/hub.js +++ b/packages/transformers/src/utils/hub.js @@ -195,7 +195,7 @@ export async function checkCachedResource(cache, localPath, proposedCacheKey) { * @param {PretrainedOptions} [options] Options containing progress callback and context for progress updates. * @returns {Promise} */ -export async function storeCachedResource(path_or_repo_id, filename, cache, cacheKey, response, result, options = {}) { +async function storeCachedResource(path_or_repo_id, filename, cache, cacheKey, response, result, options = {}) { // Check again whether request is in cache. If not, we add the response to the cache if ((await cache.match(cacheKey)) !== undefined) { return; @@ -249,7 +249,7 @@ export async function storeCachedResource(path_or_repo_id, filename, cache, cach * @throws Will throw an error if the file is not found and `fatal` is true. * @returns {Promise} A Promise that resolves with the file content as a Uint8Array if `return_path` is false, or the file path as a string if `return_path` is true. */ -export async function loadResourceFile( +async function loadResourceFile( path_or_repo_id, filename, fatal = true, diff --git a/packages/transformers/tests/tokenizers.test.js b/packages/transformers/tests/tokenizers.test.js index 1e7977ba9..a708ad056 100644 --- a/packages/transformers/tests/tokenizers.test.js +++ b/packages/transformers/tests/tokenizers.test.js @@ -8,7 +8,7 @@ describe("Tokenizers (model-specific)", () => { describe(tokenizer_name, () => { for (const model_id in TEST_CONFIG) { describe(model_id, () => { - /** @type {import('../src/tokenizers.js').PreTrainedTokenizer} */ + /** @type {import('../src/tokenization_utils.js').PreTrainedTokenizer} */ let tokenizer; beforeAll(async () => { tokenizer = await TOKENIZER_CLASS.from_pretrained(model_id); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bea34792e..63f4e6357 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,12 @@ importers: .: devDependencies: + '@types/node': + specifier: ^24.10.9 + version: 24.10.9 + knip: + specifier: ^6.15.0 + version: 6.15.0 prettier: specifier: 3.8.1 version: 3.8.1 @@ -23,6 +29,9 @@ importers: '@huggingface/tokenizers': specifier: ^0.1.3 version: 0.1.3 + onnxruntime-common: + specifier: 1.24.3 + version: 1.24.3 onnxruntime-node: specifier: 1.24.3 version: 1.24.3 @@ -33,6 +42,9 @@ importers: specifier: ^0.34.5 version: 0.34.5 devDependencies: + '@jest/globals': + specifier: 30.2.0 + version: 30.2.0 '@types/jest': specifier: ^30.0.0 version: 30.0.0 @@ -48,9 +60,6 @@ importers: jest: specifier: ^30.2.0 version: 30.2.0(@types/node@24.10.9) - jest-environment-node: - specifier: ^30.2.0 - version: 30.2.0 jsdoc-to-markdown: specifier: ^9.1.3 version: 9.1.3 @@ -225,15 +234,24 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + '@emnapi/core@1.8.1': resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==} + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + '@emnapi/runtime@1.8.1': resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} '@emnapi/wasi-threads@1.1.0': resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@esbuild/aix-ppc64@0.27.2': resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} engines: {node: '>=18'} @@ -651,6 +669,12 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -663,6 +687,223 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oxc-parser/binding-android-arm-eabi@0.133.0': + resolution: {integrity: sha512-l/44caGse+VpnY9gx0yvvc5QnnG3yG1FO3KZgYvNL1GZrfK86zIwAOgGEVlxDyRymzrU/KHiblPFpevKOmJmUA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-parser/binding-android-arm64@0.133.0': + resolution: {integrity: sha512-KUHmPMziLBp4u+zbrLdB7iWS7KshuZe+RAp7ELnY9SI9nNXBZ+dp8fiBqWOxhXqn+FQg3a4UcQhwmsJOKV8Jjg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-parser/binding-darwin-arm64@0.133.0': + resolution: {integrity: sha512-q8dWmnU/8ea2tga9w2f1PinQ5rcMPDUGkF64T189b65YMjUomET4oy5oRldOr4AwOQkneOG/Zttnz1Dvrc62wg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.133.0': + resolution: {integrity: sha512-cOKeIELIB2bJnCKwqx4Rdj+1Lss/U6uCbLxRySZrhyOOQa1flKhwZFjEHRHxk8fU1NKmhK5OnTdPQ4CpjuFuVw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-freebsd-x64@0.133.0': + resolution: {integrity: sha512-OpaSv4pW3KgFrMYQxTaS0aOE4T1DQF3qZE/4B6uqqv1KgPWWd4UQhJALi8PJPX1RRV5K7ThKXRfF7qGg2+3l1A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-parser/binding-linux-arm-gnueabihf@0.133.0': + resolution: {integrity: sha512-JGK1wlGrGwxBIlVSF7KWTX1/ru6BEtf28fRROztDRkLfiW+Kxa4onnriezMIiogfn9hVw2KzYcKiLjkLR2ns8A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm-musleabihf@0.133.0': + resolution: {integrity: sha512-yuZO533Ftonxn/iyoqQzURzLQHMspvsIyfiCSNi1t/ER4eIQaR0SsmUOUm5b/lmSig7IWIUa5/BrbEkAPwcilQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm64-gnu@0.133.0': + resolution: {integrity: sha512-hvpbqT5pN2rR+3+xtWeizwfR/aZ0vGceg6TqYMl+ToxMpk9/tmnX7kSvQnfEUkoua8mhogzvIKsAkn0wxgblBA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-arm64-musl@0.133.0': + resolution: {integrity: sha512-wJQGamIosQBoJHW9+S5XxrtKRo3eyJxsnS1XCPrqN0LHi8uw1pTqqTfn3t/NVuvbBg7Pumn4ez9Eidgcn0xbEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-ppc64-gnu@0.133.0': + resolution: {integrity: sha512-Koaz32/O5+abIfrNGdyndgRvdOZ9jEf5/z3Ep9h3h2QWpdDiUQpVwgH0OcMXCs+l9aXxPLtkupqyVig9W6FDKw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxc-parser/binding-linux-riscv64-gnu@0.133.0': + resolution: {integrity: sha512-R4vOjWzxhnNWHnVLeiB6jNuIifdy9vcMXZGPc7StXcxBovI+U2zg1QhZ9o8OjV80oGivs1lX5NfPLzk4IPqlRA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-parser/binding-linux-riscv64-musl@0.133.0': + resolution: {integrity: sha512-iwgBNUTHiMdxARLYuM0SBlnYeb19iw1Ea5M+4ERZupCsBMLArti6FyZ6UfFjJxIiTDr2oW2DGQFxlQVQ/dW9rA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-parser/binding-linux-s390x-gnu@0.133.0': + resolution: {integrity: sha512-ZwZNo8FZmB/gVfboQl+wXilBigGl+6nQQs+nITOeAP/HcAOjiHl6XZJL9F/KXNEspODQcbjAiyjUbeCJd9a0fA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxc-parser/binding-linux-x64-gnu@0.133.0': + resolution: {integrity: sha512-govCvWx1dBlED3uu4qXctxpRcouu9I8Kn+DBktGCl760JtlGJzc9l/OmPJKlYWSbrRqKkMZehNeZ/4Wfma7uSA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-linux-x64-musl@0.133.0': + resolution: {integrity: sha512-ssTlpXD5Mq9uCssDJPzlRWqBt4Y7Zzd9i+XZhWmK/9Y6KUIuAxVYTYiI8lxcGWi0+3/Cz4A8q9UrD4NK9Y2j7g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-openharmony-arm64@0.133.0': + resolution: {integrity: sha512-51aByfXhPtLEdWG4a2Ihdw6cPWV1ei1AarALpFdDP8MLWDLE2NuUMgbo3DERR2Kt8fT/ok1GUvBiLxVGke9uUQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-parser/binding-wasm32-wasi@0.133.0': + resolution: {integrity: sha512-2e16tkKp+wDO2GTAmXfxbBcCmGEaFPIJEIRBBmVKNVXSc8/fJsSIaBGyFTPHM9ST5GNWgJcYIt94rDTks+PLwA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@oxc-parser/binding-win32-arm64-msvc@0.133.0': + resolution: {integrity: sha512-KPTNDKbxH1cglrqTyVeXHb4Pk4oksz8EcE1/v8zqU7N4UXbiHfA/IwtXZ2U77fnRAWBbgVkl/lZbL7o3hRdejg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-ia32-msvc@0.133.0': + resolution: {integrity: sha512-Una1bNYv9zCavQrfnDR9wuZVB3itLjCEH4Oz7i6CwAJN/Xq9b+zbbcxmvdkKvvJt4Ngc/MBmIYlbLo3zS4TQ0A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.133.0': + resolution: {integrity: sha512-kjBhCiOGSYTwDJQuuZa7a94JbP8htWu7J0X1KwH74kV2K5eYf6eyJRYmkpCDvr0XEL8tMxYI4WU1VekblFCLgg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.133.0': + resolution: {integrity: sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==} + + '@oxc-resolver/binding-android-arm-eabi@11.20.0': + resolution: {integrity: sha512-IjfWOXRgJFNdORDl+Uf1aibNgZY2guOD3zmOhx1BGVb/MIiqlFTdmjpQNplSN58lhWehnX4UNqC3QwpUo8pjJg==} + cpu: [arm] + os: [android] + + '@oxc-resolver/binding-android-arm64@11.20.0': + resolution: {integrity: sha512-QqslZAuFQG8Q9xm7JuIn8JUbvywhSBMVhuQHtYW+auirZJloS41oxUUaBXk7uUhZJgp44c5zQLeVvmFaDQB+2Q==} + cpu: [arm64] + os: [android] + + '@oxc-resolver/binding-darwin-arm64@11.20.0': + resolution: {integrity: sha512-MUcavykj2ewlR+kc5arpg4tC2RvzJkUxWtNv74pf7lcNk00GpIpN43vXMj+j6r4eMmfZhlb8hueKoIb8e9kAGQ==} + cpu: [arm64] + os: [darwin] + + '@oxc-resolver/binding-darwin-x64@11.20.0': + resolution: {integrity: sha512-BGB16nRUK5Etiv//ihPyzj8Lj1px0mhh4YIfe0FDf045ywknfSm0GEbiRESpr6Q4K82AvnyaRIhhluHByvS4bg==} + cpu: [x64] + os: [darwin] + + '@oxc-resolver/binding-freebsd-x64@11.20.0': + resolution: {integrity: sha512-JZgtePaqj3qmD5XFHJaSLWzHRxQu0LaPkdoM1KJXYADvAaa83ijXHclV3ej3CueeW0wxfIAbGCZVP45J0CA7uQ==} + cpu: [x64] + os: [freebsd] + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.20.0': + resolution: {integrity: sha512-hOQ/p3ry3v3SchUBXicrrnszaI/UmYzM4wtS4RGfwgVUX7a+HbyQSzJ5aOzu+o6XZkFkS3ZXN4PZAzhOb77OSg==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm-musleabihf@11.20.0': + resolution: {integrity: sha512-2ArPksaw0AqeuGBfoS715VF+JvJQAhD2niWgjE5hVO+L+nAfikVQopvngCMX9x4BD8itWoQ3dnikrQyl5Ho5Jg==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-gnu@11.20.0': + resolution: {integrity: sha512-0bJnmYFp62JdZ4nVMDUZ/C58BCZOCcqgKtnUlp7L9Ojf/czIN+3j72YlLPeWLkzlr6SlYvIQA4SGV/HyO0d+qg==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-musl@11.20.0': + resolution: {integrity: sha512-wKHHzPKZo7Ufhv/Bt6yxT7FOgnIgW4gwXcJUipkShGp68W3wGVqvr1Sr0fY65lN0Oy6y41+g2kIDvkgZaMMUkw==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-ppc64-gnu@11.20.0': + resolution: {integrity: sha512-RN8goF7Ie0B79L4i4G6OeBocTgSC56vJbQ65VJje+oXnldVpLnOU7j/AQ/dP94TcCS+Yh6WG8u3Qt4ETteXFNQ==} + cpu: [ppc64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-gnu@11.20.0': + resolution: {integrity: sha512-5l1yU6/xQEqLZRzxqmMxJfWPslpwCmBsdDGaBvABPehxquCXDC7dd7oraNdKSJUMDXSM7VvVj8H2D2FTjU7oWw==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-musl@11.20.0': + resolution: {integrity: sha512-xHEvkbgz6UC+A3JOyDQy76LkUaxsNSfIr3/GV8slwZsnuooJiIB34gzJfsyvR4JdCYNUUPsRJc/w/oWkODu+hg==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-s390x-gnu@11.20.0': + resolution: {integrity: sha512-aWPDUUmSeyHvlW+SoEUd+JIJsQhVhu6a5tBpDRMu058naPAchTgAVGCFy35zjbnFlt0i8hLWziff6HX0D3LU4g==} + cpu: [s390x] + os: [linux] + + '@oxc-resolver/binding-linux-x64-gnu@11.20.0': + resolution: {integrity: sha512-x2YeSimvhJjKLVD8KSu8f/rqU1potcdEMkApIPJqjZWN7c2Fpt4g2X32WDg1p+XDAmyT7nuQGe0vnhvXeLbH+g==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-linux-x64-musl@11.20.0': + resolution: {integrity: sha512-kcRLEIxpZefeYfLChjpgFf3ilBzRDZ+yobMrpRsQlSrxuFGtm3U6PMU7AaEpMqo3NfDGVyJJseAjnRLzMFHjwQ==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-openharmony-arm64@11.20.0': + resolution: {integrity: sha512-HHcfnApSZGtKhTiHqe8OZruOZe5XuFQH5/E0Yhj3u8fnFvzkM4/k6WjacUf4SvA0SPEAbfbgYmVPuo0VX/fIBQ==} + cpu: [arm64] + os: [openharmony] + + '@oxc-resolver/binding-wasm32-wasi@11.20.0': + resolution: {integrity: sha512-Tn0y1XOFYHNfK1wp1Z5QK8Rcld/bsOwRISQXfqAZ5IBpv8Gz1IvV39fUWNprqNdRizgcvFhOzWwFun2zkJsyBg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-resolver/binding-win32-arm64-msvc@11.20.0': + resolution: {integrity: sha512-qPi25YNPe4YenS8MgsQU2+bIFHxxpLx1LVna2444cEHqNPhNjvWf9zqj4aWE43H9LpAsTmkkAlA3eL5ElBU3mA==} + cpu: [arm64] + os: [win32] + + '@oxc-resolver/binding-win32-x64-msvc@11.20.0': + resolution: {integrity: sha512-Wb14jWEW8huH6It9F6sXd9vrYmIS7pMrgkU6sxpLxkP+9z+wRgs71hUEhRpcn8FOXAFa27FVWfY2tRpbfTzfLw==} + cpu: [x64] + os: [win32] + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1190,6 +1431,18 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fd-package-json@2.0.0: + resolution: {integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-set@5.3.0: resolution: {integrity: sha512-FKCxdjLX0J6zqTWdT0RXIxNF/n7MyXXnsSUp0syLEOCKdexvPZ02lNNv2a+gpK9E3hzUYF3+eFZe32ci7goNUg==} engines: {node: '>=12.17'} @@ -1223,6 +1476,11 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} + formatly@0.3.0: + resolution: {integrity: sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==} + engines: {node: '>=18.3.0'} + hasBin: true + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -1247,6 +1505,9 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1493,6 +1754,10 @@ packages: node-notifier: optional: true + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1550,6 +1815,11 @@ packages: klaw@3.0.0: resolution: {integrity: sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==} + knip@6.15.0: + resolution: {integrity: sha512-uBaKFEGcu/HG4EY2gWFBMr+fBF43Jftoc2riJX51TKME1Z46C8UQIbNEusenYbEWihphxe2PY0Kns0yPvPYz4A==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -1698,6 +1968,13 @@ packages: onnxruntime-web@1.26.0-dev.20260416-b7804b056c: resolution: {integrity: sha512-MD6Ss4GSpQBo6zqoJzyT9LRbKYs7x/JVN23FT24EcEvlqF4VuzPOeH6X38orZPKHQDbprn7K+SBpu0/mj2CQiw==} + oxc-parser@0.133.0: + resolution: {integrity: sha512-661RSx+ZcjBmjBYid+Fpp/2F5EbtildpeoZh5HdgnGs+jZ03nqQEQW8yGkt4BGyOC3OMPDQQRl8M5kqD2/g6jw==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxc-resolver@11.20.0: + resolution: {integrity: sha512-CblytBiV/a/ZXY34dsVU2NxhIOxMXst8CvDCtyBelVITgd7PLrKzbEbA6oKLdPjvDKDzCiW48qzmzZ+mYaqn+g==} + p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -1748,6 +2025,10 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} @@ -1800,6 +2081,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -1850,6 +2134,10 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + smol-toml@1.6.1: + resolution: {integrity: sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==} + engines: {node: '>= 18'} + sort-array@5.1.1: resolution: {integrity: sha512-EltS7AIsNlAFIM9cayrgKrM6XP94ATWwXP4LCL4IQbvbYhELSt2hZTrixg+AaQwnWFs/JGJgqU3rxMcNNWxGAA==} engines: {node: '>=12.17'} @@ -1908,6 +2196,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -1928,6 +2220,10 @@ packages: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -1967,6 +2263,10 @@ packages: engines: {node: '>=0.8.0'} hasBin: true + unbash@3.0.0: + resolution: {integrity: sha512-FeFPZ/WFT0mbRCuydiZzpPFlrYN8ZUpphQKoq4EeElVIYjYyGzPMxQR/simUwCOJIyVhpFk4RbtyO7RuMpMnHA==} + engines: {node: '>=14'} + underscore@1.13.7: resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} @@ -1994,6 +2294,10 @@ packages: resolution: {integrity: sha512-e/FRLDVdZQWFrAzU6Hdvpm7D7m2ina833gIKLptQykRK49mmCYHLHq7UqjPDbxbKLZkTkW1rFqbengdE3sLfdw==} engines: {node: '>=12.17'} + walk-up-path@4.0.0: + resolution: {integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==} + engines: {node: 20 || >=22} + walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -2034,6 +2338,11 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -2046,6 +2355,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + snapshots: '@babel/code-frame@7.28.6': @@ -2237,12 +2549,23 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + '@emnapi/core@1.8.1': dependencies: '@emnapi/wasi-threads': 1.1.0 tslib: 2.8.1 optional: true + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + '@emnapi/runtime@1.8.1': dependencies: tslib: 2.8.1 @@ -2253,6 +2576,11 @@ snapshots: tslib: 2.8.1 optional: true + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 + optional: true + '@esbuild/aix-ppc64@0.27.2': optional: true @@ -2659,6 +2987,13 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.1 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2671,6 +3006,133 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.20.1 + '@oxc-parser/binding-android-arm-eabi@0.133.0': + optional: true + + '@oxc-parser/binding-android-arm64@0.133.0': + optional: true + + '@oxc-parser/binding-darwin-arm64@0.133.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.133.0': + optional: true + + '@oxc-parser/binding-freebsd-x64@0.133.0': + optional: true + + '@oxc-parser/binding-linux-arm-gnueabihf@0.133.0': + optional: true + + '@oxc-parser/binding-linux-arm-musleabihf@0.133.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.133.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.133.0': + optional: true + + '@oxc-parser/binding-linux-ppc64-gnu@0.133.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-gnu@0.133.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-musl@0.133.0': + optional: true + + '@oxc-parser/binding-linux-s390x-gnu@0.133.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.133.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.133.0': + optional: true + + '@oxc-parser/binding-openharmony-arm64@0.133.0': + optional: true + + '@oxc-parser/binding-wasm32-wasi@0.133.0': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.133.0': + optional: true + + '@oxc-parser/binding-win32-ia32-msvc@0.133.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.133.0': + optional: true + + '@oxc-project/types@0.133.0': {} + + '@oxc-resolver/binding-android-arm-eabi@11.20.0': + optional: true + + '@oxc-resolver/binding-android-arm64@11.20.0': + optional: true + + '@oxc-resolver/binding-darwin-arm64@11.20.0': + optional: true + + '@oxc-resolver/binding-darwin-x64@11.20.0': + optional: true + + '@oxc-resolver/binding-freebsd-x64@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-arm-musleabihf@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-gnu@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-musl@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-ppc64-gnu@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-riscv64-gnu@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-riscv64-musl@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-s390x-gnu@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-x64-gnu@11.20.0': + optional: true + + '@oxc-resolver/binding-linux-x64-musl@11.20.0': + optional: true + + '@oxc-resolver/binding-openharmony-arm64@11.20.0': + optional: true + + '@oxc-resolver/binding-wasm32-wasi@11.20.0': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@oxc-resolver/binding-win32-arm64-msvc@11.20.0': + optional: true + + '@oxc-resolver/binding-win32-x64-msvc@11.20.0': + optional: true + '@pkgjs/parseargs@0.11.0': optional: true @@ -3167,6 +3629,14 @@ snapshots: dependencies: bser: 2.1.1 + fd-package-json@2.0.0: + dependencies: + walk-up-path: 4.0.0 + + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + file-set@5.3.0: dependencies: array-back: 6.2.2 @@ -3190,6 +3660,10 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + formatly@0.3.0: + dependencies: + fd-package-json: 2.0.0 + fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -3203,6 +3677,10 @@ snapshots: get-stream@6.0.1: {} + get-tsconfig@4.14.0: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -3644,6 +4122,8 @@ snapshots: - supports-color - ts-node + jiti@2.7.0: {} + js-tokens@4.0.0: {} js-yaml@3.14.2: @@ -3714,6 +4194,23 @@ snapshots: dependencies: graceful-fs: 4.2.11 + knip@6.15.0: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + formatly: 0.3.0 + get-tsconfig: 4.14.0 + jiti: 2.7.0 + minimist: 1.2.8 + oxc-parser: 0.133.0 + oxc-resolver: 11.20.0 + picomatch: 4.0.4 + smol-toml: 1.6.1 + strip-json-comments: 5.0.3 + tinyglobby: 0.2.17 + unbash: 3.0.0 + yaml: 2.9.0 + zod: 4.4.3 + leven@3.1.0: {} lines-and-columns@1.2.4: {} @@ -3842,6 +4339,53 @@ snapshots: platform: 1.3.6 protobufjs: 7.5.4 + oxc-parser@0.133.0: + dependencies: + '@oxc-project/types': 0.133.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.133.0 + '@oxc-parser/binding-android-arm64': 0.133.0 + '@oxc-parser/binding-darwin-arm64': 0.133.0 + '@oxc-parser/binding-darwin-x64': 0.133.0 + '@oxc-parser/binding-freebsd-x64': 0.133.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.133.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.133.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.133.0 + '@oxc-parser/binding-linux-arm64-musl': 0.133.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.133.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.133.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.133.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.133.0 + '@oxc-parser/binding-linux-x64-gnu': 0.133.0 + '@oxc-parser/binding-linux-x64-musl': 0.133.0 + '@oxc-parser/binding-openharmony-arm64': 0.133.0 + '@oxc-parser/binding-wasm32-wasi': 0.133.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.133.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.133.0 + '@oxc-parser/binding-win32-x64-msvc': 0.133.0 + + oxc-resolver@11.20.0: + optionalDependencies: + '@oxc-resolver/binding-android-arm-eabi': 11.20.0 + '@oxc-resolver/binding-android-arm64': 11.20.0 + '@oxc-resolver/binding-darwin-arm64': 11.20.0 + '@oxc-resolver/binding-darwin-x64': 11.20.0 + '@oxc-resolver/binding-freebsd-x64': 11.20.0 + '@oxc-resolver/binding-linux-arm-gnueabihf': 11.20.0 + '@oxc-resolver/binding-linux-arm-musleabihf': 11.20.0 + '@oxc-resolver/binding-linux-arm64-gnu': 11.20.0 + '@oxc-resolver/binding-linux-arm64-musl': 11.20.0 + '@oxc-resolver/binding-linux-ppc64-gnu': 11.20.0 + '@oxc-resolver/binding-linux-riscv64-gnu': 11.20.0 + '@oxc-resolver/binding-linux-riscv64-musl': 11.20.0 + '@oxc-resolver/binding-linux-s390x-gnu': 11.20.0 + '@oxc-resolver/binding-linux-x64-gnu': 11.20.0 + '@oxc-resolver/binding-linux-x64-musl': 11.20.0 + '@oxc-resolver/binding-openharmony-arm64': 11.20.0 + '@oxc-resolver/binding-wasm32-wasi': 11.20.0 + '@oxc-resolver/binding-win32-arm64-msvc': 11.20.0 + '@oxc-resolver/binding-win32-x64-msvc': 11.20.0 + p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -3882,6 +4426,8 @@ snapshots: picomatch@4.0.3: {} + picomatch@4.0.4: {} + pirates@4.0.7: {} pkg-dir@4.2.0: @@ -3933,6 +4479,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + reusify@1.1.0: {} roarr@2.15.4: @@ -4001,6 +4549,8 @@ snapshots: slash@3.0.0: {} + smol-toml@1.6.1: {} + sort-array@5.1.1: dependencies: array-back: 6.2.2 @@ -4052,6 +4602,8 @@ snapshots: strip-json-comments@3.1.1: {} + strip-json-comments@5.0.3: {} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -4075,6 +4627,11 @@ snapshots: glob: 7.2.3 minimatch: 3.1.2 + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + tmpl@1.0.5: {} to-regex-range@5.0.1: @@ -4099,6 +4656,8 @@ snapshots: uglify-js@3.19.3: optional: true + unbash@3.0.0: {} + underscore@1.13.7: {} undici-types@7.16.0: {} @@ -4143,6 +4702,8 @@ snapshots: walk-back@5.1.1: {} + walk-up-path@4.0.0: {} + walker@1.0.8: dependencies: makeerror: 1.0.12 @@ -4180,6 +4741,8 @@ snapshots: yallist@3.1.1: {} + yaml@2.9.0: {} + yargs-parser@21.1.1: {} yargs@17.7.2: @@ -4193,3 +4756,5 @@ snapshots: yargs-parser: 21.1.1 yocto-queue@0.1.0: {} + + zod@4.4.3: {} From a82161f414f22543f7b3cdcb0fdd73386a1ba73c Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sat, 6 Jun 2026 18:09:18 +0200 Subject: [PATCH 2/7] removed old code --- .../tests/types/tests/Gemma4ParserStrategy.test.d.ts | 2 -- .../tests/types/tests/Gemma4ParserStrategy.test.d.ts.map | 1 - 2 files changed, 3 deletions(-) delete mode 100644 packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts delete mode 100644 packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map diff --git a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts deleted file mode 100644 index 10daedc0b..000000000 --- a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Gemma4ParserStrategy.test.d.ts.map \ No newline at end of file diff --git a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map b/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map deleted file mode 100644 index 360a174e0..000000000 --- a/packages/transformers-agent/tests/types/tests/Gemma4ParserStrategy.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Gemma4ParserStrategy.test.d.ts","sourceRoot":"","sources":["../../Gemma4ParserStrategy.test.ts"],"names":[],"mappings":""} \ No newline at end of file From 2af13f13fc6acf8f659963f6dea962116c65c137 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sat, 6 Jun 2026 18:19:06 +0200 Subject: [PATCH 3/7] added knip to github actions --- .github/workflows/tests.yml | 16 ++++++++++++++++ knip.json | 1 - 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d4de355b..104081cee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,22 @@ env: ONNXRUNTIME_NODE_INSTALL: skip jobs: + knip: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Install pnpm + uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + - name: Use Node.js 24.10.0 + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 + with: + node-version: "24.10.0" + cache: "pnpm" + - run: pnpm install --frozen-lockfile + - run: pnpm knip + build: if: github.event.pull_request.draft == false runs-on: ubuntu-latest diff --git a/knip.json b/knip.json index a433ce239..0ebc236d9 100644 --- a/knip.json +++ b/knip.json @@ -2,7 +2,6 @@ "$schema": "https://unpkg.com/knip@6/schema.json", "tags": ["-lintignore"], "ignoreBinaries": ["doc-builder", "python"], - "ignoreWorkspaces": ["packages/transformers-agent"], "workspaces": { ".": { "entry": ["scripts/*.mjs"], From 62a67171c9d76eabd06bea6d49a9f40026e380a6 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sun, 7 Jun 2026 07:31:09 +0200 Subject: [PATCH 4/7] moved knip.json to package.json --- knip.json | 30 ------------------------------ package.json | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 30 deletions(-) delete mode 100644 knip.json diff --git a/knip.json b/knip.json deleted file mode 100644 index 0ebc236d9..000000000 --- a/knip.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://unpkg.com/knip@6/schema.json", - "tags": ["-lintignore"], - "ignoreBinaries": ["doc-builder", "python"], - "workspaces": { - ".": { - "entry": ["scripts/*.mjs"], - "project": ["scripts/**/*.mjs"] - }, - "packages/transformers": { - "entry": [ - "src/models/registry.js", - "tests/**/*.js", - "scripts/*.mjs", - "docs/scripts/**/*.js", - "docs/plugins/**/*.js" - ], - "project": [ - "src/**/*.{js,ts}", - "tests/**/*.js", - "scripts/**/*.mjs", - "docs/scripts/**/*.js", - "docs/plugins/**/*.js", - "!coverage/**", - "!dist/**", - "!types/**" - ] - } - } -} diff --git a/package.json b/package.json index 110594902..0a2baf1df 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,44 @@ "prettier": "3.8.1", "typescript": "5.9.3" }, + "knip": { + "tags": [ + "-lintignore" + ], + "ignoreBinaries": [ + "doc-builder", + "python" + ], + "workspaces": { + ".": { + "entry": [ + "scripts/*.mjs" + ], + "project": [ + "scripts/**/*.mjs" + ] + }, + "packages/transformers": { + "entry": [ + "src/models/registry.js", + "tests/**/*.js", + "scripts/*.mjs", + "docs/scripts/**/*.js", + "docs/plugins/**/*.js" + ], + "project": [ + "src/**/*.{js,ts}", + "tests/**/*.js", + "scripts/**/*.mjs", + "docs/scripts/**/*.js", + "docs/plugins/**/*.js", + "!coverage/**", + "!dist/**", + "!types/**" + ] + } + } + }, "prettier": { "overrides": [ { From 72530967043629241b9172bb94dfde9c428bab26 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sun, 7 Jun 2026 07:35:13 +0200 Subject: [PATCH 5/7] small changes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a2baf1df..a2fb83b28 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "homepage": "https://github.com/huggingface/transformers.js#readme", "devDependencies": { "@types/node": "^24.10.9", - "knip": "^6.15.0", + "knip": "6.15.0", "prettier": "3.8.1", "typescript": "5.9.3" }, From 8fece72c108be90a2208fdeee47c739554db6f78 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Sun, 7 Jun 2026 07:38:23 +0200 Subject: [PATCH 6/7] added prettier check to github workflow --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 104081cee..7feec5ac0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,7 @@ jobs: node-version: "24.10.0" cache: "pnpm" - run: pnpm install --frozen-lockfile + - run: pnpm format:check - run: pnpm knip build: From 8d8856a3206dea31f8dfd1c26b0d933a734f67fd Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Mon, 8 Jun 2026 09:03:30 +0200 Subject: [PATCH 7/7] updated lockfile --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63f4e6357..ef003551c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,7 @@ importers: specifier: ^24.10.9 version: 24.10.9 knip: - specifier: ^6.15.0 + specifier: 6.15.0 version: 6.15.0 prettier: specifier: 3.8.1