diff --git a/buildLib/commandLineHelper.mjs b/buildLib/commandLineHelper.mjs new file mode 100644 index 00000000..d6c39d9f --- /dev/null +++ b/buildLib/commandLineHelper.mjs @@ -0,0 +1,230 @@ +import process from 'node:process'; + +export default function createCommandLineArgumentsHandler(validArguments) { + const validTypes = ['json', 'string', 'number', 'boolean']; + const argumentInfo = {}; + const shortArgsMap = {}; + const defaultTemplate = {}; + { + const inputKeys = Object.keys(validArguments); + for(let i = 0; i < inputKeys.length; i++) { + const key = inputKeys[i]; + const firstCode = key[0].charCodeAt(0); + if((firstCode < 65 || firstCode > 90) && (firstCode < 97 || firstCode > 122)) + continue; + const argument = validArguments[key]; + if(argument.type && validTypes.includes(argument.type)){ + argumentInfo[key] = {}; + argumentInfo[key].type = argument.type; + argumentInfo[key].hasShortKey = argument.shortKey??(argument.type === 'boolean'); + argumentInfo[key].takesParameter = (argument.type !== 'boolean'? true : argument.takesParameter??false); + argumentInfo[key].acceptsPropertySyntax = argument.propertySyntax; + if(argument.default){ + defaultTemplate[key] = argument.default; + } + } + } + validArguments = null; + } + const argumentKeys = Object.keys(argumentInfo); + for(let i = 0; i < argumentKeys.length; i++) { + const key = argumentKeys[i]; + if(!argumentInfo[key].hasShortKey) + continue; + let shortKey = null; + let shortKeyCandidate = key[0].toLowerCase(); + for(let j = 0; j < 26; j++){ + if(!shortArgsMap[shortKeyCandidate]){ + shortArgsMap[shortKeyCandidate] = key; + shortKey = shortKeyCandidate; + break; + }else if(!shortArgsMap[shortKeyCandidate.toUpperCase()]){ + shortArgsMap[shortKeyCandidate.toUpperCase()] = key; + shortKey = shortKeyCandidate.toUpperCase(); + break; + } + shortKeyCandidate = String.fromCharCode(((shortKeyCandidate.charCodeAt(0)-95)%26)+96); + console.log(shortKeyCandidate); + } + if(!shortKey) + throw new Error(`Could not assign short key for argument: ${key}`); + } + + function checkForSplitValue(value, args, index){ + if(value[0] == "'"){ + return value[value.length-1] !== "'"; + }else if(value[0] == '"'){ + return value[value.length-1] !== '"'; + } + return false; + } + + function parseBooleanArgument(key, args, index, options, value){ + if(value !== null && !argumentInfo[key].takesParameter){ + throw new Error(`Invalid option: ${key}`); + }else if(value === null && !argumentInfo[key].takesParameter){ + options[key] = true; + return 0; + }else if(argumentInfo[key].takesParameter){ + let increment = 0; + if(value === null && args.length > index+1){ + value = args[index+1]; + increment = 1; + }else if(value === null){ + throw new Error(`Invalid option: ${key}`); + }else if(checkForSplitValue(value)){ + do{ + if(args.length <= index+increment) + throw new Error(`Unclosed option value: ${key}`); + value += ' ' + args[index+1]; + increment++; + }while(checkForSplitValue(value)); + value = value.slice(1,-1); + } + options[key] = value; + return increment; + }else{ + throw new Error(`Invalid option: ${key}`); + } + } + + function parseNumberArgument(key, args, index, options, value){ + let increment = 0; + if(value === null && args.length > index+1){ + value = args[index+1]; + increment = 1; + } + if(value === null) + throw new Error(`Invalid option: ${key}`); + if(checkForSplitValue(value)) + throw new Error(`Unclosed option value: ${key}`); + if(value.startsWith("0x")){ + options[key] = parseInt(value.slice(2), 16); + }else if(value.startsWith("0o")){ + options[key] = parseInt(value.slice(2), 8); + }else if(value.startsWith("0b")){ + options[key] = parseInt(value.slice(2), 2); + }else{ + if(value.startsWith("0d")){ + options[key]=parseInt(value.slice(2),10); + } else options[key] = parseFloat(value); + } + return increment; + } + + function parseStringArgument(key, args, index, options, value){ + let increment = 0; + if(value === null && args.length > index+1){ + value = args[index+1]; + increment = 1; + } + if(value === null) + throw new Error(`Invalid option: ${key}`); + if(checkForSplitValue(value)){ + do{ + if(args.length <= index+increment) + throw new Error(`Unclosed option value: ${key}`); + value += ' ' + args[index+1]; + increment++; + }while(checkForSplitValue(value)); + value = value.slice(1,-1); + } + options[key] = value; + return increment; + } + + function parseJsonArgument(key, args, index, options, value){ + let increment = 0; + if(value === null && args.length > index+1){ + value = args[index+1]; + increment = 1; + } + if(value === null) + throw new Error(`Invalid option: ${key}`); + if(checkForSplitValue(value)){ + do{ + if(args.length <= index+increment) + throw new Error(`Unclosed option value: ${key}`); + value += ' ' + args[index+1]; + increment++; + }while(checkForSplitValue(value)); + value = value.slice(1,-1); + } + options[key] = JSON.parse(value.replaceAll("'", "\"")); + return increment; + } + + + return function() { + const args = process.argv.slice(2); + const parsedArgs = {args: [], options: Object.assign({}, defaultTemplate)}; + + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + if (arg.startsWith('--')) { + const longArg = arg.slice(2); + let key = longArg; + let value = null; + if (!argumentInfo[key.replace(/-/g, '_')]) { + let splitproperty = longArg.split("="); + if (splitproperty.length > 1) { + key = splitproperty[0]; + value = splitproperty[1]; + }else{ + throw new Error(`Invalid option: ${key}`); + } + if(!argumentInfo[key]) + throw new Error(`Invalid option: ${key}`); + if(!argumentInfo[key].acceptsPropertySyntax) + throw new Error(`Invalid property syntax for option: ${key}`); + } + if(key.indexOf('_') !== -1) + throw new Error(`Invalid option: ${key}`); + key = key.replace(/-/g, '_'); + switch(argumentInfo[key].type) { + case 'boolean': + i += parseBooleanArgument(key, args, i, parsedArgs.options, value); + break; + case 'number': + i += parseNumberArgument(key, args, i, parsedArgs.options, value); + break; + case 'string': + i += parseStringArgument(key, args, i, parsedArgs.options, value); + break; + case 'json': + i += parseJsonArgument(key, args, i, parsedArgs.options, value); + break; + } + } else if (arg.startsWith('-')) { + const shortArg = arg.slice(1); + for (let j = 0; j < shortArg.length; j++) { + const key = shortArgsMap[shortArg[j]]; + if (!key) { + throw new Error(`Invalid option: ${shortArg[j]}`); + } + if(argumentInfo[key].type === 'boolean'){ + i += parseBooleanArgument(key, args, i, parsedArgs.options, null); + }else if(j > 0 || shortArg.length > 1){ + throw new Error(`Invalid option: ${shortArg}`); + }else{ + switch(argumentInfo[key].type) { + case 'number': + i += parseNumberArgument(key, args, i, parsedArgs.options, null); + break; + case 'string': + i += parseStringArgument(key, args, i, parsedArgs.options, null); + break; + case 'json': + i += parseJsonArgument(key, args, i, parsedArgs.options, null); + break; + } + } + } + }else{ + parsedArgs.args.push(arg); + } + } + + return parsedArgs; + } +}; \ No newline at end of file diff --git a/buildLib/esbuild-plugin-swc.mjs b/buildLib/esbuild-plugin-swc.mjs new file mode 100644 index 00000000..69d56da0 --- /dev/null +++ b/buildLib/esbuild-plugin-swc.mjs @@ -0,0 +1,85 @@ +/* +This file's license: + +MIT License + +Copyright (c) 2021 sanyuan et al. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +import { transform, transformSync } from '@swc/core'; +import path from 'node:path'; +import process from 'node:process'; +import fs from 'node:fs/promises'; + +function assignDeep(target, source) { + for (const key in source) { + if (source[key] instanceof Object && !(source[key] instanceof Function)) { + if (!target[key]) { + target[key] = {}; + } + assignDeep(target[key], source[key]); + } else { + target[key] = source[key]; + } + } + return target; +} + +export default function swcPlugin(options, isAsync) { + options = options ?? {}; + isAsync = isAsync ?? true; + return { + name: 'esbuild:swc', + setup(builder) { + builder.onResolve({ filter: /\.(m?[tj]s)$/ }, (args) => { + const fullPath = path.resolve(args.resolveDir, args.path); + return { + path: fullPath, + }; + }); + builder.onLoad({ filter: /\.(m?[tj]s)$/ }, async (args) => { + const code = await fs.readFile(args.path, 'utf-8'); + const isTS = args.path.endsWith('.ts'); + const initialOptions = { + jsc: { + parser: { + syntax: isTS ? 'typescript' : 'ecmascript', + } + }, + filename: args.path, + sourceMaps: true, + sourceFileName: path.relative(options.root,args.path) + }; + const finalOptions = assignDeep(assignDeep({}, initialOptions), options); + let result; + if (isAsync) { + result = await transform(code, finalOptions); + }else{ + result = transformSync(code, finalOptions); + } + return { + contents: result.code+(finalOptions.sourceMaps?`\n//# sourceMappingURL=data:application/json;base64,${Buffer.from(result.map).toString('base64')}`:''), + loader: 'js' + }; + }); + } + } +} \ No newline at end of file diff --git a/esbuild-runner.mjs b/esbuild-runner.mjs new file mode 100644 index 00000000..5d2c3212 --- /dev/null +++ b/esbuild-runner.mjs @@ -0,0 +1,218 @@ +import * as esbuild from 'esbuild' +import Path from 'node:path'; +import createCommandLineArgumentsHandler from './buildLib/commandLineHelper.mjs'; +import swcPlugin from './buildLib/esbuild-plugin-swc.mjs'; + +function convertToEsbuildTarget(swcTargets) { + const esbuildTargets = []; + const targetKeys = Object.keys(swcTargets); + for(let i = 0; i < targetKeys.length; i++) { + if(targetKeys[i] == "android") + continue; + esbuildTargets.push(`${targetKeys[i]}${swcTargets[targetKeys[i]]}`); + } + return esbuildTargets; +} + +const parseArgs = createCommandLineArgumentsHandler({ + "input":{ + type: "string", + shortKey: true, + propertySyntax: true + }, + "output":{ + type: "string", + shortKey: true, + propertySyntax: true + }, + "externals":{ + type: "json", + shortKey: false, + propertySyntax: false + }, + "target":{ + type: "string", + shortKey: true, + propertySyntax: true, + default: "es2015" + }, + "global_name": { + type: "string", + shortKey: false, + propertySyntax: true + }, + "footer": { + type: "string", + shortKey: false, + propertySyntax: true + }, + "watch": { + type: "boolean", + shortKey: true, + propertySyntax: false, + default: false + }, + "servedir": { + type: "string", + shortKey: false, + propertySyntax: true + }, + "minify": { + type: "boolean", + shortKey: true, + propertySyntax: false, + default: false + }, + "sourcemap": { + type: "boolean", + shortKey: true, + propertySyntax: false, + default: false + }, + "module": { + type: "boolean", + shortKey: true, + propertySyntax: false, + default: false + } +}); +const params = parseArgs(); +async function build(params) { + const swcConfig = { + "jsc": { + "loose": true, + "externalHelpers": true, + "transform": { + "optimizer": { + "simplify": true + } + }, + "minify": { + "compress": { + "arguments": true, + "booleans_as_integers": true, + "ecma": 5, + "arrows": true, + "booleans": true, + "collapse_vars": true, + "comparisons": true, + "conditionals": true, + "dead_code": true, + "defaults": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "inline": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "passes": 0, + "properties": true, + "pure_getters": "", + "reduce_funcs": false, + "reduce_vars": true, + "sequences": true, + "side_effects": true, + "switches": true, + "top_retain": "", + "toplevel": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true + }, + "mangle": false + } + }, + "rootMode": "root", + "root": Path.dirname(params.options.input??params.options.args[0]), + "sourceMaps": params.options.sourcemap??false, + "inlineSourcesContent": true, + "isModule": true, + "minify": params.options.minify??false + }; + let esbuildTarget; + { + //These are the targets for a compatibility build that should work with all browsers in use today, even in embedded devices. + const compatTargets = { + "chrome": "19", + "safari": "5.1.7", + "firefox": "12.1", + "ie": "11", + "opera": "12.1", + "android": "122", + "ios": "8" + } + if(params.options.target == "compat") { + swcConfig.env = { + "bugfixes": true + }; + swcConfig.env.targets = compatTargets; + swcConfig.jsc.minify.compress.ecma = 3; + esbuildTarget = convertToEsbuildTarget(compatTargets); + esbuildTarget.push("es5"); + }else{ + swcConfig.jsc.target = params.options.target??'es2015'; + esbuildTarget = params.options.target??'es2015'; + } + } + try { + let outputBaseName = Path.basename(params.options.output??params.options.args[params.options.args.length-1]); + let outputDir = Path.dirname(params.options.output??params.options.args[params.options.args.length-1]); + console.log(outputDir); + const options = { + entryPoints: [params.options.input??params.options.args[0]], + bundle: true, + minify: params.options.minify??false, + format: (params.options.module??false?'esm':'iife'), + conditions: [], + external: params.options.externals??[], + globalName: params.options.global_name??undefined, + plugins: [swcPlugin(swcConfig)], + target: esbuildTarget, + sourcemap: params.options.sourcemap??false, + outdir: outputDir, + outExtension: { + '.js': outputBaseName.slice(outputBaseName.indexOf(".")) + } + }; + if(params.options.footer){ + options.footer = {}; + options.footer.js = params.options.footer; + } + if(params.options.watch){ + if(options.footer?.js){ + options.footer.js = options.footer.js+";new EventSource('/esbuild').addEventListener('change', () => location.reload());"; + } + let ctx = await esbuild.context(options); + await ctx.watch(); + let { host, port } = await ctx.serve({ + servedir: params.options.servedir + }); + console.log(`Serving on http://${host}:${port}`); + }else{ + await esbuild.build(options); + console.log('Build complete'); + } + } catch (error) { + console.error('Build failed:\n', error); + } +} + +build(params); \ No newline at end of file diff --git a/eslint-local-rules.js b/eslint-local-rules.js index fdcc8538..b2a8e260 100644 --- a/eslint-local-rules.js +++ b/eslint-local-rules.js @@ -24,7 +24,7 @@ module.exports = { create(context) { const checkImportPath = (node) => { const importPath = node.source.value; - const isRelative = importPath.startsWith('.') || importPath.startsWith('/'); + const isRelative = importPath.startsWith('.') || !importPath.startsWith('/'); const extensionMissing = require('path').extname(importPath) === ''; if (!isRelative || !extensionMissing) { return; diff --git a/package-lock.json b/package-lock.json index fc2834d0..f8493b9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,12 @@ "ot": "bin/ot" }, "devDependencies": { - "esbuild": "^0.20.0", - "eslint": "^8.56.0", + "@swc/core": "^1.4.11", + "@swc/helpers": "^0.5.8", + "esbuild": "^0.20.2", + "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", - "mocha": "^8.4.0", - "reify": "^0.20.12" + "mocha": "^10.4.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -30,9 +31,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", - "integrity": "sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ "ppc64" ], @@ -46,9 +47,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.0.tgz", - "integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -62,9 +63,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz", - "integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -78,9 +79,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.0.tgz", - "integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -94,9 +95,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz", - "integrity": "sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -110,9 +111,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz", - "integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -126,9 +127,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz", - "integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -142,9 +143,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz", - "integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -158,9 +159,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz", - "integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -174,9 +175,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz", - "integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -190,9 +191,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz", - "integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -206,9 +207,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz", - "integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -222,9 +223,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz", - "integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -238,9 +239,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz", - "integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -254,9 +255,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz", - "integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -270,9 +271,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz", - "integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -286,9 +287,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz", - "integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -302,9 +303,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz", - "integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -318,9 +319,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz", - "integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -334,9 +335,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz", - "integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -350,9 +351,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz", - "integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -366,9 +367,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz", - "integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -382,9 +383,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz", - "integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -445,22 +446,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -481,9 +482,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -521,18 +522,234 @@ "node": ">= 8" } }, + "node_modules/@swc/core": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.11.tgz", + "integrity": "sha512-WKEakMZxkVwRdgMN4AMJ9K5nysY8g8npgQPczmjBeNK5In7QEAZAJwnyccrWwJZU0XjVeHn2uj+XbOKdDW17rg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@swc/counter": "^0.1.2", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.4.11", + "@swc/core-darwin-x64": "1.4.11", + "@swc/core-linux-arm-gnueabihf": "1.4.11", + "@swc/core-linux-arm64-gnu": "1.4.11", + "@swc/core-linux-arm64-musl": "1.4.11", + "@swc/core-linux-x64-gnu": "1.4.11", + "@swc/core-linux-x64-musl": "1.4.11", + "@swc/core-win32-arm64-msvc": "1.4.11", + "@swc/core-win32-ia32-msvc": "1.4.11", + "@swc/core-win32-x64-msvc": "1.4.11" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.11.tgz", + "integrity": "sha512-C1j1Qp/IHSelVWdEnT7f0iONWxQz6FAqzjCF2iaL+0vFg4V5f2nlgrueY8vj5pNNzSGhrAlxsMxEIp4dj1MXkg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.11.tgz", + "integrity": "sha512-0TTy3Ni8ncgaMCchSQ7FK8ZXQLlamy0FXmGWbR58c+pVZWYZltYPTmheJUvVcR0H2+gPAymRKyfC0iLszDALjg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.11.tgz", + "integrity": "sha512-XJLB71uw0rog4DjYAPxFGAuGCBQpgJDlPZZK6MTmZOvI/1t0+DelJ24IjHIxk500YYM26Yv47xPabqFPD7I2zQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.11.tgz", + "integrity": "sha512-vYQwzJvm/iu052d5Iw27UFALIN5xSrGkPZXxLNMHPySVko2QMNNBv35HLatkEQHbQ3X+VKSW9J9SkdtAvAVRAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.11.tgz", + "integrity": "sha512-eV+KduiRYUFjPsvbZuJ9aknQH9Tj0U2/G9oIZSzLx/18WsYi+upzHbgxmIIHJ2VJgfd7nN40RI/hMtxNsUzR/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.11.tgz", + "integrity": "sha512-WA1iGXZ2HpqM1OR9VCQZJ8sQ1KP2or9O4bO8vWZo6HZJIeoQSo7aa9waaCLRpkZvkng1ct/TF/l6ymqSNFXIzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.11.tgz", + "integrity": "sha512-UkVJToKf0owwQYRnGvjHAeYVDfeimCEcx0VQSbJoN7Iy0ckRZi7YPlmWJU31xtKvikE2bQWCOVe0qbSDqqcWXA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.11.tgz", + "integrity": "sha512-35khwkyly7lF5NDSyvIrukBMzxPorgc5iTSDfVO/LvnmN5+fm4lTlrDr4tUfTdOhv3Emy7CsKlsNAeFRJ+Pm+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.11.tgz", + "integrity": "sha512-Wx8/6f0ufgQF2pbVPsJ2dAmFLwIOW+xBE5fxnb7VnEbGkTgP1qMDWiiAtD9rtvDSuODG3i1AEmAak/2HAc6i6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.11.tgz", + "integrity": "sha512-0xRFW6K9UZQH2NVC/0pVB0GJXS45lY24f+6XaPBF1YnMHd8A8GoHl7ugyM5yNUTe2AKhSgk5fJV00EJt/XBtdQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true + }, + "node_modules/@swc/helpers": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.8.tgz", + "integrity": "sha512-lruDGw3pnfM3wmZHeW7JuhkGQaJjPyiKjxeGhdmfoOT53Ic9qb5JLDNaK2HUdl1zLDeX28H221UvKjfdvSLVMg==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@swc/types": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.6.tgz", + "integrity": "sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==", + "dev": true, + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -755,12 +972,15 @@ "dev": true }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -843,24 +1063,30 @@ } }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "node_modules/chokidar/node_modules/glob-parent": { @@ -1111,9 +1337,9 @@ } }, "node_modules/esbuild": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.0.tgz", - "integrity": "sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -1123,29 +1349,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.0", - "@esbuild/android-arm": "0.20.0", - "@esbuild/android-arm64": "0.20.0", - "@esbuild/android-x64": "0.20.0", - "@esbuild/darwin-arm64": "0.20.0", - "@esbuild/darwin-x64": "0.20.0", - "@esbuild/freebsd-arm64": "0.20.0", - "@esbuild/freebsd-x64": "0.20.0", - "@esbuild/linux-arm": "0.20.0", - "@esbuild/linux-arm64": "0.20.0", - "@esbuild/linux-ia32": "0.20.0", - "@esbuild/linux-loong64": "0.20.0", - "@esbuild/linux-mips64el": "0.20.0", - "@esbuild/linux-ppc64": "0.20.0", - "@esbuild/linux-riscv64": "0.20.0", - "@esbuild/linux-s390x": "0.20.0", - "@esbuild/linux-x64": "0.20.0", - "@esbuild/netbsd-x64": "0.20.0", - "@esbuild/openbsd-x64": "0.20.0", - "@esbuild/sunos-x64": "0.20.0", - "@esbuild/win32-arm64": "0.20.0", - "@esbuild/win32-ia32": "0.20.0", - "@esbuild/win32-x64": "0.20.0" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/escalade": { @@ -1170,16 +1396,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -1533,6 +1759,20 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -1689,15 +1929,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -2102,6 +2333,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -2197,24 +2440,19 @@ "dev": true }, "node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { "node": ">=10" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimatch": { @@ -2239,114 +2477,78 @@ } }, "node_modules/mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", + "glob": "8.1.0", "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 10.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">= 14.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "balanced-match": "^1.0.0" } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/mocha/node_modules/ms": { @@ -2376,18 +2578,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2646,9 +2836,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { "picomatch": "^2.2.1" @@ -2674,43 +2864,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/reify": { - "version": "0.20.12", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.12.tgz", - "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==", - "dev": true, - "dependencies": { - "acorn": "^6.1.1", - "acorn-dynamic-import": "^4.0.0", - "magic-string": "^0.25.3", - "semver": "^5.4.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/reify/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/reify/node_modules/acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "deprecated": "This is probably built in to whatever tool you're using. If you still need it... idk", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2846,19 +2999,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2928,13 +3072,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3081,6 +3218,12 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3244,62 +3387,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "node_modules/wrap-ansi": { @@ -3397,163 +3488,163 @@ "dev": true }, "@esbuild/aix-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", - "integrity": "sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "dev": true, "optional": true }, "@esbuild/android-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.0.tgz", - "integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz", - "integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.0.tgz", - "integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz", - "integrity": "sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz", - "integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz", - "integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz", - "integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz", - "integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz", - "integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz", - "integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz", - "integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz", - "integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz", - "integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz", - "integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz", - "integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz", - "integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz", - "integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz", - "integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz", - "integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz", - "integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz", - "integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz", - "integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "dev": true, "optional": true }, @@ -3590,19 +3681,19 @@ } }, "@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, @@ -3613,9 +3704,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "@nodelib/fs.scandir": { @@ -3644,18 +3735,126 @@ "fastq": "^1.6.0" } }, + "@swc/core": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.11.tgz", + "integrity": "sha512-WKEakMZxkVwRdgMN4AMJ9K5nysY8g8npgQPczmjBeNK5In7QEAZAJwnyccrWwJZU0XjVeHn2uj+XbOKdDW17rg==", + "dev": true, + "requires": { + "@swc/core-darwin-arm64": "1.4.11", + "@swc/core-darwin-x64": "1.4.11", + "@swc/core-linux-arm-gnueabihf": "1.4.11", + "@swc/core-linux-arm64-gnu": "1.4.11", + "@swc/core-linux-arm64-musl": "1.4.11", + "@swc/core-linux-x64-gnu": "1.4.11", + "@swc/core-linux-x64-musl": "1.4.11", + "@swc/core-win32-arm64-msvc": "1.4.11", + "@swc/core-win32-ia32-msvc": "1.4.11", + "@swc/core-win32-x64-msvc": "1.4.11", + "@swc/counter": "^0.1.2", + "@swc/types": "^0.1.5" + } + }, + "@swc/core-darwin-arm64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.11.tgz", + "integrity": "sha512-C1j1Qp/IHSelVWdEnT7f0iONWxQz6FAqzjCF2iaL+0vFg4V5f2nlgrueY8vj5pNNzSGhrAlxsMxEIp4dj1MXkg==", + "dev": true, + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.11.tgz", + "integrity": "sha512-0TTy3Ni8ncgaMCchSQ7FK8ZXQLlamy0FXmGWbR58c+pVZWYZltYPTmheJUvVcR0H2+gPAymRKyfC0iLszDALjg==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.11.tgz", + "integrity": "sha512-XJLB71uw0rog4DjYAPxFGAuGCBQpgJDlPZZK6MTmZOvI/1t0+DelJ24IjHIxk500YYM26Yv47xPabqFPD7I2zQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.11.tgz", + "integrity": "sha512-vYQwzJvm/iu052d5Iw27UFALIN5xSrGkPZXxLNMHPySVko2QMNNBv35HLatkEQHbQ3X+VKSW9J9SkdtAvAVRAQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.11.tgz", + "integrity": "sha512-eV+KduiRYUFjPsvbZuJ9aknQH9Tj0U2/G9oIZSzLx/18WsYi+upzHbgxmIIHJ2VJgfd7nN40RI/hMtxNsUzR/g==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.11.tgz", + "integrity": "sha512-WA1iGXZ2HpqM1OR9VCQZJ8sQ1KP2or9O4bO8vWZo6HZJIeoQSo7aa9waaCLRpkZvkng1ct/TF/l6ymqSNFXIzQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.11.tgz", + "integrity": "sha512-UkVJToKf0owwQYRnGvjHAeYVDfeimCEcx0VQSbJoN7Iy0ckRZi7YPlmWJU31xtKvikE2bQWCOVe0qbSDqqcWXA==", + "dev": true, + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.11.tgz", + "integrity": "sha512-35khwkyly7lF5NDSyvIrukBMzxPorgc5iTSDfVO/LvnmN5+fm4lTlrDr4tUfTdOhv3Emy7CsKlsNAeFRJ+Pm+w==", + "dev": true, + "optional": true + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.11.tgz", + "integrity": "sha512-Wx8/6f0ufgQF2pbVPsJ2dAmFLwIOW+xBE5fxnb7VnEbGkTgP1qMDWiiAtD9rtvDSuODG3i1AEmAak/2HAc6i6A==", + "dev": true, + "optional": true + }, + "@swc/core-win32-x64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.11.tgz", + "integrity": "sha512-0xRFW6K9UZQH2NVC/0pVB0GJXS45lY24f+6XaPBF1YnMHd8A8GoHl7ugyM5yNUTe2AKhSgk5fJV00EJt/XBtdQ==", + "dev": true, + "optional": true + }, + "@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true + }, + "@swc/helpers": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.8.tgz", + "integrity": "sha512-lruDGw3pnfM3wmZHeW7JuhkGQaJjPyiKjxeGhdmfoOT53Ic9qb5JLDNaK2HUdl1zLDeX28H221UvKjfdvSLVMg==", + "dev": true, + "requires": { + "tslib": "^2.4.0" + } + }, + "@swc/types": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.6.tgz", + "integrity": "sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==", + "dev": true, + "requires": { + "@swc/counter": "^0.1.3" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -3812,9 +4011,9 @@ "dev": true }, "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true }, "brace-expansion": { @@ -3876,19 +4075,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "dependencies": { "glob-parent": { @@ -4088,34 +4287,34 @@ } }, "esbuild": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.0.tgz", - "integrity": "sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "requires": { - "@esbuild/aix-ppc64": "0.20.0", - "@esbuild/android-arm": "0.20.0", - "@esbuild/android-arm64": "0.20.0", - "@esbuild/android-x64": "0.20.0", - "@esbuild/darwin-arm64": "0.20.0", - "@esbuild/darwin-x64": "0.20.0", - "@esbuild/freebsd-arm64": "0.20.0", - "@esbuild/freebsd-x64": "0.20.0", - "@esbuild/linux-arm": "0.20.0", - "@esbuild/linux-arm64": "0.20.0", - "@esbuild/linux-ia32": "0.20.0", - "@esbuild/linux-loong64": "0.20.0", - "@esbuild/linux-mips64el": "0.20.0", - "@esbuild/linux-ppc64": "0.20.0", - "@esbuild/linux-riscv64": "0.20.0", - "@esbuild/linux-s390x": "0.20.0", - "@esbuild/linux-x64": "0.20.0", - "@esbuild/netbsd-x64": "0.20.0", - "@esbuild/openbsd-x64": "0.20.0", - "@esbuild/sunos-x64": "0.20.0", - "@esbuild/win32-arm64": "0.20.0", - "@esbuild/win32-ia32": "0.20.0", - "@esbuild/win32-x64": "0.20.0" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "escalade": { @@ -4131,16 +4330,16 @@ "dev": true }, "eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -4423,6 +4622,13 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -4531,12 +4737,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -4806,6 +5006,12 @@ "which-typed-array": "^1.1.11" } }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -4883,21 +5089,13 @@ "dev": true }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "requires": { - "chalk": "^4.0.0" - } - }, - "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.8" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "minimatch": { @@ -4916,85 +5114,62 @@ "dev": true }, "mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", + "glob": "8.1.0", "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "balanced-match": "^1.0.0" } }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "dev": true, - "requires": { - "argparse": "^2.0.1" + "minimatch": "^5.0.1", + "once": "^1.3.0" } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" } }, "ms": { @@ -5020,12 +5195,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5204,9 +5373,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -5223,33 +5392,6 @@ "set-function-name": "^2.0.0" } }, - "reify": { - "version": "0.20.12", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.12.tgz", - "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==", - "dev": true, - "requires": { - "acorn": "^6.1.1", - "acorn-dynamic-import": "^4.0.0", - "magic-string": "^0.25.3", - "semver": "^5.4.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true, - "requires": {} - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5326,16 +5468,10 @@ "is-regex": "^1.1.4" } }, - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - }, "serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -5390,12 +5526,6 @@ "object-inspect": "^1.9.0" } }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -5503,6 +5633,12 @@ "strip-bom": "^3.0.0" } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5621,52 +5757,10 @@ "has-tostringtag": "^1.0.0" } }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { diff --git a/package.json b/package.json index 08ff3227..a2cf2e10 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,32 @@ }, "main": "./dist/opentype.js", "browser": "./dist/opentype.js", - "module": "./dist/opentype.module.js", + "module": "./dist/opentype.mjs", "scripts": { - "build": "npm run b:umd && npm run b:esm", - "dist": " npm run d:umd && npm run d:esm", - "test": "npm run build && npm run dist && mocha --require reify --recursive && npm run lint", - "lint": "eslint src", - "lint-fix": "eslint src --fix", - "start": "esbuild --bundle src/opentype.js --outdir=dist --external:fs --external:http --external:https --target=es2018 --format=esm --out-extension:.js=.module.js --global-name=opentype --footer:js=\"(function (root, factory) { if (typeof define === 'function' && define.amd)define(factory); else if (typeof module === 'object' && module.exports)module.exports = factory(); else root.opentype = factory(); }(typeof self !== 'undefined' ? self : this, () => ({...opentype,'default':opentype})));\" --watch --servedir=. --footer:js=\"new EventSource('/esbuild').addEventListener('change', () => location.reload())\"", - "b:umd": "esbuild --bundle src/opentype.js --outdir=dist --external:fs --external:http --external:https --target=es2018 --format=iife --out-extension:.js=.js --global-name=opentype --footer:js=\"(function (root, factory) { if (typeof define === 'function' && define.amd)define(factory); else if (typeof module === 'object' && module.exports)module.exports = factory(); else root.opentype = factory(); }(typeof self !== 'undefined' ? self : this, () => ({...opentype,'default':opentype})));\"", - "d:umd": "esbuild --bundle src/opentype.js --outdir=dist --external:fs --external:http --external:https --target=es2018 --format=iife --out-extension:.js=.min.js --global-name=opentype --footer:js=\"(function (root, factory) { if (typeof define === 'function' && define.amd)define(factory); else if (typeof module === 'object' && module.exports)module.exports = factory(); else root.opentype = factory(); }(typeof self !== 'undefined' ? self : this, () => ({...opentype,'default':opentype})));\" --minify --sourcemap", - "b:esm": "esbuild --bundle src/opentype.js --outdir=dist --external:fs --external:http --external:https --target=es2018 --format=esm --out-extension:.js=.module.js", - "d:esm": "esbuild --bundle src/opentype.js --outdir=dist --external:fs --external:http --external:https --target=es2018 --format=esm --out-extension:.js=.module.min.js --minify --sourcemap" + "build": "npm run b:umd && npm run b:esm && npm run b:compat", + "dist": " npm run d:umd && npm run d:esm && npm run d:compat", + "test": "npm run build && npm run dist && mocha --recursive && npm run lint", + "lint": "eslint src --ext .js,.mjs", + "lint-fix": "eslint src --fix --ext .js,.mjs", + "start": "node esbuild-runner.mjs --input src/opentype.mjs --output dist/opentype.module.js --externals \"['fs','http','https']\" --target es2015 --module --watch --servedir . --global-name opentype --footer \"(function (root, factory) { if (typeof define === 'function' && define.amd)define(factory); else if (typeof module === 'object' && module.exports)module.exports = factory(); else root.opentype = factory(); })(typeof self !== 'undefined' ? self : this, function(){return ((function(a,b){var keys=Object.keys(b);for(var i=0;i { + fs.readFile(path, function(err, buffer) { + if (err) { + return callback(err.message); + } + + callback(null, buffer); + }); + }, (err) => callback(err)); + } } /** @@ -87,44 +99,118 @@ function loadFromUrl(url, callback) { } else if ( isNode() ) { // Node environment, we use the http/https libraries (to avoid extra dependencies like axios). + if(typeof(require) !== 'undefined'){ + const lib = url.startsWith('https:') ? require('https') : require('http'); + + const req = lib.request(url, res => { + // Follow redirections + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) { + return loadFromUrl(res.headers.location, callback); + } - const lib = url.startsWith('https:') ? require('https') : require('http'); + res.setEncoding('binary'); - const req = lib.request(url, res => { - // Follow redirections - if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) { - return loadFromUrl(res.headers.location, callback); - } + const chunks = []; - res.setEncoding('binary'); + res.on('data', (chunk) => { + // Convert binary to Buffer and append. + chunks.push(Buffer.from(chunk, 'binary')); + }); - const chunks = []; + res.on('end', () => { + // group chunks into a single response Buffer + const b = Buffer.concat(chunks); + // convert Buffer to ArrayBuffer for compatibility with XHR interface + const ab = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); + callback(null, ab); + }); - res.on('data', (chunk) => { - // Convert binary to Buffer and append. - chunks.push(Buffer.from(chunk, 'binary')); - }); + res.on('error', (error) => { + callback(error, undefined); + }); - res.on('end', () => { - // group chunks into a single response Buffer - const b = Buffer.concat(chunks); - // convert Buffer to ArrayBuffer for compatibility with XHR interface - const ab = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); - callback(null, ab); }); - res.on('error', (error) => { + req.on('error', error => { callback(error, undefined); }); - }); - - req.on('error', error => { - callback(error, undefined); - }); - - req.end(); - + req.end(); + } else { + if(url.startsWith('https:')){ + import('https').then(lib => { + const req = lib.request(url, res => { + // Follow redirections + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) { + return loadFromUrl(res.headers.location, callback); + } + + res.setEncoding('binary'); + + const chunks = []; + + res.on('data', (chunk) => { + // Convert binary to Buffer and append. + chunks.push(Buffer.from(chunk, 'binary')); + }); + + res.on('end', () => { + // group chunks into a single response Buffer + const b = Buffer.concat(chunks); + // convert Buffer to ArrayBuffer for compatibility with XHR interface + const ab = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); + callback(null, ab); + }); + + res.on('error', (error) => { + callback(error, undefined); + }); + }); + + req.on('error', error => { + callback(error, undefined); + }); + + req.end(); + }, (err) => callback(err, undefined)); + }else{ + import('http').then(lib => { + const req = lib.request(url, res => { + // Follow redirections + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) { + return loadFromUrl(res.headers.location, callback); + } + + res.setEncoding('binary'); + + const chunks = []; + + res.on('data', (chunk) => { + // Convert binary to Buffer and append. + chunks.push(Buffer.from(chunk, 'binary')); + }); + + res.on('end', () => { + // group chunks into a single response Buffer + const b = Buffer.concat(chunks); + // convert Buffer to ArrayBuffer for compatibility with XHR interface + const ab = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); + callback(null, ab); + }); + + res.on('error', (error) => { + callback(error, undefined); + }); + }); + + req.on('error', error => { + callback(error, undefined); + }); + + req.end(); + }, (err) => callback(err, undefined)); + } + } } } @@ -483,7 +569,7 @@ function parseBuffer(buffer, opt={}) { * with two arguments `(err, font)`. The `err` will be null on success, * the `font` is a Font object. * We use the node.js callback convention so that - * opentype.js can integrate with frameworks like async.js. + * opentype.js can integrate with frameworks like async.mjs. * @alias opentype.load * @param {string} url - The URL of the font to load. * @param {Function} callback - The callback. diff --git a/src/parse.js b/src/parse.mjs similarity index 99% rename from src/parse.js rename to src/parse.mjs index d6770721..22581903 100644 --- a/src/parse.js +++ b/src/parse.mjs @@ -1,6 +1,6 @@ // Parsing utility functions -import check from './check.js'; +import check from './check.mjs'; // Retrieve an unsigned byte from the DataView. function getByte(dataView, offset) { @@ -432,7 +432,7 @@ Parser.prototype.parsePointer32 = function(description) { * or a list of offsets to lists of offsets to any kind of items. * If itemCallback is not provided, a list of list of UShort is assumed. * If provided, itemCallback is called on each item and must parse the item. - * See examples in tables/gsub.js + * See examples in tables/gsub.mjs */ Parser.prototype.parseListOfLists = function(itemCallback) { const offsets = this.parseOffset16List(); diff --git a/src/path.js b/src/path.mjs similarity index 99% rename from src/path.js rename to src/path.mjs index 02f9bdff..dd92854d 100644 --- a/src/path.js +++ b/src/path.mjs @@ -1,6 +1,6 @@ // Geometric objects -import BoundingBox from './bbox.js'; +import BoundingBox from './bbox.mjs'; /** * A bézier path containing a set of path commands similar to a SVG path. diff --git a/src/position.js b/src/position.mjs similarity index 98% rename from src/position.js rename to src/position.mjs index 90c83410..692aef61 100644 --- a/src/position.js +++ b/src/position.mjs @@ -1,7 +1,7 @@ // The Position object provides utility methods to manipulate // the GPOS position table. -import Layout from './layout.js'; +import Layout from './layout.mjs'; /** * @exports opentype.Position diff --git a/src/substitution.js b/src/substitution.mjs similarity index 99% rename from src/substitution.js rename to src/substitution.mjs index 4774ecf7..e3c2f2f7 100644 --- a/src/substitution.js +++ b/src/substitution.mjs @@ -1,9 +1,9 @@ // The Substitution object provides utility methods to manipulate // the GSUB substitution table. -import check from './check.js'; -import Layout from './layout.js'; -import { arraysEqual } from './util.js'; +import check from './check.mjs'; +import Layout from './layout.mjs'; +import { arraysEqual } from './util.mjs'; /** * @exports opentype.Substitution diff --git a/src/table.js b/src/table.mjs similarity index 99% rename from src/table.js rename to src/table.mjs index 6e10ffff..640712b2 100644 --- a/src/table.js +++ b/src/table.mjs @@ -1,7 +1,7 @@ // Table metadata -import check from './check.js'; -import { encode, sizeOf } from './types.js'; +import check from './check.mjs'; +import { encode, sizeOf } from './types.mjs'; /** * @exports opentype.Table diff --git a/src/tables/avar.js b/src/tables/avar.mjs similarity index 96% rename from src/tables/avar.js rename to src/tables/avar.mjs index fe1f934c..f8887a6c 100644 --- a/src/tables/avar.js +++ b/src/tables/avar.mjs @@ -1,9 +1,9 @@ // The `avar` table stores information on how to modify a variation along a variation axis // https://learn.microsoft.com/en-us/typography/opentype/spec/avar -import check from '../check.js'; -import { Parser } from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import { Parser } from '../parse.mjs'; +import table from '../table.mjs'; function makeAvarAxisValueMap(n, axisValueMap) { return new table.Record('axisValueMap_' + n, [ diff --git a/src/tables/cff.js b/src/tables/cff.mjs similarity index 99% rename from src/tables/cff.js rename to src/tables/cff.mjs index 334ce92e..9b7f3e47 100755 --- a/src/tables/cff.js +++ b/src/tables/cff.mjs @@ -12,11 +12,11 @@ import { cffStandardStrings, cffISOAdobeStrings, cffIExpertStrings, - cffExpertSubsetStrings } from '../encoding.js'; -import glyphset from '../glyphset.js'; -import parse from '../parse.js'; -import Path from '../path.js'; -import table from '../table.js'; + cffExpertSubsetStrings } from '../encoding.mjs'; +import glyphset from '../glyphset.mjs'; +import parse from '../parse.mjs'; +import Path from '../path.mjs'; +import table from '../table.mjs'; // Custom equals function that can also check lists. function equals(a, b) { diff --git a/src/tables/cmap.js b/src/tables/cmap.mjs similarity index 98% rename from src/tables/cmap.js rename to src/tables/cmap.mjs index 4f3dc8eb..6193a056 100644 --- a/src/tables/cmap.js +++ b/src/tables/cmap.mjs @@ -1,11 +1,11 @@ // The `cmap` table stores the mappings from characters to glyphs. // https://www.microsoft.com/typography/OTSPEC/cmap.htm -import check from '../check.js'; -import parse from '../parse.js'; -import table from '../table.js'; -import { eightBitMacEncodings } from '../types.js'; -import { getEncoding } from '../tables/name.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; +import { eightBitMacEncodings } from '../types.mjs'; +import { getEncoding } from '../tables/name.mjs'; function parseCmapTableFormat0(cmap, p, platformID, encodingID) { // Length in bytes of the index map diff --git a/src/tables/colr.js b/src/tables/colr.mjs similarity index 95% rename from src/tables/colr.js rename to src/tables/colr.mjs index 0b09d38c..ed0034fd 100644 --- a/src/tables/colr.js +++ b/src/tables/colr.mjs @@ -1,9 +1,9 @@ // The `COLR` table adds support for multi-colored glyphs // https://www.microsoft.com/typography/OTSPEC/colr.htm -import { Parser } from '../parse.js'; -import check from '../check.js'; -import table from '../table.js'; +import { Parser } from '../parse.mjs'; +import check from '../check.mjs'; +import table from '../table.mjs'; function parseColrTable(data, start) { const p = new Parser(data, start); diff --git a/src/tables/cpal.js b/src/tables/cpal.mjs similarity index 95% rename from src/tables/cpal.js rename to src/tables/cpal.mjs index edcd7e4e..e7b46b33 100644 --- a/src/tables/cpal.js +++ b/src/tables/cpal.mjs @@ -3,9 +3,9 @@ // every palettes share the same size (numPaletteEntries) and can overlap to refere the same colors // https://www.microsoft.com/typography/OTSPEC/cpal.htm -import { Parser } from '../parse.js'; -import check from '../check.js'; -import table from '../table.js'; +import { Parser } from '../parse.mjs'; +import check from '../check.mjs'; +import table from '../table.mjs'; // Parse the header `head` table function parseCpalTable(data, start) { diff --git a/src/tables/fvar.js b/src/tables/fvar.mjs similarity index 96% rename from src/tables/fvar.js rename to src/tables/fvar.mjs index 058d137f..24aaa4be 100644 --- a/src/tables/fvar.js +++ b/src/tables/fvar.mjs @@ -1,10 +1,10 @@ // The `fvar` table stores font variation axes and instances. // https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6fvar.html -import check from '../check.js'; -import parse from '../parse.js'; -import table from '../table.js'; -import { objectsEqual } from '../util.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; +import { objectsEqual } from '../util.mjs'; function addName(name, names) { let nameID = 256; diff --git a/src/tables/gasp.js b/src/tables/gasp.mjs similarity index 93% rename from src/tables/gasp.js rename to src/tables/gasp.mjs index e0ffdcc9..068b348d 100644 --- a/src/tables/gasp.js +++ b/src/tables/gasp.mjs @@ -1,9 +1,9 @@ // The `gasp` table contains global information about the font. // https://learn.microsoft.com/de-de/typography/opentype/spec/gasp -import check from '../check.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; //const GASP_SYMMETRIC_GRIDFIT = 0x0004 //const GASP_SYMMETRIC_SMOOTHING = 0x0008 diff --git a/src/tables/gdef.js b/src/tables/gdef.mjs similarity index 96% rename from src/tables/gdef.js rename to src/tables/gdef.mjs index f15a6559..2cfd6b3d 100644 --- a/src/tables/gdef.js +++ b/src/tables/gdef.mjs @@ -1,8 +1,8 @@ // The `GDEF` table contains various glyph properties // https://docs.microsoft.com/en-us/typography/opentype/spec/gdef -import check from '../check.js'; -import { Parser } from '../parse.js'; +import check from '../check.mjs'; +import { Parser } from '../parse.mjs'; var attachList = function() { return { diff --git a/src/tables/glyf.js b/src/tables/glyf.mjs similarity index 98% rename from src/tables/glyf.js rename to src/tables/glyf.mjs index dded5951..ce92b80e 100644 --- a/src/tables/glyf.js +++ b/src/tables/glyf.mjs @@ -1,10 +1,10 @@ // The `glyf` table describes the glyphs in TrueType outline format. // http://www.microsoft.com/typography/otspec/glyf.htm -import check from '../check.js'; -import glyphset from '../glyphset.js'; -import parse from '../parse.js'; -import Path from '../path.js'; +import check from '../check.mjs'; +import glyphset from '../glyphset.mjs'; +import parse from '../parse.mjs'; +import Path from '../path.mjs'; // Parse the coordinate data for a glyph. function parseGlyphCoordinate(p, flag, previousValue, shortVectorBitMask, sameBitMask) { diff --git a/src/tables/gpos.js b/src/tables/gpos.mjs similarity index 97% rename from src/tables/gpos.js rename to src/tables/gpos.mjs index 32a7aceb..23f09789 100644 --- a/src/tables/gpos.js +++ b/src/tables/gpos.mjs @@ -1,9 +1,9 @@ // The `GPOS` table contains kerning pairs, among other things. // https://docs.microsoft.com/en-us/typography/opentype/spec/gpos -import check from '../check.js'; -import { Parser } from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import { Parser } from '../parse.mjs'; +import table from '../table.mjs'; const subtableParsers = new Array(10); // subtableParsers[0] is unused diff --git a/src/tables/gsub.js b/src/tables/gsub.mjs similarity index 99% rename from src/tables/gsub.js rename to src/tables/gsub.mjs index 3fb27276..17854d8d 100644 --- a/src/tables/gsub.js +++ b/src/tables/gsub.mjs @@ -1,9 +1,9 @@ // The `GSUB` table contains ligatures, among other things. // https://www.microsoft.com/typography/OTSPEC/gsub.htm -import check from '../check.js'; -import { Parser } from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import { Parser } from '../parse.mjs'; +import table from '../table.mjs'; const subtableParsers = new Array(9); // subtableParsers[0] is unused diff --git a/src/tables/gvar.js b/src/tables/gvar.mjs similarity index 80% rename from src/tables/gvar.js rename to src/tables/gvar.mjs index 9eea7a20..9c5b5f24 100644 --- a/src/tables/gvar.js +++ b/src/tables/gvar.mjs @@ -1,9 +1,9 @@ // The `gvar` table stores information on how to modify glyf outlines across the variation space // https://learn.microsoft.com/en-us/typography/opentype/spec/gvar -// import check from '../check.js'; -// import parse from '../parse.js'; -// import table from '../table.js'; +// import check from '../check.mjs'; +// import parse from '../parse.mjs'; +// import table from '../table.mjs'; function makeGvarTable() { console.warn('Writing of gvar tables is not yet supported.'); diff --git a/src/tables/head.js b/src/tables/head.mjs similarity index 96% rename from src/tables/head.js rename to src/tables/head.mjs index 832c60d1..8a6fe87b 100644 --- a/src/tables/head.js +++ b/src/tables/head.mjs @@ -1,9 +1,9 @@ // The `head` table contains global information about the font. // https://www.microsoft.com/typography/OTSPEC/head.htm -import check from '../check.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // Parse the header `head` table function parseHeadTable(data, start) { diff --git a/src/tables/hhea.js b/src/tables/hhea.mjs similarity index 96% rename from src/tables/hhea.js rename to src/tables/hhea.mjs index 63b588f3..1a4c7936 100644 --- a/src/tables/hhea.js +++ b/src/tables/hhea.mjs @@ -1,8 +1,8 @@ // The `hhea` table contains information for horizontal layout. // https://www.microsoft.com/typography/OTSPEC/hhea.htm -import parse from '../parse.js'; -import table from '../table.js'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // Parse the horizontal header `hhea` table function parseHheaTable(data, start) { diff --git a/src/tables/hmtx.js b/src/tables/hmtx.mjs similarity index 97% rename from src/tables/hmtx.js rename to src/tables/hmtx.mjs index 23d1f596..5765dcc5 100644 --- a/src/tables/hmtx.js +++ b/src/tables/hmtx.mjs @@ -1,8 +1,8 @@ // The `hmtx` table contains the horizontal metrics for all glyphs. // https://www.microsoft.com/typography/OTSPEC/hmtx.htm -import parse from '../parse.js'; -import table from '../table.js'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; function parseHmtxTableAll(data, start, numMetrics, numGlyphs, glyphs) { let advanceWidth; diff --git a/src/tables/kern.js b/src/tables/kern.mjs similarity index 97% rename from src/tables/kern.js rename to src/tables/kern.mjs index 604fc42d..6da2f791 100644 --- a/src/tables/kern.js +++ b/src/tables/kern.mjs @@ -2,8 +2,8 @@ // Note that some fonts use the GPOS OpenType layout table to specify kerning. // https://www.microsoft.com/typography/OTSPEC/kern.htm -import check from '../check.js'; -import parse from '../parse.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; function parseWindowsKernTable(p) { const pairs = {}; diff --git a/src/tables/loca.js b/src/tables/loca.mjs similarity index 97% rename from src/tables/loca.js rename to src/tables/loca.mjs index 563fd86d..fa81f6b9 100644 --- a/src/tables/loca.js +++ b/src/tables/loca.mjs @@ -1,7 +1,7 @@ // The `loca` table stores the offsets to the locations of the glyphs in the font. // https://www.microsoft.com/typography/OTSPEC/loca.htm -import parse from '../parse.js'; +import parse from '../parse.mjs'; // Parse the `loca` table. This table stores the offsets to the locations of the glyphs in the font, // relative to the beginning of the glyphData table. diff --git a/src/tables/ltag.js b/src/tables/ltag.mjs similarity index 94% rename from src/tables/ltag.js rename to src/tables/ltag.mjs index 90ced2ea..6b750289 100644 --- a/src/tables/ltag.js +++ b/src/tables/ltag.mjs @@ -4,9 +4,9 @@ // http://www.w3.org/International/articles/language-tags/ // http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry -import check from '../check.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; function makeLtagTable(tags) { const result = new table.Table('ltag', [ diff --git a/src/tables/maxp.js b/src/tables/maxp.mjs similarity index 95% rename from src/tables/maxp.js rename to src/tables/maxp.mjs index 7aaf5f6d..b97811eb 100644 --- a/src/tables/maxp.js +++ b/src/tables/maxp.mjs @@ -2,8 +2,8 @@ // We need it just to get the number of glyphs in the font. // https://www.microsoft.com/typography/OTSPEC/maxp.htm -import parse from '../parse.js'; -import table from '../table.js'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // Parse the maximum profile `maxp` table. function parseMaxpTable(data, start) { diff --git a/src/tables/meta.js b/src/tables/meta.mjs similarity index 93% rename from src/tables/meta.js rename to src/tables/meta.mjs index b73e9a17..ab5cfeae 100644 --- a/src/tables/meta.js +++ b/src/tables/meta.mjs @@ -1,10 +1,10 @@ // The `GPOS` table contains kerning pairs, among other things. // https://www.microsoft.com/typography/OTSPEC/gpos.htm -import check from '../check.js'; -import { decode } from '../types.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import { decode } from '../types.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // Parse the metadata `meta` table. // https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html diff --git a/src/tables/name.js b/src/tables/name.mjs similarity index 99% rename from src/tables/name.js rename to src/tables/name.mjs index b722127b..6035b5cd 100644 --- a/src/tables/name.js +++ b/src/tables/name.mjs @@ -1,9 +1,9 @@ // The `name` naming table. // https://www.microsoft.com/typography/OTSPEC/name.htm -import { decode, encode } from '../types.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import { decode, encode } from '../types.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // NameIDs for the name table. const nameTableNames = [ diff --git a/src/tables/os2.js b/src/tables/os2.mjs similarity index 99% rename from src/tables/os2.js rename to src/tables/os2.mjs index 541109f0..8392a8df 100644 --- a/src/tables/os2.js +++ b/src/tables/os2.mjs @@ -1,8 +1,8 @@ // The `OS/2` table contains metrics required in OpenType fonts. // https://www.microsoft.com/typography/OTSPEC/os2.htm -import parse from '../parse.js'; -import table from '../table.js'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; const unicodeRanges = [ {begin: 0x0000, end: 0x007F}, // Basic Latin diff --git a/src/tables/post.js b/src/tables/post.mjs similarity index 95% rename from src/tables/post.js rename to src/tables/post.mjs index 8e243fbb..c064bb84 100644 --- a/src/tables/post.js +++ b/src/tables/post.mjs @@ -1,9 +1,9 @@ // The `post` table stores additional PostScript information, such as glyph names. // https://www.microsoft.com/typography/OTSPEC/post.htm -import { standardNames } from '../encoding.js'; -import parse from '../parse.js'; -import table from '../table.js'; +import { standardNames } from '../encoding.mjs'; +import parse from '../parse.mjs'; +import table from '../table.mjs'; // Parse the PostScript `post` table function parsePostTable(data, start) { diff --git a/src/tables/sfnt.js b/src/tables/sfnt.mjs similarity index 95% rename from src/tables/sfnt.js rename to src/tables/sfnt.mjs index 8abdb844..5763fff0 100644 --- a/src/tables/sfnt.js +++ b/src/tables/sfnt.mjs @@ -4,27 +4,27 @@ // Recommendations for creating OpenType Fonts: // http://www.microsoft.com/typography/otspec140/recom.htm -import check from '../check.js'; -import table from '../table.js'; - -import cmap from './cmap.js'; -import cff from './cff.js'; -import head from './head.js'; -import hhea from './hhea.js'; -import hmtx from './hmtx.js'; -import ltag from './ltag.js'; -import maxp from './maxp.js'; -import _name from './name.js'; -import os2 from './os2.js'; -import post from './post.js'; -import gsub from './gsub.js'; -import meta from './meta.js'; -import colr from './colr.js'; -import cpal from './cpal.js'; -import fvar from './fvar.js'; -import stat from './stat.js'; -import avar from './avar.js'; -import gasp from './gasp.js'; +import check from '../check.mjs'; +import table from '../table.mjs'; + +import cmap from './cmap.mjs'; +import cff from './cff.mjs'; +import head from './head.mjs'; +import hhea from './hhea.mjs'; +import hmtx from './hmtx.mjs'; +import ltag from './ltag.mjs'; +import maxp from './maxp.mjs'; +import _name from './name.mjs'; +import os2 from './os2.mjs'; +import post from './post.mjs'; +import gsub from './gsub.mjs'; +import meta from './meta.mjs'; +import colr from './colr.mjs'; +import cpal from './cpal.mjs'; +import fvar from './fvar.mjs'; +import stat from './stat.mjs'; +import avar from './avar.mjs'; +import gasp from './gasp.mjs'; function log2(v) { return Math.log(v) / Math.log(2) | 0; diff --git a/src/tables/stat.js b/src/tables/stat.mjs similarity index 98% rename from src/tables/stat.js rename to src/tables/stat.mjs index c4c2a1c9..bd0d4181 100644 --- a/src/tables/stat.js +++ b/src/tables/stat.mjs @@ -1,9 +1,9 @@ // The `STAT` table stores information on design attributes for font-style variants // https://learn.microsoft.com/en-us/typography/opentype/spec/STAT -import check from '../check.js'; -import { default as parse, Parser } from '../parse.js'; -import table from '../table.js'; +import check from '../check.mjs'; +import { default as parse, Parser } from '../parse.mjs'; +import table from '../table.mjs'; const axisRecordStruct = { tag: Parser.tag, diff --git a/src/tiny-inflate@1.0.3.esm.js b/src/tiny-inflate@1.0.3.esm.mjs similarity index 100% rename from src/tiny-inflate@1.0.3.esm.js rename to src/tiny-inflate@1.0.3.esm.mjs diff --git a/src/tokenizer.js b/src/tokenizer.mjs similarity index 100% rename from src/tokenizer.js rename to src/tokenizer.mjs diff --git a/src/types.js b/src/types.mjs similarity index 99% rename from src/types.js rename to src/types.mjs index d8e5e637..9e091755 100644 --- a/src/types.js +++ b/src/types.mjs @@ -1,7 +1,7 @@ // Data types used in the OpenType font file. // All OpenType fonts use Motorola-style byte ordering (Big Endian) -import check from './check.js'; +import check from './check.mjs'; const LIMIT16 = 32768; // The limit at which a 16-bit number switches signs == 2^15 const LIMIT32 = 2147483648; // The limit at which a 32-bit number switches signs == 2 ^ 31 diff --git a/src/util.js b/src/util.mjs similarity index 100% rename from src/util.js rename to src/util.mjs diff --git a/test/bidi.js b/test/bidi.mjs similarity index 98% rename from test/bidi.js rename to test/bidi.mjs index 2f2b8601..0b060e79 100644 --- a/test/bidi.js +++ b/test/bidi.mjs @@ -1,10 +1,10 @@ import assert from 'assert'; -import Bidi from '../src/bidi.js'; -import { parse } from '../src/opentype.js'; +import Bidi from '../src/bidi.mjs'; +import { parse } from '../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('bidi.js', function() { +describe('bidi.mjs', function() { let latinFont; let arabicFont; let bidiFira; diff --git a/test/distSpec.js b/test/distSpec.mjs similarity index 71% rename from test/distSpec.js rename to test/distSpec.mjs index 61f547da..5355ffb9 100644 --- a/test/distSpec.js +++ b/test/distSpec.mjs @@ -1,14 +1,14 @@ import assert from 'assert'; -import { parse as parseBuffer } from '../dist/opentype.js'; -import { parse as parseBufferMin } from '../dist/opentype.min.js'; -import { parse as parseBufferMod } from '../dist/opentype.module.js'; -import { parse as parseBufferModMin } from '../dist/opentype.module.min.js'; +import opentype from '../dist/opentype.js'; +import opentypemin from '../dist/opentype.min.js'; +import { parse as parseBufferMod } from '../dist/opentype.mjs'; +import { parse as parseBufferModMin } from '../dist/opentype.min.mjs'; import { readFileSync } from 'fs'; describe('opentype.js dist', function () { const dist_matrix = [ - [parseBuffer, '.js'], - [parseBufferMin, '.min.js'], + [opentype.parse, '.js'], + [opentypemin.parse, '.min.js'], [parseBufferMod, '.module.js'], [parseBufferModMin, '.module.min.js'], ] diff --git a/test/featureQuery.js b/test/featureQuery.mjs similarity index 97% rename from test/featureQuery.js rename to test/featureQuery.mjs index 8e7bfc1c..f53eacf4 100644 --- a/test/featureQuery.js +++ b/test/featureQuery.mjs @@ -1,11 +1,11 @@ import assert from 'assert'; -import { parse } from '../src/opentype.js'; -import FeatureQuery from '../src/features/featureQuery.js'; -import { ContextParams } from '../src/tokenizer.js'; +import { parse } from '../src/opentype.mjs'; +import FeatureQuery from '../src/features/featureQuery.mjs'; +import { ContextParams } from '../src/tokenizer.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('featureQuery.js', function() { +describe('featureQuery.mjs', function() { let arabicFont; let arabicFontChanga; let latinFont; diff --git a/test/font.js b/test/font.mjs similarity index 98% rename from test/font.js rename to test/font.mjs index e15217b8..bd5312e3 100644 --- a/test/font.js +++ b/test/font.mjs @@ -1,10 +1,10 @@ import assert from 'assert'; -import { Font, Glyph, Path, parse } from '../src/opentype.js'; -import glyphset from '../src/glyphset.js'; +import { Font, Glyph, Path, parse } from '../src/opentype.mjs'; +import glyphset from '../src/glyphset.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('font.js', function() { +describe('font.mjs', function() { let font; const fGlyph = new Glyph({name: 'f', unicode: 102, path: new Path(), advanceWidth: 1}); @@ -175,7 +175,7 @@ describe('font.js', function() { }); }); -describe('glyphset.js', function() { +describe('glyphset.mjs', function() { let font; const fGlyph = new Glyph({name: 'f', unicode: 102, path: new Path(), advanceWidth: 1}); diff --git a/test/glyph.js b/test/glyph.mjs similarity index 98% rename from test/glyph.js rename to test/glyph.mjs index 2525779d..833b9c0b 100644 --- a/test/glyph.js +++ b/test/glyph.mjs @@ -1,9 +1,9 @@ import assert from 'assert'; -import { parse, Glyph, Path } from '../src/opentype.js'; +import { parse, Glyph, Path } from '../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('glyph.js', function() { +describe('glyph.mjs', function() { describe('lazy loading', function() { let font; let glyph; @@ -147,7 +147,7 @@ describe('glyph.js', function() { }); }); -describe('glyph.js on low memory mode', function() { +describe('glyph.mjs on low memory mode', function() { let opt = {lowMemory: true}; describe('lazy loading', function() { diff --git a/test/layout.js b/test/layout.mjs similarity index 97% rename from test/layout.js rename to test/layout.mjs index 5f9bc630..7273a67a 100644 --- a/test/layout.js +++ b/test/layout.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { Font, Path, Glyph } from '../src/opentype.js'; -import Layout from '../src/layout.js'; +import { Font, Path, Glyph } from '../src/opentype.mjs'; +import Layout from '../src/layout.mjs'; -describe('layout.js', function() { +describe('layout.mjs', function() { let font; let layout; const notdefGlyph = new Glyph({ diff --git a/test/opentypeSpec.js b/test/opentypeSpec.mjs similarity index 97% rename from test/opentypeSpec.js rename to test/opentypeSpec.mjs index 363f2b22..9965c5d4 100644 --- a/test/opentypeSpec.js +++ b/test/opentypeSpec.mjs @@ -1,9 +1,9 @@ import assert from 'assert'; -import { Font, Path, Glyph, parse, load} from '../src/opentype.js'; +import { Font, Path, Glyph, parse, load} from '../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('opentype.js', function() { +describe('opentype.mjs', function() { it('can load a TrueType font', function() { const font = loadSync('./test/fonts/Roboto-Black.ttf'); assert.deepEqual(font.names.macintosh.fontFamily, {en: 'Roboto Black'}); @@ -25,7 +25,7 @@ describe('opentype.js', function() { assert.equal(aGlyph.unicode, 65); assert.equal(aGlyph.path.commands.length, 15); done(); - }); + },(err) => done(err)); }); it('can load a font from URL in Node context', function(done) { @@ -38,9 +38,7 @@ describe('opentype.js', function() { assert.equal(aGlyph.unicode, 65); assert.equal(aGlyph.path.commands.length, 14); done(); - }).catch(error => { - console.log(error); - }); + },(err) => done(err)); }); it('can load a OpenType/CFF font', function() { @@ -119,7 +117,7 @@ describe('opentype.js', function() { }); }); -describe('opentype.js on low memory mode', function() { +describe('opentype.mjs on low memory mode', function() { const opt = { lowMemory: true }; it('can load a TrueType font', function() { diff --git a/test/parse.js b/test/parse.mjs similarity index 99% rename from test/parse.js rename to test/parse.mjs index a9023254..95f50bdd 100644 --- a/test/parse.js +++ b/test/parse.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { unhex } from './testutil.js'; -import { Parser } from '../src/parse.js'; +import { unhex } from './testutil.mjs'; +import { Parser } from '../src/parse.mjs'; -describe('parse.js', function() { +describe('parse.mjs', function() { describe('parseUShortList', function() { it('can parse an empty list', function() { const p = new Parser(unhex('0000'), 0); diff --git a/test/path.js b/test/path.mjs similarity index 98% rename from test/path.js rename to test/path.mjs index 1046bd94..b57761de 100644 --- a/test/path.js +++ b/test/path.mjs @@ -1,7 +1,7 @@ import assert from 'assert'; -import { Path } from '../src/opentype'; +import { Path } from '../src/opentype.mjs'; -describe('path.js', function() { +describe('path.mjs', function() { let emptyPath; let testPath1; let testPath2; diff --git a/test/substitution.js b/test/substitution.mjs similarity index 97% rename from test/substitution.js rename to test/substitution.mjs index 81fd0735..99517e60 100644 --- a/test/substitution.js +++ b/test/substitution.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { Font, Glyph, Path } from '../src/opentype.js'; -import Substitution from '../src/substitution.js'; +import { Font, Glyph, Path } from '../src/opentype.mjs'; +import Substitution from '../src/substitution.mjs'; -describe('substitution.js', function() { +describe('substitution.mjs', function() { let font; let substitution; const notdefGlyph = new Glyph({ diff --git a/test/table.js b/test/table.mjs similarity index 96% rename from test/table.js rename to test/table.mjs index 9da3a483..9e8aaccf 100644 --- a/test/table.js +++ b/test/table.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { unhexArray } from './testutil.js'; -import table from '../src/table.js'; +import { unhexArray } from './testutil.mjs'; +import table from '../src/table.mjs'; -describe('table.js', function() { +describe('table.mjs', function() { it('should make a ScriptList table', function() { // https://www.microsoft.com/typography/OTSPEC/chapter2.htm Examples 1 & 2 const expectedData = unhexArray( diff --git a/test/tables/avar.js b/test/tables/avar.mjs similarity index 92% rename from test/tables/avar.js rename to test/tables/avar.mjs index 50e446ae..e887bb30 100644 --- a/test/tables/avar.js +++ b/test/tables/avar.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import avar from '../../src/tables/avar.js'; +import { hex, unhex } from '../testutil.mjs'; +import avar from '../../src/tables/avar.mjs'; -describe('tables/avar.js', function() { +describe('tables/avar.mjs', function() { const fvar = {axes: [ {tag: 'TEST', minValue: 100, defaultValue: 400, maxValue: 900, name: {en: 'Test'}}, {tag: 'TEST2', minValue: 0, defaultValue: 1, maxValue: 2, name: {en: 'Test2'}} diff --git a/test/tables/cff.js b/test/tables/cff.mjs similarity index 96% rename from test/tables/cff.js rename to test/tables/cff.mjs index b55f0f01..47afef32 100644 --- a/test/tables/cff.js +++ b/test/tables/cff.mjs @@ -1,14 +1,14 @@ import assert from 'assert'; -import { unhex, hex } from '../testutil.js'; -import Glyph from '../../src/glyph.js'; -import glyphset from '../../src/glyphset.js'; -import Path from '../../src/path.js'; -import cff from '../../src/tables/cff.js'; -import { parse } from '../../src/opentype.js'; +import { unhex, hex } from '../testutil.mjs'; +import Glyph from '../../src/glyph.mjs'; +import glyphset from '../../src/glyphset.mjs'; +import Path from '../../src/path.mjs'; +import cff from '../../src/tables/cff.mjs'; +import { parse } from '../../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('tables/cff.js', function () { +describe('tables/cff.mjs', function () { const data = '01 00 04 01 00 01 01 01 03 70 73 00 01 01 01 32 ' + 'F8 1B 00 F8 1C 02 F8 1C 03 F8 1D 04 1D 00 00 00 ' + diff --git a/test/tables/cmap.js b/test/tables/cmap.mjs similarity index 93% rename from test/tables/cmap.js rename to test/tables/cmap.mjs index a3f41d66..4ab388a5 100644 --- a/test/tables/cmap.js +++ b/test/tables/cmap.mjs @@ -1,12 +1,12 @@ import assert from 'assert'; -import { unhex } from '../testutil'; -import { Parser } from '../../src/parse'; -import { parseCmapTableFormat14, parseCmapTableFormat0 } from '../../src/tables/cmap'; -import { parse } from '../../src/opentype.js'; +import { unhex } from '../testutil.mjs'; +import { Parser } from '../../src/parse.mjs'; +import { parseCmapTableFormat14, parseCmapTableFormat0 } from '../../src/tables/cmap.mjs'; +import { parse } from '../../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('tables/cmap.js', function() { +describe('tables/cmap.mjs', function() { it('can parse a CMAP format 14 table', function() { const cmapData = diff --git a/test/tables/colr.js b/test/tables/colr.mjs similarity index 87% rename from test/tables/colr.js rename to test/tables/colr.mjs index 1eb18e2e..23ee364e 100644 --- a/test/tables/colr.js +++ b/test/tables/colr.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import colr from '../../src/tables/colr.js'; +import { hex, unhex } from '../testutil.mjs'; +import colr from '../../src/tables/colr.mjs'; -describe('tables/colr.js', function () { +describe('tables/colr.mjs', function () { const data = '00 00 00 02 00 00 00 0E 00 00 00 1A 00 03 ' + '00 AA 00 00 00 01 00 BB 00 01 00 02 ' + '00 20 FF FF 00 21 00 40 00 23 00 41'; diff --git a/test/tables/cpal.js b/test/tables/cpal.mjs similarity index 83% rename from test/tables/cpal.js rename to test/tables/cpal.mjs index 05aca19d..28b280ca 100644 --- a/test/tables/cpal.js +++ b/test/tables/cpal.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import cpal from '../../src/tables/cpal.js'; +import { hex, unhex } from '../testutil.mjs'; +import cpal from '../../src/tables/cpal.mjs'; -describe('tables/cpal.js', function() { +describe('tables/cpal.mjs', function() { const data = '00 00 00 02 00 03 00 04 00 00 00 12 00 00 00 01 00 02 ' + '88 66 BB AA 00 11 22 33 12 34 56 78 DE AD BE EF'; const obj = { diff --git a/test/tables/fvar.js b/test/tables/fvar.mjs similarity index 95% rename from test/tables/fvar.js rename to test/tables/fvar.mjs index 8f87fb03..9375d5da 100644 --- a/test/tables/fvar.js +++ b/test/tables/fvar.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import fvar from '../../src/tables/fvar.js'; +import { hex, unhex } from '../testutil.mjs'; +import fvar from '../../src/tables/fvar.mjs'; -describe('tables/fvar.js', function() { +describe('tables/fvar.mjs', function() { const data = '00 01 00 00 00 10 00 02 00 02 00 14 00 02 00 0C ' + '77 67 68 74 00 64 00 00 01 90 00 00 03 84 00 00 00 00 01 01 ' + diff --git a/test/tables/gasp.js b/test/tables/gasp.mjs similarity index 96% rename from test/tables/gasp.js rename to test/tables/gasp.mjs index f2aec720..9dff5cfb 100644 --- a/test/tables/gasp.js +++ b/test/tables/gasp.mjs @@ -1,9 +1,9 @@ import assert from 'assert'; -import { Font, Path, Glyph, parse, load} from '../../src/opentype.js'; +import { Font, Path, Glyph, parse, load} from '../../src/opentype.mjs'; import { readFileSync } from 'fs'; const loadSync = (url, opt) => parse(readFileSync(url), opt); -describe('tables/gasp.js', function () { +describe('tables/gasp.mjs', function () { const font = loadSync('./test/fonts/Roboto-Black.ttf'); it('can parse gasp table version', function() { diff --git a/test/tables/gdef.js b/test/tables/gdef.mjs similarity index 95% rename from test/tables/gdef.js rename to test/tables/gdef.mjs index bbef4bd9..99f55b34 100644 --- a/test/tables/gdef.js +++ b/test/tables/gdef.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { unhex } from '../testutil.js'; -import gdef from '../../src/tables/gdef.js'; +import { unhex } from '../testutil.mjs'; +import gdef from '../../src/tables/gdef.mjs'; -describe('tables/gdef.js', function() { +describe('tables/gdef.mjs', function() { const data = ' 00 01 00 00 00 0c 00 40 00 78 00 d0 00 02 00 08' + ' 00 65 00 65 00 03 00 f2 00 f2 00 01 02 08 02 08' + diff --git a/test/tables/gpos.js b/test/tables/gpos.mjs similarity index 97% rename from test/tables/gpos.js rename to test/tables/gpos.mjs index a2cde3c2..0fedf140 100644 --- a/test/tables/gpos.js +++ b/test/tables/gpos.mjs @@ -1,6 +1,6 @@ import assert from 'assert'; -import { unhex } from '../testutil.js'; -import gpos from '../../src/tables/gpos.js'; +import { unhex } from '../testutil.mjs'; +import gpos from '../../src/tables/gpos.mjs'; // Helper that builds a minimal GPOS table to test a lookup subtable. function parseLookup(lookupType, subTableData) { @@ -13,7 +13,7 @@ function parseLookup(lookupType, subTableData) { return gpos.parse(data).lookups[0].subtables[0]; } -describe('tables/gpos.js', function() { +describe('tables/gpos.mjs', function() { //// Header /////////////////////////////////////////////////////////////// it('can parse a GPOS header', function() { const data = unhex( diff --git a/test/tables/gsub.js b/test/tables/gsub.mjs similarity index 99% rename from test/tables/gsub.js rename to test/tables/gsub.mjs index 37191d2e..900b0162 100644 --- a/test/tables/gsub.js +++ b/test/tables/gsub.mjs @@ -1,6 +1,6 @@ import assert from 'assert'; -import { unhex, unhexArray } from '../testutil.js'; -import gsub from '../../src/tables/gsub.js'; +import { unhex, unhexArray } from '../testutil.mjs'; +import gsub from '../../src/tables/gsub.mjs'; // Helper that builds a minimal GSUB table to test a lookup subtable. function parseLookup(lookupType, subTableData) { @@ -26,7 +26,7 @@ function makeLookup(lookupType, data) { }).encode().slice(0x1a); // sub table start offset: 0x1a } -describe('tables/gsub.js', function() { +describe('tables/gsub.mjs', function() { //// Header /////////////////////////////////////////////////////////////// it('can parse a GSUB header', function() { const data = unhex( diff --git a/test/tables/loca.js b/test/tables/loca.mjs similarity index 77% rename from test/tables/loca.js rename to test/tables/loca.mjs index dd203642..785ed594 100644 --- a/test/tables/loca.js +++ b/test/tables/loca.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { unhex } from '../testutil.js'; -import loca from '../../src/tables/loca.js'; +import { unhex } from '../testutil.mjs'; +import loca from '../../src/tables/loca.mjs'; -describe('tables/loca.js', function() { +describe('tables/loca.mjs', function() { it('can parse the short version', function() { const data = unhex('DEAD BEEF 0010 0100 80CE'); assert.deepEqual([32, 512, 2 * 0x80ce], loca.parse(data, 4, 2, true)); diff --git a/test/tables/ltag.js b/test/tables/ltag.mjs similarity index 81% rename from test/tables/ltag.js rename to test/tables/ltag.mjs index c400b018..d1ed24ca 100644 --- a/test/tables/ltag.js +++ b/test/tables/ltag.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import ltag from '../../src/tables/ltag.js'; +import { hex, unhex } from '../testutil.mjs'; +import ltag from '../../src/tables/ltag.mjs'; -describe('tables/ltag.js', function() { +describe('tables/ltag.mjs', function() { const data = '00 00 00 01 00 00 00 00 00 00 00 04 00 1C 00 02 ' + '00 1E 00 07 00 1E 00 02 00 25 00 13 65 6E 7A 68 ' + diff --git a/test/tables/meta.js b/test/tables/meta.mjs similarity index 90% rename from test/tables/meta.js rename to test/tables/meta.mjs index dd8e5f77..30584f4d 100644 --- a/test/tables/meta.js +++ b/test/tables/meta.mjs @@ -1,9 +1,9 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import meta from '../../src/tables/meta.js'; +import { hex, unhex } from '../testutil.mjs'; +import meta from '../../src/tables/meta.mjs'; // Based on https://github.com/behdad/fonttools/blob/a5968458015b519bc415f3ca7d882a428f45c347/Lib/fontTools/ttLib/tables/_m_e_t_a_test.py -describe('tables/meta.js', function() { +describe('tables/meta.mjs', function() { // The 'dlng' and 'slng' tag with text data containing "augmented" BCP 47 // comma-separated or comma-space-separated tags. These should be UTF-8 encoded // text. diff --git a/test/tables/name.js b/test/tables/name.mjs similarity index 98% rename from test/tables/name.js rename to test/tables/name.mjs index 393c635e..2c98375f 100644 --- a/test/tables/name.js +++ b/test/tables/name.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import table from '../../src/table.js'; -import { encode } from '../../src/types.js'; -import _name from '../../src/tables/name.js'; -import { hex, unhex } from '../testutil.js'; +import table from '../../src/table.mjs'; +import { encode } from '../../src/types.mjs'; +import _name from '../../src/tables/name.mjs'; +import { hex, unhex } from '../testutil.mjs'; // For testing, we need a custom function that builds name tables. // The public name.make() API of opentype.js is hiding the complexity @@ -99,7 +99,7 @@ function getNameRecords(names) { return result; } -describe('tables/name.js', function() { +describe('tables/name.mjs', function() { it('can parse a naming table', function() { assert.deepEqual(parseNameTable([ [1, '0057 0061 006C 0072 0075 0073', 3, 1, 0x0409], diff --git a/test/tables/sfnt.js b/test/tables/sfnt.mjs similarity index 96% rename from test/tables/sfnt.js rename to test/tables/sfnt.mjs index b0bf61f8..7a2fc2d0 100644 --- a/test/tables/sfnt.js +++ b/test/tables/sfnt.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import Font from '../../src/font.js'; -import sfnt from '../../src/tables/sfnt.js'; -import name from '../../src/tables/name.js'; -import { encode } from '../../src/types.js'; +import Font from '../../src/font.mjs'; +import sfnt from '../../src/tables/sfnt.mjs'; +import name from '../../src/tables/name.mjs'; +import { encode } from '../../src/types.mjs'; function encodeAndParseTable(table, parser) { const bytes = encode.TABLE(table); @@ -14,7 +14,7 @@ function encodeAndParseTable(table, parser) { return parser(data, 0); } -describe('tables/sfnt.js', ()=>{ +describe('tables/sfnt.mjs', ()=>{ let font; const defaultFont = { familyName: 'MyFont', diff --git a/test/tables/stat.js b/test/tables/stat.mjs similarity index 94% rename from test/tables/stat.js rename to test/tables/stat.mjs index 198bb376..e36600f6 100644 --- a/test/tables/stat.js +++ b/test/tables/stat.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from '../testutil.js'; -import STAT from '../../src/tables/stat.js'; +import { hex, unhex } from '../testutil.mjs'; +import STAT from '../../src/tables/stat.mjs'; -describe('tables/stat.js', function() { +describe('tables/stat.mjs', function() { // Style Attributes Header, v1.2 const h10 = '00 01 00 00 00 08 00 03 00 00 00 12 00 04 00 00 00 2A'; // Style Attributes Header, v1.0 diff --git a/test/testutil.js b/test/testutil.mjs similarity index 100% rename from test/testutil.js rename to test/testutil.mjs diff --git a/test/tokenizer.js b/test/tokenizer.mjs similarity index 98% rename from test/tokenizer.js rename to test/tokenizer.mjs index 18ff8953..1826ed3c 100644 --- a/test/tokenizer.js +++ b/test/tokenizer.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import Tokenizer, { Token } from '../src/tokenizer.js'; -import { isWhiteSpace, isArabicChar } from '../src/char.js'; +import Tokenizer, { Token } from '../src/tokenizer.mjs'; +import { isWhiteSpace, isArabicChar } from '../src/char.mjs'; -describe('tokenizer.js', function() { +describe('tokenizer.mjs', function() { describe('tokenize', function() { let tokenizer; beforeEach(function() { diff --git a/test/types.js b/test/types.mjs similarity index 99% rename from test/types.js rename to test/types.mjs index f19bcb86..7027e3fe 100644 --- a/test/types.js +++ b/test/types.mjs @@ -1,8 +1,8 @@ import assert from 'assert'; -import { hex, unhex } from './testutil.js'; -import { decode, encode, sizeOf } from '../src/types.js'; +import { hex, unhex } from './testutil.mjs'; +import { decode, encode, sizeOf } from '../src/types.mjs'; -describe('types.js', function() { +describe('types.mjs', function() { it('can handle BYTE', function() { assert.equal(hex(encode.BYTE(0xFE)), 'FE'); assert.equal(sizeOf.BYTE(0xFE), 1); diff --git a/test/util.js b/test/util.mjs similarity index 88% rename from test/util.js rename to test/util.mjs index b3691773..ff0a26de 100644 --- a/test/util.js +++ b/test/util.mjs @@ -1,7 +1,7 @@ import assert from 'assert'; -import { objectsEqual } from '../src/util.js'; +import { objectsEqual } from '../src/util.mjs'; -describe('util.js', function() { +describe('util.mjs', function() { describe('objectsEqual', function() { it('should return true for equal objects', function() { assert.equal(objectsEqual({}, {}), true);