From e2f4c0b2a0a7f5cd5b480bfe0b443d5df0321d55 Mon Sep 17 00:00:00 2001 From: yumauri Date: Sat, 22 Apr 2023 22:08:35 +0300 Subject: [PATCH] Bump versions / Fix tests in nodejs 18.16.0 In nodejs 18.16.0 become impossible to do a trick `Object.create(new URL(...))`, so rewrote all mocks implementations to classes. Nodejs behaviour was changed in this PR - https://github.com/nodejs/node/pull/46866 --- .github/workflows/build.yml | 8 +- .github/workflows/publish.yml | 49 +++ .tool-versions | 2 +- package.json | 14 +- pnpm-lock.yaml | 579 +++++++++++++++--------------- tests/mocks/async-storage.mock.ts | 118 +++--- tests/mocks/events.mock.ts | 47 +-- tests/mocks/history.mock.ts | 219 ++++++----- tests/mocks/location.mock.ts | 98 +++-- tests/mocks/storage.mock.ts | 134 ++++--- tests/rewiremock.ts | 4 +- 11 files changed, 648 insertions(+), 624 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 360fbb0..53763b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,8 @@ name: build -on: [push, pull_request] +on: + - push + - pull_request jobs: build: @@ -13,7 +15,7 @@ jobs: - 18 effector-version: - 22.0.0 - - 22.7.0 + - 22.8.1 name: Node ${{ matrix.node-version }} / effector ${{ matrix.effector-version }} @@ -30,7 +32,7 @@ jobs: version: 7.29.3 - name: ๐Ÿง Use Node ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: pnpm diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6652a6a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: publish + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + + name: Publish + + steps: + - name: ๐Ÿ›Ž๏ธ Checkout + uses: actions/checkout@v3 + + - name: ๐Ÿ“ฆ Use PNPM + uses: pnpm/action-setup@v2 + with: + version: 7.29.3 + + - name: ๐Ÿง Use Node 18.16.0 + uses: actions/setup-node@v3 + with: + node-version: 18.16.0 + cache: pnpm + registry-url: https://registry.npmjs.org/ + + - name: ๐Ÿ” Installation + run: pnpm install --frozen-lockfile --ignore-scripts + + - name: ๐Ÿ‘ฎโ€โ™‚๏ธ Linting + run: pnpm lint + + - name: ๐Ÿงช Testing + run: pnpm test + + - name: ๐Ÿ”ง Build + run: pnpm build + + - name: ๐Ÿ”ฌ Check size + run: pnpm size + + - name: ๐Ÿ“ฆ Publish + run: pnpm publish --access public + working-directory: dist + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.tool-versions b/.tool-versions index a6f247a..23ef868 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 18.15.0 +nodejs 18.16.0 pnpm 7.29.3 diff --git a/package.json b/package.json index bb89c96..a93352b 100644 --- a/package.json +++ b/package.json @@ -50,14 +50,14 @@ "@babel/preset-typescript": "^7.21.4", "@react-native-async-storage/async-storage": "^1.18.1", "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-node-resolve": "^15.0.2", "@size-limit/preset-small-lib": "^8.2.4", - "@typescript-eslint/eslint-plugin": "^5.57.0", - "@typescript-eslint/parser": "^5.57.0", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", "effector": "22.0.0", "effector-22-0-0": "npm:effector@22.0.0", - "effector-22-7-0": "npm:effector@22.7.0", - "eslint": "^8.37.0", + "effector-22-8-1": "npm:effector@22.8.1", + "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.27.5", @@ -71,7 +71,7 @@ "prettier": "^2.8.7", "react-native-encrypted-storage": "^4.0.3", "rewiremock": "^3.14.5", - "rollup": "^3.20.2", + "rollup": "^3.20.7", "rollup-plugin-command": "^1.1.3", "rollup-plugin-dts": "^5.3.0", "rollup-plugin-generate-package-json": "^3.2.0", @@ -81,7 +81,7 @@ "ts-node": "^10.9.1", "tsd": "^0.28.1", "tslib": "^2.5.0", - "typescript": "^5.0.3", + "typescript": "^5.0.4", "uvu": "0.5.6", "yaspeller": "^8.0.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 445264c..ad9bd6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,14 +11,14 @@ specifiers: '@babel/preset-typescript': ^7.21.4 '@react-native-async-storage/async-storage': ^1.18.1 '@rollup/plugin-babel': ^6.0.3 - '@rollup/plugin-node-resolve': ^15.0.1 + '@rollup/plugin-node-resolve': ^15.0.2 '@size-limit/preset-small-lib': ^8.2.4 - '@typescript-eslint/eslint-plugin': ^5.57.0 - '@typescript-eslint/parser': ^5.57.0 + '@typescript-eslint/eslint-plugin': ^5.59.0 + '@typescript-eslint/parser': ^5.59.0 effector: 22.0.0 effector-22-0-0: npm:effector@22.0.0 - effector-22-7-0: npm:effector@22.7.0 - eslint: ^8.37.0 + effector-22-8-1: npm:effector@22.8.1 + eslint: ^8.39.0 eslint-config-prettier: ^8.8.0 eslint-config-standard: ^17.0.0 eslint-plugin-import: ^2.27.5 @@ -32,7 +32,7 @@ specifiers: prettier: ^2.8.7 react-native-encrypted-storage: ^4.0.3 rewiremock: ^3.14.5 - rollup: ^3.20.2 + rollup: ^3.20.7 rollup-plugin-command: ^1.1.3 rollup-plugin-dts: ^5.3.0 rollup-plugin-generate-package-json: ^3.2.0 @@ -42,7 +42,7 @@ specifiers: ts-node: ^10.9.1 tsd: ^0.28.1 tslib: ^2.5.0 - typescript: ^5.0.3 + typescript: ^5.0.4 uvu: 0.5.6 yaspeller: ^8.0.1 @@ -51,20 +51,20 @@ devDependencies: '@babel/plugin-transform-block-scoping': 7.21.0_@babel+core@7.21.4 '@babel/preset-typescript': 7.21.4_@babel+core@7.21.4 '@react-native-async-storage/async-storage': 1.18.1 - '@rollup/plugin-babel': 6.0.3_wlieuynzbak3666wdkk5ilofqu - '@rollup/plugin-node-resolve': 15.0.1_rollup@3.20.2 + '@rollup/plugin-babel': 6.0.3_35qymc66u5as7lotnxu3n5lhhu + '@rollup/plugin-node-resolve': 15.0.2_rollup@3.20.7 '@size-limit/preset-small-lib': 8.2.4_size-limit@8.2.4 - '@typescript-eslint/eslint-plugin': 5.57.0_z24sz2fazj3bxoipp6m4s7b2mi - '@typescript-eslint/parser': 5.57.0_vwh6htx42aidho2qgfca5u5rwm + '@typescript-eslint/eslint-plugin': 5.59.0_chh3ljgpke5ydgcjpmkmu4hz5q + '@typescript-eslint/parser': 5.59.0_iacogk7kkaymxepzhgcbytyi7q effector: 22.0.0 effector-22-0-0: /effector/22.0.0 - effector-22-7-0: /effector/22.7.0 - eslint: 8.37.0 - eslint-config-prettier: 8.8.0_eslint@8.37.0 - eslint-config-standard: 17.0.0_ed26cu7hf3bvb66klim2omkahq - eslint-plugin-import: 2.27.5_2niwd2uqke2jpnohndnwvllrkm - eslint-plugin-n: 15.7.0_eslint@8.37.0 - eslint-plugin-promise: 6.1.1_eslint@8.37.0 + effector-22-8-1: /effector/22.8.1 + eslint: 8.39.0 + eslint-config-prettier: 8.8.0_eslint@8.39.0 + eslint-config-standard: 17.0.0_anxg5cjecvm4rko2bul6pcjvfy + eslint-plugin-import: 2.27.5_mjjvf5mpcotuozqtmhbaxkeuwq + eslint-plugin-n: 15.7.0_eslint@8.39.0 + eslint-plugin-promise: 6.1.1_eslint@8.39.0 flowgen: 1.21.0 np: 7.7.0 npm-run-all: 4.1.5 @@ -73,28 +73,28 @@ devDependencies: prettier: 2.8.7 react-native-encrypted-storage: 4.0.3 rewiremock: 3.14.5 - rollup: 3.20.2 + rollup: 3.20.7 rollup-plugin-command: 1.1.3 - rollup-plugin-dts: 5.3.0_veck7oukgpukn72f5inxoyux7q - rollup-plugin-generate-package-json: 3.2.0_rollup@3.20.2 - rollup-plugin-terser: 7.0.2_rollup@3.20.2 + rollup-plugin-dts: 5.3.0_lhrcpyem2zu5b6sfj3l3zvso3q + rollup-plugin-generate-package-json: 3.2.0_rollup@3.20.7 + rollup-plugin-terser: 7.0.2_rollup@3.20.7 size-limit: 8.2.4 snoop: 1.0.4 - ts-node: 10.9.1_typescript@5.0.3 + ts-node: 10.9.1_typescript@5.0.4 tsd: 0.28.1 tslib: 2.5.0 - typescript: 5.0.3 + typescript: 5.0.4 uvu: 0.5.6_ecyfqwbbk3ionomkymbsdo5zhq yaspeller: 8.0.1 packages: - /@ampproject/remapping/2.2.0: - resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} + /@ampproject/remapping/2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} dependencies: - '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@babel/code-frame/7.21.4: @@ -113,7 +113,7 @@ packages: resolution: {integrity: sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==} engines: {node: '>=6.9.0'} dependencies: - '@ampproject/remapping': 2.2.0 + '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.21.4 '@babel/generator': 7.21.4 '@babel/helper-compilation-targets': 7.21.4_@babel+core@7.21.4 @@ -137,8 +137,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.21.4 - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 jsesc: 2.5.2 dev: true @@ -440,8 +440,8 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@esbuild/android-arm/0.17.14: - resolution: {integrity: sha512-0CnlwnjDU8cks0yJLXfkaU/uoLyRf9VZJs4p1PskBr2AlAHeEsFEwJEo0of/Z3g+ilw5mpyDwThlxzNEIxOE4g==} + /@esbuild/android-arm/0.17.17: + resolution: {integrity: sha512-E6VAZwN7diCa3labs0GYvhEPL2M94WLF8A+czO8hfjREXxba8Ng7nM5VxV+9ihNXIY1iQO1XxUU4P7hbqbICxg==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -449,8 +449,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64/0.17.14: - resolution: {integrity: sha512-eLOpPO1RvtsP71afiFTvS7tVFShJBCT0txiv/xjFBo5a7R7Gjw7X0IgIaFoLKhqXYAXhahoXm7qAmRXhY4guJg==} + /@esbuild/android-arm64/0.17.17: + resolution: {integrity: sha512-jaJ5IlmaDLFPNttv0ofcwy/cfeY4bh/n705Tgh+eLObbGtQBK3EPAu+CzL95JVE4nFAliyrnEu0d32Q5foavqg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -458,8 +458,8 @@ packages: dev: true optional: true - /@esbuild/android-x64/0.17.14: - resolution: {integrity: sha512-nrfQYWBfLGfSGLvRVlt6xi63B5IbfHm3tZCdu/82zuFPQ7zez4XjmRtF/wIRYbJQ/DsZrxJdEvYFE67avYXyng==} + /@esbuild/android-x64/0.17.17: + resolution: {integrity: sha512-446zpfJ3nioMC7ASvJB1pszHVskkw4u/9Eu8s5yvvsSDTzYh4p4ZIRj0DznSl3FBF0Z/mZfrKXTtt0QCoFmoHA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -467,8 +467,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64/0.17.14: - resolution: {integrity: sha512-eoSjEuDsU1ROwgBH/c+fZzuSyJUVXQTOIN9xuLs9dE/9HbV/A5IqdXHU1p2OfIMwBwOYJ9SFVGGldxeRCUJFyw==} + /@esbuild/darwin-arm64/0.17.17: + resolution: {integrity: sha512-m/gwyiBwH3jqfUabtq3GH31otL/0sE0l34XKpSIqR7NjQ/XHQ3lpmQHLHbG8AHTGCw8Ao059GvV08MS0bhFIJQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -476,8 +476,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64/0.17.14: - resolution: {integrity: sha512-zN0U8RWfrDttdFNkHqFYZtOH8hdi22z0pFm0aIJPsNC4QQZv7je8DWCX5iA4Zx6tRhS0CCc0XC2m7wKsbWEo5g==} + /@esbuild/darwin-x64/0.17.17: + resolution: {integrity: sha512-4utIrsX9IykrqYaXR8ob9Ha2hAY2qLc6ohJ8c0CN1DR8yWeMrTgYFjgdeQ9LIoTOfLetXjuCu5TRPHT9yKYJVg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -485,8 +485,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64/0.17.14: - resolution: {integrity: sha512-z0VcD4ibeZWVQCW1O7szaLxGsx54gcCnajEJMdYoYjLiq4g1jrP2lMq6pk71dbS5+7op/L2Aod+erw+EUr28/A==} + /@esbuild/freebsd-arm64/0.17.17: + resolution: {integrity: sha512-4PxjQII/9ppOrpEwzQ1b0pXCsFLqy77i0GaHodrmzH9zq2/NEhHMAMJkJ635Ns4fyJPFOlHMz4AsklIyRqFZWA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -494,8 +494,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64/0.17.14: - resolution: {integrity: sha512-hd9mPcxfTgJlolrPlcXkQk9BMwNBvNBsVaUe5eNUqXut6weDQH8whcNaKNF2RO8NbpT6GY8rHOK2A9y++s+ehw==} + /@esbuild/freebsd-x64/0.17.17: + resolution: {integrity: sha512-lQRS+4sW5S3P1sv0z2Ym807qMDfkmdhUYX30GRBURtLTrJOPDpoU0kI6pVz1hz3U0+YQ0tXGS9YWveQjUewAJw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -503,8 +503,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm/0.17.14: - resolution: {integrity: sha512-BNTl+wSJ1omsH8s3TkQmIIIQHwvwJrU9u1ggb9XU2KTVM4TmthRIVyxSp2qxROJHhZuW/r8fht46/QE8hU8Qvg==} + /@esbuild/linux-arm/0.17.17: + resolution: {integrity: sha512-biDs7bjGdOdcmIk6xU426VgdRUpGg39Yz6sT9Xp23aq+IEHDb/u5cbmu/pAANpDB4rZpY/2USPhCA+w9t3roQg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -512,8 +512,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64/0.17.14: - resolution: {integrity: sha512-FhAMNYOq3Iblcj9i+K0l1Fp/MHt+zBeRu/Qkf0LtrcFu3T45jcwB6A1iMsemQ42vR3GBhjNZJZTaCe3VFPbn9g==} + /@esbuild/linux-arm64/0.17.17: + resolution: {integrity: sha512-2+pwLx0whKY1/Vqt8lyzStyda1v0qjJ5INWIe+d8+1onqQxHLLi3yr5bAa4gvbzhZqBztifYEu8hh1La5+7sUw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -521,8 +521,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32/0.17.14: - resolution: {integrity: sha512-91OK/lQ5y2v7AsmnFT+0EyxdPTNhov3y2CWMdizyMfxSxRqHazXdzgBKtlmkU2KYIc+9ZK3Vwp2KyXogEATYxQ==} + /@esbuild/linux-ia32/0.17.17: + resolution: {integrity: sha512-IBTTv8X60dYo6P2t23sSUYym8fGfMAiuv7PzJ+0LcdAndZRzvke+wTVxJeCq4WgjppkOpndL04gMZIFvwoU34Q==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -530,8 +530,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.17.14: - resolution: {integrity: sha512-vp15H+5NR6hubNgMluqqKza85HcGJgq7t6rMH7O3Y6ApiOWPkvW2AJfNojUQimfTp6OUrACUXfR4hmpcENXoMQ==} + /@esbuild/linux-loong64/0.17.17: + resolution: {integrity: sha512-WVMBtcDpATjaGfWfp6u9dANIqmU9r37SY8wgAivuKmgKHE+bWSuv0qXEFt/p3qXQYxJIGXQQv6hHcm7iWhWjiw==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -539,8 +539,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el/0.17.14: - resolution: {integrity: sha512-90TOdFV7N+fgi6c2+GO9ochEkmm9kBAKnuD5e08GQMgMINOdOFHuYLPQ91RYVrnWwQ5683sJKuLi9l4SsbJ7Hg==} + /@esbuild/linux-mips64el/0.17.17: + resolution: {integrity: sha512-2kYCGh8589ZYnY031FgMLy0kmE4VoGdvfJkxLdxP4HJvWNXpyLhjOvxVsYjYZ6awqY4bgLR9tpdYyStgZZhi2A==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -548,8 +548,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64/0.17.14: - resolution: {integrity: sha512-NnBGeoqKkTugpBOBZZoktQQ1Yqb7aHKmHxsw43NddPB2YWLAlpb7THZIzsRsTr0Xw3nqiPxbA1H31ZMOG+VVPQ==} + /@esbuild/linux-ppc64/0.17.17: + resolution: {integrity: sha512-KIdG5jdAEeAKogfyMTcszRxy3OPbZhq0PPsW4iKKcdlbk3YE4miKznxV2YOSmiK/hfOZ+lqHri3v8eecT2ATwQ==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -557,8 +557,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64/0.17.14: - resolution: {integrity: sha512-0qdlKScLXA8MGVy21JUKvMzCYWovctuP8KKqhtE5A6IVPq4onxXhSuhwDd2g5sRCzNDlDjitc5sX31BzDoL5Fw==} + /@esbuild/linux-riscv64/0.17.17: + resolution: {integrity: sha512-Cj6uWLBR5LWhcD/2Lkfg2NrkVsNb2sFM5aVEfumKB2vYetkA/9Uyc1jVoxLZ0a38sUhFk4JOVKH0aVdPbjZQeA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -566,8 +566,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x/0.17.14: - resolution: {integrity: sha512-Hdm2Jo1yaaOro4v3+6/zJk6ygCqIZuSDJHdHaf8nVH/tfOuoEX5Riv03Ka15LmQBYJObUTNS1UdyoMk0WUn9Ww==} + /@esbuild/linux-s390x/0.17.17: + resolution: {integrity: sha512-lK+SffWIr0XsFf7E0srBjhpkdFVJf3HEgXCwzkm69kNbRar8MhezFpkIwpk0qo2IOQL4JE4mJPJI8AbRPLbuOQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -575,8 +575,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64/0.17.14: - resolution: {integrity: sha512-8KHF17OstlK4DuzeF/KmSgzrTWQrkWj5boluiiq7kvJCiQVzUrmSkaBvcLB2UgHpKENO2i6BthPkmUhNDaJsVw==} + /@esbuild/linux-x64/0.17.17: + resolution: {integrity: sha512-XcSGTQcWFQS2jx3lZtQi7cQmDYLrpLRyz1Ns1DzZCtn898cWfm5Icx/DEWNcTU+T+tyPV89RQtDnI7qL2PObPg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -584,8 +584,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64/0.17.14: - resolution: {integrity: sha512-nVwpqvb3yyXztxIT2+VsxJhB5GCgzPdk1n0HHSnchRAcxqKO6ghXwHhJnr0j/B+5FSyEqSxF4q03rbA2fKXtUQ==} + /@esbuild/netbsd-x64/0.17.17: + resolution: {integrity: sha512-RNLCDmLP5kCWAJR+ItLM3cHxzXRTe4N00TQyQiimq+lyqVqZWGPAvcyfUBM0isE79eEZhIuGN09rAz8EL5KdLA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -593,8 +593,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64/0.17.14: - resolution: {integrity: sha512-1RZ7uQQ9zcy/GSAJL1xPdN7NDdOOtNEGiJalg/MOzeakZeTrgH/DoCkbq7TaPDiPhWqnDF+4bnydxRqQD7il6g==} + /@esbuild/openbsd-x64/0.17.17: + resolution: {integrity: sha512-PAXswI5+cQq3Pann7FNdcpSUrhrql3wKjj3gVkmuz6OHhqqYxKvi6GgRBoaHjaG22HV/ZZEgF9TlS+9ftHVigA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -602,8 +602,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64/0.17.14: - resolution: {integrity: sha512-nqMjDsFwv7vp7msrwWRysnM38Sd44PKmW8EzV01YzDBTcTWUpczQg6mGao9VLicXSgW/iookNK6AxeogNVNDZA==} + /@esbuild/sunos-x64/0.17.17: + resolution: {integrity: sha512-V63egsWKnx/4V0FMYkr9NXWrKTB5qFftKGKuZKFIrAkO/7EWLFnbBZNM1CvJ6Sis+XBdPws2YQSHF1Gqf1oj/Q==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -611,8 +611,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64/0.17.14: - resolution: {integrity: sha512-xrD0mccTKRBBIotrITV7WVQAwNJ5+1va6L0H9zN92v2yEdjfAN7864cUaZwJS7JPEs53bDTzKFbfqVlG2HhyKQ==} + /@esbuild/win32-arm64/0.17.17: + resolution: {integrity: sha512-YtUXLdVnd6YBSYlZODjWzH+KzbaubV0YVd6UxSfoFfa5PtNJNaW+1i+Hcmjpg2nEe0YXUCNF5bkKy1NnBv1y7Q==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -620,8 +620,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32/0.17.14: - resolution: {integrity: sha512-nXpkz9bbJrLLyUTYtRotSS3t5b+FOuljg8LgLdINWFs3FfqZMtbnBCZFUmBzQPyxqU87F8Av+3Nco/M3hEcu1w==} + /@esbuild/win32-ia32/0.17.17: + resolution: {integrity: sha512-yczSLRbDdReCO74Yfc5tKG0izzm+lPMYyO1fFTcn0QNwnKmc3K+HdxZWLGKg4pZVte7XVgcFku7TIZNbWEJdeQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -629,8 +629,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64/0.17.14: - resolution: {integrity: sha512-gPQmsi2DKTaEgG14hc3CHXHp62k8g6qr0Pas+I4lUxRMugGSATh/Bi8Dgusoz9IQ0IfdrvLpco6kujEIBoaogA==} + /@esbuild/win32-x64/0.17.17: + resolution: {integrity: sha512-FNZw7H3aqhF9OyRQbDDnzUApDXfC1N6fgBhkqEO2jvYCJ+DxMTfZVqg3AX0R1khg1wHTBRD5SdcibSJ+XF6bFg==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -638,13 +638,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.4.0_eslint@8.37.0: + /@eslint-community/eslint-utils/4.4.0_eslint@8.39.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 dependencies: - eslint: 8.37.0 + eslint: 8.39.0 eslint-visitor-keys: 3.4.0 dev: true @@ -670,8 +670,8 @@ packages: - supports-color dev: true - /@eslint/js/8.37.0: - resolution: {integrity: sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==} + /@eslint/js/8.39.0: + resolution: {integrity: sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -718,25 +718,22 @@ packages: '@sinclair/typebox': 0.25.24 dev: true - /@jridgewell/gen-mapping/0.1.1: - resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} + /@jridgewell/gen-mapping/0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.18 dev: true - /@jridgewell/gen-mapping/0.3.2: - resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + /@jridgewell/resolve-uri/3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.17 dev: true - /@jridgewell/resolve-uri/3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + /@jridgewell/resolve-uri/3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true @@ -745,19 +742,23 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/source-map/0.3.2: - resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} + /@jridgewell/source-map/0.3.3: + resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} dependencies: - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@jridgewell/sourcemap-codec/1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true - /@jridgewell/trace-mapping/0.3.17: - resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} + /@jridgewell/sourcemap-codec/1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping/0.3.18: + resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 @@ -766,8 +767,8 @@ packages: /@jridgewell/trace-mapping/0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@nodelib/fs.scandir/2.1.5: @@ -799,7 +800,7 @@ packages: merge-options: 3.0.4 dev: true - /@rollup/plugin-babel/6.0.3_wlieuynzbak3666wdkk5ilofqu: + /@rollup/plugin-babel/6.0.3_35qymc66u5as7lotnxu3n5lhhu: resolution: {integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==} engines: {node: '>=14.0.0'} peerDependencies: @@ -814,12 +815,12 @@ packages: dependencies: '@babel/core': 7.21.4 '@babel/helper-module-imports': 7.21.4 - '@rollup/pluginutils': 5.0.2_rollup@3.20.2 - rollup: 3.20.2 + '@rollup/pluginutils': 5.0.2_rollup@3.20.7 + rollup: 3.20.7 dev: true - /@rollup/plugin-node-resolve/15.0.1_rollup@3.20.2: - resolution: {integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==} + /@rollup/plugin-node-resolve/15.0.2_rollup@3.20.7: + resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0 @@ -827,16 +828,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.20.2 + '@rollup/pluginutils': 5.0.2_rollup@3.20.7 '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 - resolve: 1.22.1 - rollup: 3.20.2 + resolve: 1.22.2 + rollup: 3.20.7 dev: true - /@rollup/pluginutils/5.0.2_rollup@3.20.2: + /@rollup/pluginutils/5.0.2_rollup@3.20.7: resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -845,10 +846,10 @@ packages: rollup: optional: true dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.20.2 + rollup: 3.20.7 dev: true /@samverschueren/stream-to-observable/0.3.1_rxjs@6.6.7: @@ -894,7 +895,7 @@ packages: peerDependencies: size-limit: 8.2.4 dependencies: - esbuild: 0.17.14 + esbuild: 0.17.17 nanoid: 3.3.6 size-limit: 8.2.4 dev: true @@ -949,8 +950,8 @@ packages: resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} dev: true - /@tsd/typescript/5.0.3: - resolution: {integrity: sha512-dGYlmePDOyea9ZsHdwZx67e1Al8TkDqLgTNnxkmUXpRMawDo+HyXeJFw3Ee8j6ODqLiuYjH82BKJuzmEDhN62w==} + /@tsd/typescript/5.0.4: + resolution: {integrity: sha512-YQi2lvZSI+xidKeUjlbv6b6Zw7qB3aXHw5oGJLs5OOGAEqKIOvz5UIAkWyg0bJbkSUWPBEtaOHpVxU4EYBO1Jg==} dev: true /@types/cacheable-request/6.0.3: @@ -958,19 +959,19 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.15.11 + '@types/node': 18.15.13 '@types/responselike': 1.0.0 dev: true /@types/eslint/7.29.0: resolution: {integrity: sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==} dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.1 '@types/json-schema': 7.0.11 dev: true - /@types/estree/1.0.0: - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} + /@types/estree/1.0.1: + resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} dev: true /@types/http-cache-semantics/4.0.1: @@ -988,15 +989,15 @@ packages: /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.15.11 + '@types/node': 18.15.13 dev: true /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/18.15.11: - resolution: {integrity: sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==} + /@types/node/18.15.13: + resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} dev: true /@types/normalize-package-data/2.4.1: @@ -1014,15 +1015,15 @@ packages: /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.15.11 + '@types/node': 18.15.13 dev: true /@types/semver/7.3.13: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true - /@typescript-eslint/eslint-plugin/5.57.0_z24sz2fazj3bxoipp6m4s7b2mi: - resolution: {integrity: sha512-itag0qpN6q2UMM6Xgk6xoHa0D0/P+M17THnr4SVgqn9Rgam5k/He33MA7/D7QoJcdMxHFyX7U9imaBonAX/6qA==} + /@typescript-eslint/eslint-plugin/5.59.0_chh3ljgpke5ydgcjpmkmu4hz5q: + resolution: {integrity: sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1033,24 +1034,24 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.0 - '@typescript-eslint/parser': 5.57.0_vwh6htx42aidho2qgfca5u5rwm - '@typescript-eslint/scope-manager': 5.57.0 - '@typescript-eslint/type-utils': 5.57.0_vwh6htx42aidho2qgfca5u5rwm - '@typescript-eslint/utils': 5.57.0_vwh6htx42aidho2qgfca5u5rwm + '@typescript-eslint/parser': 5.59.0_iacogk7kkaymxepzhgcbytyi7q + '@typescript-eslint/scope-manager': 5.59.0 + '@typescript-eslint/type-utils': 5.59.0_iacogk7kkaymxepzhgcbytyi7q + '@typescript-eslint/utils': 5.59.0_iacogk7kkaymxepzhgcbytyi7q debug: 4.3.4 - eslint: 8.37.0 + eslint: 8.39.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 - semver: 7.3.8 - tsutils: 3.21.0_typescript@5.0.3 - typescript: 5.0.3 + semver: 7.5.0 + tsutils: 3.21.0_typescript@5.0.4 + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.57.0_vwh6htx42aidho2qgfca5u5rwm: - resolution: {integrity: sha512-orrduvpWYkgLCyAdNtR1QIWovcNZlEm6yL8nwH/eTxWLd8gsP+25pdLHYzL2QdkqrieaDwLpytHqycncv0woUQ==} + /@typescript-eslint/parser/5.59.0_iacogk7kkaymxepzhgcbytyi7q: + resolution: {integrity: sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1059,26 +1060,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.57.0 - '@typescript-eslint/types': 5.57.0 - '@typescript-eslint/typescript-estree': 5.57.0_typescript@5.0.3 + '@typescript-eslint/scope-manager': 5.59.0 + '@typescript-eslint/types': 5.59.0 + '@typescript-eslint/typescript-estree': 5.59.0_typescript@5.0.4 debug: 4.3.4 - eslint: 8.37.0 - typescript: 5.0.3 + eslint: 8.39.0 + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.57.0: - resolution: {integrity: sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw==} + /@typescript-eslint/scope-manager/5.59.0: + resolution: {integrity: sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.57.0 - '@typescript-eslint/visitor-keys': 5.57.0 + '@typescript-eslint/types': 5.59.0 + '@typescript-eslint/visitor-keys': 5.59.0 dev: true - /@typescript-eslint/type-utils/5.57.0_vwh6htx42aidho2qgfca5u5rwm: - resolution: {integrity: sha512-kxXoq9zOTbvqzLbdNKy1yFrxLC6GDJFE2Yuo3KqSwTmDOFjUGeWSakgoXT864WcK5/NAJkkONCiKb1ddsqhLXQ==} + /@typescript-eslint/type-utils/5.59.0_iacogk7kkaymxepzhgcbytyi7q: + resolution: {integrity: sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1087,23 +1088,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.57.0_typescript@5.0.3 - '@typescript-eslint/utils': 5.57.0_vwh6htx42aidho2qgfca5u5rwm + '@typescript-eslint/typescript-estree': 5.59.0_typescript@5.0.4 + '@typescript-eslint/utils': 5.59.0_iacogk7kkaymxepzhgcbytyi7q debug: 4.3.4 - eslint: 8.37.0 - tsutils: 3.21.0_typescript@5.0.3 - typescript: 5.0.3 + eslint: 8.39.0 + tsutils: 3.21.0_typescript@5.0.4 + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.57.0: - resolution: {integrity: sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ==} + /@typescript-eslint/types/5.59.0: + resolution: {integrity: sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.57.0_typescript@5.0.3: - resolution: {integrity: sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw==} + /@typescript-eslint/typescript-estree/5.59.0_typescript@5.0.4: + resolution: {integrity: sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1111,43 +1112,43 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.57.0 - '@typescript-eslint/visitor-keys': 5.57.0 + '@typescript-eslint/types': 5.59.0 + '@typescript-eslint/visitor-keys': 5.59.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0_typescript@5.0.3 - typescript: 5.0.3 + semver: 7.5.0 + tsutils: 3.21.0_typescript@5.0.4 + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.57.0_vwh6htx42aidho2qgfca5u5rwm: - resolution: {integrity: sha512-ps/4WohXV7C+LTSgAL5CApxvxbMkl9B9AUZRtnEFonpIxZDIT7wC1xfvuJONMidrkB9scs4zhtRyIwHh4+18kw==} + /@typescript-eslint/utils/5.59.0_iacogk7kkaymxepzhgcbytyi7q: + resolution: {integrity: sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.37.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.39.0 '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.57.0 - '@typescript-eslint/types': 5.57.0 - '@typescript-eslint/typescript-estree': 5.57.0_typescript@5.0.3 - eslint: 8.37.0 + '@typescript-eslint/scope-manager': 5.59.0 + '@typescript-eslint/types': 5.59.0 + '@typescript-eslint/typescript-estree': 5.59.0_typescript@5.0.4 + eslint: 8.39.0 eslint-scope: 5.1.1 - semver: 7.3.8 + semver: 7.5.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.57.0: - resolution: {integrity: sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g==} + /@typescript-eslint/visitor-keys/5.59.0: + resolution: {integrity: sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.57.0 + '@typescript-eslint/types': 5.59.0 eslint-visitor-keys: 3.4.0 dev: true @@ -1516,10 +1517,10 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001473 - electron-to-chromium: 1.4.348 + caniuse-lite: 1.0.30001481 + electron-to-chromium: 1.4.369 node-releases: 2.0.10 - update-browserslist-db: 1.0.10_browserslist@4.21.5 + update-browserslist-db: 1.0.11_browserslist@4.21.5 dev: true /buffer-from/1.1.2: @@ -1554,7 +1555,7 @@ packages: /builtins/5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.3.8 + semver: 7.5.0 dev: true /bytes-iec/3.1.1: @@ -1637,8 +1638,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite/1.0.30001473: - resolution: {integrity: sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg==} + /caniuse-lite/1.0.30001481: + resolution: {integrity: sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==} dev: true /chalk/1.1.3: @@ -2118,13 +2119,13 @@ packages: engines: {node: '>=6.0.0'} dev: true - /effector/22.7.0: - resolution: {integrity: sha512-C3jMCjRmU/j7Mu04q0zm45OYglQB9fYxSHNu51UrV77VDZJRs7nFmNfNiaXmgkKOnsUP4VuyE64aiSvAZWZo7g==} + /effector/22.8.1: + resolution: {integrity: sha512-368ysZBxxqr0ThVYElhmo8p8rT2wTZ0hF/BIg1FxNPSIdr/wvw4Hbnioy22CbgtU5d53CnadkJnSlKqfOICOwg==} engines: {node: '>=11.0.0'} dev: true - /electron-to-chromium/1.4.348: - resolution: {integrity: sha512-gM7TdwuG3amns/1rlgxMbeeyNoBFPa+4Uu0c7FeROWh4qWmvSOnvcslKmWy51ggLKZ2n/F/4i2HJ+PVNxH9uCQ==} + /electron-to-chromium/1.4.369: + resolution: {integrity: sha512-LfxbHXdA/S+qyoTEA4EbhxGjrxx7WK2h6yb5K2v0UCOufUKX+VZaHbl3svlzZfv9sGseym/g3Ne4DpsgRULmqg==} dev: true /elegant-spinner/1.0.1: @@ -2195,7 +2196,7 @@ packages: object-inspect: 1.12.3 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.0 safe-regex-test: 1.0.0 string.prototype.trim: 1.2.7 string.prototype.trimend: 1.0.6 @@ -2233,34 +2234,34 @@ packages: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} dev: true - /esbuild/0.17.14: - resolution: {integrity: sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw==} + /esbuild/0.17.17: + resolution: {integrity: sha512-/jUywtAymR8jR4qsa2RujlAF7Krpt5VWi72Q2yuLD4e/hvtNcFQ0I1j8m/bxq238pf3/0KO5yuXNpuLx8BE1KA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.14 - '@esbuild/android-arm64': 0.17.14 - '@esbuild/android-x64': 0.17.14 - '@esbuild/darwin-arm64': 0.17.14 - '@esbuild/darwin-x64': 0.17.14 - '@esbuild/freebsd-arm64': 0.17.14 - '@esbuild/freebsd-x64': 0.17.14 - '@esbuild/linux-arm': 0.17.14 - '@esbuild/linux-arm64': 0.17.14 - '@esbuild/linux-ia32': 0.17.14 - '@esbuild/linux-loong64': 0.17.14 - '@esbuild/linux-mips64el': 0.17.14 - '@esbuild/linux-ppc64': 0.17.14 - '@esbuild/linux-riscv64': 0.17.14 - '@esbuild/linux-s390x': 0.17.14 - '@esbuild/linux-x64': 0.17.14 - '@esbuild/netbsd-x64': 0.17.14 - '@esbuild/openbsd-x64': 0.17.14 - '@esbuild/sunos-x64': 0.17.14 - '@esbuild/win32-arm64': 0.17.14 - '@esbuild/win32-ia32': 0.17.14 - '@esbuild/win32-x64': 0.17.14 + '@esbuild/android-arm': 0.17.17 + '@esbuild/android-arm64': 0.17.17 + '@esbuild/android-x64': 0.17.17 + '@esbuild/darwin-arm64': 0.17.17 + '@esbuild/darwin-x64': 0.17.17 + '@esbuild/freebsd-arm64': 0.17.17 + '@esbuild/freebsd-x64': 0.17.17 + '@esbuild/linux-arm': 0.17.17 + '@esbuild/linux-arm64': 0.17.17 + '@esbuild/linux-ia32': 0.17.17 + '@esbuild/linux-loong64': 0.17.17 + '@esbuild/linux-mips64el': 0.17.17 + '@esbuild/linux-ppc64': 0.17.17 + '@esbuild/linux-riscv64': 0.17.17 + '@esbuild/linux-s390x': 0.17.17 + '@esbuild/linux-x64': 0.17.17 + '@esbuild/netbsd-x64': 0.17.17 + '@esbuild/openbsd-x64': 0.17.17 + '@esbuild/sunos-x64': 0.17.17 + '@esbuild/win32-arm64': 0.17.17 + '@esbuild/win32-ia32': 0.17.17 + '@esbuild/win32-x64': 0.17.17 dev: true /escalade/3.1.1: @@ -2292,16 +2293,16 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier/8.8.0_eslint@8.37.0: + /eslint-config-prettier/8.8.0_eslint@8.39.0: resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.37.0 + eslint: 8.39.0 dev: true - /eslint-config-standard/17.0.0_ed26cu7hf3bvb66klim2omkahq: + /eslint-config-standard/17.0.0_anxg5cjecvm4rko2bul6pcjvfy: resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -2309,10 +2310,10 @@ packages: eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.37.0 - eslint-plugin-import: 2.27.5_2niwd2uqke2jpnohndnwvllrkm - eslint-plugin-n: 15.7.0_eslint@8.37.0 - eslint-plugin-promise: 6.1.1_eslint@8.37.0 + eslint: 8.39.0 + eslint-plugin-import: 2.27.5_mjjvf5mpcotuozqtmhbaxkeuwq + eslint-plugin-n: 15.7.0_eslint@8.39.0 + eslint-plugin-promise: 6.1.1_eslint@8.39.0 dev: true /eslint-formatter-pretty/4.1.0: @@ -2333,14 +2334,14 @@ packages: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.11.0 - resolve: 1.22.1 + is-core-module: 2.12.0 + resolve: 1.22.2 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_yzucv6lmyr6r4j6quu4y6fizdu: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils/2.8.0_fnjvmxxyn7gb2d4x2systjjt6q: + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2360,26 +2361,26 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.57.0_vwh6htx42aidho2qgfca5u5rwm + '@typescript-eslint/parser': 5.59.0_iacogk7kkaymxepzhgcbytyi7q debug: 3.2.7 - eslint: 8.37.0 + eslint: 8.39.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es/4.1.0_eslint@8.37.0: + /eslint-plugin-es/4.1.0_eslint@8.39.0: resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.37.0 + eslint: 8.39.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.27.5_2niwd2uqke2jpnohndnwvllrkm: + /eslint-plugin-import/2.27.5_mjjvf5mpcotuozqtmhbaxkeuwq: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -2389,21 +2390,21 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.57.0_vwh6htx42aidho2qgfca5u5rwm + '@typescript-eslint/parser': 5.59.0_iacogk7kkaymxepzhgcbytyi7q array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.37.0 + eslint: 8.39.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_yzucv6lmyr6r4j6quu4y6fizdu + eslint-module-utils: 2.8.0_fnjvmxxyn7gb2d4x2systjjt6q has: 1.0.3 - is-core-module: 2.11.0 + is-core-module: 2.12.0 is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.1.6 - resolve: 1.22.1 + resolve: 1.22.2 semver: 6.3.0 tsconfig-paths: 3.14.2 transitivePeerDependencies: @@ -2412,30 +2413,30 @@ packages: - supports-color dev: true - /eslint-plugin-n/15.7.0_eslint@8.37.0: + /eslint-plugin-n/15.7.0_eslint@8.39.0: resolution: {integrity: sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: builtins: 5.0.1 - eslint: 8.37.0 - eslint-plugin-es: 4.1.0_eslint@8.37.0 - eslint-utils: 3.0.0_eslint@8.37.0 + eslint: 8.39.0 + eslint-plugin-es: 4.1.0_eslint@8.39.0 + eslint-utils: 3.0.0_eslint@8.39.0 ignore: 5.2.4 - is-core-module: 2.11.0 + is-core-module: 2.12.0 minimatch: 3.1.2 - resolve: 1.22.1 - semver: 7.3.8 + resolve: 1.22.2 + semver: 7.5.0 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.37.0: + /eslint-plugin-promise/6.1.1_eslint@8.39.0: resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.37.0 + eslint: 8.39.0 dev: true /eslint-rule-docs/1.1.235: @@ -2450,8 +2451,8 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope/7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + /eslint-scope/7.2.0: + resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 @@ -2465,13 +2466,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.37.0: + /eslint-utils/3.0.0_eslint@8.39.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.37.0 + eslint: 8.39.0 eslint-visitor-keys: 2.1.0 dev: true @@ -2490,15 +2491,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.37.0: - resolution: {integrity: sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==} + /eslint/8.39.0: + resolution: {integrity: sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.37.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.39.0 '@eslint-community/regexpp': 4.5.0 '@eslint/eslintrc': 2.0.2 - '@eslint/js': 8.37.0 + '@eslint/js': 8.39.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2508,7 +2509,7 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 + eslint-scope: 7.2.0 eslint-visitor-keys: 3.4.0 espree: 9.5.1 esquery: 1.5.0 @@ -3308,8 +3309,8 @@ packages: ci-info: 2.0.0 dev: true - /is-core-module/2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + /is-core-module/2.12.0: + resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} dependencies: has: 1.0.3 dev: true @@ -3632,7 +3633,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.15.11 + '@types/node': 18.15.13 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -3925,7 +3926,7 @@ packages: resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} engines: {node: '>=12'} dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /make-dir/2.1.0: @@ -4221,7 +4222,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.1 + resolve: 1.22.2 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true @@ -4231,8 +4232,8 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.11.0 - semver: 7.3.8 + is-core-module: 2.12.0 + semver: 7.5.0 validate-npm-package-license: 3.0.4 dev: true @@ -4290,7 +4291,7 @@ packages: pkg-dir: 5.0.0 read-pkg-up: 7.0.1 rxjs: 6.6.7 - semver: 7.3.8 + semver: 7.5.0 split: 1.0.1 symbol-observable: 3.0.0 terminal-link: 2.1.1 @@ -4327,7 +4328,7 @@ packages: minimatch: 3.1.2 pidtree: 0.3.1 read-pkg: 3.0.0 - shell-quote: 1.8.0 + shell-quote: 1.8.1 string.prototype.padend: 3.1.4 dev: true @@ -4948,7 +4949,7 @@ packages: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} dependencies: - resolve: 1.22.1 + resolve: 1.22.2 dev: true /redent/3.0.0: @@ -4963,8 +4964,8 @@ packages: resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==} dev: true - /regexp.prototype.flags/1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + /regexp.prototype.flags/1.5.0: + resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -5024,11 +5025,11 @@ packages: engines: {node: '>=8'} dev: true - /resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + /resolve/1.22.2: + resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.12.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -5097,7 +5098,7 @@ packages: resolution: {integrity: sha512-9nIcP5mgVYWGU7x/6ufTgtqI4vl5vvsYs6fTTil91NX53EIPcim42FXmq1TPdZRFJbUM1ikrg05clahPxObL1g==} dev: true - /rollup-plugin-dts/5.3.0_veck7oukgpukn72f5inxoyux7q: + /rollup-plugin-dts/5.3.0_lhrcpyem2zu5b6sfj3l3zvso3q: resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} engines: {node: '>=v14'} peerDependencies: @@ -5105,24 +5106,24 @@ packages: typescript: ^4.1 || ^5.0 dependencies: magic-string: 0.30.0 - rollup: 3.20.2 - typescript: 5.0.3 + rollup: 3.20.7 + typescript: 5.0.4 optionalDependencies: '@babel/code-frame': 7.21.4 dev: true - /rollup-plugin-generate-package-json/3.2.0_rollup@3.20.2: + /rollup-plugin-generate-package-json/3.2.0_rollup@3.20.7: resolution: {integrity: sha512-+Kq1kFVr+maxW/mZB+E+XuaieCXVZqjl2tNU9k3TtAMs3NOaeREa5sRHy67qKDmcnFtZZukIQ3dFCcnV+r0xyw==} engines: {node: '>=8.3'} peerDependencies: rollup: '>=1.0.0' dependencies: read-pkg: 5.2.0 - rollup: 3.20.2 + rollup: 3.20.7 write-pkg: 4.0.0 dev: true - /rollup-plugin-terser/7.0.2_rollup@3.20.2: + /rollup-plugin-terser/7.0.2_rollup@3.20.7: resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser peerDependencies: @@ -5130,13 +5131,13 @@ packages: dependencies: '@babel/code-frame': 7.21.4 jest-worker: 26.6.2 - rollup: 3.20.2 + rollup: 3.20.7 serialize-javascript: 4.0.0 - terser: 5.16.8 + terser: 5.17.1 dev: true - /rollup/3.20.2: - resolution: {integrity: sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==} + /rollup/3.20.7: + resolution: {integrity: sha512-P7E2zezKSLhWnTz46XxjSmInrbOCiul1yf+kJccMxT56vxjHwCbDfoLbiqFgu+WQoo9ij2PkraYaBstgB2prBA==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -5226,6 +5227,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver/7.5.0: + resolution: {integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /serialize-javascript/4.0.0: resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} dependencies: @@ -5272,8 +5281,8 @@ packages: engines: {node: '>=8'} dev: true - /shell-quote/1.8.0: - resolution: {integrity: sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ==} + /shell-quote/1.8.1: + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true /shelljs/0.8.5: @@ -5587,12 +5596,12 @@ packages: supports-hyperlinks: 2.3.0 dev: true - /terser/5.16.8: - resolution: {integrity: sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA==} + /terser/5.17.1: + resolution: {integrity: sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==} engines: {node: '>=10'} hasBin: true dependencies: - '@jridgewell/source-map': 0.3.2 + '@jridgewell/source-map': 0.3.3 acorn: 8.8.2 commander: 2.20.3 source-map-support: 0.5.21 @@ -5664,7 +5673,7 @@ packages: engines: {node: '>=8'} dev: true - /ts-node/10.9.1_typescript@5.0.3: + /ts-node/10.9.1_typescript@5.0.4: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -5689,7 +5698,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.0.3 + typescript: 5.0.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -5708,7 +5717,7 @@ packages: engines: {node: '>=14.16'} hasBin: true dependencies: - '@tsd/typescript': 5.0.3 + '@tsd/typescript': 5.0.4 eslint-formatter-pretty: 4.1.0 globby: 11.1.0 jest-diff: 29.5.0 @@ -5725,14 +5734,14 @@ packages: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} dev: true - /tsutils/3.21.0_typescript@5.0.3: + /tsutils/3.21.0_typescript@5.0.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.0.3 + typescript: 5.0.4 dev: true /tty-browserify/0.0.0: @@ -5805,8 +5814,8 @@ packages: hasBin: true dev: true - /typescript/5.0.3: - resolution: {integrity: sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==} + /typescript/5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true dev: true @@ -5827,8 +5836,8 @@ packages: crypto-random-string: 2.0.0 dev: true - /update-browserslist-db/1.0.10_browserslist@4.21.5: - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + /update-browserslist-db/1.0.11_browserslist@4.21.5: + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -5853,7 +5862,7 @@ packages: is-yarn-global: 0.3.0 latest-version: 5.1.0 pupa: 2.1.1 - semver: 7.3.8 + semver: 7.5.0 semver-diff: 3.1.1 xdg-basedir: 4.0.0 dev: true @@ -5958,8 +5967,8 @@ packages: is-symbol: 1.0.4 dev: true - /which-module/2.0.0: - resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} + /which-module/2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} dev: true /which-typed-array/1.1.9: @@ -6149,7 +6158,7 @@ packages: require-main-filename: 2.0.0 set-blocking: 2.0.0 string-width: 4.2.3 - which-module: 2.0.0 + which-module: 2.0.1 y18n: 4.0.3 yargs-parser: 18.1.3 dev: true diff --git a/tests/mocks/async-storage.mock.ts b/tests/mocks/async-storage.mock.ts index 19954b5..18c9dd4 100644 --- a/tests/mocks/async-storage.mock.ts +++ b/tests/mocks/async-storage.mock.ts @@ -1,72 +1,56 @@ import type { AsyncStorage } from '../../src/async-storage' -const has = (object: any, key: string) => - Object.prototype.hasOwnProperty.call(object, key) +const noop: any = () => undefined + +export class AsyncStorageMock implements AsyncStorage { + private storage = new Map() + + private getCallback: (key: string) => string | null = noop + private setCallback: (key: string, value: string) => void = noop + private removeCallback: (key: string) => void = noop + private clearCallback: () => void = noop + + public async setItem(key: string, value: string) { + await Promise.resolve() + key = String(key) + value = String(value) + this.setCallback(key, value) + this.storage.set(key, value) + } + + public async getItem(key: string) { + await Promise.resolve() + key = String(key) + this.getCallback(key) + return this.storage.has(key) ? this.storage.get(key) ?? null : null + } + + public async removeItem(key: string) { + await Promise.resolve() + key = String(key) + this.removeCallback(key) + this.storage.delete(key) + } + + public async clear() { + await Promise.resolve() + this.clearCallback() + this.storage.clear() + } + + public _callbacks( + get: typeof AsyncStorageMock.prototype.getCallback | null, + set: typeof AsyncStorageMock.prototype.setCallback | null, + remove: typeof AsyncStorageMock.prototype.removeCallback | null, + clear: typeof AsyncStorageMock.prototype.clearCallback | null + ) { + this.getCallback = get === null ? noop : get + this.setCallback = set === null ? noop : set + this.removeCallback = remove === null ? noop : remove + this.clearCallback = clear === null ? noop : clear + } +} export function createAsyncStorageMock(): AsyncStorage { - const asyncStorage = Object.create(null) - - const noop: any = () => undefined - let getCallback: (key: string) => string | null = noop - let setCallback: (key: string, value: string) => void = noop - let removeCallback: (key: string) => void = noop - let clearCallback: () => void = noop - - Object.defineProperty(asyncStorage, 'setItem', { - async value(key: string, value: string) { - await Promise.resolve() - setCallback(key, value) - key = String(key) - value = String(value) - asyncStorage[key] = value - }, - }) - - Object.defineProperty(asyncStorage, 'getItem', { - async value(key: string) { - await Promise.resolve() - getCallback(key) - key = String(key) - return has(asyncStorage, key) ? asyncStorage[key] : null - }, - }) - - Object.defineProperty(asyncStorage, 'removeItem', { - async value(key: string) { - await Promise.resolve() - removeCallback(key) - key = String(key) - if (has(asyncStorage, key)) { - delete asyncStorage[key] - } - }, - }) - - Object.defineProperty(asyncStorage, 'clear', { - async value() { - await Promise.resolve() - clearCallback() - for (const key in asyncStorage) { - if (has(asyncStorage, key)) { - delete asyncStorage[key] - } - } - }, - }) - - Object.defineProperty(asyncStorage, '_callbacks', { - value( - get: typeof getCallback | null, - set: typeof setCallback | null, - remove: typeof removeCallback | null, - clear: typeof clearCallback | null - ) { - getCallback = get === null ? noop : get - setCallback = set === null ? noop : set - removeCallback = remove === null ? noop : remove - clearCallback = clear === null ? noop : clear - }, - }) - - return asyncStorage + return new AsyncStorageMock() } diff --git a/tests/mocks/events.mock.ts b/tests/mocks/events.mock.ts index 999b54d..6881bde 100644 --- a/tests/mocks/events.mock.ts +++ b/tests/mocks/events.mock.ts @@ -1,6 +1,3 @@ -const has = (object: any, key: string) => - Object.prototype.hasOwnProperty.call(object, key) - interface EventListener { (event: any): void } @@ -10,28 +7,32 @@ interface Events { addEventListener(name: string, listener: EventListener): void } -export function createEventsMock(): Events { - const listeners: { - [key: string]: EventListener[] - } = Object.create(null) +export class EventsMock implements Events { + private listeners = new Map() - return { - async dispatchEvent(name: string, event: any) { - if (has(listeners, name) && listeners[name].length > 0) { - return Promise.all( - listeners[name].map( - (listener) => - new Promise((resolve) => - setTimeout(() => resolve(listener(event)), 0) - ) - ) + public async dispatchEvent(name: string, event: any) { + const listeners = this.listeners.get(name) + if (listeners && listeners.length > 0) { + return Promise.all( + listeners.map( + (listener) => + new Promise((resolve) => + setTimeout(() => resolve(listener(event)), 0) + ) ) - } - }, + ) + } + } - addEventListener(name: string, listener: EventListener) { - if (!has(listeners, name)) listeners[name] = [] - listeners[name].push(listener) - }, + public addEventListener = (name: string, listener: EventListener) => { + let listeners = this.listeners.get(name) + if (!listeners) { + this.listeners.set(name, (listeners = [])) + } + listeners.push(listener) } } + +export function createEventsMock(): Events { + return new EventsMock() +} diff --git a/tests/mocks/history.mock.ts b/tests/mocks/history.mock.ts index 649e84a..e2f1409 100644 --- a/tests/mocks/history.mock.ts +++ b/tests/mocks/history.mock.ts @@ -4,124 +4,113 @@ type HistoryItem = { url?: string | null } +const noop: any = () => undefined + +export class HistoryMock implements History { + private location?: Location & { _set: (url: string) => void } + + private items: HistoryItem[] + private index: number + + private backCallback: History['back'] = noop + private forwardCallback: History['forward'] = noop + private goCallback: History['go'] = noop + private pushStateCallback: History['pushState'] = noop + private replaceStateCallback: History['replaceState'] = noop + + constructor(data: any, title: string, url?: string | null) { + this.items = [{ data, title, url }] + this.index = 0 + } + + public scrollRestoration: ScrollRestoration = 'auto' + + public get length() { + return this.items.length + } + + public get state() { + return this.items[this.index].data + } + + private updateLocation() { + if (this.location && this.items[this.index].url != null) { + this.location._set(this.items[this.index].url as string) + } + } + + public back() { + this.backCallback() + if (this.index > 0) { + this.index -= 1 + this.updateLocation() + } + } + + public forward() { + this.forwardCallback() + if (this.index < this.items.length - 1) { + this.index += 1 + this.updateLocation() + } + } + + public go(delta?: number) { + this.goCallback(delta) + const idx = this.index + (delta || 0) + if (idx >= 0 && idx <= this.items.length - 1) { + this.index = idx + this.updateLocation() + } + } + + public pushState(data: any, title: string, url?: string | null) { + this.pushStateCallback(data, title, url) + this.items.push({ data, title, url }) + this.index = this.items.length - 1 + this.updateLocation() + } + + public replaceState(data: any, title: string, url?: string | null) { + this.replaceStateCallback(data, title, url) + this.items[this.items.length - 1] = { data, title, url } + this.index = this.items.length - 1 + this.updateLocation() + } + + public _callbacks({ + back, + forward, + go, + pushState, + replaceState, + }: Partial) { + this.backCallback = back || noop + this.forwardCallback = forward || noop + this.goCallback = go || noop + this.pushStateCallback = pushState || noop + this.replaceStateCallback = replaceState || noop + } + + public _location(l: Location & { _set: (url: string) => void }) { + this.location = l + } + + public _push(url: string) { + this.items.push({ data: null, title: '', url }) + this.index = this.items.length - 1 + } + + public _replace(url: string) { + this.items[this.items.length - 1] = { data: null, title: '', url } + this.index = this.items.length - 1 + } +} + export function createHistoryMock( data: any, title: string, url?: string | null ): History { - const history = Object.create(null) - let location: Location & { _set: (url: string) => void } - - const items: HistoryItem[] = [{ data, title, url }] - let index = 0 - - const noop: any = () => undefined - let backCallback: History['back'] = noop - let forwardCallback: History['forward'] = noop - let goCallback: History['go'] = noop - let pushStateCallback: History['pushState'] = noop - let replaceStateCallback: History['replaceState'] = noop - - Object.defineProperty(history, 'length', { - get() { - return items.length - }, - }) - - Object.defineProperty(history, 'state', { - get() { - return items[index].data - }, - }) - - Object.defineProperty(history, 'back', { - value() { - backCallback() - if (index > 0) { - index -= 1 - if (location && items[index].url != null) { - location._set(items[index].url as string) - } - } - }, - }) - - Object.defineProperty(history, 'forward', { - value() { - forwardCallback() - if (index < items.length - 1) { - index += 1 - if (location && items[index].url != null) { - location._set(items[index].url as string) - } - } - }, - }) - - Object.defineProperty(history, 'go', { - value(delta?: number) { - goCallback(delta) - const idx = index + (delta || 0) - if (idx >= 0 && idx <= items.length - 1) { - index = idx - if (location && items[index].url != null) { - location._set(items[index].url as string) - } - } - }, - }) - - Object.defineProperty(history, 'pushState', { - value(data: any, title: string, url?: string | null) { - pushStateCallback(data, title, url) - items.push({ data, title, url }) - index = items.length - 1 - if (location && items[index].url != null) { - location._set(items[index].url as string) - } - }, - }) - - Object.defineProperty(history, 'replaceState', { - value(data: any, title: string, url?: string | null) { - replaceStateCallback(data, title, url) - items[items.length - 1] = { data, title, url } - index = items.length - 1 - if (location && items[index].url != null) { - location._set(items[index].url as string) - } - }, - }) - - Object.defineProperty(history, '_callbacks', { - value({ back, forward, go, pushState, replaceState }: Partial) { - backCallback = back || noop - forwardCallback = forward || noop - goCallback = go || noop - pushStateCallback = pushState || noop - replaceStateCallback = replaceState || noop - }, - }) - - Object.defineProperty(history, '_location', { - value(l: Location & { _set: (url: string) => void }) { - location = l - }, - }) - - Object.defineProperty(history, '_push', { - value(url: string) { - items.push({ data: null, title: '', url }) - index = items.length - 1 - }, - }) - - Object.defineProperty(history, '_replace', { - value(url: string) { - items[items.length - 1] = { data: null, title: '', url } - index = items.length - 1 - }, - }) - - return history + return new HistoryMock(data, title, url) } diff --git a/tests/mocks/location.mock.ts b/tests/mocks/location.mock.ts index 4c20f24..8d3f3a0 100644 --- a/tests/mocks/location.mock.ts +++ b/tests/mocks/location.mock.ts @@ -1,65 +1,57 @@ -export function createLocationMock(url: string): Location { - const location = Object.create(new URL(url)) - let history: History & { +const noop: any = () => undefined + +export class LocationMock extends URL implements Location { + private history?: History & { _push: (url: string) => void _replace: (url: string) => void } - const noop: any = () => undefined - let assignCallback: Location['assign'] = noop - let reloadCallback: Location['reload'] = noop - let replaceCallback: Location['replace'] = noop + private assignCallback: Location['assign'] = noop + private reloadCallback: Location['reload'] = noop + private replaceCallback: Location['replace'] = noop - Object.defineProperty(location, 'assign', { - value(url: string) { - assignCallback(url) - if (history) { - history._push(url) - } - Object.setPrototypeOf(location, new URL(location.origin + url)) - }, - }) + public ancestorOrigins = [] as any as DOMStringList - Object.defineProperty(location, 'reload', { - value() { - reloadCallback() - }, - }) + public assign(url: string) { + this.assignCallback(url) + if (this.history) { + this.history._push(url) + } + this.href = this.origin + url + } - Object.defineProperty(location, 'replace', { - value(url: string) { - replaceCallback(url) - if (history) { - history._replace(url) - } - Object.setPrototypeOf(location, new URL(location.origin + url)) - }, - }) + public reload() { + this.reloadCallback() + } - Object.defineProperty(location, '_callbacks', { - value({ assign, reload, replace }: Partial) { - assignCallback = assign || noop - reloadCallback = reload || noop - replaceCallback = replace || noop - }, - }) + public replace(url: string) { + this.replaceCallback(url) + if (this.history) { + this.history._replace(url) + } + this.href = this.origin + url + } - Object.defineProperty(location, '_history', { - value( - h: History & { - _push: (url: string) => void - _replace: (url: string) => void - } - ) { - history = h - }, - }) + public _callbacks({ assign, reload, replace }: Partial) { + this.assignCallback = assign || noop + this.reloadCallback = reload || noop + this.replaceCallback = replace || noop + } - Object.defineProperty(location, '_set', { - value(url: string) { - Object.setPrototypeOf(location, new URL(location.origin + url)) - }, - }) + public _history( + h: History & { + _push: (url: string) => void + _replace: (url: string) => void + } + ) { + this.history = h + } - return location + public _set(url: string) { + this.href = this.origin + url + } +} + +export function createLocationMock(url: string): Location { + return new LocationMock(url) } diff --git a/tests/mocks/storage.mock.ts b/tests/mocks/storage.mock.ts index 4ec3f4b..8c076f5 100644 --- a/tests/mocks/storage.mock.ts +++ b/tests/mocks/storage.mock.ts @@ -1,79 +1,77 @@ -const has = (object: any, key: string) => - Object.prototype.hasOwnProperty.call(object, key) +const noop: any = () => undefined -export function createStorageMock(): Storage { - const storage = Object.create(null) +export class StorageMock implements Storage { + private storage = new Map() - const noop: any = () => undefined - let getCallback: (key: string) => string | null = noop - let setCallback: (key: string, value: string) => void = noop - let removeCallback: (key: string) => void = noop - let clearCallback: () => void = noop + private getCallback: (key: string) => string | null = noop + private setCallback: (key: string, value: string) => void = noop + private removeCallback: (key: string) => void = noop + private clearCallback: () => void = noop - Object.defineProperty(storage, 'setItem', { - value(key: string, value: string) { - setCallback(key, value) - key = String(key) - value = String(value) - storage[key] = value - }, - }) + constructor() { + return new Proxy(this, { + get(target, property, receiver) { + if (property in target) { + return Reflect.get(target, property, receiver) + } + return target.storage.get(String(property)) + }, + set(target, property, value, receiver) { + if (property in target) { + return Reflect.set(target, property, value, receiver) + } + target.storage.set(String(property), String(value)) + return true + }, + }) + } - Object.defineProperty(storage, 'getItem', { - value(key: string) { - getCallback(key) - key = String(key) - return has(storage, key) ? storage[key] : null - }, - }) + public setItem(key: string, value: string) { + key = String(key) + value = String(value) + this.setCallback(key, value) + this.storage.set(key, value) + } - Object.defineProperty(storage, 'removeItem', { - value(key: string) { - removeCallback(key) - key = String(key) - if (has(storage, key)) { - delete storage[key] - } - }, - }) + public getItem(key: string) { + key = String(key) + this.getCallback(key) + return this.storage.has(key) ? this.storage.get(key) ?? null : null + } - Object.defineProperty(storage, 'clear', { - value() { - clearCallback() - for (const key in storage) { - if (has(storage, key)) { - delete storage[key] - } - } - }, - }) + public removeItem(key: string) { + key = String(key) + this.removeCallback(key) + this.storage.delete(key) + } - Object.defineProperty(storage, 'length', { - get() { - return Object.keys(storage).length - }, - }) + public clear() { + this.clearCallback() + this.storage.clear() + } - Object.defineProperty(storage, 'key', { - value(n: number) { - const key = Object.keys(storage)[n] - return key === undefined ? null : key - }, - }) + public get length() { + return this.storage.size + } - Object.defineProperty(storage, '_callbacks', { - value( - get: typeof getCallback | null, - set: typeof setCallback | null, - remove: typeof removeCallback | null, - clear: typeof clearCallback | null - ) { - getCallback = get === null ? noop : get - setCallback = set === null ? noop : set - removeCallback = remove === null ? noop : remove - clearCallback = clear === null ? noop : clear - }, - }) + public key(n: number) { + const key = Array.from(this.storage.keys())[n] + return key === undefined ? null : key + } - return storage + public _callbacks( + get: typeof StorageMock.prototype.getCallback | null, + set: typeof StorageMock.prototype.setCallback | null, + remove: typeof StorageMock.prototype.removeCallback | null, + clear: typeof StorageMock.prototype.clearCallback | null + ) { + this.getCallback = get === null ? noop : get + this.setCallback = set === null ? noop : set + this.removeCallback = remove === null ? noop : remove + this.clearCallback = clear === null ? noop : clear + } +} + +export function createStorageMock(): Storage { + return new StorageMock() } diff --git a/tests/rewiremock.ts b/tests/rewiremock.ts index acf22f0..c30eba0 100644 --- a/tests/rewiremock.ts +++ b/tests/rewiremock.ts @@ -2,7 +2,7 @@ import rewiremock from 'rewiremock' /* eslint-disable camelcase */ import * as effector_22_0_0 from 'effector-22-0-0' -import * as effector_22_7_0 from 'effector-22-7-0' +import * as effector_22_8_1 from 'effector-22-8-1' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @@ -11,7 +11,7 @@ const effectorVersion: string = process.env.EFFECTOR_VERSION || '22.0.0' rewiremock('effector').with( { '22.0.0': effector_22_0_0, - '22.7.0': effector_22_7_0, + '22.8.1': effector_22_8_1, }[effectorVersion] )