From 6f1141c4290b466221bd7b757cf1956c8a5e9831 Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 17:02:41 +1100 Subject: [PATCH 1/6] refactor: migrate from prettier and eslint to biome --- .eslintrc.json | 23 -- .prettierrc | 10 - biome.json | 54 +++ package.json | 19 +- pnpm-lock.yaml | 1054 ++++-------------------------------------------- 5 files changed, 149 insertions(+), 1011 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 .prettierrc create mode 100644 biome.json diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index ffeee40..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/eslintrc.json", - "env": { - "es2020": true, - "node": true - }, - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"], - "rules": { - "tsdoc/syntax": "warn", - "no-empty-function": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "warn", - "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-empty-interface": "off", - "no-mixed-spaces-and-tabs": "off" - } -} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index df88428..0000000 --- a/.prettierrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "useTabs": true, - "tabWidth": 4, - "semi": true, - "singleQuote": false, - "trailingComma": "es5", - "arrowParens": "always", - "printWidth": 80, - "bracketSpacing": false -} diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..122d91d --- /dev/null +++ b/biome.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, + "defaultBranch": "master" + }, + "files": { + "ignore": [ + "docs/src/content/snippets/*.ts", + "docs/src/**/*.astro", + "examples/*/public/*.js" + ], + "ignoreUnknown": false + }, + "formatter": { + "enabled": true, + "indentStyle": "tab", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 80, + "bracketSpacing": true + }, + "organizeImports": { "enabled": true }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": "warn" + }, + "complexity": { + "useLiteralKeys": "off" + }, + "suspicious": { + "noEmptyBlockStatements": "error" + }, + "style": { + "useTemplate": "off" + } + } + }, + "javascript": { + "formatter": { + "quoteProperties": "asNeeded", + "trailingCommas": "es5", + "semicolons": "always", + "arrowParentheses": "always", + "quoteStyle": "double", + "bracketSpacing": false + } + } +} diff --git a/package.json b/package.json index 493a237..79b37d3 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,10 @@ "scripts": { "build": "tsup", "test": "vitest", - "format": "prettier --write ./src/**/*.ts", - "lint": "eslint \"./src/**/*.ts\"", - "prepublishOnly": "npm-run-all format test build" + "format": "biome format --write", + "lint": "biome lint --write", + "ci": "biome ci", + "prepublishOnly": "npm-run-all ci build" }, "main": "./build/index.js", "module": "./build/index.mjs", @@ -32,27 +33,19 @@ "import": "./build/index.mjs" } }, - "files": [ - "build", - "!build/**/*.map" - ], + "files": ["build", "!build/**/*.map"], "engines": { "node": ">=20", "pnpm": ">=9" }, "devDependencies": { + "@biomejs/biome": "1.9.4", "@tsconfig/node20": "^20.1.4", "@types/eventsource": "^1.1.15", "@types/express": "^5.0.0", "@types/node": "^22.7.6", - "@typescript-eslint/eslint-plugin": "^8.9.0", - "@typescript-eslint/parser": "^8.9.0", - "eslint": "^8.57.1", - "eslint-plugin-tsdoc": "^0.3.0", "eventsource": "^2.0.2", "npm-run-all": "^4.1.5", - "prettier": "^3.3.3", - "ts-node": "^10.9.2", "tsup": "^8.3.0", "typescript": "^5.6.3", "vitest": "^2.1.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03faa00..f1803de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@biomejs/biome': + specifier: 1.9.4 + version: 1.9.4 '@tsconfig/node20': specifier: ^20.1.4 version: 20.1.4 @@ -20,30 +23,12 @@ importers: '@types/node': specifier: ^22.7.6 version: 22.7.6 - '@typescript-eslint/eslint-plugin': - specifier: ^8.9.0 - version: 8.9.0(@typescript-eslint/parser@8.9.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/parser': - specifier: ^8.9.0 - version: 8.9.0(eslint@8.57.1)(typescript@5.6.3) - eslint: - specifier: ^8.57.1 - version: 8.57.1 - eslint-plugin-tsdoc: - specifier: ^0.3.0 - version: 0.3.0 eventsource: specifier: ^2.0.2 version: 2.0.2 npm-run-all: specifier: ^4.1.5 version: 4.1.5 - prettier: - specifier: ^3.3.3 - version: 3.3.3 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@22.7.6)(typescript@5.6.3) tsup: specifier: ^8.3.0 version: 8.3.0(postcss@8.4.47)(typescript@5.6.3) @@ -56,9 +41,58 @@ importers: packages: - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} @@ -342,37 +376,6 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -398,27 +401,6 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - - '@microsoft/tsdoc-config@0.17.0': - resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} - - '@microsoft/tsdoc@0.15.0': - resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -503,18 +485,6 @@ packages: cpu: [x64] os: [win32] - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@tsconfig/node20@20.1.4': resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==} @@ -557,66 +527,6 @@ packages: '@types/serve-static@1.15.7': resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} - '@typescript-eslint/eslint-plugin@8.9.0': - resolution: {integrity: sha512-Y1n621OCy4m7/vTXNlCbMVp87zSd7NH0L9cXD8aIpOaNlzeWxIK4+Q19A68gSmTNRZn92UjocVUWDthGxtqHFg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.9.0': - resolution: {integrity: sha512-U+BLn2rqTTHnc4FL3FJjxaXptTxmf9sNftJK62XLz4+GxG3hLHm/SUNaaXP5Y4uTiuYoL5YLy4JBCJe3+t8awQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@8.9.0': - resolution: {integrity: sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.9.0': - resolution: {integrity: sha512-JD+/pCqlKqAk5961vxCluK+clkppHY07IbV3vett97KOV+8C6l+CPEPwpUuiMwgbOz/qrN3Ke4zzjqbT+ls+1Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@8.9.0': - resolution: {integrity: sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.9.0': - resolution: {integrity: sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.9.0': - resolution: {integrity: sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - - '@typescript-eslint/visitor-keys@8.9.0': - resolution: {integrity: sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitest/expect@2.1.3': resolution: {integrity: sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==} @@ -647,26 +557,11 @@ packages: '@vitest/utils@2.1.3': resolution: {integrity: sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==} - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} - engines: {node: '>=0.4.0'} - acorn@8.13.0: resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} engines: {node: '>=0.4.0'} hasBin: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ajv@8.12.0: - resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -694,12 +589,6 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} @@ -750,10 +639,6 @@ packages: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} @@ -762,10 +647,6 @@ packages: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -801,9 +682,6 @@ packages: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -837,9 +715,6 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -848,14 +723,6 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} - diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -906,50 +773,9 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-plugin-tsdoc@0.3.0: - resolution: {integrity: sha512-0MuFdBrrJVBjT/gyhkP2BqpD0np1NxNLfQ38xXDlSs/KVVpKI2A6vN7jx2Rve/CyUsvOsMGwp9KKrinv7q9g3A==} - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - eventsource@2.0.2: resolution: {integrity: sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==} engines: {node: '>=12.0.0'} @@ -958,22 +784,6 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - fdir@6.4.2: resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} peerDependencies: @@ -982,25 +792,10 @@ packages: picomatch: optional: true - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -1008,9 +803,6 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1042,22 +834,10 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - glob@10.4.5: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -1068,9 +848,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -1078,10 +855,6 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -1108,25 +881,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} @@ -1189,10 +943,6 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -1229,39 +979,13 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - lilconfig@3.1.2: resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} @@ -1277,13 +1001,6 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -1296,9 +1013,6 @@ packages: magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -1306,14 +1020,6 @@ packages: merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -1340,9 +1046,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -1378,44 +1081,17 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@2.0.1: resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} engines: {node: '>=4'} @@ -1492,22 +1168,10 @@ packages: resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - read-pkg@3.0.0: resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} engines: {node: '>=4'} @@ -1520,14 +1184,6 @@ packages: resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} @@ -1536,23 +1192,11 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.24.0: resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - safe-array-concat@1.1.2: resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} engines: {node: '>=0.4'} @@ -1565,11 +1209,6 @@ packages: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -1683,10 +1322,6 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -1696,10 +1331,6 @@ packages: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -1709,9 +1340,6 @@ packages: engines: {node: '>=10'} hasBin: true - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -1752,29 +1380,9 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - tsup@8.3.0: resolution: {integrity: sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==} engines: {node: '>=18'} @@ -1794,14 +1402,6 @@ packages: typescript: optional: true - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -1829,12 +1429,6 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -1926,10 +1520,6 @@ packages: engines: {node: '>=8'} hasBin: true - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -1938,22 +1528,42 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} +snapshots: - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true -snapshots: + '@biomejs/cli-darwin-x64@1.9.4': + optional: true - '@cspotcode/source-map-support@0.8.1': - dependencies: - '@jridgewell/trace-mapping': 0.3.9 + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true '@esbuild/aix-ppc64@0.21.5': optional: true @@ -2096,41 +1706,6 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.11.1': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.7 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.1': {} - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -2163,32 +1738,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@microsoft/tsdoc-config@0.17.0': - dependencies: - '@microsoft/tsdoc': 0.15.0 - ajv: 8.12.0 - jju: 1.4.0 - resolve: 1.22.8 - - '@microsoft/tsdoc@0.15.0': {} - - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} - - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 - '@pkgjs/parseargs@0.11.0': optional: true @@ -2240,14 +1789,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true - '@tsconfig/node10@1.0.11': {} - - '@tsconfig/node12@1.0.11': {} - - '@tsconfig/node14@1.0.3': {} - - '@tsconfig/node16@1.0.4': {} - '@tsconfig/node20@20.1.4': {} '@types/body-parser@1.19.5': @@ -2300,89 +1841,6 @@ snapshots: '@types/node': 22.7.6 '@types/send': 0.17.4 - '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.9.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.9.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/type-utils': 8.9.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.9.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.9.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.9.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.9.0 - debug: 4.3.7 - eslint: 8.57.1 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.9.0': - dependencies: - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/visitor-keys': 8.9.0 - - '@typescript-eslint/type-utils@8.9.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.9.0(eslint@8.57.1)(typescript@5.6.3) - debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - eslint - - supports-color - - '@typescript-eslint/types@8.9.0': {} - - '@typescript-eslint/typescript-estree@8.9.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/visitor-keys': 8.9.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.9.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@8.9.0': - dependencies: - '@typescript-eslint/types': 8.9.0 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.2.0': {} - '@vitest/expect@2.1.3': dependencies: '@vitest/spy': 2.1.3 @@ -2423,29 +1881,8 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 - acorn-jsx@5.3.2(acorn@8.13.0): - dependencies: - acorn: 8.13.0 - - acorn-walk@8.3.4: - dependencies: - acorn: 8.13.0 - - acorn@8.13.0: {} - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ajv@8.12.0: - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 + acorn@8.13.0: + optional: true ansi-regex@5.0.1: {} @@ -2468,10 +1905,6 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - arg@4.1.3: {} - - argparse@2.0.1: {} - array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 @@ -2529,8 +1962,6 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.2 - callsites@3.1.0: {} - chai@5.1.1: dependencies: assertion-error: 2.0.1 @@ -2545,11 +1976,6 @@ snapshots: escape-string-regexp: 1.0.5 supports-color: 5.5.0 - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - check-error@2.1.1: {} chokidar@3.6.0: @@ -2585,8 +2011,6 @@ snapshots: consola@3.2.3: {} - create-require@1.1.1: {} - cross-spawn@6.0.5: dependencies: nice-try: 1.0.5 @@ -2625,8 +2049,6 @@ snapshots: deep-eql@5.0.2: {} - deep-is@0.1.4: {} - define-data-property@1.1.4: dependencies: es-define-property: 1.0.0 @@ -2639,12 +2061,6 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 - diff@4.0.2: {} - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - eastasianwidth@0.2.0: {} emoji-regex@8.0.0: {} @@ -2781,85 +2197,10 @@ snapshots: escape-string-regexp@1.0.5: {} - escape-string-regexp@4.0.0: {} - - eslint-plugin-tsdoc@0.3.0: - dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@9.6.1: - dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) - eslint-visitor-keys: 3.4.3 - - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.6 - esutils@2.0.3: {} - eventsource@2.0.2: {} execa@5.1.1: @@ -2874,49 +2215,14 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - fast-deep-equal@3.1.3: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fastq@1.17.1: - dependencies: - reusify: 1.0.4 - fdir@6.4.2(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - - flatted@3.3.1: {} - for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -2926,8 +2232,6 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true @@ -2962,10 +2266,6 @@ snapshots: dependencies: is-glob: 4.0.3 - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - glob@10.4.5: dependencies: foreground-child: 3.3.0 @@ -2975,19 +2275,6 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -2999,14 +2286,10 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - has-bigints@1.0.2: {} has-flag@3.0.0: {} - has-flag@4.0.0: {} - has-property-descriptors@1.0.2: dependencies: es-define-property: 1.0.0 @@ -3027,22 +2310,6 @@ snapshots: human-signals@2.1.0: {} - ignore@5.3.2: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - imurmurhash@0.1.4: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - internal-slot@1.0.7: dependencies: es-errors: 1.3.0 @@ -3099,8 +2366,6 @@ snapshots: is-number@7.0.0: {} - is-path-inside@3.0.3: {} - is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -3138,33 +2403,10 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jju@1.4.0: {} - joycon@3.1.1: {} - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - json-buffer@3.0.1: {} - json-parse-better-errors@1.0.2: {} - json-schema-traverse@0.4.1: {} - - json-schema-traverse@1.0.0: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - lilconfig@3.1.2: {} lines-and-columns@1.2.4: {} @@ -3178,12 +2420,6 @@ snapshots: load-tsconfig@0.2.5: {} - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - lodash.merge@4.6.2: {} - lodash.sortby@4.7.0: {} loupe@3.1.2: {} @@ -3194,19 +2430,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - make-error@1.3.6: {} - memorystream@0.3.1: {} merge-stream@2.0.0: {} - merge2@1.4.1: {} - - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - mimic-fn@2.1.0: {} minimatch@3.1.2: @@ -3229,8 +2456,6 @@ snapshots: nanoid@3.3.7: {} - natural-compare@1.4.0: {} - nice-try@1.0.5: {} normalize-package-data@2.5.0: @@ -3271,46 +2496,17 @@ snapshots: has-symbols: 1.0.3 object-keys: 1.1.1 - once@1.4.0: - dependencies: - wrappy: 1.0.2 - onetime@5.1.2: dependencies: mimic-fn: 2.1.0 - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - package-json-from-dist@1.0.1: {} - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse-json@4.0.0: dependencies: error-ex: 1.3.2 json-parse-better-errors: 1.0.2 - path-exists@4.0.0: {} - - path-is-absolute@1.0.1: {} - path-key@2.0.1: {} path-key@3.1.1: {} @@ -3356,14 +2552,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier@3.3.3: {} - punycode@2.3.1: {} - queue-microtask@1.2.3: {} - read-pkg@3.0.0: dependencies: load-json-file: 4.0.0 @@ -3381,10 +2571,6 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 - require-from-string@2.0.2: {} - - resolve-from@4.0.0: {} - resolve-from@5.0.0: {} resolve@1.22.8: @@ -3393,12 +2579,6 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - reusify@1.0.4: {} - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.24.0: dependencies: '@types/estree': 1.0.6 @@ -3421,10 +2601,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.24.0 fsevents: 2.3.3 - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - safe-array-concat@1.1.2: dependencies: call-bind: 1.0.7 @@ -3440,8 +2616,6 @@ snapshots: semver@5.7.2: {} - semver@7.6.3: {} - set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -3568,8 +2742,6 @@ snapshots: strip-final-newline@2.0.0: {} - strip-json-comments@3.1.1: {} - sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -3584,10 +2756,6 @@ snapshots: dependencies: has-flag: 3.0.0 - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} terser@5.36.0: @@ -3598,8 +2766,6 @@ snapshots: source-map-support: 0.5.21 optional: true - text-table@0.2.0: {} - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -3633,30 +2799,8 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.6.3): - dependencies: - typescript: 5.6.3 - ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@types/node@22.7.6)(typescript@5.6.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.7.6 - acorn: 8.13.0 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.6.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - tsup@8.3.0(postcss@8.4.47)(typescript@5.6.3): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) @@ -3684,12 +2828,6 @@ snapshots: - tsx - yaml - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-fest@0.20.2: {} - typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 @@ -3733,12 +2871,6 @@ snapshots: undici-types@6.19.8: {} - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - v8-compile-cache-lib@3.0.1: {} - validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 @@ -3842,8 +2974,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - word-wrap@1.2.5: {} - wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -3855,9 +2985,3 @@ snapshots: ansi-styles: 6.2.1 string-width: 5.1.2 strip-ansi: 7.1.0 - - wrappy@1.0.2: {} - - yn@3.1.1: {} - - yocto-queue@0.1.0: {} From a90404451daebc668a4d4f09ff9730058b0c977e Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 17:12:52 +1100 Subject: [PATCH 2/6] refactor: format and apply safe lint fixes to all files with biome --- docs/src/env.d.ts | 2 +- examples/benchmarks/suites/Suite.ts | 7 ++++-- examples/getting-started/server.ts | 2 +- examples/http2/server.ts | 4 ++-- .../resource-monitor/channels/resource.ts | 24 ++++++++++++------- src/Channel.test.ts | 14 ++++------- src/Channel.ts | 6 ++--- src/EventBuffer.ts | 4 ++-- src/Session.test.ts | 8 +++---- src/Session.ts | 24 ++++++++----------- src/createChannel.ts | 4 ++-- src/createSession.test.ts | 2 +- src/createSession.ts | 2 +- src/lib/createPushFromIterable.test.ts | 2 +- src/lib/createPushFromStream.test.ts | 2 +- src/lib/createPushFromStream.ts | 2 +- src/lib/sanitize.ts | 4 +--- src/lib/serialize.ts | 4 +--- src/lib/testUtils.ts | 7 +++--- 19 files changed, 59 insertions(+), 65 deletions(-) diff --git a/docs/src/env.d.ts b/docs/src/env.d.ts index 9bc5cb4..e16c13c 100644 --- a/docs/src/env.d.ts +++ b/docs/src/env.d.ts @@ -1 +1 @@ -/// \ No newline at end of file +/// diff --git a/examples/benchmarks/suites/Suite.ts b/examples/benchmarks/suites/Suite.ts index f4dfb6c..a241986 100644 --- a/examples/benchmarks/suites/Suite.ts +++ b/examples/benchmarks/suites/Suite.ts @@ -1,5 +1,5 @@ import {Suite as BenchmarkSuite} from "benchmark"; -import express, {Express} from "express"; +import express, {type Express} from "express"; /** * Wrap the Benchmark.js Suite with a much nicer and more @@ -8,7 +8,10 @@ import express, {Express} from "express"; export class Suite extends BenchmarkSuite { static port = 8000; - constructor(name: string, private createBenchmarks: () => Promise) { + constructor( + name: string, + private createBenchmarks: () => Promise + ) { super(name, {async: true}); this.on("start", () => { diff --git a/examples/getting-started/server.ts b/examples/getting-started/server.ts index d294add..6f9809e 100644 --- a/examples/getting-started/server.ts +++ b/examples/getting-started/server.ts @@ -1,6 +1,6 @@ import path from "path"; import express from "express"; -import {createSession, Session} from "better-sse"; +import {createSession, type Session} from "better-sse"; const app = express(); diff --git a/examples/http2/server.ts b/examples/http2/server.ts index ccccbbb..f6e1866 100644 --- a/examples/http2/server.ts +++ b/examples/http2/server.ts @@ -2,8 +2,8 @@ import {resolve} from "path"; import {promisify} from "util"; import {createSecureServer} from "http2"; import { - CertificateCreationOptions, - CertificateCreationResult, + type CertificateCreationOptions, + type CertificateCreationResult, createCertificate as createCertificateCallback, } from "pem"; import {createSession} from "better-sse"; diff --git a/examples/resource-monitor/channels/resource.ts b/examples/resource-monitor/channels/resource.ts index 24f3d1b..cf53290 100644 --- a/examples/resource-monitor/channels/resource.ts +++ b/examples/resource-monitor/channels/resource.ts @@ -1,4 +1,4 @@ -import osu, {NetStatMetrics} from "node-os-utils"; +import osu, {type NetStatMetrics} from "node-os-utils"; import {createChannel} from "better-sse"; const resource = createChannel(); @@ -11,10 +11,13 @@ const broadcastSystemStats = async () => { const {totalMemMb, freeMemMb} = await osu.mem.info(); const memoryUsage = (freeMemMb / totalMemMb) * 100; - resource.broadcast({ - cpuUsage, - memoryUsage, - }, "system-stats"); + resource.broadcast( + { + cpuUsage, + memoryUsage, + }, + "system-stats" + ); setTimeout(broadcastSystemStats, interval); }; @@ -27,10 +30,13 @@ const broadcastNetStats = async () => { total: {inputMb, outputMb}, } = netStats as NetStatMetrics; - resource.broadcast({ - inputMb, - outputMb, - }, "net-stats"); + resource.broadcast( + { + inputMb, + outputMb, + }, + "net-stats" + ); setTimeout(broadcastNetStats, interval); }; diff --git a/src/Channel.test.ts b/src/Channel.test.ts index 838ae16..53507a4 100644 --- a/src/Channel.test.ts +++ b/src/Channel.test.ts @@ -5,9 +5,9 @@ import { expect, beforeEach, afterEach, - SpyInstance, + type SpyInstance, } from "vitest"; -import http from "http"; +import type http from "http"; import EventSource from "eventsource"; import { createHttpServer, @@ -350,10 +350,7 @@ describe("broadcasting", () => { channel.broadcast(...args); - expect(callback).toHaveBeenCalledWith( - ...args, - expect.any(String) - ); + expect(callback).toHaveBeenCalledWith(...args, expect.any(String)); done(); }); @@ -392,10 +389,7 @@ describe("broadcasting", () => { new Promise((done) => { type AuthSessionState = {isTrusted: boolean}; - const channel = new Channel< - Record, - AuthSessionState - >(); + const channel = new Channel, AuthSessionState>(); const sessionPushMocks: SpyInstance[] = []; diff --git a/src/Channel.ts b/src/Channel.ts index 640f6a3..e021ec4 100644 --- a/src/Channel.ts +++ b/src/Channel.ts @@ -1,5 +1,5 @@ -import {Session, DefaultSessionState} from "./Session"; -import {TypedEmitter, EventMap} from "./lib/TypedEmitter"; +import type {Session, DefaultSessionState} from "./Session"; +import {TypedEmitter, type EventMap} from "./lib/TypedEmitter"; import {generateId} from "./lib/generateId"; import {SseError} from "./lib/SseError"; @@ -47,7 +47,7 @@ interface DefaultChannelState { */ class Channel< State = DefaultChannelState, - SessionState = DefaultSessionState + SessionState = DefaultSessionState, > extends TypedEmitter> { /** * Custom state for this channel. diff --git a/src/EventBuffer.ts b/src/EventBuffer.ts index 7d25b6a..3e52f5a 100644 --- a/src/EventBuffer.ts +++ b/src/EventBuffer.ts @@ -1,5 +1,5 @@ -import {serialize, SerializerFunction} from "./lib/serialize"; -import {sanitize, SanitizerFunction} from "./lib/sanitize"; +import {serialize, type SerializerFunction} from "./lib/serialize"; +import {sanitize, type SanitizerFunction} from "./lib/sanitize"; import {generateId} from "./lib/generateId"; import {createPushFromStream} from "./lib/createPushFromStream"; import {createPushFromIterable} from "./lib/createPushFromIterable"; diff --git a/src/Session.test.ts b/src/Session.test.ts index d5789d3..337cfc9 100644 --- a/src/Session.test.ts +++ b/src/Session.test.ts @@ -1,7 +1,7 @@ import {vi, describe, it, expect, beforeEach, afterEach} from "vitest"; -import http from "http"; +import type http from "http"; import http2 from "http2"; -import {AddressInfo} from "net"; +import type {AddressInfo} from "net"; import EventSource from "eventsource"; import { createHttpServer, @@ -709,9 +709,7 @@ describe("polyfill support", () => { done(); }); - eventsource = new EventSource( - `${url}/?evs_last_event_id=${lastEventId}` - ); + eventsource = new EventSource(`${url}/?evs_last_event_id=${lastEventId}`); })); it("writes a preamble comment when indicated to by the 'eventsource-polyfill' URL query", () => diff --git a/src/Session.ts b/src/Session.ts index dc5b9f6..f83778f 100644 --- a/src/Session.ts +++ b/src/Session.ts @@ -1,16 +1,16 @@ import { - IncomingMessage as Http1ServerRequest, + type IncomingMessage as Http1ServerRequest, ServerResponse as Http1ServerResponse, - OutgoingHttpHeaders, + type OutgoingHttpHeaders, } from "http"; -import {Http2ServerRequest, Http2ServerResponse} from "http2"; -import {EventBuffer, EventBufferOptions} from "./EventBuffer"; -import {TypedEmitter, EventMap} from "./lib/TypedEmitter"; +import type {Http2ServerRequest, Http2ServerResponse} from "http2"; +import {EventBuffer, type EventBufferOptions} from "./EventBuffer"; +import {TypedEmitter, type EventMap} from "./lib/TypedEmitter"; import {generateId} from "./lib/generateId"; import {createPushFromStream} from "./lib/createPushFromStream"; import {createPushFromIterable} from "./lib/createPushFromIterable"; -import {serialize, SerializerFunction} from "./lib/serialize"; -import {sanitize, SanitizerFunction} from "./lib/sanitize"; +import {serialize, type SerializerFunction} from "./lib/serialize"; +import {sanitize, type SanitizerFunction} from "./lib/sanitize"; import {SseError} from "./lib/SseError"; interface SessionOptions @@ -173,11 +173,10 @@ class Session extends TypedEmitter { this.trustClientEventId = options.trustClientEventId ?? true; - this.initialRetry = - options.retry === null ? null : options.retry ?? 2000; + this.initialRetry = options.retry === null ? null : (options.retry ?? 2000); this.keepAliveInterval = - options.keepAlive === null ? null : options.keepAlive ?? 10000; + options.keepAlive === null ? null : (options.keepAlive ?? 10000); this.statusCode = options.statusCode ?? 200; @@ -243,10 +242,7 @@ class Session extends TypedEmitter { this.flush(); if (this.keepAliveInterval !== null) { - this.keepAliveTimer = setInterval( - this.keepAlive, - this.keepAliveInterval - ); + this.keepAliveTimer = setInterval(this.keepAlive, this.keepAliveInterval); } this.isConnected = true; diff --git a/src/createChannel.ts b/src/createChannel.ts index 130c711..dcc9d7b 100644 --- a/src/createChannel.ts +++ b/src/createChannel.ts @@ -1,5 +1,5 @@ -import {Channel, DefaultChannelState} from "./Channel"; -import {DefaultSessionState} from "./Session"; +import {Channel, type DefaultChannelState} from "./Channel"; +import type {DefaultSessionState} from "./Session"; const createChannel = < State = DefaultChannelState, diff --git a/src/createSession.test.ts b/src/createSession.test.ts index 29f346e..7acf5bc 100644 --- a/src/createSession.test.ts +++ b/src/createSession.test.ts @@ -1,5 +1,5 @@ import {it, expect, beforeEach, afterEach} from "vitest"; -import http from "http"; +import type http from "http"; import EventSource from "eventsource"; import {createHttpServer, closeServer, getUrl} from "./lib/testUtils"; import {Session} from "./Session"; diff --git a/src/createSession.ts b/src/createSession.ts index 9f6c26a..9997641 100644 --- a/src/createSession.ts +++ b/src/createSession.ts @@ -1,4 +1,4 @@ -import {Session, DefaultSessionState} from "./Session"; +import {Session, type DefaultSessionState} from "./Session"; /** * Create a new session and return the session instance once it has connected. diff --git a/src/lib/createPushFromIterable.test.ts b/src/lib/createPushFromIterable.test.ts index 6b19e25..9c4c0f6 100644 --- a/src/lib/createPushFromIterable.test.ts +++ b/src/lib/createPushFromIterable.test.ts @@ -1,4 +1,4 @@ -import {vi, it, expect, beforeEach, Mock} from "vitest"; +import {vi, it, expect, beforeEach, type Mock} from "vitest"; import {createPushFromIterable} from "./createPushFromIterable"; const data = [1, 2, 3]; diff --git a/src/lib/createPushFromStream.test.ts b/src/lib/createPushFromStream.test.ts index d29b2af..c91111d 100644 --- a/src/lib/createPushFromStream.test.ts +++ b/src/lib/createPushFromStream.test.ts @@ -1,5 +1,5 @@ import {Readable} from "stream"; -import {vi, it, expect, beforeEach, Mock} from "vitest"; +import {vi, it, expect, beforeEach, type Mock} from "vitest"; import {createPushFromStream} from "./createPushFromStream"; const data = [1, 2, 3]; diff --git a/src/lib/createPushFromStream.ts b/src/lib/createPushFromStream.ts index 1585475..0d3f135 100644 --- a/src/lib/createPushFromStream.ts +++ b/src/lib/createPushFromStream.ts @@ -1,4 +1,4 @@ -import {Readable} from "stream"; +import type {Readable} from "stream"; interface StreamOptions { /** diff --git a/src/lib/sanitize.ts b/src/lib/sanitize.ts index d5d40ed..046dcff 100644 --- a/src/lib/sanitize.ts +++ b/src/lib/sanitize.ts @@ -1,6 +1,4 @@ -interface SanitizerFunction { - (text: string): string; -} +type SanitizerFunction = (text: string) => string; const newlineVariantsRegex = /(\r\n|\r|\n)/g; diff --git a/src/lib/serialize.ts b/src/lib/serialize.ts index d6e074e..a05b147 100644 --- a/src/lib/serialize.ts +++ b/src/lib/serialize.ts @@ -1,9 +1,7 @@ /** * Serialize arbitrary data to a string that can be sent over the wire to the client. */ -interface SerializerFunction { - (data: unknown): string; -} +type SerializerFunction = (data: unknown) => string; const serialize: SerializerFunction = (data) => JSON.stringify(data); diff --git a/src/lib/testUtils.ts b/src/lib/testUtils.ts index 53bb1c0..51e6fff 100644 --- a/src/lib/testUtils.ts +++ b/src/lib/testUtils.ts @@ -1,8 +1,9 @@ import http from "http"; import http2 from "http2"; -import net, {AddressInfo} from "net"; -import {Session} from "../Session"; -import {EventBuffer} from "../EventBuffer"; +import type net from "net"; +import type {AddressInfo} from "net"; +import type {Session} from "../Session"; +import type {EventBuffer} from "../EventBuffer"; const createHttpServer = (): Promise => new Promise((resolve, reject) => { From f1f457c96da80fbca9cda45518f764a2bd24e3c4 Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 17:23:16 +1100 Subject: [PATCH 3/6] fix: session keep-alive tests not restoring timer mocks correctly --- src/Session.test.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Session.test.ts b/src/Session.test.ts index 337cfc9..80c9e56 100644 --- a/src/Session.test.ts +++ b/src/Session.test.ts @@ -1,7 +1,7 @@ -import {vi, describe, it, expect, beforeEach, afterEach} from "vitest"; +import { vi, describe, it, expect, beforeEach, afterEach } from "vitest"; import type http from "http"; import http2 from "http2"; -import type {AddressInfo} from "net"; +import type { AddressInfo } from "net"; import EventSource from "eventsource"; import { createHttpServer, @@ -11,8 +11,8 @@ import { waitForConnect, getBuffer, } from "./lib/testUtils"; -import {Session} from "./Session"; -import {EventBuffer} from "./EventBuffer"; +import { Session } from "./Session"; +import { EventBuffer } from "./EventBuffer"; let server: http.Server; let url: string; @@ -172,7 +172,7 @@ describe("connection", () => { it("can set the status code in options", () => new Promise((done) => { server.on("request", (req, res) => { - const session = new Session(req, res, {statusCode: 201}); + const session = new Session(req, res, { statusCode: 201 }); session.on("connected", () => { expect(res.statusCode).toBe(201); @@ -266,12 +266,12 @@ describe("connection", () => { }); describe("state", () => { - const givenState = {id: "123"}; + const givenState = { id: "123" }; it("can set the initial state in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, {state: givenState}); + const session = new Session(req, res, { state: givenState }); await waitForConnect(session); @@ -352,7 +352,7 @@ describe("keep-alive", () => { vi.useFakeTimers(); }); - beforeEach(() => { + afterEach(() => { vi.restoreAllMocks(); }); @@ -379,7 +379,7 @@ describe("keep-alive", () => { it("can set the keep-alive interval in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, {keepAlive: 30000}); + const session = new Session(req, res, { keepAlive: 30000 }); // @ts-expect-error spying on private method const keepAlive = vi.spyOn(session, "keepAlive"); @@ -407,7 +407,7 @@ describe("keep-alive", () => { it("can disable the keep-alive mechanism in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, {keepAlive: null}); + const session = new Session(req, res, { keepAlive: null }); // @ts-expect-error spying on private method const keepAlive = vi.spyOn(session, "keepAlive"); @@ -456,7 +456,7 @@ describe("event ID management", () => { }); eventsource = new EventSource(url, { - headers: {"Last-Event-ID": givenLastId}, + headers: { "Last-Event-ID": givenLastId }, }); })); @@ -475,7 +475,7 @@ describe("event ID management", () => { }); eventsource = new EventSource(url, { - headers: {"Last-Event-ID": givenLastId}, + headers: { "Last-Event-ID": givenLastId }, }); })); }); From d6d99d5d29d9efe6d90e38c7a4d0be2f7bd36437 Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 18:07:26 +1100 Subject: [PATCH 4/6] refactor: apply all biome unsafe fixes --- examples/benchmarks/benchmark.ts | 8 ++++--- examples/benchmarks/lib/createClientPool.ts | 4 +++- examples/channels/server.ts | 2 +- examples/getting-started/server.ts | 2 +- examples/http2/server.ts | 6 ++--- examples/resource-monitor/server.ts | 2 +- examples/streams/server.ts | 4 ++-- src/Channel.test.ts | 2 +- src/EventBuffer.test.ts | 2 +- src/Session.test.ts | 26 ++++++++++----------- src/Session.ts | 4 ++-- src/createSession.test.ts | 2 +- src/lib/TypedEmitter.ts | 4 ++-- src/lib/createPushFromStream.test.ts | 2 +- src/lib/createPushFromStream.ts | 2 +- src/lib/generateId.ts | 2 +- src/lib/testUtils.ts | 8 +++---- 17 files changed, 43 insertions(+), 39 deletions(-) diff --git a/examples/benchmarks/benchmark.ts b/examples/benchmarks/benchmark.ts index f9dab37..037d66e 100644 --- a/examples/benchmarks/benchmark.ts +++ b/examples/benchmarks/benchmark.ts @@ -1,5 +1,7 @@ import {suite as suiteChannelPushManySessions} from "./suites/channel-push-many-sessions"; -Promise.all([suiteChannelPushManySessions.setup()]).then((suites) => - suites.forEach((suite) => suite.run()) -); +Promise.all([suiteChannelPushManySessions.setup()]).then((suites) => { + for (const suite of suites) { + suite.run(); + } +}); diff --git a/examples/benchmarks/lib/createClientPool.ts b/examples/benchmarks/lib/createClientPool.ts index 8e8ef7a..15e5548 100644 --- a/examples/benchmarks/lib/createClientPool.ts +++ b/examples/benchmarks/lib/createClientPool.ts @@ -25,6 +25,8 @@ export const createClientPool = async ({ await Promise.all(listeners); return () => { - sources.forEach((eventsource) => eventsource.close()); + for (const eventsource of sources) { + eventsource.close(); + } }; }; diff --git a/examples/channels/server.ts b/examples/channels/server.ts index dd9a06b..9f78519 100644 --- a/examples/channels/server.ts +++ b/examples/channels/server.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import express from "express"; import {createSession} from "better-sse"; import {ticker} from "./channels/ticker"; diff --git a/examples/getting-started/server.ts b/examples/getting-started/server.ts index 6f9809e..25bb122 100644 --- a/examples/getting-started/server.ts +++ b/examples/getting-started/server.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import express from "express"; import {createSession, type Session} from "better-sse"; diff --git a/examples/http2/server.ts b/examples/http2/server.ts index f6e1866..e85ad5d 100644 --- a/examples/http2/server.ts +++ b/examples/http2/server.ts @@ -1,6 +1,6 @@ -import {resolve} from "path"; -import {promisify} from "util"; -import {createSecureServer} from "http2"; +import {resolve} from "node:path"; +import {promisify} from "node:util"; +import {createSecureServer} from "node:http2"; import { type CertificateCreationOptions, type CertificateCreationResult, diff --git a/examples/resource-monitor/server.ts b/examples/resource-monitor/server.ts index 955e409..db7bfad 100644 --- a/examples/resource-monitor/server.ts +++ b/examples/resource-monitor/server.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import express from "express"; import {createSession} from "better-sse"; import {resource} from "./channels/resource"; diff --git a/examples/streams/server.ts b/examples/streams/server.ts index dc1b44d..1b8fadf 100644 --- a/examples/streams/server.ts +++ b/examples/streams/server.ts @@ -1,7 +1,7 @@ -import path from "path"; +import path from "node:path"; import express from "express"; import {createSession} from "better-sse"; -import {Readable} from "stream"; +import {Readable} from "node:stream"; const app = express(); diff --git a/src/Channel.test.ts b/src/Channel.test.ts index 53507a4..6a0f778 100644 --- a/src/Channel.test.ts +++ b/src/Channel.test.ts @@ -7,7 +7,7 @@ import { afterEach, type SpyInstance, } from "vitest"; -import type http from "http"; +import type http from "node:http"; import EventSource from "eventsource"; import { createHttpServer, diff --git a/src/EventBuffer.test.ts b/src/EventBuffer.test.ts index 6f47ced..153a378 100644 --- a/src/EventBuffer.test.ts +++ b/src/EventBuffer.test.ts @@ -21,7 +21,7 @@ describe("sanitizer", () => { buffer.data("test-data"); - expect(buffer.read()).toBe(`data:sanitized\n`); + expect(buffer.read()).toBe("data:sanitized\n"); }); it("sanitizes all fields with custom-given values", () => { diff --git a/src/Session.test.ts b/src/Session.test.ts index 80c9e56..aceb4eb 100644 --- a/src/Session.test.ts +++ b/src/Session.test.ts @@ -1,7 +1,7 @@ -import { vi, describe, it, expect, beforeEach, afterEach } from "vitest"; -import type http from "http"; -import http2 from "http2"; -import type { AddressInfo } from "net"; +import {vi, describe, it, expect, beforeEach, afterEach} from "vitest"; +import type http from "node:http"; +import http2 from "node:http2"; +import type {AddressInfo} from "node:net"; import EventSource from "eventsource"; import { createHttpServer, @@ -11,8 +11,8 @@ import { waitForConnect, getBuffer, } from "./lib/testUtils"; -import { Session } from "./Session"; -import { EventBuffer } from "./EventBuffer"; +import {Session} from "./Session"; +import {EventBuffer} from "./EventBuffer"; let server: http.Server; let url: string; @@ -172,7 +172,7 @@ describe("connection", () => { it("can set the status code in options", () => new Promise((done) => { server.on("request", (req, res) => { - const session = new Session(req, res, { statusCode: 201 }); + const session = new Session(req, res, {statusCode: 201}); session.on("connected", () => { expect(res.statusCode).toBe(201); @@ -266,12 +266,12 @@ describe("connection", () => { }); describe("state", () => { - const givenState = { id: "123" }; + const givenState = {id: "123"}; it("can set the initial state in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, { state: givenState }); + const session = new Session(req, res, {state: givenState}); await waitForConnect(session); @@ -379,7 +379,7 @@ describe("keep-alive", () => { it("can set the keep-alive interval in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, { keepAlive: 30000 }); + const session = new Session(req, res, {keepAlive: 30000}); // @ts-expect-error spying on private method const keepAlive = vi.spyOn(session, "keepAlive"); @@ -407,7 +407,7 @@ describe("keep-alive", () => { it("can disable the keep-alive mechanism in options", () => new Promise((done) => { server.on("request", async (req, res) => { - const session = new Session(req, res, { keepAlive: null }); + const session = new Session(req, res, {keepAlive: null}); // @ts-expect-error spying on private method const keepAlive = vi.spyOn(session, "keepAlive"); @@ -456,7 +456,7 @@ describe("event ID management", () => { }); eventsource = new EventSource(url, { - headers: { "Last-Event-ID": givenLastId }, + headers: {"Last-Event-ID": givenLastId}, }); })); @@ -475,7 +475,7 @@ describe("event ID management", () => { }); eventsource = new EventSource(url, { - headers: { "Last-Event-ID": givenLastId }, + headers: {"Last-Event-ID": givenLastId}, }); })); }); diff --git a/src/Session.ts b/src/Session.ts index f83778f..7ecc7e6 100644 --- a/src/Session.ts +++ b/src/Session.ts @@ -2,8 +2,8 @@ import { type IncomingMessage as Http1ServerRequest, ServerResponse as Http1ServerResponse, type OutgoingHttpHeaders, -} from "http"; -import type {Http2ServerRequest, Http2ServerResponse} from "http2"; +} from "node:http"; +import type {Http2ServerRequest, Http2ServerResponse} from "node:http2"; import {EventBuffer, type EventBufferOptions} from "./EventBuffer"; import {TypedEmitter, type EventMap} from "./lib/TypedEmitter"; import {generateId} from "./lib/generateId"; diff --git a/src/createSession.test.ts b/src/createSession.test.ts index 7acf5bc..5090a33 100644 --- a/src/createSession.test.ts +++ b/src/createSession.test.ts @@ -1,5 +1,5 @@ import {it, expect, beforeEach, afterEach} from "vitest"; -import type http from "http"; +import type http from "node:http"; import EventSource from "eventsource"; import {createHttpServer, closeServer, getUrl} from "./lib/testUtils"; import {Session} from "./Session"; diff --git a/src/lib/TypedEmitter.ts b/src/lib/TypedEmitter.ts index 6246d5c..63d7b91 100644 --- a/src/lib/TypedEmitter.ts +++ b/src/lib/TypedEmitter.ts @@ -1,7 +1,7 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; export interface EventMap { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: must be `any` to allow coercion, `unknown` does not work [name: string | symbol]: (...args: any[]) => void; } diff --git a/src/lib/createPushFromStream.test.ts b/src/lib/createPushFromStream.test.ts index c91111d..530c9a5 100644 --- a/src/lib/createPushFromStream.test.ts +++ b/src/lib/createPushFromStream.test.ts @@ -1,4 +1,4 @@ -import {Readable} from "stream"; +import {Readable} from "node:stream"; import {vi, it, expect, beforeEach, type Mock} from "vitest"; import {createPushFromStream} from "./createPushFromStream"; diff --git a/src/lib/createPushFromStream.ts b/src/lib/createPushFromStream.ts index 0d3f135..21f5aa0 100644 --- a/src/lib/createPushFromStream.ts +++ b/src/lib/createPushFromStream.ts @@ -1,4 +1,4 @@ -import type {Readable} from "stream"; +import type {Readable} from "node:stream"; interface StreamOptions { /** diff --git a/src/lib/generateId.ts b/src/lib/generateId.ts index edb8e12..6cb4272 100644 --- a/src/lib/generateId.ts +++ b/src/lib/generateId.ts @@ -1,4 +1,4 @@ -import {randomUUID, randomBytes} from "crypto"; +import {randomUUID, randomBytes} from "node:crypto"; let generateId: () => string; diff --git a/src/lib/testUtils.ts b/src/lib/testUtils.ts index 51e6fff..199dfe6 100644 --- a/src/lib/testUtils.ts +++ b/src/lib/testUtils.ts @@ -1,7 +1,7 @@ -import http from "http"; -import http2 from "http2"; -import type net from "net"; -import type {AddressInfo} from "net"; +import http from "node:http"; +import http2 from "node:http2"; +import type net from "node:net"; +import type {AddressInfo} from "node:net"; import type {Session} from "../Session"; import type {EventBuffer} from "../EventBuffer"; From 610e874be48204c9fd092e5a1f23528c078b70dd Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 18:17:30 +1100 Subject: [PATCH 5/6] refactor: apply biome import sorting to all files --- docs/astro.config.ts | 2 +- .../suites/channel-push-many-sessions.ts | 6 +++--- examples/channels/server.ts | 2 +- examples/getting-started/server.ts | 2 +- examples/http2/server.ts | 4 ++-- .../resource-monitor/channels/resource.ts | 2 +- examples/resource-monitor/server.ts | 2 +- examples/streams/server.ts | 4 ++-- package.json | 2 +- src/Channel.test.ts | 20 +++++++++---------- src/Channel.ts | 6 +++--- src/EventBuffer.test.ts | 2 +- src/EventBuffer.ts | 8 ++++---- src/Session.test.ts | 12 +++++------ src/Session.ts | 12 +++++------ src/createChannel.test.ts | 2 +- src/createEventBuffer.test.ts | 2 +- src/createSession.test.ts | 4 ++-- src/createSession.ts | 2 +- src/lib/createPushFromIterable.test.ts | 2 +- src/lib/createPushFromStream.test.ts | 2 +- src/lib/generateId.test.ts | 2 +- src/lib/generateId.ts | 2 +- src/lib/sanitize.test.ts | 2 +- src/lib/serialize.test.ts | 2 +- src/lib/testUtils.ts | 2 +- 26 files changed, 55 insertions(+), 55 deletions(-) diff --git a/docs/astro.config.ts b/docs/astro.config.ts index 50a53d2..89890c3 100644 --- a/docs/astro.config.ts +++ b/docs/astro.config.ts @@ -1,5 +1,5 @@ -import {defineConfig} from "astro/config"; import starlight from "@astrojs/starlight"; +import {defineConfig} from "astro/config"; export default defineConfig({ site: "https://matthewwid.github.io", diff --git a/examples/benchmarks/suites/channel-push-many-sessions.ts b/examples/benchmarks/suites/channel-push-many-sessions.ts index 8d16dbb..6771e69 100644 --- a/examples/benchmarks/suites/channel-push-many-sessions.ts +++ b/examples/benchmarks/suites/channel-push-many-sessions.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import {createSession, createChannel} from "better-sse"; -// @ts-ignore -import SseChannel from "sse-channel"; +import {createChannel, createSession} from "better-sse"; // @ts-ignore import EasySse from "easy-server-sent-events"; +// @ts-ignore +import SseChannel from "sse-channel"; import {createClientPool} from "../lib/createClientPool"; import {Suite} from "./Suite"; diff --git a/examples/channels/server.ts b/examples/channels/server.ts index 9f78519..0212517 100644 --- a/examples/channels/server.ts +++ b/examples/channels/server.ts @@ -1,6 +1,6 @@ import path from "node:path"; -import express from "express"; import {createSession} from "better-sse"; +import express from "express"; import {ticker} from "./channels/ticker"; const app = express(); diff --git a/examples/getting-started/server.ts b/examples/getting-started/server.ts index 25bb122..a997a6a 100644 --- a/examples/getting-started/server.ts +++ b/examples/getting-started/server.ts @@ -1,6 +1,6 @@ import path from "node:path"; +import {type Session, createSession} from "better-sse"; import express from "express"; -import {createSession, type Session} from "better-sse"; const app = express(); diff --git a/examples/http2/server.ts b/examples/http2/server.ts index e85ad5d..94c18b3 100644 --- a/examples/http2/server.ts +++ b/examples/http2/server.ts @@ -1,12 +1,12 @@ +import {createSecureServer} from "node:http2"; import {resolve} from "node:path"; import {promisify} from "node:util"; -import {createSecureServer} from "node:http2"; +import {createSession} from "better-sse"; import { type CertificateCreationOptions, type CertificateCreationResult, createCertificate as createCertificateCallback, } from "pem"; -import {createSession} from "better-sse"; (async () => { const createCertificate = promisify< diff --git a/examples/resource-monitor/channels/resource.ts b/examples/resource-monitor/channels/resource.ts index cf53290..1fdec50 100644 --- a/examples/resource-monitor/channels/resource.ts +++ b/examples/resource-monitor/channels/resource.ts @@ -1,5 +1,5 @@ -import osu, {type NetStatMetrics} from "node-os-utils"; import {createChannel} from "better-sse"; +import osu, {type NetStatMetrics} from "node-os-utils"; const resource = createChannel(); diff --git a/examples/resource-monitor/server.ts b/examples/resource-monitor/server.ts index db7bfad..3fb0d3c 100644 --- a/examples/resource-monitor/server.ts +++ b/examples/resource-monitor/server.ts @@ -1,6 +1,6 @@ import path from "node:path"; -import express from "express"; import {createSession} from "better-sse"; +import express from "express"; import {resource} from "./channels/resource"; const app = express(); diff --git a/examples/streams/server.ts b/examples/streams/server.ts index 1b8fadf..a7be242 100644 --- a/examples/streams/server.ts +++ b/examples/streams/server.ts @@ -1,7 +1,7 @@ import path from "node:path"; -import express from "express"; -import {createSession} from "better-sse"; import {Readable} from "node:stream"; +import {createSession} from "better-sse"; +import express from "express"; const app = express(); diff --git a/package.json b/package.json index 79b37d3..1082781 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsup", "test": "vitest", - "format": "biome format --write", + "format": "biome check --linter-enabled=false --write", "lint": "biome lint --write", "ci": "biome ci", "prepublishOnly": "npm-run-all ci build" diff --git a/src/Channel.test.ts b/src/Channel.test.ts index 6a0f778..cce9e45 100644 --- a/src/Channel.test.ts +++ b/src/Channel.test.ts @@ -1,22 +1,22 @@ +import type http from "node:http"; +import EventSource from "eventsource"; import { - vi, + type SpyInstance, + afterEach, + beforeEach, describe, - it, expect, - beforeEach, - afterEach, - type SpyInstance, + it, + vi, } from "vitest"; -import type http from "node:http"; -import EventSource from "eventsource"; +import {Channel} from "./Channel"; +import {Session} from "./Session"; import { - createHttpServer, closeServer, + createHttpServer, getUrl, waitForConnect, } from "./lib/testUtils"; -import {Session} from "./Session"; -import {Channel} from "./Channel"; let server: http.Server; let url: string; diff --git a/src/Channel.ts b/src/Channel.ts index e021ec4..14d3df6 100644 --- a/src/Channel.ts +++ b/src/Channel.ts @@ -1,7 +1,7 @@ -import type {Session, DefaultSessionState} from "./Session"; -import {TypedEmitter, type EventMap} from "./lib/TypedEmitter"; -import {generateId} from "./lib/generateId"; +import type {DefaultSessionState, Session} from "./Session"; import {SseError} from "./lib/SseError"; +import {type EventMap, TypedEmitter} from "./lib/TypedEmitter"; +import {generateId} from "./lib/generateId"; interface ChannelOptions { /** diff --git a/src/EventBuffer.test.ts b/src/EventBuffer.test.ts index 153a378..3a62ac6 100644 --- a/src/EventBuffer.test.ts +++ b/src/EventBuffer.test.ts @@ -1,4 +1,4 @@ -import {vi, describe, it, expect} from "vitest"; +import {describe, expect, it, vi} from "vitest"; import {EventBuffer} from "./EventBuffer"; describe("serializer", () => { diff --git a/src/EventBuffer.ts b/src/EventBuffer.ts index 3e52f5a..3850523 100644 --- a/src/EventBuffer.ts +++ b/src/EventBuffer.ts @@ -1,8 +1,8 @@ -import {serialize, type SerializerFunction} from "./lib/serialize"; -import {sanitize, type SanitizerFunction} from "./lib/sanitize"; -import {generateId} from "./lib/generateId"; -import {createPushFromStream} from "./lib/createPushFromStream"; import {createPushFromIterable} from "./lib/createPushFromIterable"; +import {createPushFromStream} from "./lib/createPushFromStream"; +import {generateId} from "./lib/generateId"; +import {type SanitizerFunction, sanitize} from "./lib/sanitize"; +import {type SerializerFunction, serialize} from "./lib/serialize"; interface EventBufferOptions { /** diff --git a/src/Session.test.ts b/src/Session.test.ts index aceb4eb..0c01aa0 100644 --- a/src/Session.test.ts +++ b/src/Session.test.ts @@ -1,18 +1,18 @@ -import {vi, describe, it, expect, beforeEach, afterEach} from "vitest"; import type http from "node:http"; import http2 from "node:http2"; import type {AddressInfo} from "node:net"; import EventSource from "eventsource"; +import {afterEach, beforeEach, describe, expect, it, vi} from "vitest"; +import {EventBuffer} from "./EventBuffer"; +import {Session} from "./Session"; import { - createHttpServer, - createHttp2Server, closeServer, + createHttp2Server, + createHttpServer, + getBuffer, getUrl, waitForConnect, - getBuffer, } from "./lib/testUtils"; -import {Session} from "./Session"; -import {EventBuffer} from "./EventBuffer"; let server: http.Server; let url: string; diff --git a/src/Session.ts b/src/Session.ts index 7ecc7e6..fae224e 100644 --- a/src/Session.ts +++ b/src/Session.ts @@ -5,13 +5,13 @@ import { } from "node:http"; import type {Http2ServerRequest, Http2ServerResponse} from "node:http2"; import {EventBuffer, type EventBufferOptions} from "./EventBuffer"; -import {TypedEmitter, type EventMap} from "./lib/TypedEmitter"; -import {generateId} from "./lib/generateId"; -import {createPushFromStream} from "./lib/createPushFromStream"; -import {createPushFromIterable} from "./lib/createPushFromIterable"; -import {serialize, type SerializerFunction} from "./lib/serialize"; -import {sanitize, type SanitizerFunction} from "./lib/sanitize"; import {SseError} from "./lib/SseError"; +import {type EventMap, TypedEmitter} from "./lib/TypedEmitter"; +import {createPushFromIterable} from "./lib/createPushFromIterable"; +import {createPushFromStream} from "./lib/createPushFromStream"; +import {generateId} from "./lib/generateId"; +import {type SanitizerFunction, sanitize} from "./lib/sanitize"; +import {type SerializerFunction, serialize} from "./lib/serialize"; interface SessionOptions extends Pick { diff --git a/src/createChannel.test.ts b/src/createChannel.test.ts index 2d4cc36..ef1eb67 100644 --- a/src/createChannel.test.ts +++ b/src/createChannel.test.ts @@ -1,4 +1,4 @@ -import {it, expect} from "vitest"; +import {expect, it} from "vitest"; import {Channel} from "./Channel"; import {createChannel} from "./createChannel"; diff --git a/src/createEventBuffer.test.ts b/src/createEventBuffer.test.ts index f48bf8e..62e2079 100644 --- a/src/createEventBuffer.test.ts +++ b/src/createEventBuffer.test.ts @@ -1,4 +1,4 @@ -import {it, expect} from "vitest"; +import {expect, it} from "vitest"; import {EventBuffer} from "./EventBuffer"; import {createEventBuffer} from "./createEventBuffer"; diff --git a/src/createSession.test.ts b/src/createSession.test.ts index 5090a33..c82dc00 100644 --- a/src/createSession.test.ts +++ b/src/createSession.test.ts @@ -1,9 +1,9 @@ -import {it, expect, beforeEach, afterEach} from "vitest"; import type http from "node:http"; import EventSource from "eventsource"; -import {createHttpServer, closeServer, getUrl} from "./lib/testUtils"; +import {afterEach, beforeEach, expect, it} from "vitest"; import {Session} from "./Session"; import {createSession} from "./createSession"; +import {closeServer, createHttpServer, getUrl} from "./lib/testUtils"; let server: http.Server; let url: string; diff --git a/src/createSession.ts b/src/createSession.ts index 9997641..ab92e97 100644 --- a/src/createSession.ts +++ b/src/createSession.ts @@ -1,4 +1,4 @@ -import {Session, type DefaultSessionState} from "./Session"; +import {type DefaultSessionState, Session} from "./Session"; /** * Create a new session and return the session instance once it has connected. diff --git a/src/lib/createPushFromIterable.test.ts b/src/lib/createPushFromIterable.test.ts index 9c4c0f6..e9a46bc 100644 --- a/src/lib/createPushFromIterable.test.ts +++ b/src/lib/createPushFromIterable.test.ts @@ -1,4 +1,4 @@ -import {vi, it, expect, beforeEach, type Mock} from "vitest"; +import {type Mock, beforeEach, expect, it, vi} from "vitest"; import {createPushFromIterable} from "./createPushFromIterable"; const data = [1, 2, 3]; diff --git a/src/lib/createPushFromStream.test.ts b/src/lib/createPushFromStream.test.ts index 530c9a5..4744c51 100644 --- a/src/lib/createPushFromStream.test.ts +++ b/src/lib/createPushFromStream.test.ts @@ -1,5 +1,5 @@ import {Readable} from "node:stream"; -import {vi, it, expect, beforeEach, type Mock} from "vitest"; +import {type Mock, beforeEach, expect, it, vi} from "vitest"; import {createPushFromStream} from "./createPushFromStream"; const data = [1, 2, 3]; diff --git a/src/lib/generateId.test.ts b/src/lib/generateId.test.ts index 78cc195..d3b17d9 100644 --- a/src/lib/generateId.test.ts +++ b/src/lib/generateId.test.ts @@ -1,4 +1,4 @@ -import {it, expect} from "vitest"; +import {expect, it} from "vitest"; import {generateId} from "./generateId"; it("returns a string", () => { diff --git a/src/lib/generateId.ts b/src/lib/generateId.ts index 6cb4272..30be431 100644 --- a/src/lib/generateId.ts +++ b/src/lib/generateId.ts @@ -1,4 +1,4 @@ -import {randomUUID, randomBytes} from "node:crypto"; +import {randomBytes, randomUUID} from "node:crypto"; let generateId: () => string; diff --git a/src/lib/sanitize.test.ts b/src/lib/sanitize.test.ts index 115b9db..7075316 100644 --- a/src/lib/sanitize.test.ts +++ b/src/lib/sanitize.test.ts @@ -1,4 +1,4 @@ -import {describe, it, expect} from "vitest"; +import {describe, expect, it} from "vitest"; import {sanitize} from "./sanitize"; describe("newline standarization", () => { diff --git a/src/lib/serialize.test.ts b/src/lib/serialize.test.ts index ca0f280..40b7b58 100644 --- a/src/lib/serialize.test.ts +++ b/src/lib/serialize.test.ts @@ -1,4 +1,4 @@ -import {it, expect} from "vitest"; +import {expect, it} from "vitest"; import {serialize} from "./serialize"; it("JSON-stringifies input", () => { diff --git a/src/lib/testUtils.ts b/src/lib/testUtils.ts index 199dfe6..740d14b 100644 --- a/src/lib/testUtils.ts +++ b/src/lib/testUtils.ts @@ -2,8 +2,8 @@ import http from "node:http"; import http2 from "node:http2"; import type net from "node:net"; import type {AddressInfo} from "node:net"; -import type {Session} from "../Session"; import type {EventBuffer} from "../EventBuffer"; +import type {Session} from "../Session"; const createHttpServer = (): Promise => new Promise((resolve, reject) => { From ad52695c5465efb0c2bfcad03059df0245cfc185 Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 9 Dec 2024 18:23:06 +1100 Subject: [PATCH 6/6] ci: add github actions workflow for linting and checking formatting --- .github/workflows/lint.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..e890806 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,14 @@ +name: lint +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: "package.json" + cache: "pnpm" + - run: pnpm install + - run: pnpm run ci