diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 803f2b14d..1db9a11c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,16 +5,16 @@ name: CI on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 18.x ] + node-version: [18.x] steps: - uses: actions/checkout@v2 @@ -28,7 +28,7 @@ jobs: - run: npm run build - run: npm run build:examples - run: docker-compose -f docker/docker-compose-ci.yml up --build -d - - run: npm run test + - run: npm run test:ci - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 diff --git a/config/karma.conf.js b/config/karma.conf.js deleted file mode 100644 index 5bc0c4606..000000000 --- a/config/karma.conf.js +++ /dev/null @@ -1,77 +0,0 @@ -// Karma configuration -// Generated on Sun Dec 01 2019 19:51:02 GMT+0900 - -const path = require('path'); -const webpackConfig = require('./webpack.karma.config'); - -module.exports = function (config) { - config.set({ - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '.', - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha'], - - client: { - mocha: { - timeout: 6000, - }, - testRPCAddr: config.testRPCAddr, - }, - - // list of files / patterns to load in the browser - files: ['../test/**/*.ts'], - - // list of files / patterns to exclude - exclude: ['**/*.swp', '../test/bench/**.ts'], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - '../test/**/*.ts': ['webpack'], - '../test/**/*.js': ['webpack'], - }, - - webpack: webpackConfig, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress', 'coverage-istanbul'], - - coverageIstanbulReporter: { - reports: ['html', 'text-summary', 'lcovonly'], - dir: path.join(__dirname, '../coverage'), - fixWebpackSourcePaths: true, - 'report-config': { - html: { outdir: 'html' }, - }, - }, - - // web server port - port: 9876, - - // enable / disable colors in the output (reporters and logs) - colors: true, - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['ChromeHeadless'], - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity, - }); -}; diff --git a/config/webpack.karma.config.js b/config/webpack.karma.config.js deleted file mode 100644 index d49f716de..000000000 --- a/config/webpack.karma.config.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 The Yorkie Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const config = require('./webpack.dev.config')({}, {}); - -// Do not include entry - karma-webpack does not support it -delete config.entry; - -// Show only errors while using karma -config.stats = 'errors-only'; - -module.exports = config; diff --git a/package-lock.json b/package-lock.json index 6758464b7..1336740f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,6 @@ "examples/*" ], "dependencies": { - "@types/google-protobuf": "^3.15.5", - "@types/long": "^4.0.1", "google-protobuf": "^3.19.4", "grpc-web": "^1.3.1", "long": "^5.2.0" @@ -22,15 +20,16 @@ "@microsoft/api-documenter": "^7.15.1", "@microsoft/api-extractor": "^7.19.4", "@types/benchmark": "^2.1.1", - "@types/chai": "^4.2.14", - "@types/mocha": "^8.0.4", - "@types/sinon": "^9.0.8", + "@types/google-protobuf": "^3.15.5", + "@types/jsdom": "^21.1.3", + "@types/long": "^4.0.1", "@types/yargs": "^17.0.0", "@typescript-eslint/eslint-plugin": "^5.30.6", "@typescript-eslint/parser": "^5.30.6", + "@vitest/coverage-istanbul": "^0.34.5", + "@vitest/coverage-v8": "^0.34.5", "@webpack-cli/serve": "^1.6.0", "benchmark": "^2.1.4", - "chai": "^4.2.0", "copy-webpack-plugin": "^11.0.0", "eslint": "^8.19.0", "eslint-plugin-jsdoc": "^39.3.3", @@ -38,22 +37,18 @@ "eslint-plugin-tsdoc": "^0.2.16", "husky": "^8.0.3", "istanbul-instrumenter-loader": "^2.0.0", - "karma": "^6.3.5", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-mocha": "^2.0.1", - "karma-source-map-support": "^1.4.0", - "karma-sourcemap-loader": "^0.3.8", - "karma-webpack": "^5.0.0", - "mocha": "^9.2.0", + "jsdom": "^22.1.0", "node-polyfill-webpack-plugin": "^1.1.4", "prettier": "^2.7.1", - "sinon": "^9.2.1", "ts-loader": "^9.3.1", "ts-node": "^10.9.1", "ts-patch": "^2.0.1", "typescript": "^4.7.4", "typescript-transform-paths": "^3.3.1", + "vite": "^4.4.9", + "vite-tsconfig-paths": "^4.2.1", + "vitest": "^0.34.5", + "vitest-environment-custom-jsdom": "file:test/vitest/env", "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.7.0", "webpack-cli": "^4.10.0", @@ -83,9 +78,8 @@ }, "examples/nextjs-scheduler/node_modules/@types/react": { "version": "18.0.24", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.24.tgz", - "integrity": "sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -94,18 +88,16 @@ }, "examples/nextjs-scheduler/node_modules/@types/react-dom": { "version": "18.0.8", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.8.tgz", - "integrity": "sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw==", "dev": true, + "license": "MIT", "dependencies": { "@types/react": "*" } }, "examples/nextjs-scheduler/node_modules/typescript": { "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -123,6 +115,55 @@ "vite": "^3.2.7" } }, + "examples/profile-stack/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", + "dev": true, + "dependencies": { + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, "examples/react-tldraw": { "version": "0.1.0", "dependencies": { @@ -145,6 +186,55 @@ "vite": "^3.2.7" } }, + "examples/react-tldraw/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", + "dev": true, + "dependencies": { + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, "examples/react-todomvc": { "version": "0.0.0", "dependencies": { @@ -162,6 +252,55 @@ "vite": "^3.2.7" } }, + "examples/react-todomvc/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", + "dev": true, + "dependencies": { + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, "examples/simultaneous-cursors": { "version": "0.0.0", "dependencies": { @@ -193,65 +332,33 @@ "vite": "^4.2.0" } }, - "examples/simultaneous-cursors/node_modules/esbuild": { - "version": "0.18.20", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "examples/simultaneous-cursors/node_modules/rollup": { - "version": "3.28.1", - "dev": true, - "license": "MIT", - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" + "examples/vanilla-codemirror6": { + "version": "0.0.0", + "dependencies": { + "@codemirror/commands": "^6.1.2", + "@codemirror/highlight": "^0.19.8", + "@codemirror/lang-markdown": "^6.0.2", + "@codemirror/language-data": "^6.1.0", + "@codemirror/state": "^6.1.2", + "@codemirror/view": "^6.3.1", + "codemirror": "^6.0.1", + "yorkie-js-sdk": "^0.4.6" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "devDependencies": { + "typescript": "^4.6.4", + "vite": "^3.2.7" } }, - "examples/simultaneous-cursors/node_modules/vite": { - "version": "4.4.9", + "examples/vanilla-codemirror6/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", "dev": true, - "license": "MIT", "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" }, "bin": { "vite": "bin/vite.js" @@ -259,16 +366,12 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", - "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -281,9 +384,6 @@ "less": { "optional": true }, - "lightningcss": { - "optional": true - }, "sass": { "optional": true }, @@ -298,23 +398,6 @@ } } }, - "examples/vanilla-codemirror6": { - "version": "0.0.0", - "dependencies": { - "@codemirror/commands": "^6.1.2", - "@codemirror/highlight": "^0.19.8", - "@codemirror/lang-markdown": "^6.0.2", - "@codemirror/language-data": "^6.1.0", - "@codemirror/state": "^6.1.2", - "@codemirror/view": "^6.3.1", - "codemirror": "^6.0.1", - "yorkie-js-sdk": "^0.4.6" - }, - "devDependencies": { - "typescript": "^4.6.4", - "vite": "^3.2.7" - } - }, "examples/vanilla-quill": { "version": "0.0.0", "dependencies": { @@ -344,36 +427,123 @@ "node": ">= 12.0.0" } }, - "examples/vuejs-kanban": { - "version": "0.0.0", - "dependencies": { - "vue": "^3.2.41", - "yorkie-js-sdk": "^0.4.6" - }, - "devDependencies": { - "@vitejs/plugin-vue": "^3.1.2", - "vite": "^3.2.7" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", + "examples/vanilla-quill/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "examples/vuejs-kanban": { + "version": "0.0.0", + "dependencies": { + "vue": "^3.2.41", + "yorkie-js-sdk": "^0.4.6" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^3.1.2", + "vite": "^3.2.7" } }, - "node_modules/@ampproject/remapping/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", + "examples/vuejs-kanban/node_modules/vite": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", + "integrity": "sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "esbuild": "^0.15.9", + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -839,6 +1009,12 @@ "node": ">=4" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@codemirror/autocomplete": { "version": "6.3.4", "license": "MIT", @@ -1180,103 +1356,440 @@ "node": "^14 || ^16 || ^17 || ^18" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild/android-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", + "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "android" ], "engines": { "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.0", + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Python-2.0" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@floating-ui/core": { - "version": "0.7.3", - "license": "MIT" - }, - "node_modules/@floating-ui/dom": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^0.7.3" + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@floating-ui/react-dom": { - "version": "0.7.2", - "license": "MIT", - "dependencies": { - "@floating-ui/dom": "^0.5.3", - "use-isomorphic-layout-effect": "^1.1.1" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@formatjs/ecma402-abstract": { - "version": "1.14.3", - "license": "MIT", - "dependencies": { - "@formatjs/intl-localematcher": "0.2.32", - "tslib": "^2.4.0" + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@formatjs/ecma402-abstract/node_modules/tslib": { - "version": "2.4.1", - "license": "0BSD" - }, - "node_modules/@formatjs/fast-memoize": { - "version": "1.2.7", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@formatjs/fast-memoize/node_modules/tslib": { - "version": "2.4.1", - "license": "0BSD" - }, - "node_modules/@formatjs/icu-messageformat-parser": { + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", + "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@floating-ui/core": { + "version": "0.7.3", + "license": "MIT" + }, + "node_modules/@floating-ui/dom": { + "version": "0.5.4", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^0.7.3" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "0.7.2", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^0.5.3", + "use-isomorphic-layout-effect": "^1.1.1" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "1.14.3", + "license": "MIT", + "dependencies": { + "@formatjs/intl-localematcher": "0.2.32", + "tslib": "^2.4.0" + } + }, + "node_modules/@formatjs/ecma402-abstract/node_modules/tslib": { + "version": "2.4.1", + "license": "0BSD" + }, + "node_modules/@formatjs/fast-memoize": { + "version": "1.2.7", + "license": "MIT", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@formatjs/fast-memoize/node_modules/tslib": { + "version": "2.4.1", + "license": "0BSD" + }, + "node_modules/@formatjs/icu-messageformat-parser": { "version": "2.1.14", "license": "MIT", "dependencies": { @@ -1381,6 +1894,27 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "dev": true, @@ -2618,41 +3152,11 @@ "string-argv": "~0.3.1" } }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "6.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "5.3.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" - }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "dev": true, - "license": "MIT" + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true }, "node_modules/@stitches/react": { "version": "1.2.8", @@ -2732,6 +3236,15 @@ "version": "1.8.0", "license": "MIT" }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "dev": true, @@ -2780,9 +3293,19 @@ } }, "node_modules/@types/chai": { - "version": "4.2.19", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-/k+vesl92vMvMygmQrFe9Aimxi6oQXFUX9mA5HanTrKUSAMoLauSi6PNFOdRw0oeqilaW600GNx2vSaT2f8aIQ==", + "dev": true + }, + "node_modules/@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", "dev": true, - "license": "MIT" + "dependencies": { + "@types/chai": "*" + } }, "node_modules/@types/color-hash": { "version": "1.0.2", @@ -2806,19 +3329,6 @@ "@types/node": "*" } }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/cors": { - "version": "2.8.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/eslint": { "version": "8.44.0", "dev": true, @@ -2883,6 +3393,23 @@ "@types/node": "*" } }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/jsdom": { + "version": "21.1.3", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.3.tgz", + "integrity": "sha512-1zzqSP+iHJYV4lB3lZhNBa012pubABkj9yG/GuXuf6LZH1cSPIJBqFDrm5JX65HHt6VOnNYdTui/0ySerRbMgA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.9", "dev": true, @@ -2894,8 +3421,7 @@ }, "node_modules/@types/lodash.memoize": { "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/lodash.memoize/-/lodash.memoize-4.1.7.tgz", - "integrity": "sha512-lGN7WeO4vO6sICVpf041Q7BX/9k1Y24Zo3FY0aUezr1QlKznpjzsDk3T3wvH8ofYzoK0QupN9TWcFAFZlyPwQQ==", + "license": "MIT", "dependencies": { "@types/lodash": "*" } @@ -2909,16 +3435,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/mocha": { - "version": "8.2.2", - "dev": true, - "license": "MIT" - }, "node_modules/@types/node": { "version": "20.4.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz", - "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/prop-types": { "version": "15.7.5", @@ -2990,19 +3510,6 @@ "@types/node": "*" } }, - "node_modules/@types/sinon": { - "version": "9.0.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "6.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/@types/sockjs": { "version": "0.3.33", "dev": true, @@ -3011,6 +3518,12 @@ "@types/node": "*" } }, + "node_modules/@types/tough-cookie": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.3.tgz", + "integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==", + "dev": true + }, "node_modules/@types/ws": { "version": "8.2.2", "dev": true, @@ -3272,11 +3785,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "dev": true, - "license": "ISC" - }, "node_modules/@use-gesture/core": { "version": "10.2.23", "license": "MIT" @@ -3323,6 +3831,245 @@ "vue": "^3.2.25" } }, + "node_modules/@vitest/coverage-istanbul": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-0.34.6.tgz", + "integrity": "sha512-5KaBNZPDSk2ybavC3rZ1pWGniw7sJ5usuwVGRUYzJwiBfWvnLpuUer7bjw7qUCRGdKJXrBgb/Dsgif9rkwMX/A==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.1.5", + "picocolors": "^1.0.0", + "test-exclude": "^6.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": ">=0.32.0 <1" + } + }, + "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-instrument": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", + "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitest/coverage-v8": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-0.34.6.tgz", + "integrity": "sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@bcoe/v8-coverage": "^0.2.3", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.1.5", + "magic-string": "^0.30.1", + "picocolors": "^1.0.0", + "std-env": "^3.3.3", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": ">=0.32.0 <1" + } + }, + "node_modules/@vitest/coverage-v8/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@vitest/coverage-v8/node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vitest/coverage-v8/node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitest/coverage-v8/node_modules/magic-string": { + "version": "0.30.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", + "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vitest/expect": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", + "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", + "dev": true, + "dependencies": { + "@vitest/spy": "0.34.6", + "@vitest/utils": "0.34.6", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", + "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", + "dev": true, + "dependencies": { + "@vitest/utils": "0.34.6", + "p-limit": "^4.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", + "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.1", + "pathe": "^1.1.1", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@vitest/snapshot/node_modules/magic-string": { + "version": "0.30.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", + "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vitest/spy": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", + "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", + "dev": true, + "dependencies": { + "tinyspy": "^2.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", + "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.4.3", + "loupe": "^2.3.6", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/@vue/compiler-core": { "version": "3.2.45", "license": "MIT", @@ -3599,8 +4346,7 @@ }, "node_modules/@wojtekmaj/date-utils": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@wojtekmaj/date-utils/-/date-utils-1.5.0.tgz", - "integrity": "sha512-0mq88lCND6QiffnSDWp+TbOxzJSwy2V/3XN+HwWZ7S2n19QAgR5dy5hRVhlECXvQIq2r+VcblBu+S9V+yMcxXw==", + "license": "MIT", "funding": { "url": "https://github.com/wojtekmaj/date-utils?sponsor=1" } @@ -3615,6 +4361,12 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "dev": true, @@ -3662,6 +4414,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "dev": true, @@ -3733,14 +4497,6 @@ "ajv": "^6.9.1" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-html-community": { "version": "0.0.8", "dev": true, @@ -3875,6 +4631,12 @@ "lodash": "^4.17.14" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/available-typed-arrays": { "version": "1.0.5", "dev": true, @@ -3888,9 +4650,8 @@ }, "node_modules/babel-code-frame": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^1.1.3", "esutils": "^2.0.2", @@ -3899,27 +4660,24 @@ }, "node_modules/babel-code-frame/node_modules/ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/babel-code-frame/node_modules/ansi-styles": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/babel-code-frame/node_modules/chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -3933,24 +4691,21 @@ }, "node_modules/babel-code-frame/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/babel-code-frame/node_modules/js-tokens": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/babel-code-frame/node_modules/strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -3960,18 +4715,16 @@ }, "node_modules/babel-code-frame/node_modules/supports-color": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/babel-generator": { "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, + "license": "MIT", "dependencies": { "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", @@ -3985,36 +4738,32 @@ }, "node_modules/babel-generator/node_modules/jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" } }, "node_modules/babel-generator/node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/babel-messages": { "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", "dev": true, + "license": "MIT", "dependencies": { "babel-runtime": "^6.22.0" } }, "node_modules/babel-runtime": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", "dev": true, + "license": "MIT", "dependencies": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -4022,9 +4771,8 @@ }, "node_modules/babel-template": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", "dev": true, + "license": "MIT", "dependencies": { "babel-runtime": "^6.26.0", "babel-traverse": "^6.26.0", @@ -4035,9 +4783,8 @@ }, "node_modules/babel-traverse": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", "dev": true, + "license": "MIT", "dependencies": { "babel-code-frame": "^6.26.0", "babel-messages": "^6.23.0", @@ -4052,33 +4799,29 @@ }, "node_modules/babel-traverse/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/babel-traverse/node_modules/globals": { "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/babel-traverse/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/babel-types": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", "dev": true, + "license": "MIT", "dependencies": { "babel-runtime": "^6.26.0", "esutils": "^2.0.2", @@ -4088,9 +4831,8 @@ }, "node_modules/babylon": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true, + "license": "MIT", "bin": { "babylon": "bin/babylon.js" } @@ -4119,16 +4861,8 @@ ], "license": "MIT" }, - "node_modules/base64id": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^4.5.0 || >= 5.9" - } - }, - "node_modules/batch": { - "version": "0.6.1", + "node_modules/batch": { + "version": "0.6.1", "dev": true, "license": "MIT" }, @@ -4251,11 +4985,6 @@ "version": "0.31.2", "license": "Apache-2.0" }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, "node_modules/browserify-aes": { "version": "1.2.0", "dev": true, @@ -4431,8 +5160,6 @@ }, "node_modules/busboy": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dependencies": { "streamsearch": "^1.1.0" }, @@ -4448,6 +5175,15 @@ "node": ">= 0.8" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "license": "MIT", @@ -4486,16 +5222,18 @@ "license": "CC-BY-4.0" }, "node_modules/chai": { - "version": "4.3.4", + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", "dev": true, - "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -4566,9 +5304,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, - "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -4630,8 +5372,7 @@ }, "node_modules/client-only": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" + "license": "MIT" }, "node_modules/cliui": { "version": "7.0.4", @@ -4665,8 +5406,7 @@ }, "node_modules/clsx": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -4714,6 +5454,18 @@ "node": ">=0.1.90" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "2.20.3", "dev": true, @@ -4781,20 +5533,6 @@ "dev": true, "license": "MIT" }, - "node_modules/connect": { - "version": "3.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/connect-history-api-fallback": { "version": "1.6.0", "dev": true, @@ -4803,19 +5541,6 @@ "node": ">=0.8" } }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/connect/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/console-browserify": { "version": "1.2.0", "dev": true @@ -4871,14 +5596,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/cookie": { - "version": "0.4.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/cookie-signature": { "version": "1.0.6", "dev": true, @@ -4949,29 +5666,15 @@ }, "node_modules/core-js": { "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", "dev": true, - "hasInstallScript": true + "hasInstallScript": true, + "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.2", "dev": true, "license": "MIT" }, - "node_modules/cors": { - "version": "2.8.5", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/create-ecdh": { "version": "4.0.4", "dev": true, @@ -5054,21 +5757,42 @@ "node": "*" } }, - "node_modules/csstype": { - "version": "3.1.1", - "license": "MIT" + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "optional": true, + "peer": true }, - "node_modules/custom-event": { - "version": "1.0.1", + "node_modules/cssstyle": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", "dev": true, + "dependencies": { + "rrweb-cssom": "^0.6.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/csstype": { + "version": "3.1.1", "license": "MIT" }, - "node_modules/date-format": { - "version": "4.0.3", + "node_modules/data-urls": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", "dev": true, - "license": "MIT", + "dependencies": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.0" + }, "engines": { - "node": ">=4.0" + "node": ">=14" } }, "node_modules/debug": { @@ -5087,15 +5811,22 @@ } } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, "node_modules/deep-eql": { - "version": "3.0.1", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, - "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-equal": { @@ -5168,6 +5899,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/depd": { "version": "1.1.2", "dev": true, @@ -5196,9 +5936,8 @@ }, "node_modules/detect-indent": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", "dev": true, + "license": "MIT", "dependencies": { "repeating": "^2.0.0" }, @@ -5215,17 +5954,13 @@ "version": "1.1.0", "license": "MIT" }, - "node_modules/di": { - "version": "0.0.1", + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT" - }, - "node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", "engines": { - "node": ">=0.3.1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/diffie-hellman": { @@ -5287,17 +6022,6 @@ "node": ">=6.0.0" } }, - "node_modules/dom-serialize": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, "node_modules/domain-browser": { "version": "4.22.0", "dev": true, @@ -5309,6 +6033,18 @@ "url": "https://bevry.me/fund" } }, + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "dev": true, + "dependencies": { + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/duplexer": { "version": "0.1.2", "dev": true, @@ -5353,170 +6089,455 @@ "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.10.0", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-abstract": { + "version": "1.19.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-module-lexer": { + "version": "1.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz", + "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.15.18", + "@esbuild/linux-loong64": "0.15.18", + "esbuild-android-64": "0.15.18", + "esbuild-android-arm64": "0.15.18", + "esbuild-darwin-64": "0.15.18", + "esbuild-darwin-arm64": "0.15.18", + "esbuild-freebsd-64": "0.15.18", + "esbuild-freebsd-arm64": "0.15.18", + "esbuild-linux-32": "0.15.18", + "esbuild-linux-64": "0.15.18", + "esbuild-linux-arm": "0.15.18", + "esbuild-linux-arm64": "0.15.18", + "esbuild-linux-mips64le": "0.15.18", + "esbuild-linux-ppc64le": "0.15.18", + "esbuild-linux-riscv64": "0.15.18", + "esbuild-linux-s390x": "0.15.18", + "esbuild-netbsd-64": "0.15.18", + "esbuild-openbsd-64": "0.15.18", + "esbuild-sunos-64": "0.15.18", + "esbuild-windows-32": "0.15.18", + "esbuild-windows-64": "0.15.18", + "esbuild-windows-arm64": "0.15.18" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", + "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", + "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", + "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", + "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", + "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", + "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", + "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", + "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", + "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", + "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", + "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", + "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/engine.io": { - "version": "6.5.2", + "node_modules/esbuild-linux-riscv64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", + "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@types/cookie": "^0.4.1", - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.11.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.2.0" + "node": ">=12" } }, - "node_modules/engine.io-parser": { - "version": "5.2.1", + "node_modules/esbuild-linux-s390x": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", + "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.0.0" + "node": ">=12" } }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", + "node_modules/esbuild-netbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", + "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=10.13.0" + "node": ">=12" } }, - "node_modules/ent": { - "version": "2.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/envinfo": { - "version": "7.10.0", + "node_modules/esbuild-openbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", + "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "bin": { - "envinfo": "dist/cli.js" - }, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/es-abstract": { - "version": "1.19.1", + "node_modules/esbuild-sunos-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", + "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/es-module-lexer": { - "version": "1.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", + "node_modules/esbuild-windows-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", + "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/es6-object-assign": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { + "node_modules/esbuild-windows-64": { "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", + "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", + "cpu": [ + "x64" + ], "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.15.18", - "@esbuild/linux-loong64": "0.15.18", - "esbuild-android-64": "0.15.18", - "esbuild-android-arm64": "0.15.18", - "esbuild-darwin-64": "0.15.18", - "esbuild-darwin-arm64": "0.15.18", - "esbuild-freebsd-64": "0.15.18", - "esbuild-freebsd-arm64": "0.15.18", - "esbuild-linux-32": "0.15.18", - "esbuild-linux-64": "0.15.18", - "esbuild-linux-arm": "0.15.18", - "esbuild-linux-arm64": "0.15.18", - "esbuild-linux-mips64le": "0.15.18", - "esbuild-linux-ppc64le": "0.15.18", - "esbuild-linux-riscv64": "0.15.18", - "esbuild-linux-s390x": "0.15.18", - "esbuild-netbsd-64": "0.15.18", - "esbuild-openbsd-64": "0.15.18", - "esbuild-sunos-64": "0.15.18", - "esbuild-windows-32": "0.15.18", - "esbuild-windows-64": "0.15.18", - "esbuild-windows-arm64": "0.15.18" } }, - "node_modules/esbuild-darwin-arm64": { + "node_modules/esbuild-windows-arm64": { "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", + "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ], "engines": { "node": ">=12" @@ -6144,59 +7165,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "dev": true, @@ -6238,6 +7206,20 @@ "dev": true, "license": "MIT" }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "dev": true, @@ -6315,9 +7297,10 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -6369,8 +7352,7 @@ }, "node_modules/get-user-locale": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/get-user-locale/-/get-user-locale-2.3.0.tgz", - "integrity": "sha512-I3rQvAUwu2nauRD9YyQBSXVFJZixNouwA+eZld51Sn4Pn0N1qFbgcgOi/nPigJPQlNY519mT95fiSPRgflQiTA==", + "license": "MIT", "dependencies": { "@types/lodash.memoize": "^4.1.7", "lodash.memoize": "^4.1.1" @@ -6446,6 +7428,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, "node_modules/google-protobuf": { "version": "3.19.4", "license": "BSD-3-Clause" @@ -6454,14 +7442,6 @@ "version": "4.2.11", "license": "ISC" }, - "node_modules/growl": { - "version": "1.10.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.x" - } - }, "node_modules/grpc-web": { "version": "1.3.1", "license": "Apache-2.0" @@ -6485,6 +7465,36 @@ "dev": true, "license": "MIT" }, + "node_modules/happy-dom": { + "version": "12.9.1", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-12.9.1.tgz", + "integrity": "sha512-UvQ3IwKn1G3iiNCdTrhijdLGqf8Vj7d3OpmYcPwlKakjFy83oYbW6TmOKDLMTVLO9whmOC1HIpS09wf/14k7cA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "css.escape": "^1.5.1", + "entities": "^4.5.0", + "iconv-lite": "^0.6.3", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0" + } + }, + "node_modules/happy-dom/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -6497,9 +7507,8 @@ }, "node_modules/has-ansi": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -6509,9 +7518,8 @@ }, "node_modules/has-ansi/node_modules/ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6609,14 +7617,6 @@ "minimalistic-assert": "^1.0.1" } }, - "node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, "node_modules/hmac-drbg": { "version": "1.0.1", "dev": true, @@ -6649,6 +7649,18 @@ "wbuf": "^1.1.0" } }, + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/html-entities": { "version": "2.3.2", "dev": true, @@ -6713,6 +7725,20 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/http-proxy-middleware": { "version": "2.0.1", "dev": true, @@ -6744,6 +7770,19 @@ "dev": true, "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-signals": { "version": "2.1.0", "dev": true, @@ -7108,9 +8147,8 @@ }, "node_modules/is-finite": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" }, @@ -7215,14 +8253,6 @@ "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-object": { "version": "2.0.4", "dev": true, @@ -7234,6 +8264,12 @@ "node": ">=0.10.0" } }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, "node_modules/is-regex": { "version": "1.1.4", "license": "MIT", @@ -7313,17 +8349,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-weakref": { "version": "1.0.1", "dev": true, @@ -7346,17 +8371,6 @@ "node": ">=8" } }, - "node_modules/isbinaryfile": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" - } - }, "node_modules/isexe": { "version": "2.0.0", "dev": true, @@ -7372,9 +8386,8 @@ }, "node_modules/istanbul-instrumenter-loader": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-2.0.0.tgz", - "integrity": "sha512-wgsbyJ2UYvtN39ssCtvNU2FKHTNx2TQVnsw3RVk/WWdRLOHhMeTft+iqnWFOLme14w3mf2hEgSxRWaro900V6A==", "dev": true, + "license": "MIT", "dependencies": { "convert-source-map": "^1.3.0", "istanbul-lib-instrument": "^1.1.3", @@ -7387,15 +8400,13 @@ }, "node_modules/istanbul-lib-coverage": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/istanbul-lib-instrument": { "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "babel-generator": "^6.18.0", "babel-template": "^6.16.0", @@ -7408,24 +8419,24 @@ }, "node_modules/istanbul-lib-instrument/node_modules/semver": { "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/has-flag": { @@ -7455,64 +8466,11 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "3.0.6", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/istanbul-lib-coverage": { - "version": "2.0.5", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/make-dir": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/rimraf": { - "version": "2.7.1", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/istanbul-reports": { - "version": "3.0.2", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -7521,278 +8479,161 @@ "node": ">=8" } }, - "node_modules/jest-worker": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jju": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.13.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/just-extend": { - "version": "4.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/karma": { - "version": "6.3.16", - "dev": true, - "license": "MIT", - "dependencies": { - "body-parser": "^1.19.0", - "braces": "^3.0.2", - "chokidar": "^3.5.1", - "colors": "1.4.0", - "connect": "^3.7.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.1", - "glob": "^7.1.7", - "graceful-fs": "^4.2.6", - "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.8", - "lodash": "^4.17.21", - "log4js": "^6.4.1", - "mime": "^2.5.2", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.5", - "qjobs": "^1.2.0", - "range-parser": "^1.2.1", - "rimraf": "^3.0.2", - "socket.io": "^4.2.0", - "source-map": "^0.6.1", - "tmp": "^0.2.1", - "ua-parser-js": "^0.7.30", - "yargs": "^16.1.1" - }, - "bin": { - "karma": "bin/karma" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/karma-chrome-launcher": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "which": "^1.2.1" - } - }, - "node_modules/karma-chrome-launcher/node_modules/which": { - "version": "1.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/karma-coverage-istanbul-reporter": { - "version": "3.0.3", + "node_modules/jest-worker": { + "version": "27.5.1", "dev": true, "license": "MIT", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^3.0.2", - "minimatch": "^3.0.4" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, - "funding": { - "url": "https://github.com/sponsors/mattlewis92" + "engines": { + "node": ">= 10.13.0" } }, - "node_modules/karma-coverage-istanbul-reporter/node_modules/istanbul-lib-coverage": { - "version": "3.0.0", + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/karma-mocha": { - "version": "2.0.1", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", "dev": true, "license": "MIT", "dependencies": { - "minimist": "^1.2.3" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/karma-source-map-support": { + "node_modules/jju": { "version": "1.4.0", "dev": true, - "license": "MIT", - "dependencies": { - "source-map-support": "^0.5.5" - } + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" }, - "node_modules/karma-sourcemap-loader": { - "version": "0.3.8", + "node_modules/js-yaml": { + "version": "3.13.1", "dev": true, "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.2" + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/karma-webpack": { - "version": "5.0.0", + "node_modules/jsdoc-type-pratt-parser": { + "version": "3.1.0", "dev": true, "license": "MIT", - "dependencies": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "webpack-merge": "^4.1.5" - }, "engines": { - "node": ">= 6" + "node": ">=12.0.0" + } + }, + "node_modules/jsdom": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", + "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "dev": true, + "dependencies": { + "abab": "^2.0.6", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", + "domexception": "^4.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.4", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=16" }, "peerDependencies": { - "webpack": "^5.0.0" + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/karma-webpack/node_modules/webpack-merge": { - "version": "4.2.2", + "node_modules/jsesc": { + "version": "2.5.2", "dev": true, "license": "MIT", - "dependencies": { - "lodash": "^4.17.15" + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" } }, - "node_modules/karma/node_modules/colors": { - "version": "1.4.0", + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } + "license": "MIT" }, - "node_modules/karma/node_modules/y18n": { - "version": "5.0.8", + "node_modules/json-schema-traverse": { + "version": "0.4.1", "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" }, - "node_modules/karma/node_modules/yargs": { - "version": "16.2.0", + "node_modules/json5": { + "version": "2.2.3", "dev": true, "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "bin": { + "json5": "lib/cli.js" }, "engines": { - "node": ">=10" + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, "node_modules/kind-of": { @@ -7825,9 +8666,8 @@ }, "node_modules/loader-utils": { "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha512-tiv66G0SmiOx+pLWMtGEkfSEejxvb6N6uRrQjfWJIT79W9GMpgKeCAmm9aVBKtd4WEgntciI8CsGqjpDoCWJug==", "dev": true, + "license": "MIT", "dependencies": { "big.js": "^3.1.3", "emojis-list": "^2.0.0", @@ -7837,43 +8677,38 @@ }, "node_modules/loader-utils/node_modules/big.js": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/loader-utils/node_modules/emojis-list": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/loader-utils/node_modules/json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" } }, - "node_modules/locate-path": { - "version": "6.0.0", + "node_modules/local-pkg": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", + "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/antfu" } }, "node_modules/lodash": { @@ -7895,44 +8730,13 @@ }, "node_modules/lodash.memoize": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "dev": true, "license": "MIT" }, - "node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log4js": { - "version": "6.4.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "date-format": "^4.0.3", - "debug": "^4.3.3", - "flatted": "^3.2.4", - "rfdc": "^1.3.0", - "streamroller": "^3.0.2" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/long": { "version": "5.2.0", "license": "Apache-2.0" @@ -7947,6 +8751,15 @@ "loose-envify": "cli.js" } }, + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "dev": true, @@ -7970,27 +8783,20 @@ } }, "node_modules/make-dir": { - "version": "3.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/make-error": { "version": "1.3.6", "dev": true, @@ -8080,17 +8886,6 @@ "dev": true, "license": "MIT" }, - "node_modules/mime": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/mime-db": { "version": "1.52.0", "dev": true, @@ -8148,140 +8943,23 @@ "version": "0.5.5", "dev": true, "license": "MIT", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha": { - "version": "9.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "4.2.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/mocha/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "dependencies": { + "minimist": "^1.2.5" }, - "engines": { - "node": ">=10" + "bin": { + "mkdirp": "bin/cmd.js" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", + "node_modules/mlly": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" + "dependencies": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" } }, "node_modules/mrmime": { @@ -8314,17 +8992,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nanoid": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, @@ -8392,18 +9059,6 @@ "resolved": "examples/nextjs-scheduler", "link": true }, - "node_modules/nise": { - "version": "4.1.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, "node_modules/node-forge": { "version": "1.3.0", "dev": true, @@ -8513,6 +9168,12 @@ "node": ">=8" } }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, "node_modules/object-assign": { "version": "4.1.1", "license": "MIT", @@ -8571,17 +9232,6 @@ "dev": true, "license": "MIT" }, - "node_modules/on-finished": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/on-headers": { "version": "1.0.2", "dev": true, @@ -8657,34 +9307,6 @@ "dev": true, "license": "MIT" }, - "node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-map": { "version": "4.0.0", "dev": true, @@ -8751,6 +9373,18 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/parseurl": { "version": "1.3.3", "dev": true, @@ -8793,19 +9427,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/path-type": { "version": "4.0.0", "dev": true, @@ -8814,6 +9435,12 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "dev": true + }, "node_modules/pathval": { "version": "1.1.1", "dev": true, @@ -8856,12 +9483,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" } }, "node_modules/platform": { @@ -8966,6 +9596,38 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/process": { "version": "0.11.10", "dev": true, @@ -8985,8 +9647,7 @@ }, "node_modules/prop-types": { "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -9013,6 +9674,12 @@ "node": ">= 0.10" } }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, "node_modules/public-encrypt": { "version": "4.0.3", "dev": true, @@ -9032,21 +9699,14 @@ "license": "MIT" }, "node_modules/punycode": { - "version": "2.1.1", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/qjobs": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.9" - } - }, "node_modules/qs": { "version": "6.11.0", "dev": true, @@ -9075,6 +9735,12 @@ "node": ">=0.4.x" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "dev": true, @@ -9185,8 +9851,7 @@ }, "node_modules/react-calendar": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/react-calendar/-/react-calendar-4.6.0.tgz", - "integrity": "sha512-GJ6ZipKMQmlK666t+0hgmecu6WHydEnMWJjKdEkUxW6F471hiM5DkbWXkfr8wlAg9tc9feNCBhXw3SqsPOm01A==", + "license": "MIT", "dependencies": { "@wojtekmaj/date-utils": "^1.1.3", "clsx": "^2.0.0", @@ -9411,9 +10076,8 @@ }, "node_modules/regenerator-runtime": { "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regexp.prototype.flags": { "version": "1.3.1", @@ -9442,9 +10106,8 @@ }, "node_modules/repeating": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", "dev": true, + "license": "MIT", "dependencies": { "is-finite": "^1.0.0" }, @@ -9533,11 +10196,6 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.3.0", - "dev": true, - "license": "MIT" - }, "node_modules/rimraf": { "version": "3.0.2", "dev": true, @@ -9563,8 +10221,9 @@ }, "node_modules/rollup": { "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, - "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -9575,6 +10234,12 @@ "fsevents": "~2.3.2" } }, + "node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "dev": true + }, "node_modules/run-parallel": { "version": "1.2.0", "dev": true, @@ -9611,6 +10276,18 @@ "dev": true, "license": "MIT" }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, "node_modules/scheduler": { "version": "0.23.0", "license": "MIT", @@ -9941,6 +10618,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, "node_modules/signal-exit": { "version": "3.0.5", "dev": true, @@ -9950,50 +10633,6 @@ "resolved": "examples/simultaneous-cursors", "link": true }, - "node_modules/sinon": { - "version": "9.2.4", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.0.4", - "supports-color": "^7.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon/node_modules/diff": { - "version": "4.0.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/sinon/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/sinon/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/sirv": { "version": "1.0.19", "dev": true, @@ -10015,43 +10654,6 @@ "node": ">=8" } }, - "node_modules/socket.io": { - "version": "4.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "cors": "~2.8.5", - "debug": "~4.3.2", - "engine.io": "~6.5.2", - "socket.io-adapter": "~2.5.2", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.2.0" - } - }, - "node_modules/socket.io-adapter": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ws": "~8.11.0" - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/sockjs": { "version": "0.3.21", "dev": true, @@ -10076,15 +10678,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.19", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/sourcemap-codec": { "version": "1.4.8", "license": "MIT" @@ -10154,6 +10747,12 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, "node_modules/statuses": { "version": "1.5.0", "dev": true, @@ -10162,6 +10761,12 @@ "node": ">= 0.6" } }, + "node_modules/std-env": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz", + "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==", + "dev": true + }, "node_modules/stream-browserify": { "version": "3.0.0", "dev": true, @@ -10171,92 +10776,45 @@ "readable-stream": "^3.5.0" } }, - "node_modules/stream-browserify/node_modules/readable-stream": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-http": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/streamroller": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "date-format": "^4.0.3", - "debug": "^4.1.1", - "fs-extra": "^10.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/streamroller/node_modules/fs-extra": { - "version": "10.0.0", + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.0", "dev": true, "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=12" + "node": ">= 6" } }, - "node_modules/streamroller/node_modules/jsonfile": { - "version": "6.1.0", + "node_modules/stream-http": { + "version": "3.2.0", "dev": true, "license": "MIT", "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" } }, - "node_modules/streamroller/node_modules/universalify": { - "version": "2.0.0", + "node_modules/stream-http/node_modules/readable-stream": { + "version": "3.6.0", "dev": true, "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, "engines": { - "node": ">= 10.0.0" + "node": ">= 6" } }, "node_modules/streamsearch": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", "engines": { "node": ">=10.0.0" } @@ -10344,14 +10902,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dev": true, + "dependencies": { + "acorn": "^8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/style-mod": { "version": "4.0.0", "license": "MIT" }, "node_modules/styled-jsx": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz", - "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==", + "license": "MIT", "dependencies": { "client-only": "0.0.1" }, @@ -10392,6 +10961,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, "node_modules/tapable": { "version": "2.2.1", "dev": true, @@ -10484,6 +11059,20 @@ "source-map": "^0.6.0" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/text-table": { "version": "0.2.0", "dev": true, @@ -10507,25 +11096,36 @@ }, "node_modules/tiny-warning": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + "license": "MIT" }, - "node_modules/tmp": { - "version": "0.2.1", + "node_modules/tinybench": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", + "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", + "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", + "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", "dev": true, - "license": "MIT", - "dependencies": { - "rimraf": "^3.0.0" - }, "engines": { - "node": ">=8.17.0" + "node": ">=14.0.0" } }, "node_modules/to-fast-properties": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10561,11 +11161,46 @@ "node": ">=6" } }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dev": true, + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/trim-right": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10682,6 +11317,26 @@ "which": "bin/which" } }, + "node_modules/tsconfck": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz", + "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==", + "dev": true, + "bin": { + "tsconfck": "bin/tsconfck.js" + }, + "engines": { + "node": "^14.13.1 || ^16 || >=18" + }, + "peerDependencies": { + "typescript": "^4.3.5 || ^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/tslib": { "version": "1.14.1", "dev": true, @@ -10771,23 +11426,11 @@ "typescript": ">=3.6.5" } }, - "node_modules/ua-parser-js": { - "version": "0.7.33", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - } - ], - "license": "MIT", - "engines": { - "node": "*" - } + "node_modules/ufo": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", + "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==", + "dev": true }, "node_modules/unbox-primitive": { "version": "1.0.1", @@ -10872,6 +11515,16 @@ "querystring": "0.2.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "dev": true, @@ -10969,109 +11622,388 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "3.4.0", + "node_modules/uuid": { + "version": "3.4.0", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", + "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/validator": { + "version": "13.11.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vanilla-codemirror6": { + "resolved": "examples/vanilla-codemirror6", + "link": true + }, + "node_modules/vanilla-quill": { + "resolved": "examples/vanilla-quill", + "link": true + }, + "node_modules/vary": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", + "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", + "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "mlly": "^1.4.0", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": ">=v14.18.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/vite-tsconfig-paths": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz", + "integrity": "sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "globrex": "^0.1.2", + "tsconfck": "^2.1.0" + }, + "peerDependencies": { + "vite": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "bin": { - "uuid": "bin/uuid" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/validator": { - "version": "13.11.0", + "node_modules/vite/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, - "license": "MIT", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { - "node": ">= 0.10" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, - "node_modules/vanilla-codemirror6": { - "resolved": "examples/vanilla-codemirror6", - "link": true - }, - "node_modules/vanilla-quill": { - "resolved": "examples/vanilla-quill", - "link": true - }, - "node_modules/vary": { - "version": "1.1.2", + "node_modules/vite/node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, - "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, "engines": { - "node": ">= 0.8" + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/vite": { - "version": "3.2.7", + "node_modules/vitest": { + "version": "0.34.6", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", + "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", "dev": true, - "license": "MIT", "dependencies": { - "esbuild": "^0.15.9", - "postcss": "^8.4.18", - "resolve": "^1.22.1", - "rollup": "^2.79.1" + "@types/chai": "^4.3.5", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "@vitest/expect": "0.34.6", + "@vitest/runner": "0.34.6", + "@vitest/snapshot": "0.34.6", + "@vitest/spy": "0.34.6", + "@vitest/utils": "0.34.6", + "acorn": "^8.9.0", + "acorn-walk": "^8.2.0", + "cac": "^6.7.14", + "chai": "^4.3.10", + "debug": "^4.3.4", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.1", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.3.3", + "strip-literal": "^1.0.1", + "tinybench": "^2.5.0", + "tinypool": "^0.7.0", + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", + "vite-node": "0.34.6", + "why-is-node-running": "^2.2.2" }, "bin": { - "vite": "bin/vite.js" + "vitest": "vitest.mjs" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": ">=v14.18.0" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" + "@edge-runtime/vm": "*", + "@vitest/browser": "*", + "@vitest/ui": "*", + "happy-dom": "*", + "jsdom": "*", + "playwright": "*", + "safaridriver": "*", + "webdriverio": "*" }, "peerDependenciesMeta": { - "@types/node": { + "@edge-runtime/vm": { "optional": true }, - "less": { + "@vitest/browser": { "optional": true }, - "sass": { + "@vitest/ui": { "optional": true }, - "stylus": { + "happy-dom": { "optional": true }, - "sugarss": { + "jsdom": { "optional": true }, - "terser": { + "playwright": { + "optional": true + }, + "safaridriver": { + "optional": true + }, + "webdriverio": { "optional": true } } }, - "node_modules/vm-browserify": { - "version": "1.1.2", + "node_modules/vitest-environment-custom-jsdom": { + "resolved": "test/vitest/env", + "link": true + }, + "node_modules/vitest/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/vitest/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT" + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, - "node_modules/void-elements": { - "version": "2.0.1", + "node_modules/vitest/node_modules/magic-string": { + "version": "0.30.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", + "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", "dev": true, - "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, "node_modules/vue": { "version": "3.2.45", "license": "MIT", @@ -11091,6 +12023,18 @@ "version": "2.2.6", "license": "MIT" }, + "node_modules/w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "dev": true, + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/watchpack": { "version": "2.4.0", "license": "MIT", @@ -11110,6 +12054,15 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/webpack": { "version": "5.88.2", "dev": true, @@ -11434,6 +12387,52 @@ "node": ">=0.8.0" } }, + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", + "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "dev": true, + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -11482,6 +12481,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wildcard": { "version": "2.0.0", "dev": true, @@ -11495,11 +12510,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "6.2.0", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/wrap-ansi": { "version": "7.0.0", "dev": true, @@ -11552,15 +12562,16 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.11.0", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -11571,6 +12582,21 @@ } } }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, "node_modules/xtend": { "version": "4.0.2", "dev": true, @@ -11609,42 +12635,6 @@ "node": ">=10" } }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yargs/node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -11661,17 +12651,6 @@ "node": ">=6" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yorkie-js-sdk": { "version": "0.4.6", "license": "Apache-2.0", @@ -11732,6 +12711,10 @@ "optional": true } } + }, + "test/vitest/env": { + "name": "vitest-environment-custom-jsdom", + "dev": true } } } diff --git a/package.json b/package.json index cb880f5ed..6773a11c0 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,10 @@ "prune": "ts-node-script ./scripts/prune-dts.ts --input ./dist/yorkie-js-sdk.d.ts --output ./dist/yorkie-js-sdk.d.ts", "predoc": "ts-node-script ./scripts/api-extractor.ts && sed -i.bak 's/_2//g' temp/yorkie-js-sdk.api.json temp/yorkie-js-sdk.api.md", "dev": "webpack serve --config config/webpack.dev.config.js", - "test": "karma start ./config/karma.conf.js --single-run", - "test:yorkie.dev": "karma start ./config/karma.conf.js --single-run --testRPCAddr=https://api.yorkie.dev", - "test:watch": "karma start ./config/karma.conf.js", + "test": "vitest run", + "test:ci": "vitest run --coverage", + "test:yorkie.dev": "TEST_RPC_ADDR=https://api.yorkie.dev vitest run --coverage", + "test:watch": "vitest", "lint": "eslint . --fix --max-warnings=0 --ext .ts", "prepare": "ts-patch install && npm run build", "benchmark": "ts-node-script ./test/bench", @@ -47,38 +48,35 @@ "@microsoft/api-documenter": "^7.15.1", "@microsoft/api-extractor": "^7.19.4", "@types/benchmark": "^2.1.1", - "@types/chai": "^4.2.14", - "@types/mocha": "^8.0.4", - "@types/sinon": "^9.0.8", + "@types/google-protobuf": "^3.15.5", + "@types/jsdom": "^21.1.3", + "@types/long": "^4.0.1", "@types/yargs": "^17.0.0", "@typescript-eslint/eslint-plugin": "^5.30.6", "@typescript-eslint/parser": "^5.30.6", + "@vitest/coverage-istanbul": "^0.34.5", + "@vitest/coverage-v8": "^0.34.5", "@webpack-cli/serve": "^1.6.0", "benchmark": "^2.1.4", - "chai": "^4.2.0", "copy-webpack-plugin": "^11.0.0", - "istanbul-instrumenter-loader": "^2.0.0", "eslint": "^8.19.0", "eslint-plugin-jsdoc": "^39.3.3", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-tsdoc": "^0.2.16", "husky": "^8.0.3", - "karma": "^6.3.5", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-mocha": "^2.0.1", - "karma-source-map-support": "^1.4.0", - "karma-sourcemap-loader": "^0.3.8", - "karma-webpack": "^5.0.0", - "mocha": "^9.2.0", + "istanbul-instrumenter-loader": "^2.0.0", + "jsdom": "^22.1.0", "node-polyfill-webpack-plugin": "^1.1.4", "prettier": "^2.7.1", - "sinon": "^9.2.1", "ts-loader": "^9.3.1", "ts-node": "^10.9.1", "ts-patch": "^2.0.1", "typescript": "^4.7.4", "typescript-transform-paths": "^3.3.1", + "vite": "^4.4.9", + "vite-tsconfig-paths": "^4.2.1", + "vitest": "^0.34.5", + "vitest-environment-custom-jsdom": "file:test/vitest/env", "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.7.0", "webpack-cli": "^4.10.0", @@ -86,8 +84,6 @@ "yargs": "^17.0.1" }, "dependencies": { - "@types/google-protobuf": "^3.15.5", - "@types/long": "^4.0.1", "google-protobuf": "^3.19.4", "grpc-web": "^1.3.1", "long": "^5.2.0" diff --git a/src/client/client.ts b/src/client/client.ts index 0e2b3b4ad..d419aa7a0 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -400,9 +400,11 @@ export class Client implements Observable { if (this.status === ClientStatus.Deactivated) { return Promise.resolve(); } - this.attachmentMap.forEach((_, docKey) => { - this.detachInternal(docKey); - }); + + for (const [key] of this.attachmentMap) { + this.detachInternal(key); + } + return new Promise((resolve, reject) => { const req = new DeactivateClientRequest(); req.setClientId(this.id!); @@ -920,12 +922,13 @@ export class Client implements Observable { } private detachInternal(docKey: DocumentKey) { + // NOTE(hackerwins): If attachment is not found, it means that the document + // has been already detached by another routine. + // This can happen when detach or remove is called while the watch loop is + // running. const attachment = this.attachmentMap.get(docKey); if (!attachment) { - throw new YorkieError( - Code.DocumentNotAttached, - `${docKey} is not attached`, - ); + return; } attachment.cancelWatchStream(); diff --git a/src/document/presence/presence.ts b/src/document/presence/presence.ts index e1c8a5d85..468de2b0a 100644 --- a/src/document/presence/presence.ts +++ b/src/document/presence/presence.ts @@ -30,8 +30,8 @@ export enum PresenceChangeType { * `PresenceChange` represents the change of presence. */ export type PresenceChange

