diff --git a/package.json b/package.json index 7309e6c..34ded87 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "commander": "^11.0.0", "console-table-printer": "^2.11.2", "debug": "^4.3.4", + "es-toolkit": "^1.25.2", "jsonwebtoken": "^9.0.2", - "lodash-es": "^4.17.21", "read-package-up": "^11.0.0" }, "devDependencies": { @@ -52,7 +52,6 @@ "@gera2ld/plaid-rollup": "~2.7.0", "@types/debug": "^4.1.8", "@types/jsonwebtoken": "^9.0.2", - "@types/lodash-es": "^4.17.9", "@types/node": "^20.6.0", "del-cli": "^5.1.0", "husky": "^8.0.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 894b20c..40000fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: debug: specifier: ^4.3.4 version: 4.3.4 + es-toolkit: + specifier: ^1.25.2 + version: 1.25.2 jsonwebtoken: specifier: ^9.0.2 version: 9.0.2 @@ -32,10 +35,10 @@ importers: devDependencies: '@gera2ld/plaid': specifier: ~2.7.0 - version: 2.7.0(vite@4.4.9) + version: 2.7.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) '@gera2ld/plaid-rollup': specifier: ~2.7.0 - version: 2.7.0(@babel/core@7.23.5)(@gera2ld/plaid@2.7.0)(postcss@8.4.32) + version: 2.7.0(@babel/core@7.23.5)(@gera2ld/plaid@2.7.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)))(postcss@8.4.32) '@types/debug': specifier: ^4.1.8 version: 4.1.8 @@ -1677,6 +1680,9 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} + es-toolkit@1.25.2: + resolution: {integrity: sha512-zEh2aJUwnlDwashas6JN+oFVN08F2s2qBaEwTo6EOACjO9PdPH4eGRBZC2JP/3SDLeANiMTEtVnOGhoG7GwZcA==} + esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -4178,9 +4184,9 @@ snapshots: '@eslint/js@8.55.0': {} - '@gera2ld/plaid-rollup@2.7.0(@babel/core@7.23.5)(@gera2ld/plaid@2.7.0)(postcss@8.4.32)': + '@gera2ld/plaid-rollup@2.7.0(@babel/core@7.23.5)(@gera2ld/plaid@2.7.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)))(postcss@8.4.32)': dependencies: - '@gera2ld/plaid': 2.7.0(vite@4.4.9) + '@gera2ld/plaid': 2.7.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) '@rollup/plugin-alias': 5.1.0(rollup@4.7.0) '@rollup/plugin-babel': 6.0.4(@babel/core@7.23.5)(rollup@4.7.0) '@rollup/plugin-commonjs': 25.0.7(rollup@4.7.0) @@ -4196,27 +4202,27 @@ snapshots: - postcss - ts-node - '@gera2ld/plaid@2.7.0(vite@4.4.9)': + '@gera2ld/plaid@2.7.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4))': dependencies: '@babel/core': 7.23.5 '@babel/plugin-transform-runtime': 7.23.4(@babel/core@7.23.5) '@babel/preset-env': 7.23.5(@babel/core@7.23.5) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.5) - '@typescript-eslint/eslint-plugin': 6.13.2(@typescript-eslint/parser@6.13.2)(eslint@8.55.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 6.13.2(@typescript-eslint/parser@6.13.2(eslint@8.55.0)(typescript@5.3.3))(eslint@8.55.0)(typescript@5.3.3) '@typescript-eslint/parser': 6.13.2(eslint@8.55.0)(typescript@5.3.3) '@unocss/postcss': 0.58.0(postcss@8.4.32) autoprefixer: 10.4.16(postcss@8.4.32) commander: 11.1.0 eslint: 8.55.0 eslint-config-prettier: 9.1.0(eslint@8.55.0) - eslint-plugin-prettier: 5.0.1(eslint-config-prettier@9.1.0)(eslint@8.55.0)(prettier@3.1.0) + eslint-plugin-prettier: 5.0.1(eslint-config-prettier@9.1.0(eslint@8.55.0))(eslint@8.55.0)(prettier@3.1.0) npm-run-all: 4.1.5 postcss: 8.4.32 postcss-calc: 9.0.1(postcss@8.4.32) postcss-nested: 6.0.1(postcss@8.4.32) prettier: 3.1.0 typescript: 5.3.3 - unocss: 0.58.0(postcss@8.4.32)(vite@4.4.9) + unocss: 0.58.0(postcss@8.4.32)(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) transitivePeerDependencies: - '@types/eslint' - '@unocss/webpack' @@ -4296,14 +4302,16 @@ snapshots: '@rollup/plugin-alias@5.1.0(rollup@4.7.0)': dependencies: - rollup: 4.7.0 slash: 4.0.0 + optionalDependencies: + rollup: 4.7.0 '@rollup/plugin-babel@6.0.4(@babel/core@7.23.5)(rollup@4.7.0)': dependencies: '@babel/core': 7.23.5 '@babel/helper-module-imports': 7.22.15 '@rollup/pluginutils': 5.0.4(rollup@4.7.0) + optionalDependencies: rollup: 4.7.0 '@rollup/plugin-commonjs@25.0.7(rollup@4.7.0)': @@ -4314,11 +4322,13 @@ snapshots: glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.3 + optionalDependencies: rollup: 4.7.0 '@rollup/plugin-json@6.0.1(rollup@4.7.0)': dependencies: '@rollup/pluginutils': 5.0.4(rollup@4.7.0) + optionalDependencies: rollup: 4.7.0 '@rollup/plugin-node-resolve@15.2.3(rollup@4.7.0)': @@ -4329,33 +4339,39 @@ snapshots: is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.4 + optionalDependencies: rollup: 4.7.0 '@rollup/plugin-replace@5.0.5(rollup@4.7.0)': dependencies: '@rollup/pluginutils': 5.0.4(rollup@4.7.0) magic-string: 0.30.3 + optionalDependencies: rollup: 4.7.0 '@rollup/plugin-terser@0.4.4(rollup@4.7.0)': dependencies: - rollup: 4.7.0 serialize-javascript: 6.0.1 smob: 1.4.0 terser: 5.19.4 + optionalDependencies: + rollup: 4.7.0 '@rollup/pluginutils@5.0.4(rollup@4.7.0)': dependencies: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 + optionalDependencies: rollup: 4.7.0 - '@rollup/pluginutils@5.1.0': + '@rollup/pluginutils@5.1.0(rollup@4.7.0)': dependencies: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 + optionalDependencies: + rollup: 4.7.0 '@rollup/rollup-android-arm-eabi@4.7.0': optional: true @@ -4430,7 +4446,7 @@ snapshots: '@types/semver@7.5.1': {} - '@typescript-eslint/eslint-plugin@6.13.2(@typescript-eslint/parser@6.13.2)(eslint@8.55.0)(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@6.13.2(@typescript-eslint/parser@6.13.2(eslint@8.55.0)(typescript@5.3.3))(eslint@8.55.0)(typescript@5.3.3)': dependencies: '@eslint-community/regexpp': 4.8.0 '@typescript-eslint/parser': 6.13.2(eslint@8.55.0)(typescript@5.3.3) @@ -4445,6 +4461,7 @@ snapshots: natural-compare: 1.4.0 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -4457,6 +4474,7 @@ snapshots: '@typescript-eslint/visitor-keys': 6.13.2 debug: 4.3.4 eslint: 8.55.0 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -4473,6 +4491,7 @@ snapshots: debug: 4.3.4 eslint: 8.55.0 ts-api-utils: 1.0.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -4488,6 +4507,7 @@ snapshots: is-glob: 4.0.3 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -4513,19 +4533,20 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unocss/astro@0.58.0(vite@4.4.9)': + '@unocss/astro@0.58.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4))': dependencies: '@unocss/core': 0.58.0 '@unocss/reset': 0.58.0 - '@unocss/vite': 0.58.0(vite@4.4.9) - vite: 4.4.9(@types/node@20.6.0) + '@unocss/vite': 0.58.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) + optionalDependencies: + vite: 4.4.9(@types/node@20.6.0)(terser@5.19.4) transitivePeerDependencies: - rollup - '@unocss/cli@0.58.0': + '@unocss/cli@0.58.0(rollup@4.7.0)': dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.7.0) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/preset-uno': 0.58.0 @@ -4649,10 +4670,10 @@ snapshots: dependencies: '@unocss/core': 0.58.0 - '@unocss/vite@0.58.0(vite@4.4.9)': + '@unocss/vite@0.58.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4))': dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.7.0) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/inspector': 0.58.0 @@ -4661,7 +4682,7 @@ snapshots: chokidar: 3.5.3 fast-glob: 3.3.2 magic-string: 0.30.5 - vite: 4.4.9(@types/node@20.6.0) + vite: 4.4.9(@types/node@20.6.0)(terser@5.19.4) transitivePeerDependencies: - rollup @@ -5148,6 +5169,8 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + es-toolkit@1.25.2: {} + esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -5185,13 +5208,14 @@ snapshots: dependencies: eslint: 8.55.0 - eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.1.0)(eslint@8.55.0)(prettier@3.1.0): + eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.1.0(eslint@8.55.0))(eslint@8.55.0)(prettier@3.1.0): dependencies: eslint: 8.55.0 - eslint-config-prettier: 9.1.0(eslint@8.55.0) prettier: 3.1.0 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@8.55.0) eslint-scope@7.2.2: dependencies: @@ -6065,8 +6089,9 @@ snapshots: postcss-load-config@3.1.4(postcss@8.4.32): dependencies: lilconfig: 2.1.0 - postcss: 8.4.32 yaml: 1.10.2 + optionalDependencies: + postcss: 8.4.32 postcss-merge-longhand@5.1.7(postcss@8.4.32): dependencies: @@ -6652,10 +6677,10 @@ snapshots: unicorn-magic@0.1.0: {} - unocss@0.58.0(postcss@8.4.32)(vite@4.4.9): + unocss@0.58.0(postcss@8.4.32)(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)): dependencies: - '@unocss/astro': 0.58.0(vite@4.4.9) - '@unocss/cli': 0.58.0 + '@unocss/astro': 0.58.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) + '@unocss/cli': 0.58.0(rollup@4.7.0) '@unocss/core': 0.58.0 '@unocss/extractor-arbitrary-variants': 0.58.0 '@unocss/postcss': 0.58.0(postcss@8.4.32) @@ -6673,8 +6698,9 @@ snapshots: '@unocss/transformer-compile-class': 0.58.0 '@unocss/transformer-directives': 0.58.0 '@unocss/transformer-variant-group': 0.58.0 - '@unocss/vite': 0.58.0(vite@4.4.9) - vite: 4.4.9(@types/node@20.6.0) + '@unocss/vite': 0.58.0(rollup@4.7.0)(vite@4.4.9(@types/node@20.6.0)(terser@5.19.4)) + optionalDependencies: + vite: 4.4.9(@types/node@20.6.0)(terser@5.19.4) transitivePeerDependencies: - postcss - rollup @@ -6705,14 +6731,15 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite@4.4.9(@types/node@20.6.0): + vite@4.4.9(@types/node@20.6.0)(terser@5.19.4): dependencies: - '@types/node': 20.6.0 esbuild: 0.18.20 postcss: 8.4.32 rollup: 3.29.0 optionalDependencies: + '@types/node': 20.6.0 fsevents: 2.3.3 + terser: 5.19.4 which-boxed-primitive@1.0.2: dependencies: diff --git a/src/index.ts b/src/index.ts index 42f820b..e0d402e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,20 +1,20 @@ +import debug from 'debug'; +import { isEqual } from 'es-toolkit'; import { createWriteStream } from 'fs'; import { readFile, stat } from 'fs/promises'; +import jwt from 'jsonwebtoken'; import { basename, join } from 'path'; -import debug from 'debug'; -import { isEqual } from 'lodash-es'; import { Readable } from 'stream'; -import type { ReadableStream } from 'stream/web'; import { finished } from 'stream/promises'; -import jwt from 'jsonwebtoken'; +import type { ReadableStream } from 'stream/web'; import type { ChannelType, + CompatibilityInfo, + SignAddonParam, UploadResponse, VersionDetail, - SignAddonParam, - CompatibilityInfo, - VersionListResponse, VersionListRequest, + VersionListResponse, } from './types'; const log = debug('amo-upload');