= - | { type: PresenceChangeType.Put; presence: P; } - | { type: PresenceChangeType.Clear; }; + | { type: PresenceChangeType.Put; presence: P } + | { type: PresenceChangeType.Clear }; /** * `Presence` represents a proxy for the Presence to be manipulated from the outside. diff --git a/test/integration/array_test.ts b/test/integration/array_test.ts index 58edd54c8..829eee0ab 100644 --- a/test/integration/array_test.ts +++ b/test/integration/array_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { MaxTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; @@ -252,7 +252,7 @@ describe('Array', function () { }); }); - it('Can handle concurrent insertAfter operations', async function () { + it('Can handle concurrent insertAfter operations', async function ({ task }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { let prev: WrappedElement; @@ -292,10 +292,12 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveBefore operations with the same position', async function () { + it('Can handle concurrent moveBefore operations with the same position', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -338,10 +340,12 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveBefore operations from the different position', async function () { + it('Can handle concurrent moveBefore operations from the different position', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -370,10 +374,12 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveFront operations with the item which has the different index', async function () { + it('Can handle concurrent moveFront operations with the item which has the different index', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -412,10 +418,12 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveFront operations with the item which has the same index', async function () { + it('Can handle concurrent moveFront operations with the item which has the same index', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -442,10 +450,10 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveAfter operations', async function () { + it('Can handle concurrent moveAfter operations', async function ({ task }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -472,10 +480,12 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent insertAfter and moveBefore operations', async function () { + it('Can handle concurrent insertAfter and moveBefore operations', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { let prev: WrappedElement; @@ -518,10 +528,10 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent moveAfter', async function () { + it('Can handle concurrent moveAfter', async function ({ task }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -550,10 +560,10 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent add operations', async function () { + it('Can handle concurrent add operations', async function ({ task }) { type TestDoc = { k1: Array }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -573,10 +583,10 @@ describe('Array', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent delete operations', async function () { + it('Can handle concurrent delete operations', async function ({ task }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { let prev: WrappedElement; @@ -603,10 +613,12 @@ describe('Array', function () { d1.update((root) => { assert.equal(3, root.k1.length); }); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent insertBefore and delete operations', async function () { + it('Can handle concurrent insertBefore and delete operations', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { let prev: WrappedElement; @@ -637,10 +649,12 @@ describe('Array', function () { assert.equal('{"k1":[2]}', root.toJSON!()); assert.equal(1, root.k1.length); }); - }, this.test!.title); + }, task.name); }); - it('Can handle complex concurrent insertBefore and delete operations', async function () { + it('Can handle complex concurrent insertBefore and delete operations', async function ({ + task, + }) { type TestDoc = { k1: JSONArray }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { let prev: WrappedElement; @@ -691,7 +705,7 @@ describe('Array', function () { assert.equal('{"k1":[7,1,5,3,6,4]}', root.toJSON!()); assert.equal(6, root.k1.length); }); - }, this.test!.title); + }, task.name); }); it('Returns undefined when looking up an element that doesnt exist after GC', function () { diff --git a/test/integration/client_test.ts b/test/integration/client_test.ts index a84937b0c..6e2b4eb37 100644 --- a/test/integration/client_test.ts +++ b/test/integration/client_test.ts @@ -1,5 +1,5 @@ -import { assert } from 'chai'; -import * as sinon from 'sinon'; +import { describe, it, assert, vi, afterEach } from 'vitest'; + import yorkie, { Counter, SyncMode, @@ -14,9 +14,13 @@ import { withTwoClientsAndDocuments, } from '@yorkie-js-sdk/test/integration/integration_helper'; -describe('Client', function () { - it('Can be activated, deactivated', async function () { - const clientKey = `${this.test!.title}-${new Date().getTime()}`; +describe.sequential('Client', function () { + afterEach(() => { + vi.restoreAllMocks(); + }); + + it('Can be activated, deactivated', async function ({ task }) { + const clientKey = `${task.name}-${new Date().getTime()}`; const clientWithKey = new yorkie.Client(testRPCAddr, { key: clientKey, syncLoopDuration: 50, @@ -39,27 +43,27 @@ describe('Client', function () { assert.isFalse(clientWithoutKey.isActive()); }); - it('Can handle sync', async function () { + it('Can handle sync', async function ({ task }) { type TestDoc = { k1: string; k2: string; k3: string }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { - const spy = sinon.spy(); + const spy = vi.fn(); const unsub = d2.subscribe(spy); - assert.equal(0, spy.callCount); + assert.equal(0, spy.mock.calls.length); d1.update((root) => { root['k1'] = 'v1'; }); await c1.sync(); await c2.sync(); - assert.equal(1, spy.callCount); + assert.equal(1, spy.mock.calls.length); d1.update((root) => { root['k2'] = 'v2'; }); await c1.sync(); await c2.sync(); - assert.equal(2, spy.callCount); + assert.equal(2, spy.mock.calls.length); unsub(); @@ -68,11 +72,13 @@ describe('Client', function () { }); await c1.sync(); await c2.sync(); - assert.equal(2, spy.callCount); - }, this.test!.title); + assert.equal(2, spy.mock.calls.length); + }, task.name); }); - it('Can recover from temporary disconnect (manual sync)', async function () { + it('Can recover from temporary disconnect (manual sync)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ k1: string }>(async (c1, d1, c2, d2) => { // Normal Condition d2.update((root) => { @@ -83,17 +89,21 @@ describe('Client', function () { await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - // Simulate network error - const xhr = sinon.useFakeXMLHttpRequest(); - xhr.onCreate = (req) => { - req.respond( - 400, - { - 'Content-Type': 'application/grpc-web-text+proto', + vi.stubGlobal( + 'XMLHttpRequest', + vi.fn(() => ({ + send: (req: any) => { + req.respond( + 400, + { 'Content-Type': 'application/grpc-web-text+proto' }, + '', + ); }, - '', - ); - }; + abort: vi.fn(() => { + throw new Error('INVALID_STATE_ERR - 0'); + }), + })), + ); d2.update((root) => { root['k1'] = 'v1'; @@ -109,21 +119,23 @@ describe('Client', function () { assert.equal(d2.toSortedJSON(), '{"k1":"v1"}'); // Back to normal condition - xhr.restore(); + vi.unstubAllGlobals(); await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can recover from temporary disconnect (realtime sync)', async function () { + it('Can recover from temporary disconnect (realtime sync)', async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ k1: string }>(docKey); const d2 = new yorkie.Document<{ k1: string }>(docKey); @@ -135,20 +147,20 @@ describe('Client', function () { const eventCollectorC1 = new EventCollector(); const eventCollectorC2 = new EventCollector(); - const stubC1 = sinon.stub().callsFake((event) => { + const stubC1 = vi.fn().mockImplementation((event) => { if (event.type === ClientEventType.DocumentSynced) { eventCollectorC1.add(event.value); } }); - const stubC2 = sinon.stub().callsFake((event) => { + const stubC2 = vi.fn().mockImplementation((event) => { if (event.type === ClientEventType.DocumentSynced) { eventCollectorC2.add(event.value); } }); - const stubD1 = sinon.stub().callsFake((event) => { + const stubD1 = vi.fn().mockImplementation((event) => { eventCollectorD1.add(event.type); }); - const stubD2 = sinon.stub().callsFake((event) => { + const stubD2 = vi.fn().mockImplementation((event) => { eventCollectorD2.add(event.type); }); @@ -170,19 +182,25 @@ describe('Client', function () { await eventCollectorD1.waitAndVerifyNthEvent(1, DocEventType.RemoteChange); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - // Simulate network error eventCollectorC1.reset(); eventCollectorC2.reset(); - const xhr = sinon.useFakeXMLHttpRequest(); - xhr.onCreate = (req) => { - req.respond( - 400, - { - 'Content-Type': 'application/grpc-web-text+proto', + + // Simulate network error + vi.stubGlobal( + 'XMLHttpRequest', + vi.fn(() => ({ + send: (req: any) => { + req.respond( + 400, + { 'Content-Type': 'application/grpc-web-text+proto' }, + '', + ); }, - '', - ); - }; + abort: vi.fn(() => { + throw new Error('INVALID_STATE_ERR - 0'); + }), + })), + ); d2.update((root) => { root['k1'] = 'v1'; @@ -201,7 +219,7 @@ describe('Client', function () { // Back to normal condition eventCollectorC1.reset(); eventCollectorC2.reset(); - xhr.restore(); + vi.unstubAllGlobals(); await eventCollectorC1.waitFor(DocumentSyncResultType.Synced); // wait for c1 to sync await eventCollectorC2.waitFor(DocumentSyncResultType.Synced); @@ -220,13 +238,13 @@ describe('Client', function () { await c2.deactivate(); }); - it('Can change realtime sync', async function () { + it('Can change realtime sync', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ version: string }>(docKey); const d2 = new yorkie.Document<{ version: string }>(docKey); @@ -245,7 +263,7 @@ describe('Client', function () { // 02. c2 changes the sync mode to realtime sync mode. const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.type); }); const unsub1 = c2.subscribe(stub); @@ -277,7 +295,7 @@ describe('Client', function () { await c2.deactivate(); }); - it('Can change sync mode in manual sync', async function () { + it('Can change sync mode in manual sync', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); const c3 = new yorkie.Client(testRPCAddr); @@ -285,7 +303,7 @@ describe('Client', function () { await c2.activate(); await c3.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ c1: number; c2: number }>(docKey); const d2 = new yorkie.Document<{ c1: number; c2: number }>(docKey); const d3 = new yorkie.Document<{ c1: number; c2: number }>(docKey); @@ -336,7 +354,7 @@ describe('Client', function () { await c3.deactivate(); }); - it('Can change sync mode in realtime sync', async function () { + it('Can change sync mode in realtime sync', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); const c3 = new yorkie.Client(testRPCAddr); @@ -344,7 +362,7 @@ describe('Client', function () { await c2.activate(); await c3.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ c1: number; c2: number }>(docKey); const d2 = new yorkie.Document<{ c1: number; c2: number }>(docKey); const d3 = new yorkie.Document<{ c1: number; c2: number }>(docKey); @@ -357,13 +375,13 @@ describe('Client', function () { const eventCollectorD1 = new EventCollector(); const eventCollectorD2 = new EventCollector(); const eventCollectorD3 = new EventCollector(); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollectorD1.add(event.type); }); - const stub2 = sinon.stub().callsFake((event) => { + const stub2 = vi.fn().mockImplementation((event) => { eventCollectorD2.add(event.type); }); - const stub3 = sinon.stub().callsFake((event) => { + const stub3 = vi.fn().mockImplementation((event) => { eventCollectorD3.add(event.type); }); const unsub1 = d1.subscribe(stub1); @@ -423,12 +441,12 @@ describe('Client', function () { await c3.deactivate(); }); - it('sync option with mixed mode test', async function () { + it('sync option with mixed mode test', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); await c1.activate(); // 01. cli attach to the document having counter. - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ counter: Counter }>(docKey); await c1.attach(d1, { isRealtimeSync: false }); diff --git a/test/integration/counter_test.ts b/test/integration/counter_test.ts index 8e80070a1..7aad05e98 100644 --- a/test/integration/counter_test.ts +++ b/test/integration/counter_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { withTwoClientsAndDocuments, @@ -11,8 +11,8 @@ import { CounterType } from '@yorkie-js-sdk/src/document/crdt/counter'; import Long from 'long'; describe('Counter', function () { - it('can be increased by Counter type', function () { - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('can be increased by Counter type', function ({ task }) { + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new Document<{ k1: { age?: Counter; length?: Counter }; }>(docKey); @@ -52,7 +52,7 @@ describe('Counter', function () { assertUndoRedo(doc, states); }); - it('Can handle increase operation', async function () { + it('Can handle increase operation', async function ({ task }) { type TestDoc = { age: Counter; length: Counter }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { d1.update((root) => { @@ -66,10 +66,10 @@ describe('Counter', function () { await c1.sync(); await c2.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent increase operation', async function () { + it('Can handle concurrent increase operation', async function ({ task }) { await withTwoClientsAndDocuments<{ age: Counter; width: Counter; @@ -97,11 +97,11 @@ describe('Counter', function () { await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('can handle overflow', function () { - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('can handle overflow', function ({ task }) { + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new Document<{ age: Counter }>(docKey); doc.update((root) => { root.age = new Counter(CounterType.IntegerCnt, 2147483647); @@ -132,8 +132,8 @@ describe('Counter', function () { assert.equal(`{"age":-9223372036854775808}`, doc.toSortedJSON()); }); - it('can get proper reverse operations', function () { - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('can get proper reverse operations', function ({ task }) { + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new Document<{ cnt: Counter; longCnt: Counter }>(docKey); doc.update((root) => { @@ -160,9 +160,9 @@ describe('Counter', function () { ); }); - it('Can undo/redo for increase operation', async function () { + it('Can undo/redo for increase operation', async function ({ task }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new Document(docKey); doc.update((root) => { root.counter = new Counter(CounterType.IntegerCnt, 100); @@ -184,8 +184,8 @@ describe('Counter', function () { assert.equal(doc.toSortedJSON(), '{"counter":100}'); }); - it('should handle undo/redo for long type and overflow', function () { - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('should handle undo/redo for long type and overflow', function ({ task }) { + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new Document<{ cnt: Counter; longCnt: Counter }>(docKey); const states: Array = []; @@ -219,9 +219,9 @@ describe('Counter', function () { assertUndoRedo(doc, states); }); - it('Can undo/redo for concurrent users', async function () { + it('Can undo/redo for concurrent users', async function ({ task }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document(docKey); const doc2 = new yorkie.Document(docKey); diff --git a/test/integration/document_test.ts b/test/integration/document_test.ts index 3e6bc63f2..0e97e5384 100644 --- a/test/integration/document_test.ts +++ b/test/integration/document_test.ts @@ -1,5 +1,4 @@ -import { assert } from 'chai'; -import * as sinon from 'sinon'; +import { describe, it, assert, vi, afterEach } from 'vitest'; import yorkie, { Counter, Text, JSONArray } from '@yorkie-js-sdk/src/yorkie'; import { testRPCAddr, @@ -18,9 +17,13 @@ import { OperationInfo } from '@yorkie-js-sdk/src/document/operation/operation'; import { YorkieError } from '@yorkie-js-sdk/src/util/error'; describe('Document', function () { - it('Can attach/detach documents', async function () { + afterEach(() => { + vi.restoreAllMocks(); + }); + + it('Can attach/detach documents', async function ({ task }) { type TestDoc = { k1: { ['k1-1']: string }; k2: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document(docKey); const doc2 = new yorkie.Document(docKey); @@ -53,13 +56,13 @@ describe('Document', function () { await client2.deactivate(); }); - it('Can watch documents', async function () { + it('Can watch documents', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document<{ k1: string }>(docKey); const d2 = new yorkie.Document<{ k1: string }>(docKey); await c1.attach(d1); @@ -67,10 +70,10 @@ describe('Document', function () { const eventCollectorD1 = new EventCollector(); const eventCollectorD2 = new EventCollector(); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollectorD1.add(event.type); }); - const stub2 = sinon.stub().callsFake((event) => { + const stub2 = vi.fn().mockImplementation((event) => { eventCollectorD2.add(event.type); }); const unsub1 = d1.subscribe(stub1); @@ -93,13 +96,13 @@ describe('Document', function () { await c2.deactivate(); }); - it('detects the events from doc.subscribe', async function () { + it('detects the events from doc.subscribe', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type TestDoc = { counter: Counter; todos: JSONArray; // specify type as `JSONArray` to use the `moveAfter` method @@ -123,10 +126,10 @@ describe('Document', function () { let expectedEventValue: Array; const eventCollectorD1 = new EventCollector(); const eventCollectorD2 = new EventCollector(); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollectorD1.add({ type: event.type, value: event.value.operations }); }); - const stub2 = sinon.stub().callsFake((event) => { + const stub2 = vi.fn().mockImplementation((event) => { eventCollectorD2.add({ type: event.type, value: event.value.operations }); }); const unsub1 = d1.subscribe(stub1); @@ -234,13 +237,13 @@ describe('Document', function () { await c2.deactivate(); }); - it('specify the topic to subscribe to', async function () { + it('specify the topic to subscribe to', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type TestDoc = { counter: Counter; todos: JSONArray; @@ -254,13 +257,13 @@ describe('Document', function () { const eventCollector = new EventCollector(); const eventCollectorForTodos = new EventCollector(); const eventCollectorForCounter = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); - const stubTodo = sinon.stub().callsFake((event) => { + const stubTodo = vi.fn().mockImplementation((event) => { eventCollectorForTodos.add(event.value.operations); }); - const stubCounter = sinon.stub().callsFake((event) => { + const stubCounter = vi.fn().mockImplementation((event) => { eventCollectorForCounter.add(event.value.operations); }); const unsub = d1.subscribe(stub); @@ -327,13 +330,13 @@ describe('Document', function () { await c2.deactivate(); }); - it('specify the nested topic to subscribe to', async function () { + it('specify the nested topic to subscribe to', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type TestDoc = { todos: Array<{ text: string; @@ -350,13 +353,13 @@ describe('Document', function () { const eventCollector = new EventCollector(); const eventCollectorForTodos0 = new EventCollector(); const eventCollectorForObjC1 = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); - const stubTodo = sinon.stub().callsFake((event) => { + const stubTodo = vi.fn().mockImplementation((event) => { eventCollectorForTodos0.add(event.value.operations); }); - const stubObj = sinon.stub().callsFake((event) => { + const stubObj = vi.fn().mockImplementation((event) => { eventCollectorForObjC1.add(event.value.operations); }); const unsub = d1.subscribe(stub); @@ -433,9 +436,9 @@ describe('Document', function () { await c2.deactivate(); }); - it('Can handle tombstone', async function () { + it('Can handle tombstone', async function ({ task }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document(docKey); const d2 = new yorkie.Document(docKey); @@ -470,9 +473,9 @@ describe('Document', function () { assert.isTrue(prevArray?.isRemoved()); }); - it('Can remove document', async function () { + it('Can remove document', async function ({ task }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const d1 = new yorkie.Document(docKey); const c1 = new yorkie.Client(testRPCAddr); const c1Key = c1.getKey(); @@ -523,9 +526,11 @@ describe('Document', function () { await c1.deactivate(); }); - it('Can create document with the same key as the removed document key', async function () { + it('Can create document with the same key as the removed document key', async function ({ + task, + }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); // 01. c1 creates d1 and removes it. const c1 = new yorkie.Client(testRPCAddr); @@ -554,9 +559,11 @@ describe('Document', function () { await c2.deactivate(); }); - it('Can know that document has been removed when doing client.sync()', async function () { + it('Can know that document has been removed when doing client.sync()', async function ({ + task, + }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); // 01. c1 attaches d1 and c2 watches same doc. const c1 = new yorkie.Client(testRPCAddr); @@ -591,9 +598,11 @@ describe('Document', function () { await c2.deactivate(); }); - it('Can know that document has been removed when doing client.detach()', async function () { + it('Can know that document has been removed when doing client.detach()', async function ({ + task, + }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); // 01. c1 attaches d1 and c2 watches same doc. const c1 = new yorkie.Client(testRPCAddr); @@ -622,9 +631,9 @@ describe('Document', function () { await c2.deactivate(); }); - it('removed document removal test', async function () { + it('removed document removal test', async function ({ task }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); // 01. c1 attaches d1 and c2 watches same doc. const c1 = new yorkie.Client(testRPCAddr); @@ -659,9 +668,9 @@ describe('Document', function () { // ▲ │ │ ▲ // └───────────┘ └─────┘ // Detach PushPull - it('document state transition test', async function () { + it('document state transition test', async function ({ task }) { type TestDoc = { k1: Array }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const c1 = new yorkie.Client(testRPCAddr); await c1.activate(); @@ -727,9 +736,9 @@ describe('Document', function () { }); describe('Undo/Redo', function () { - it('Can canUndo/canRedo work properly', async function () { + it('Can canUndo/canRedo work properly', async function ({ task }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); doc.update((root) => { root.counter = new Counter(yorkie.IntType, 100); @@ -761,9 +770,9 @@ describe('Document', function () { assert.equal(doc.toSortedJSON(), '{"counter":101}'); }); - it('doc.update should clear redo stack', async function () { + it('doc.update should clear redo stack', async function ({ task }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); doc.update((root) => { root.counter = new Counter(yorkie.IntType, 100); @@ -795,9 +804,11 @@ describe('Document', function () { assert.equal(doc.history.canRedo(), false); }); - it('undo/redo with empty stack must throw error', async function () { + it('undo/redo with empty stack must throw error', async function ({ + task, + }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); assert.throws( @@ -817,9 +828,11 @@ describe('Document', function () { ); }); - it('update() that contains undo/redo must throw error', async function () { + it('update() that contains undo/redo must throw error', async function ({ + task, + }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); doc.update((root) => { root.counter = new Counter(yorkie.IntType, 100); @@ -850,9 +863,9 @@ describe('Document', function () { ); }); - it('maximum undo/redo stack test', async function () { + it('maximum undo/redo stack test', async function ({ task }) { type TestDoc = { counter: Counter }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); doc.update((root) => { root.counter = new Counter(yorkie.IntType, 0); diff --git a/test/integration/gc_test.ts b/test/integration/gc_test.ts index 3bad0af5c..9a8142646 100644 --- a/test/integration/gc_test.ts +++ b/test/integration/gc_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { MaxTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; import { CRDTArray } from '@yorkie-js-sdk/src/document/crdt/array'; import yorkie, { Tree } from '@yorkie-js-sdk/src/yorkie'; @@ -289,8 +289,10 @@ describe('Garbage Collection', function () { assert.equal(nodeLengthBeforeGC - nodeLengthAfterGC, 5); }); - it('Can handle tree garbage collection for multi client', async function () { - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can handle tree garbage collection for multi client', async function ({ + task, + }) { + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document<{ t: Tree }>(docKey); const doc2 = new yorkie.Document<{ t: Tree }>(docKey); @@ -371,9 +373,11 @@ describe('Garbage Collection', function () { await client2.deactivate(); }); - it('Can handle garbage collection for container type', async function () { + it('Can handle garbage collection for container type', async function ({ + task, + }) { type TestDoc = { 1: number; 2?: Array; 3: number }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document(docKey); const doc2 = new yorkie.Document(docKey); @@ -439,9 +443,9 @@ describe('Garbage Collection', function () { await client2.deactivate(); }); - it('Can handle garbage collection for text type', async function () { + it('Can handle garbage collection for text type', async function ({ task }) { type TestDoc = { text: Text; textWithAttr: Text }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document(docKey); const doc2 = new yorkie.Document(docKey); @@ -510,7 +514,9 @@ describe('Garbage Collection', function () { await client2.deactivate(); }); - it('Can handle garbage collection with detached document test', async function () { + it('Can handle garbage collection with detached document test', async function ({ + task, + }) { type TestDoc = { 1: number; 2?: Array; @@ -518,7 +524,7 @@ describe('Garbage Collection', function () { 4: Text; 5: Text; }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc1 = new yorkie.Document(docKey); const doc2 = new yorkie.Document(docKey); diff --git a/test/integration/integration_helper.ts b/test/integration/integration_helper.ts index df8aeb3b6..63e6cc856 100644 --- a/test/integration/integration_helper.ts +++ b/test/integration/integration_helper.ts @@ -1,12 +1,10 @@ -import { assert } from 'chai'; +import { assert } from 'vitest'; import yorkie from '@yorkie-js-sdk/src/yorkie'; import { Client } from '@yorkie-js-sdk/src/client/client'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { Indexable } from '@yorkie-js-sdk/test/helper/helper'; -const __karma__ = (global as any).__karma__; -export const testRPCAddr = - __karma__?.config?.testRPCAddr || 'http://localhost:8080'; +export const testRPCAddr = process.env.TEST_RPC_ADDR || 'http://localhost:8080'; export function toDocKey(title: string): string { return title diff --git a/test/integration/object_test.ts b/test/integration/object_test.ts index 78a29c715..fafeba262 100644 --- a/test/integration/object_test.ts +++ b/test/integration/object_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { JSONObject } from '@yorkie-js-sdk/src/yorkie'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { withTwoClientsAndDocuments } from '@yorkie-js-sdk/test/integration/integration_helper'; @@ -133,7 +133,7 @@ describe('Object', function () { assert.equal('a,1,b,2,c,3', Object.entries(content).join(',')); }); - it('Can handle concurrent set/delete operations', async function () { + it('Can handle concurrent set/delete operations', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: string; k2: string; @@ -190,6 +190,6 @@ describe('Object', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); }); diff --git a/test/integration/presence_test.ts b/test/integration/presence_test.ts index b71e03441..4c19736f5 100644 --- a/test/integration/presence_test.ts +++ b/test/integration/presence_test.ts @@ -1,5 +1,4 @@ -import { assert } from 'chai'; -import * as sinon from 'sinon'; +import { describe, it, assert, vi, afterEach } from 'vitest'; import yorkie, { DocEvent, DocEventType, @@ -12,13 +11,17 @@ import { import { EventCollector, deepSort } from '@yorkie-js-sdk/test/helper/helper'; describe('Presence', function () { - it('Can be built from a snapshot', async function () { + afterEach(() => { + vi.restoreAllMocks(); + }); + + it('Can be built from a snapshot', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { key: string }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { isRealtimeSync: false }); @@ -41,13 +44,15 @@ describe('Presence', function () { }); }); - it('Can be set initial value in attach and be removed in detach', async function () { + it('Can be set initial value in attach and be removed in detach', async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { key: string }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { @@ -74,13 +79,15 @@ describe('Presence', function () { assert.isFalse(doc1.hasPresence(c2.getID()!)); }); - it('Should be initialized as an empty object if no initial value is set during attach', async function () { + it('Should be initialized as an empty object if no initial value is set during attach', async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { key: string }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { isRealtimeSync: false }); @@ -98,7 +105,7 @@ describe('Presence', function () { assert.deepEqual(doc1.getPresenceForTest(c2.getID()!), emptyObject); }); - it('Should be synced eventually', async function () { + it('Should be synced eventually', async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); @@ -106,20 +113,20 @@ describe('Presence', function () { const c1ID = c1.getID()!; const c2ID = c2.getID()!; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const eventCollectorP1 = new EventCollector(); const eventCollectorP2 = new EventCollector(); type PresenceType = { name: string }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { initialPresence: { name: 'a' } }); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollectorP1.add(event); }); const unsub1 = doc1.subscribe('presence', stub1); const doc2 = new yorkie.Document<{}, PresenceType>(docKey); await c2.attach(doc2, { initialPresence: { name: 'b' } }); - const stub2 = sinon.stub().callsFake((event) => { + const stub2 = vi.fn().mockImplementation((event) => { eventCollectorP2.add(event); }); const unsub2 = doc2.subscribe('presence', stub2); @@ -169,13 +176,15 @@ describe('Presence', function () { unsub2(); }); - it('Can be updated partially by doc.update function', async function () { + it('Can be updated partially by doc.update function', async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { key: string; cursor: { x: number; y: number } }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { @@ -203,7 +212,7 @@ describe('Presence', function () { }); }); - it(`Should return only online clients`, async function () { + it(`Should return only online clients`, async function ({ task }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); const c3 = new yorkie.Client(testRPCAddr); @@ -214,7 +223,7 @@ describe('Presence', function () { const c2ID = c2.getID()!; const c3ID = c3.getID()!; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { name: string; cursor: { x: number; y: number } }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { @@ -222,7 +231,7 @@ describe('Presence', function () { }); const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event); }); const unsub = doc1.subscribe('presence', stub); @@ -270,13 +279,15 @@ describe('Presence', function () { await c3.deactivate(); }); - it('Can get presence value using p.get() within doc.update function', async function () { + it('Can get presence value using p.get() within doc.update function', async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); await c2.activate(); - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { counter: number }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { @@ -303,7 +314,9 @@ describe('Presence', function () { }); describe(`Document.Subscribe('presence')`, function () { - it(`Should receive presence-changed event for final presence if there are multiple presence changes within doc.update`, async function () { + it(`Should receive presence-changed event for final presence if there are multiple presence changes within doc.update`, async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); @@ -311,7 +324,7 @@ describe(`Document.Subscribe('presence')`, function () { const c1ID = c1.getID()!; const c2ID = c2.getID()!; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const eventCollectorP1 = new EventCollector(); const eventCollectorP2 = new EventCollector(); type PresenceType = { name: string; cursor: { x: number; y: number } }; @@ -319,7 +332,7 @@ describe(`Document.Subscribe('presence')`, function () { await c1.attach(doc1, { initialPresence: { name: 'a', cursor: { x: 0, y: 0 } }, }); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollectorP1.add(event); }); const unsub1 = doc1.subscribe('presence', stub1); @@ -328,7 +341,7 @@ describe(`Document.Subscribe('presence')`, function () { await c2.attach(doc2, { initialPresence: { name: 'b', cursor: { x: 0, y: 0 } }, }); - const stub2 = sinon.stub().callsFake((event) => { + const stub2 = vi.fn().mockImplementation((event) => { eventCollectorP2.add(event); }); const unsub2 = doc2.subscribe('presence', stub2); @@ -359,7 +372,9 @@ describe(`Document.Subscribe('presence')`, function () { unsub2(); }); - it(`Can receive 'unwatched' event when a client detaches`, async function () { + it(`Can receive 'unwatched' event when a client detaches`, async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); await c1.activate(); @@ -367,12 +382,12 @@ describe(`Document.Subscribe('presence')`, function () { const c1ID = c1.getID()!; const c2ID = c2.getID()!; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { name: string }; const eventCollector = new EventCollector(); const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { initialPresence: { name: 'a' } }); - const stub1 = sinon.stub().callsFake((event) => { + const stub1 = vi.fn().mockImplementation((event) => { eventCollector.add(event); }); const unsub1 = doc1.subscribe('presence', stub1); @@ -405,7 +420,9 @@ describe(`Document.Subscribe('presence')`, function () { unsub1(); }); - it(`Can receive presence-related event only when using realtime sync`, async function () { + it(`Can receive presence-related event only when using realtime sync`, async function ({ + task, + }) { const c1 = new yorkie.Client(testRPCAddr); const c2 = new yorkie.Client(testRPCAddr); const c3 = new yorkie.Client(testRPCAddr); @@ -415,14 +432,14 @@ describe(`Document.Subscribe('presence')`, function () { const c2ID = c2.getID()!; const c3ID = c3.getID()!; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); type PresenceType = { name: string; cursor: { x: number; y: number } }; const doc1 = new yorkie.Document<{}, PresenceType>(docKey); await c1.attach(doc1, { initialPresence: { name: 'a1', cursor: { x: 0, y: 0 } }, }); const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event); }); const unsub = doc1.subscribe('presence', stub); @@ -533,10 +550,10 @@ describe(`Document.Subscribe('presence')`, function () { }); describe('Undo/Redo', function () { - it('Can undo/redo with presence', async function () { + it('Can undo/redo with presence', async function ({ task }) { type TestDoc = { counter: Counter }; type Presence = { color: string }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document(docKey); doc.update((root) => { root.counter = new Counter(yorkie.IntType, 100); @@ -589,9 +606,11 @@ describe('Undo/Redo', function () { await client.deactivate(); }); - it('Should not impact undo if presence is not added to history', async function () { + it('Should not impact undo if presence is not added to history', async function ({ + task, + }) { type Presence = { color: string; cursor: { x: number; y: number } }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{}, Presence>(docKey); const client = new yorkie.Client(testRPCAddr); @@ -707,9 +726,11 @@ describe('Undo/Redo', function () { await client.deactivate(); }); - it('Should handle undo/redo correctly for multiple changes to a single presence key within update', async function () { + it('Should handle undo/redo correctly for multiple changes to a single presence key within update', async function ({ + task, + }) { type Presence = { color: string }; - const docKey = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + const docKey = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{}, Presence>(docKey); const client = new yorkie.Client(testRPCAddr); diff --git a/test/integration/primitive_test.ts b/test/integration/primitive_test.ts index 7bcf2f11d..f102cb23f 100644 --- a/test/integration/primitive_test.ts +++ b/test/integration/primitive_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import Long from 'long'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { InitialCheckpoint } from '@yorkie-js-sdk/src/document/change/checkpoint'; @@ -43,7 +43,7 @@ describe('Primitive', function () { assert.equal('{"k1":{"k1-1":1,"k1-2":2}}', doc.toSortedJSON()); }); - it('Can handle primitive types', async function () { + it('Can handle primitive types', async function ({ task }) { await withTwoClientsAndDocuments<{ k0: null; k1: boolean; @@ -70,6 +70,6 @@ describe('Primitive', function () { await c1.sync(); await c2.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); }); diff --git a/test/integration/snapshot_test.ts b/test/integration/snapshot_test.ts index 01fdd7cde..49d16e4e1 100644 --- a/test/integration/snapshot_test.ts +++ b/test/integration/snapshot_test.ts @@ -1,9 +1,9 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { withTwoClientsAndDocuments } from '@yorkie-js-sdk/test/integration/integration_helper'; import { Text } from '@yorkie-js-sdk/src/yorkie'; describe('Snapshot', function () { - it('should handle snapshot', async function () { + it('should handle snapshot', async function ({ task }) { type TestDoc = Record & { key: string }; await withTwoClientsAndDocuments(async (c1, d1, c2, d2) => { // 01. Updates 700 changes over snapshot threshold. @@ -25,10 +25,10 @@ describe('Snapshot', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('should handle snapshot for text object', async function () { + it('should handle snapshot for text object', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { for (let idx = 0; idx < 700; idx++) { d1.update((root) => { @@ -55,10 +55,12 @@ describe('Snapshot', function () { await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('should handle snapshot for text with attributes', async function () { + it('should handle snapshot for text with attributes', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -77,6 +79,6 @@ describe('Snapshot', function () { await c2.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); }); diff --git a/test/integration/text_test.ts b/test/integration/text_test.ts index eee70b8d2..cb08dc344 100644 --- a/test/integration/text_test.ts +++ b/test/integration/text_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { TextView } from '@yorkie-js-sdk/test/helper/helper'; import { withTwoClientsAndDocuments } from '@yorkie-js-sdk/test/integration/integration_helper'; import { Document, Text } from '@yorkie-js-sdk/src/yorkie'; @@ -175,7 +175,7 @@ describe('Text', function () { } }); - it('should handle edit operations', async function () { + it('should handle edit operations', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -195,7 +195,7 @@ describe('Text', function () { await c1.sync(); assert.equal(d1.toSortedJSON(), `{"k1":[{"val":"1234"}]}`); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); it('should handle text edit operations with attributes', function () { @@ -249,7 +249,7 @@ describe('Text', function () { assert.equal(doc.getRoot().k1.toString(), ``); }); - it('should handle concurrent edit operations', async function () { + it('should handle concurrent edit operations', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -294,10 +294,12 @@ describe('Text', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('should handle concurrent insertion and deletion', async function () { + it('should handle concurrent insertion and deletion', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -326,10 +328,10 @@ describe('Text', function () { assert.equal(d1.toSortedJSON(), `{"k1":[{"val":"C"}]}`); assert.equal(d2.toSortedJSON(), `{"k1":[{"val":"C"}]}`); assert.equal(d1.toSortedJSON(), d2.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('should handle concurrent block deletions', async function () { + it('should handle concurrent block deletions', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -369,10 +371,12 @@ describe('Text', function () { await c1.sync(); await c2.sync(); await c1.sync(); - }, this.test!.title); + }, task.name); }); - it('should maintain the correct weight for nodes newly created then concurrently removed', async function () { + it('should maintain the correct weight for nodes newly created then concurrently removed', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -403,12 +407,12 @@ describe('Text', function () { // assert.isOk(d1.getRoot().k1.checkWeight()); // assert.isOk(d2.getRoot().k1.checkWeight()); - }, this.test!.title); + }, task.name); }); }); describe('peri-text example: text concurrent edit', function () { - it('ex1. concurrent insertions on plain text', async function () { + it('ex1. concurrent insertions on plain text', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -441,10 +445,10 @@ describe('peri-text example: text concurrent edit', function () { '{"k1":[{"val":"The "},{"val":"quick "},{"val":"fox jumped"},{"val":" over the dog"},{"val":"."}]}', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('ex2. concurrent formatting and insertion', async function () { + it('ex2. concurrent formatting and insertion', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -484,10 +488,10 @@ describe('peri-text example: text concurrent edit', function () { // 'd1', // ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON()); - }, this.test!.title); + }, task.name); }); - it('ex3. overlapping formatting(bold)', async function () { + it('ex3. overlapping formatting(bold)', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -521,10 +525,12 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex4. overlapping different formatting(bold and italic)', async function () { + it('ex4. overlapping different formatting(bold and italic)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -558,10 +564,10 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex5. conflicting overlaps(highlighting)', async function () { + it('ex5. conflicting overlaps(highlighting)', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -595,10 +601,10 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex6. conflicting overlaps(bold) - 1', async function () { + it('ex6. conflicting overlaps(bold) - 1', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -639,10 +645,10 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex6. conflicting overlaps(bold) - 2', async function () { + it('ex6. conflicting overlaps(bold) - 2', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -682,10 +688,10 @@ describe('peri-text example: text concurrent edit', function () { await c2.sync(); await c1.sync(); assert.equal(d1.toSortedJSON(), d2.toSortedJSON(), 'd1'); - }, this.test!.title); + }, task.name); }); - it('ex7. multiple instances of the same mark', async function () { + it('ex7. multiple instances of the same mark', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -721,10 +727,10 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex8. text insertion at span boundaries(bold)', async function () { + it('ex8. text insertion at span boundaries(bold)', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -765,10 +771,10 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); - it('ex9. text insertion at span boundaries(link)', async function () { + it('ex9. text insertion at span boundaries(link)', async function ({ task }) { await withTwoClientsAndDocuments<{ k1: Text }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.k1 = new Text(); @@ -808,6 +814,6 @@ describe('peri-text example: text concurrent edit', function () { 'd1', ); assert.equal(d2.toSortedJSON(), d1.toSortedJSON(), 'd2'); - }, this.test!.title); + }, task.name); }); }); diff --git a/test/integration/tree_test.ts b/test/integration/tree_test.ts index e9ea9074b..d73eed329 100644 --- a/test/integration/tree_test.ts +++ b/test/integration/tree_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import yorkie, { Tree } from '@yorkie-js-sdk/src/yorkie'; import { toDocKey, @@ -23,8 +23,8 @@ import { import { TreeEditOpInfo } from '@yorkie-js-sdk/src/document/operation/operation'; describe('Tree', () => { - it('Can be created', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be created', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -67,8 +67,8 @@ describe('Tree', () => { }); }); - it('Can be created from JSON', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be created from JSON', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -100,8 +100,8 @@ describe('Tree', () => { }); }); - it('Can be created from JSON with attrebutes', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be created from JSON with attrebutes', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -127,8 +127,8 @@ describe('Tree', () => { }); }); - it('Can edit its content', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can edit its content', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -186,8 +186,8 @@ describe('Tree', () => { }); }); - it('Can be subscribed by handler', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be subscribed by handler', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -236,8 +236,8 @@ describe('Tree', () => { ); }); - it('Can be subscribed by handler(path)', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be subscribed by handler(path)', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -308,8 +308,8 @@ describe('Tree', () => { ); }); - it('Can edit its content with path', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can edit its content with path', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -399,8 +399,8 @@ describe('Tree', () => { }); }); - it('Can edit its content with path 2', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can edit its content with path 2', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -499,7 +499,7 @@ describe('Tree', () => { }); }); - it('Can sync its content with other clients', async function () { + it('Can sync its content with other clients', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -530,11 +530,11 @@ describe('Tree', () => { d2.getRoot().t.toXML(), /*html*/ `

hello

yorkie

`, ); - }, this.test!.title); + }, task.name); }); - it('Get correct range from index', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Get correct range from index', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -571,8 +571,8 @@ describe('Tree', () => { assert.deepEqual(tree.posRangeToIndexRange(range), [5, 7]); }); - it('Get correct range from path', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Get correct range from path', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -611,8 +611,8 @@ describe('Tree', () => { }); describe('Tree.edit', function () { - it('Can insert multiple text nodes', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can insert multiple text nodes', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -639,8 +639,8 @@ describe('Tree.edit', function () { assert.equal(doc.getRoot().t.toXML(), /*html*/ `

abcd

`); }); - it('Can insert multiple element nodes', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can insert multiple element nodes', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -670,8 +670,10 @@ describe('Tree.edit', function () { ); }); - it('Can edit its content with path when multi tree nodes passed', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can edit its content with path when multi tree nodes passed', function ({ + task, + }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -776,8 +778,8 @@ describe('Tree.edit', function () { }); }); - it('Detecting error for empty text', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Detecting error for empty text', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -804,8 +806,8 @@ describe('Tree.edit', function () { }, 'text node cannot have empty value'); }); - it('Detecting error for mixed type insertion', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Detecting error for mixed type insertion', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -832,8 +834,8 @@ describe('Tree.edit', function () { }, 'element node and text node cannot be passed together'); }); - it('Detecting correct error order [1]', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Detecting correct error order [1]', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -866,8 +868,8 @@ describe('Tree.edit', function () { }, 'element node and text node cannot be passed together'); }); - it('Detecting correct error order [2]', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Detecting correct error order [2]', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -894,8 +896,8 @@ describe('Tree.edit', function () { }, 'text node cannot have empty value'); }); - it('Detecting correct error order [3]', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Detecting correct error order [3]', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -922,8 +924,8 @@ describe('Tree.edit', function () { }, 'element node and text node cannot be passed together'); }); - it('delete nodes in a multi-level range test', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('delete nodes in a multi-level range test', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { root.t = new Tree({ @@ -972,8 +974,8 @@ describe('Tree.edit', function () { }); describe('Tree.style', function () { - it('Can be inserted with attributes', function () { - const doc = new yorkie.Document<{ t: Tree }>(toDocKey(this.test!.title)); + it('Can be inserted with attributes', function ({ task }) { + const doc = new yorkie.Document<{ t: Tree }>(toDocKey(task.name)); doc.update((root) => { root.t = new Tree({ type: 'doc', @@ -998,8 +1000,8 @@ describe('Tree.style', function () { ); }); - it('Can be edited with index', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be edited with index', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -1044,8 +1046,8 @@ describe('Tree.style', function () { }); }); - it('Can be edited with path', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can be edited with path', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -1095,7 +1097,9 @@ describe('Tree.style', function () { }); }); - it('Can sync its content containing attributes with other replicas', async function () { + it('Can sync its content containing attributes with other replicas', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1135,11 +1139,11 @@ describe('Tree.style', function () { d2.getRoot().t.toXML(), /*html*/ `

hello

`, ); - }, this.test!.title); + }, task.name); }); - it('style node with element attributes test', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('style node with element attributes test', function ({ task }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -1199,7 +1203,7 @@ describe('Tree.style', function () { }); describe('Concurrent editing, overlapping range', () => { - it('Can concurrently delete overlapping elements', async function () { + it('Can concurrently delete overlapping elements', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1232,10 +1236,10 @@ describe('Concurrent editing, overlapping range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ ``); assert.equal(d2.getRoot().t.toXML(), /*html*/ ``); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete overlapping text', async function () { + it('Can concurrently delete overlapping text', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1260,12 +1264,14 @@ describe('Concurrent editing, overlapping range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); }); describe('Concurrent editing, contained range', () => { - it('Can concurrently insert and delete contained elements of the same depth', async function () { + it('Can concurrently insert and delete contained elements of the same depth', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1300,10 +1306,12 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently multiple insert and delete contained elements of the same depth', async function () { + it('Can concurrently multiple insert and delete contained elements of the same depth', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1347,10 +1355,12 @@ describe('Concurrent editing, contained range', () => { d2.getRoot().t.toXML(), /*html*/ `

`, ); - }, this.test!.title); + }, task.name); }); - it('Detecting error when inserting and deleting contained elements at different depths', async function () { + it('Detecting error when inserting and deleting contained elements at different depths', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1376,10 +1386,10 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete contained elements', async function () { + it('Can concurrently delete contained elements', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1415,10 +1425,12 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ ``); assert.equal(d2.getRoot().t.toXML(), /*html*/ ``); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert and delete contained text', async function () { + it('Can concurrently insert and delete contained text', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1446,10 +1458,10 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

a

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

a

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete contained text', async function () { + it('Can concurrently delete contained text', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1477,10 +1489,12 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert and delete contained text and elements', async function () { + it('Can concurrently insert and delete contained text and elements', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1508,10 +1522,12 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ ``); assert.equal(d2.getRoot().t.toXML(), /*html*/ ``); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete contained text and elements', async function () { + it('Can concurrently delete contained text and elements', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1539,12 +1555,14 @@ describe('Concurrent editing, contained range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ ``); assert.equal(d2.getRoot().t.toXML(), /*html*/ ``); - }, this.test!.title); + }, task.name); }); }); describe('Concurrent editing, side by side range', () => { - it('Can concurrently insert side by side elements (left)', async function () { + it('Can concurrently insert side by side elements (left)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1578,10 +1596,12 @@ describe('Concurrent editing, side by side range', () => { d2.getRoot().t.toXML(), /*html*/ `

`, ); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert side by side elements (middle)', async function () { + it('Can concurrently insert side by side elements (middle)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1615,10 +1635,12 @@ describe('Concurrent editing, side by side range', () => { d2.getRoot().t.toXML(), /*html*/ `

`, ); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert side by side elements (right)', async function () { + it('Can concurrently insert side by side elements (right)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1652,10 +1674,12 @@ describe('Concurrent editing, side by side range', () => { d2.getRoot().t.toXML(), /*html*/ `

`, ); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert and delete side by side elements', async function () { + it('Can concurrently insert and delete side by side elements', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1686,10 +1710,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete and insert side by side elements', async function () { + it('Can concurrently delete and insert side by side elements', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1720,10 +1746,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete side by side elements', async function () { + it('Can concurrently delete side by side elements', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1760,10 +1788,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can insert text to the same position(left) concurrently', async function () { + it('Can insert text to the same position(left) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1786,10 +1816,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

BA12

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

BA12

`); - }, this.test!.title); + }, task.name); }); - it('Can insert text to the same position(middle) concurrently', async function () { + it('Can insert text to the same position(middle) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1812,10 +1844,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

1BA2

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

1BA2

`); - }, this.test!.title); + }, task.name); }); - it('Can insert text content to the same position(right) concurrently', async function () { + it('Can insert text content to the same position(right) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1838,10 +1872,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

12BA

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

12BA

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently insert and delete side by side text', async function () { + it('Can concurrently insert and delete side by side text', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1866,10 +1902,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

12a

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

12a

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete and insert side by side text', async function () { + it('Can concurrently delete and insert side by side text', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1894,10 +1932,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

a34

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

a34

`); - }, this.test!.title); + }, task.name); }); - it('Can concurrently delete side by side text blocks', async function () { + it('Can concurrently delete side by side text blocks', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1922,10 +1962,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can delete text content at the same position(left) concurrently', async function () { + it('Can delete text content at the same position(left) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1948,10 +1990,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

23

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

23

`); - }, this.test!.title); + }, task.name); }); - it('Can delete text content at the same position(middle) concurrently', async function () { + it('Can delete text content at the same position(middle) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -1974,10 +2018,12 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

13

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

13

`); - }, this.test!.title); + }, task.name); }); - it('Can delete text content at the same position(right) concurrently', async function () { + it('Can delete text content at the same position(right) concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2000,12 +2046,14 @@ describe('Concurrent editing, side by side range', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

12

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

12

`); - }, this.test!.title); + }, task.name); }); }); describe('Concurrent editing, complex cases', () => { - it('Can delete text content anchored to another concurrently', async function () { + it('Can delete text content anchored to another concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2028,10 +2076,10 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

3

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

3

`); - }, this.test!.title); + }, task.name); }); - it('Can produce complete deletion concurrently', async function () { + it('Can produce complete deletion concurrently', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2054,10 +2102,10 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

`); - }, this.test!.title); + }, task.name); }); - it('Can handle block delete concurrently', async function () { + it('Can handle block delete concurrently', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2082,10 +2130,12 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

3

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

3

`); - }, this.test!.title); + }, task.name); }); - it('Can handle insert within block delete concurrently', async function () { + it('Can handle insert within block delete concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2110,10 +2160,12 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

1B5

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

1B5

`); - }, this.test!.title); + }, task.name); }); - it('Can handle insert within block delete concurrently [2]', async function () { + it('Can handle insert within block delete concurrently [2]', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2145,10 +2197,12 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

1abc

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

1abc

`); - }, this.test!.title); + }, task.name); }); - it('Can handle block element insertion within delete [2]', async function () { + it('Can handle block element insertion within delete [2]', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2196,10 +2250,12 @@ describe('Concurrent editing, complex cases', () => { d2.getRoot().t.toXML(), /*html*/ `

cd

fg
`, ); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent element insert/ deletion (left)', async function () { + it('Can handle concurrent element insert/ deletion (left)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2240,10 +2296,12 @@ describe('Concurrent editing, complex cases', () => { d2.getRoot().t.toXML(), /*html*/ `

cd

fg
`, ); - }, this.test!.title); + }, task.name); }); - it('Can handle concurrent element insert/ deletion (right)', async function () { + it('Can handle concurrent element insert/ deletion (right)', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2285,10 +2343,12 @@ describe('Concurrent editing, complex cases', () => { d2.getRoot().t.toXML(), /*html*/ `

cd

fg
`, ); - }, this.test!.title); + }, task.name); }); - it('Can handle deletion of insertion anchor concurrently', async function () { + it('Can handle deletion of insertion anchor concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2312,10 +2372,12 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

A2

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

A2

`); - }, this.test!.title); + }, task.name); }); - it('Can handle deletion after insertion concurrently', async function () { + it('Can handle deletion after insertion concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2338,10 +2400,12 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

A

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

A

`); - }, this.test!.title); + }, task.name); }); - it('Can handle deletion before insertion concurrently', async function () { + it('Can handle deletion before insertion concurrently', async function ({ + task, + }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2364,13 +2428,15 @@ describe('Concurrent editing, complex cases', () => { await c1.sync(); assert.equal(d1.getRoot().t.toXML(), /*html*/ `

A

`); assert.equal(d2.getRoot().t.toXML(), /*html*/ `

A

`); - }, this.test!.title); + }, task.name); }); }); describe('testing edge cases', () => { - it('Can delete very first text when there is tombstone in front of target text', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can delete very first text when there is tombstone in front of target text', function ({ + task, + }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -2408,8 +2474,10 @@ describe('testing edge cases', () => { }); }); - it('Can delete node when there is more than one text node in front which has size bigger than 1', function () { - const key = toDocKey(`${this.test!.title}-${new Date().getTime()}`); + it('Can delete node when there is more than one text node in front which has size bigger than 1', function ({ + task, + }) { + const key = toDocKey(`${task.name}-${new Date().getTime()}`); const doc = new yorkie.Document<{ t: Tree }>(key); doc.update((root) => { @@ -2450,7 +2518,7 @@ describe('testing edge cases', () => { }); }); - it('split link can transmitted through rpc', async function () { + it('split link can transmitted through rpc', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2492,10 +2560,10 @@ describe('testing edge cases', () => { d2.getRoot().t.toXML(), /*html*/ `

a12321b

`, ); - }, this.test!.title); + }, task.name); }); - it('can calculate size of index tree correctly', async function () { + it('can calculate size of index tree correctly', async function ({ task }) { await withTwoClientsAndDocuments<{ t: Tree }>(async (c1, d1, c2, d2) => { d1.update((root) => { root.t = new Tree({ @@ -2527,6 +2595,6 @@ describe('testing edge cases', () => { const size = d1.getRoot().t.getIndexTree().getRoot().size; assert.equal(d2.getRoot().t.getIndexTree().getRoot().size, size); - }, this.test!.title); + }, task.name); }); }); diff --git a/test/unit/api/converter_test.ts b/test/unit/api/converter_test.ts index 491795934..929d8fe0c 100644 --- a/test/unit/api/converter_test.ts +++ b/test/unit/api/converter_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { Document } from '@yorkie-js-sdk/src/document/document'; import { converter } from '@yorkie-js-sdk/src/api/converter'; import { Counter, Text } from '@yorkie-js-sdk/src/yorkie'; diff --git a/test/unit/document/crdt/counter_test.ts b/test/unit/document/crdt/counter_test.ts index da8362476..d4d4f0a0e 100644 --- a/test/unit/document/crdt/counter_test.ts +++ b/test/unit/document/crdt/counter_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { InitialTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; import Long from 'long'; import { diff --git a/test/unit/document/crdt/primitive_test.ts b/test/unit/document/crdt/primitive_test.ts index 0ebb875fb..f320b40c7 100644 --- a/test/unit/document/crdt/primitive_test.ts +++ b/test/unit/document/crdt/primitive_test.ts @@ -15,7 +15,7 @@ */ import Long from 'long'; -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { InitialTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; import { Primitive, diff --git a/test/unit/document/crdt/rht_test.ts b/test/unit/document/crdt/rht_test.ts index 000b91315..785582b6c 100644 --- a/test/unit/document/crdt/rht_test.ts +++ b/test/unit/document/crdt/rht_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { RHT } from '@yorkie-js-sdk/src/document/crdt/rht'; import { InitialTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; import { Indexable } from '@yorkie-js-sdk/test/helper/helper'; diff --git a/test/unit/document/crdt/root_test.ts b/test/unit/document/crdt/root_test.ts index 065136090..d64f7245a 100644 --- a/test/unit/document/crdt/root_test.ts +++ b/test/unit/document/crdt/root_test.ts @@ -1,4 +1,4 @@ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { InitialChangeID } from '@yorkie-js-sdk/src/document/change/change_id'; import { CRDTRoot } from '@yorkie-js-sdk/src/document/crdt/root'; import { CRDTObject } from '@yorkie-js-sdk/src/document/crdt/object'; diff --git a/test/unit/document/crdt/tree_test.ts b/test/unit/document/crdt/tree_test.ts index 63bb794ce..87c771f30 100644 --- a/test/unit/document/crdt/tree_test.ts +++ b/test/unit/document/crdt/tree_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { ElementRHT } from '@yorkie-js-sdk/src/document/crdt/element_rht'; import { CRDTObject } from '@yorkie-js-sdk/src/document/crdt/object'; import { diff --git a/test/unit/document/document_test.ts b/test/unit/document/document_test.ts index 4478802a6..ea326bd6b 100644 --- a/test/unit/document/document_test.ts +++ b/test/unit/document/document_test.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; -import * as sinon from 'sinon'; +import { describe, it, assert, vi, afterEach } from 'vitest'; import { EventCollector } from '@yorkie-js-sdk/test/helper/helper'; import { MaxTimeTicket } from '@yorkie-js-sdk/src/document/time/ticket'; @@ -24,7 +23,11 @@ import { OperationInfo } from '@yorkie-js-sdk/src/document/operation/operation'; import { JSONArray, Text, Counter, Tree } from '@yorkie-js-sdk/src/yorkie'; import { CounterType } from '@yorkie-js-sdk/src/document/crdt/counter'; -describe('Document', function () { +describe.sequential('Document', function () { + afterEach(() => { + vi.restoreAllMocks(); + }); + it('doesnt return error when trying to delete a missing key', function () { const doc = new Document<{ k1?: string; @@ -943,7 +946,7 @@ describe('Document', function () { type EventForTest = Array; const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); const unsub = doc.subscribe(stub); @@ -975,7 +978,7 @@ describe('Document', function () { const doc = new Document('test-doc'); type EventForTest = Array; const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); const unsub = doc.subscribe(stub); @@ -1006,7 +1009,7 @@ describe('Document', function () { const doc = new Document('test-doc'); type EventForTest = Array; const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); const unsub = doc.subscribe(stub); @@ -1058,7 +1061,7 @@ describe('Document', function () { const doc = new Document('test-doc'); type EventForTest = Array; const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); const unsub = doc.subscribe(stub); @@ -1087,7 +1090,7 @@ describe('Document', function () { const doc = new Document('test-doc'); type EventForTest = Array; const eventCollector = new EventCollector(); - const stub = sinon.stub().callsFake((event) => { + const stub = vi.fn().mockImplementation((event) => { eventCollector.add(event.value.operations); }); const unsub = doc.subscribe(stub); diff --git a/test/unit/util/index_tree_test.ts b/test/unit/util/index_tree_test.ts index 75064b824..6497a0b69 100644 --- a/test/unit/util/index_tree_test.ts +++ b/test/unit/util/index_tree_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { buildIndexTree } from '@yorkie-js-sdk/test/helper/helper'; import { CRDTTreeNode } from '@yorkie-js-sdk/src/document/crdt/tree'; import { diff --git a/test/unit/util/llrb_tree_test.ts b/test/unit/util/llrb_tree_test.ts index fc1f71170..df8eb9feb 100644 --- a/test/unit/util/llrb_tree_test.ts +++ b/test/unit/util/llrb_tree_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { LLRBTree } from '@yorkie-js-sdk/src/util/llrb_tree'; const arrays = [ diff --git a/test/unit/util/logger_test.ts b/test/unit/util/logger_test.ts index 8ca45901d..a41950aaa 100644 --- a/test/unit/util/logger_test.ts +++ b/test/unit/util/logger_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { logger, setLogLevel, LogLevel } from '@yorkie-js-sdk/src/util/logger'; describe('logger', function () { diff --git a/test/unit/util/splay_tree_test.ts b/test/unit/util/splay_tree_test.ts index f13fda77d..49cddce09 100644 --- a/test/unit/util/splay_tree_test.ts +++ b/test/unit/util/splay_tree_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { assert } from 'chai'; +import { describe, it, assert } from 'vitest'; import { SplayNode, SplayTree } from '@yorkie-js-sdk/src/util/splay_tree'; class StringNode extends SplayNode { diff --git a/test/vitest/env/index.ts b/test/vitest/env/index.ts new file mode 100644 index 000000000..4cad2a424 --- /dev/null +++ b/test/vitest/env/index.ts @@ -0,0 +1,155 @@ +import { CookieJar, JSDOM, ResourceLoader, VirtualConsole } from 'jsdom'; +import { Environment } from 'vitest'; +import { populateGlobal } from 'vitest/environments'; + +function catchWindowErrors(window: Window) { + let userErrorListenerCount = 0; + function throwUnhandlerError(e: ErrorEvent) { + if (userErrorListenerCount === 0 && e.error != null) + process.emit('uncaughtException', e.error); + } + const addEventListener = window.addEventListener.bind(window); + const removeEventListener = window.removeEventListener.bind(window); + window.addEventListener('error', throwUnhandlerError); + window.addEventListener = function ( + ...args: Parameters + ) { + if (args[0] === 'error') userErrorListenerCount++; + return addEventListener.apply(this, args); + }; + window.removeEventListener = function ( + ...args: Parameters + ) { + if (args[0] === 'error' && userErrorListenerCount) userErrorListenerCount--; + return removeEventListener.apply(this, args); + }; + return function clearErrorHandlers() { + window.removeEventListener('error', throwUnhandlerError); + }; +} + +const AllowedKeys = ['Uint8Array']; + +export default { + name: 'jsdom', + transformMode: 'web', + async setupVM({ jsdom = {} }) { + const { + html = '', + userAgent, + url = 'http://localhost:3000', + contentType = 'text/html', + pretendToBeVisual = true, + includeNodeLocations = false, + runScripts = 'dangerously', + resources, + console = false, + cookieJar = false, + ...restOptions + } = jsdom as any; + const dom = new JSDOM(html, { + pretendToBeVisual, + resources: + resources ?? + (userAgent ? new ResourceLoader({ userAgent }) : undefined), + runScripts, + url, + virtualConsole: + console && globalThis.console + ? new VirtualConsole().sendTo(globalThis.console) + : undefined, + cookieJar: cookieJar ? new CookieJar() : undefined, + includeNodeLocations, + contentType, + userAgent, + ...restOptions, + }); + const clearWindowErrors = catchWindowErrors(dom.window as any); + + // TODO: browser doesn't expose Buffer, but a lot of dependencies use it + dom.window.Buffer = Buffer; + + // inject web globals if they missing in JSDOM but otherwise available in Nodejs + // https://nodejs.org/dist/latest/docs/api/globals.html + const globalNames = [ + 'structuredClone', + 'fetch', + 'Request', + 'Response', + 'BroadcastChannel', + 'MessageChannel', + 'MessagePort', + ] as const; + for (const name of globalNames) { + const value = globalThis[name]; + if ( + typeof value !== 'undefined' && + typeof dom.window[name] === 'undefined' + ) + dom.window[name] = value; + } + + return { + getVmContext() { + return dom.getInternalVMContext(); + }, + teardown() { + clearWindowErrors(); + dom.window.close(); + }, + }; + }, + async setup(global, { jsdom = {} }) { + const { CookieJar, JSDOM, ResourceLoader, VirtualConsole } = + (await require('jsdom')) as typeof import('jsdom'); + const { + html = '', + userAgent, + url = 'http://localhost:3000', + contentType = 'text/html', + pretendToBeVisual = true, + includeNodeLocations = false, + runScripts = 'dangerously', + resources, + console = false, + cookieJar = false, + ...restOptions + } = jsdom as any; + const dom = new JSDOM(html, { + pretendToBeVisual, + resources: + resources ?? + (userAgent ? new ResourceLoader({ userAgent }) : undefined), + runScripts, + url, + virtualConsole: + console && global.console + ? new VirtualConsole().sendTo(global.console) + : undefined, + cookieJar: cookieJar ? new CookieJar() : undefined, + includeNodeLocations, + contentType, + userAgent, + ...restOptions, + }); + + const { keys, originals } = populateGlobal(global, dom.window, { + bindFunctions: true, + }); + + AllowedKeys.forEach((key) => { + global[key] = originals.get(key); + }); + + const clearWindowErrors = catchWindowErrors(global); + + return { + teardown(global) { + clearWindowErrors(); + dom.window.close(); + keys.forEach((key) => delete global[key]); + originals.forEach((v, k) => (global[k] = v)); + }, + }; + }, +}; diff --git a/test/vitest/env/package-lock.json b/test/vitest/env/package-lock.json new file mode 100644 index 000000000..caf2af0bd --- /dev/null +++ b/test/vitest/env/package-lock.json @@ -0,0 +1,10 @@ +{ + "name": "vitest-environment-custom-jsdom", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vitest-environment-custom-jsdom" + } + } +} diff --git a/test/vitest/env/package.json b/test/vitest/env/package.json new file mode 100644 index 000000000..ed0773339 --- /dev/null +++ b/test/vitest/env/package.json @@ -0,0 +1,5 @@ +{ + "name": "vitest-environment-custom-jsdom", + "private": true, + "main": "index.ts" +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 000000000..9c904f6bc --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,24 @@ +import { defineConfig } from 'vitest/config'; +import tsconfigPaths from 'vite-tsconfig-paths'; + +// CI is true when running on GitHub Actions. +const isCI = process.env.CI === 'true'; + +export default defineConfig({ + test: { + include: ['**/*_{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + exclude: ['**/bench/*'], + coverage: { + provider: 'istanbul', + reporter: ['lcov', 'text-summary'], + }, + onConsoleLog() { + return false; + }, + environment: 'custom-jsdom', + globals: true, + singleThread: true, + testTimeout: isCI ? 5000 : Infinity, + }, + plugins: [tsconfigPaths()], +});