diff --git a/.gitignore b/.gitignore index 1baf345..0f7adc8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build /.idea *.iml out -.DS_Store \ No newline at end of file +.DS_Store +.kotlin/ diff --git a/README.md b/README.md index ffb68f6..82ddc73 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ All credit for the implementation goes to original authors. ## Features -All features from version `4.10` of the original library are present, except for: +All features from version `4.12` of the original library are present, except for: +- fuzzy patches - unified diff, which heavily uses file read/write and therefore needs a more complicated rewrite -- diff-utils-jgit, which uses JVM-only jgit library +- diff-utils-jgit, which uses JVM-only JGit Please refer to the original guides for more information. @@ -29,8 +30,10 @@ Currently, artifacts for the following platforms are supported: - WebAssembly (JS and WASI) - Native -The supported Native targets are (following the Kotlin/Native [target support guidelines](https://kotlinlang.org/docs/native-target-support.html)): +The supported Native targets are (following the Kotlin/Native [target support guidelines][1]): | Tier 1 | Tier 2 | Tier 3 | |:---------|:---------|:---------| | macosX64 | linuxX64 | mingwX64 | + +[1]: https://kotlinlang.org/docs/native-target-support.html diff --git a/build.gradle.kts b/build.gradle.kts index 2cf2a7a..f51697b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest plugins { kotlin("multiplatform") @@ -31,12 +32,17 @@ kotlin { jvm { compilations.configureEach { - compilerOptions.configure { - // Minimum bytecode level is 52 - jvmTarget = JvmTarget.JVM_1_8 - - // Output interfaces with default methods - freeCompilerArgs.add("-Xjvm-default=all") + compileTaskProvider.configure { + compilerOptions { + // Minimum bytecode level is 52 + jvmTarget = JvmTarget.JVM_1_8 + + // Output interfaces with default methods + freeCompilerArgs.addAll( + "-Xjvm-default=all", // Output interfaces with default methods + "-Xno-param-assertions", // Remove Intrinsics.checkNotNullParameter + ) + } } } @@ -48,23 +54,31 @@ kotlin { } js { - browser() - nodejs() + val testConfig: (KotlinJsTest).() -> Unit = { + useMocha { + // Override default 2s timeout + timeout = "120s" + } + } + + browser { + testTask(testConfig) + } + + nodejs { + testTask(testConfig) + } } @OptIn(ExperimentalWasmDsl::class) wasmJs { browser() nodejs() - applyBinaryen() } @OptIn(ExperimentalWasmDsl::class) wasmWasi { nodejs() - - // Available since 2.0 - // applyBinaryen() } linuxX64() diff --git a/detekt.yml b/detekt.yml index ff5ef36..4ce30a7 100644 --- a/detekt.yml +++ b/detekt.yml @@ -15,3 +15,12 @@ formatting: active: false TrailingCommaOnDeclarationSite: active: true +complexity: + ComplexCondition: + active: false + CyclomaticComplexMethod: + active: false + NestedBlockDepth: + active: false + LongParameterList: + functionThreshold: 7 diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index e0dff77..c75bf7a 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -8,62 +8,54 @@ integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== "@discoveryjs/json-ext@^0.5.0": - version "0.5.6" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.6.tgz#d5e0706cf8c6acd8c6032f8d54070af261bbbb2f" - integrity sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA== + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@jridgewell/gen-mapping@^0.3.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== dependencies: - "@jridgewell/set-array" "^1.0.1" + "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/source-map@^0.3.3": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" - integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" -"@jridgewell/trace-mapping@^0.3.17": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== "@types/cookie@^0.4.1": version "0.4.1" @@ -71,52 +63,49 @@ integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== "@types/cors@^2.8.12": - version "2.8.13" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" - integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + version "2.8.17" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" + integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== dependencies: "@types/node" "*" "@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== dependencies: "@types/eslint" "*" "@types/estree" "*" "@types/eslint@*": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.2.1.tgz#13f3d69bac93c2ae008019c28783868d0a1d6605" - integrity sha512-UP9rzNn/XyGwb5RQ2fok+DzcIRIYwc16qTXse5+Smsy8MOIccCChT15KAwnsgQx4PzJkaMq4myFyZ4CL5TjhIQ== + version "8.56.10" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" + integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== dependencies: "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" - integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== - -"@types/estree@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/json-schema@*", "@types/json-schema@^7.0.8": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*", "@types/node@>=10.0.0": - version "17.0.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.4.tgz#fec0ce0526abb6062fd206d72a642811b887a111" - integrity sha512-6xwbrW4JJiJLgF+zNypN5wr2ykM9/jHcL7rQ8fZe2vuftggjzZeRSM4OwRc6Xk8qWjwJ99qVHo/JgOGmomWRog== + version "20.12.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" + integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== + dependencies: + undici-types "~5.26.4" -"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" - integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.11.5": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== dependencies: "@webassemblyjs/helper-numbers" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" @@ -131,10 +120,10 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== -"@webassemblyjs/helper-buffer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" - integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== "@webassemblyjs/helper-numbers@1.11.6": version "1.11.6" @@ -150,15 +139,15 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-section@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" - integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/ieee754@1.11.6": version "1.11.6" @@ -180,58 +169,58 @@ integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== "@webassemblyjs/wasm-edit@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" - integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-opt" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - "@webassemblyjs/wast-printer" "1.11.6" - -"@webassemblyjs/wasm-gen@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" - integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== - dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-opt@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" - integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" - integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-api-error" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wast-printer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" - integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^2.1.0": @@ -265,27 +254,22 @@ abab@^2.0.6: integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== accepts@~1.3.4: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" + mime-types "~2.1.34" + negotiator "0.6.3" acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== -acorn@^8.7.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - -acorn@^8.8.2: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.7.1, acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== ajv-keywords@^3.5.2: version "3.5.2" @@ -348,20 +332,22 @@ binary-extensions@^2.0.0: integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== body-parser@^1.19.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4" - integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA== + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== dependencies: - bytes "3.1.1" - content-type "~1.0.4" + bytes "3.1.2" + content-type "~1.0.5" debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.6" - raw-body "2.4.2" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" type-is "~1.6.18" + unpipe "1.0.0" brace-expansion@^1.1.7: version "1.1.11" @@ -391,35 +377,45 @@ browser-stdout@1.3.1: integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserslist@^4.14.5: - version "4.19.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -bytes@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" - integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" camelcase@^6.0.0: version "6.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.1.tgz#250fd350cfd555d0d2160b1d51510eaf8326e86e" integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== -caniuse-lite@^1.0.30001286: - version "1.0.30001292" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001292.tgz#4a55f61c06abc9595965cfd77897dc7bc1cdc456" - integrity sha512-jnT4Tq0Q4ma+6nncYQVe7d73kmDmE9C3OGTx3MvW7lBM/eY1S1DZTMBON7dqV481RhNiS5OxD7k9JQvmDOTirw== +caniuse-lite@^1.0.30001587: + version "1.0.30001620" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz#78bb6f35b8fe315b96b8590597094145d0b146b4" + integrity sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew== chalk@^4.1.0: version "4.1.2" @@ -445,9 +441,9 @@ chokidar@3.5.3: fsevents "~2.3.2" chokidar@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -495,9 +491,9 @@ color-name@~1.1.4: integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colorette@^2.0.14: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== commander@^10.0.1: version "10.0.1" @@ -524,15 +520,15 @@ connect@^3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== cookie@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" - integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== cors@~2.8.5: version "2.8.5" @@ -554,7 +550,7 @@ cross-spawn@^7.0.3: custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== date-format@^4.0.14: version "4.0.14" @@ -568,34 +564,41 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4.3.4, debug@^4.3.4, debug@~4.3.2: +debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@~4.3.1: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - decamelize@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== diff@5.0.0: version "5.0.0" @@ -605,7 +608,7 @@ diff@5.0.0: dom-serialize@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - integrity sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs= + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== dependencies: custom-event "~1.0.0" ent "~2.2.0" @@ -615,12 +618,12 @@ dom-serialize@^2.2.1: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.17: - version "1.4.28" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.28.tgz#fef0e92e281df6d568f482d8d53c34ca5374de48" - integrity sha512-Gzbf0wUtKfyPaqf0Plz+Ctinf9eQIzxEqBHwSvbGfeOm9GMNdLxyu1dNiCUfM+x6r4BE0xUJNh3Nmg9gfAtTmg== +electron-to-chromium@^1.4.668: + version "1.4.774" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.774.tgz#1017d1758aaeeefe5423aa9d67b4b1e5d1d0a856" + integrity sha512-132O1XCd7zcTkzS3FgkAzKmnBuNJjK8WjcTtNuoylj7MYbqw5eXehjQ5OK91g0zm7OTKIPeaAG4CPoRfD9M1Mg== emoji-regex@^8.0.0: version "8.0.0" @@ -630,17 +633,17 @@ emoji-regex@^8.0.0: encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -engine.io-parser@~5.0.3: - version "5.0.5" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.5.tgz#c6fa52e57d8d2dc68b24754348f779aa6e44f886" - integrity sha512-mjEyaa4zhuuRhaSLOdjEb57X0XPP9JEsnXI4E+ivhwT0GgzUogARx4MqoY1jQyB+4Bkz3BUOmzL7t9RMKmlG3g== +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== -engine.io@~6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.1.tgz#e3f7826ebc4140db9bbaa9021ad6b1efb175878f" - integrity sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA== +engine.io@~6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.4.tgz#6822debf324e781add2254e912f8568508850cdc" + integrity sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg== dependencies: "@types/cookie" "^0.4.1" "@types/cors" "^2.8.12" @@ -650,13 +653,13 @@ engine.io@~6.2.1: cookie "~0.4.1" cors "~2.8.5" debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" + engine.io-parser "~5.2.1" + ws "~8.11.0" enhanced-resolve@^5.13.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" - integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + version "5.16.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" + integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -664,27 +667,44 @@ enhanced-resolve@^5.13.0: ent@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== envinfo@^7.7.3: - version "7.8.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" - integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== -es-module-lexer@^1.2.1: +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" - integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.2.1: + version "1.5.3" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.3.tgz#25969419de9c0b1fbe54279789023e8a9a788412" + integrity sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg== escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== escape-string-regexp@4.0.0: version "4.0.0" @@ -742,9 +762,9 @@ fast-json-stable-stringify@^2.0.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== fill-range@^7.0.1: version "7.0.1" @@ -788,14 +808,14 @@ flat@^5.0.2: integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== flatted@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== follow-redirects@^1.0.0: - version "1.14.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" - integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== format-util@^1.0.5: version "1.0.5" @@ -821,16 +841,27 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -843,7 +874,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.2.0, glob@^7.1.3, glob@^7.1.7: +glob@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -855,47 +886,73 @@ glob@7.2.0, glob@^7.1.3, glob@^7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6: - version "4.2.8" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" - integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" -graceful-fs@^4.2.10: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has@^1.0.3: +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: - function-bind "^1.1.1" + function-bind "^1.1.2" he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" + depd "2.0.0" inherits "2.0.4" setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" + statuses "2.0.1" toidentifier "1.0.1" http-proxy@^1.18.1: @@ -922,9 +979,9 @@ iconv-lite@^0.6.3: safer-buffer ">= 2.1.2 < 3.0.0" import-local@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" - integrity sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -954,12 +1011,12 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.11.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - has "^1.0.3" + hasown "^2.0.0" is-extglob@^2.1.1: version "2.1.1" @@ -1001,19 +1058,19 @@ is-unicode-supported@^0.1.0: integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== isbinaryfile@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.8.tgz#5d34b94865bd4946633ecc78a026fc76c5b11fcf" - integrity sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w== + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== jest-worker@^27.4.5: version "27.5.1" @@ -1044,7 +1101,7 @@ json-schema-traverse@^0.4.1: jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== optionalDependencies: graceful-fs "^4.1.6" @@ -1114,9 +1171,9 @@ kind-of@^6.0.2: integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== loader-runner@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" - integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== locate-path@^5.0.0: version "5.0.0" @@ -1146,37 +1203,37 @@ log-symbols@4.1.0: is-unicode-supported "^0.1.0" log4js@^6.4.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.7.1.tgz#06e12b1ac915dd1067146ffad8215f666f7d2c51" - integrity sha512-lzbd0Eq1HRdWM2abSD7mk6YIVY0AogGJzb/z+lqzRk+8+XJP+M6L1MS5FUSc3jjGru4dbKjEMJmqlsoYYpuivQ== + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== dependencies: date-format "^4.0.14" debug "^4.3.4" flatted "^3.2.7" rfdc "^1.3.0" - streamroller "^3.1.3" + streamroller "^3.1.5" media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.27, mime-types@~2.1.24: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== +mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.51.0" + mime-db "1.52.0" mime@^2.5.2: version "2.6.0" @@ -1197,15 +1254,17 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.3: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" -minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== +minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.5: version "0.5.6" @@ -1244,7 +1303,7 @@ mocha@10.2.0: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" @@ -1261,20 +1320,20 @@ nanoid@3.3.3: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-releases@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" - integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -1284,12 +1343,24 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== dependencies: ee-first "1.1.1" @@ -1358,10 +1429,10 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.0" @@ -1376,19 +1447,21 @@ pkg-dir@^4.2.0: find-up "^4.0.0" punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== qjobs@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== -qs@6.9.6: - version "6.9.6" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" - integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" randombytes@^2.1.0: version "2.1.0" @@ -1402,13 +1475,13 @@ range-parser@^1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" - integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: - bytes "3.1.1" - http-errors "1.8.1" + bytes "3.1.2" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" @@ -1434,7 +1507,7 @@ require-directory@^2.1.1: requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== resolve-cwd@^3.0.0: version "3.0.0" @@ -1449,20 +1522,20 @@ resolve-from@^5.0.0: integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve@^1.20.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.11.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -1479,16 +1552,7 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.1.2: +schema-utils@^3.1.1, schema-utils@^3.1.2: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -1505,12 +1569,24 @@ serialize-javascript@6.0.0: randombytes "^2.1.0" serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -1535,35 +1611,49 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -socket.io-adapter@~2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" - integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +socket.io-adapter@~2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz#4fdb1358667f6d68f25343353bd99bd11ee41006" + integrity sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg== + dependencies: + debug "~4.3.4" + ws "~8.11.0" -socket.io-parser@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" - integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== dependencies: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" socket.io@^4.4.1: - version "4.5.4" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.4.tgz#a4513f06e87451c17013b8d13fdfaf8da5a86a90" - integrity sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ== + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" + integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== dependencies: accepts "~1.3.4" base64id "~2.0.0" + cors "~2.8.5" debug "~4.3.2" - engine.io "~6.2.1" - socket.io-adapter "~2.4.0" - socket.io-parser "~4.2.1" + engine.io "~6.5.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== source-map-loader@4.0.1: version "4.0.1" @@ -1587,15 +1677,20 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -streamroller@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.4.tgz#844a18e795d39c1089a8216e66a1cf1151271df0" - integrity sha512-Ha1Ccw2/N5C/IF8Do6zgNe8F3jQo8MPBnMBGvX0QjNv/I97BcNRzK6/mzOpZHHK7DjMLTI3c7Xw7Y1KvdChkvw== +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== dependencies: date-format "^4.0.14" debug "^4.3.4" @@ -1647,20 +1742,20 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== terser-webpack-plugin@^5.3.7: - version "5.3.9" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" - integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: - "@jridgewell/trace-mapping" "^0.3.17" + "@jridgewell/trace-mapping" "^0.3.20" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.1" - terser "^5.16.8" + terser "^5.26.0" -terser@^5.16.8: - version "5.18.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.18.2.tgz#ff3072a0faf21ffd38f99acc9a0ddf7b5f07b948" - integrity sha512-Ah19JS86ypbJzTzvUCX7KOsEIhDaRONungA4aYBjEP3JZRf4ocuDzTg4QWZnPn9DEMiMYGJPiSOy7aykoCc70w== +terser@^5.26.0: + version "5.31.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" + integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -1668,11 +1763,9 @@ terser@^5.16.8: source-map-support "~0.5.20" tmp@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== to-regex-range@^5.0.1: version "5.0.1" @@ -1700,9 +1793,14 @@ typescript@5.0.4: integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== ua-parser-js@^0.7.30: - version "0.7.32" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.32.tgz#cd8c639cdca949e30fa68c44b7813ef13e36d211" - integrity sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw== + version "0.7.37" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.37.tgz#e464e66dac2d33a7a1251d7d7a99d6157ec27832" + integrity sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" @@ -1712,7 +1810,15 @@ universalify@^0.1.0: unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.13: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" uri-js@^4.2.2: version "4.4.1" @@ -1724,22 +1830,22 @@ uri-js@^4.2.2: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== vary@^1: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + version "2.4.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -1771,11 +1877,12 @@ webpack-merge@^4.1.5: lodash "^4.17.15" webpack-merge@^5.7.3: - version "5.8.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== dependencies: clone-deep "^4.0.1" + flat "^5.0.2" wildcard "^2.0.0" webpack-sources@^3.2.3: @@ -1828,9 +1935,9 @@ which@^2.0.1: isexe "^2.0.0" wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== workerpool@6.2.1: version "6.2.1" @@ -1851,10 +1958,10 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== y18n@^5.0.5: version "5.0.8" diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/DiffUtils.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/DiffUtils.kt index cb45f59..b76548c 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/DiffUtils.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/DiffUtils.kt @@ -22,6 +22,7 @@ package io.github.petertrr.diffutils import io.github.petertrr.diffutils.algorithm.DiffAlgorithm import io.github.petertrr.diffutils.algorithm.DiffAlgorithmListener +import io.github.petertrr.diffutils.algorithm.DiffEqualizer import io.github.petertrr.diffutils.algorithm.NoopAlgorithmListener import io.github.petertrr.diffutils.algorithm.myers.MyersDiff import io.github.petertrr.diffutils.patch.Patch @@ -73,7 +74,7 @@ public fun diff( public fun diff( source: List, target: List, - equalizer: ((T, T) -> Boolean), + equalizer: DiffEqualizer, ): Patch = diff( source = source, diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/Change.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/Change.kt index d4b264f..02e61dc 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/Change.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/Change.kt @@ -19,11 +19,12 @@ package io.github.petertrr.diffutils.algorithm import io.github.petertrr.diffutils.patch.DeltaType +import kotlin.jvm.JvmField public data class Change( - val deltaType: DeltaType, - val startOriginal: Int, - val endOriginal: Int, - val startRevised: Int, - val endRevised: Int, + @JvmField val deltaType: DeltaType, + @JvmField val startOriginal: Int, + @JvmField val endOriginal: Int, + @JvmField val startRevised: Int, + @JvmField val endRevised: Int, ) diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/DiffEqualizer.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/DiffEqualizer.kt new file mode 100644 index 0000000..18020a1 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/DiffEqualizer.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.algorithm + +public fun interface DiffEqualizer { + public fun test(one: T, two: T): Boolean +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/EqualsDiffEqualizer.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/EqualsDiffEqualizer.kt new file mode 100644 index 0000000..cfed015 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/EqualsDiffEqualizer.kt @@ -0,0 +1,21 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.algorithm + +public class EqualsDiffEqualizer : DiffEqualizer { + override fun test(one: T, two: T): Boolean = + one == two +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/IgnoreWsStringDiffEqualizer.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/IgnoreWsStringDiffEqualizer.kt new file mode 100644 index 0000000..ed1c2cf --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/IgnoreWsStringDiffEqualizer.kt @@ -0,0 +1,25 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.algorithm + +public class IgnoreWsStringDiffEqualizer : DiffEqualizer { + private companion object { + private val ws = Regex("\\s+") + } + + override fun test(one: String, two: String): Boolean = + ws.replace(one.trim(), " ") == ws.replace(two.trim(), " ") +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiff.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiff.kt index 3f5fa94..8eae8c1 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiff.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiff.kt @@ -21,12 +21,14 @@ package io.github.petertrr.diffutils.algorithm.myers import io.github.petertrr.diffutils.algorithm.Change import io.github.petertrr.diffutils.algorithm.DiffAlgorithm import io.github.petertrr.diffutils.algorithm.DiffAlgorithmListener +import io.github.petertrr.diffutils.algorithm.DiffEqualizer +import io.github.petertrr.diffutils.algorithm.EqualsDiffEqualizer import io.github.petertrr.diffutils.patch.DeltaType /** * A clean-room implementation of Eugene Myers greedy differencing algorithm. */ -public class MyersDiff(private val equalizer: (T, T) -> Boolean = { t1, t2 -> t1 == t2 }) : DiffAlgorithm { +public class MyersDiff(private val equalizer: DiffEqualizer = EqualsDiffEqualizer()) : DiffAlgorithm { /** * Returns an empty diff if we get an error while procession the difference. */ @@ -82,7 +84,7 @@ public class MyersDiff(private val equalizer: (T, T) -> Boolean = { t1, t2 -> var j = i - k var node = PathNode(i, j, snake = false, bootstrap = false, prev = prev) - while (i < origSize && j < revSize && equalizer.invoke(orig[i], rev[j])) { + while (i < origSize && j < revSize && equalizer.test(orig[i], rev[j])) { i++ j++ } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpace.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpace.kt new file mode 100644 index 0000000..1567987 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpace.kt @@ -0,0 +1,225 @@ +/* + * Copyright 2024 Peter Trifanov. + * Copyright 2009-2021 java-diff-utils. + * + * 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. + * + * This file has been modified by Peter Trifanov when porting from Java to Kotlin. + */ +package io.github.petertrr.diffutils.algorithm.myers + +import io.github.petertrr.diffutils.algorithm.Change +import io.github.petertrr.diffutils.algorithm.DiffAlgorithm +import io.github.petertrr.diffutils.algorithm.DiffAlgorithmListener +import io.github.petertrr.diffutils.algorithm.DiffEqualizer +import io.github.petertrr.diffutils.algorithm.EqualsDiffEqualizer +import io.github.petertrr.diffutils.patch.DeltaType +import kotlin.jvm.JvmField + +public class MyersDiffWithLinearSpace( + private val equalizer: DiffEqualizer = EqualsDiffEqualizer(), +) : DiffAlgorithm { + public override fun computeDiff(source: List, target: List, progress: DiffAlgorithmListener): List { + progress.diffStart() + + val data = DiffData(source, target) + val maxIdx = source.size + target.size + val progressWrapper = DelegateAlgorithmListener(maxIdx, progress) + buildScript(data, 0, source.size, 0, target.size, progressWrapper) + + progress.diffEnd() + return data.script + } + + private fun buildScript( + data: DiffData, + start1: Int, + end1: Int, + start2: Int, + end2: Int, + progress: DiffAlgorithmListener, + ) { + progress.diffStep((end1 - start1) / 2 + (end2 - start2) / 2, -1) + + val middle = getMiddleSnake(data, start1, end1, start2, end2) + + if (middle == null || + middle.start == end1 && middle.diag == end1 - end2 || + middle.end == start1 && middle.diag == start1 - start2 + ) { + var i = start1 + var j = start2 + + while (i < end1 || j < end2) { + if (i < end1 && j < end2 && equalizer.test(data.source[i], data.target[j])) { + ++i + ++j + } else { + // TODO: compress these commands + if (end1 - start1 > end2 - start2) { + if (data.script.isEmpty() || + data.script[data.script.size - 1].endOriginal != i || + data.script[data.script.size - 1].deltaType != DeltaType.DELETE + ) { + data.script.add(Change(DeltaType.DELETE, i, i + 1, j, j)) + } else { + data.script[data.script.size - 1] = + data.script[data.script.size - 1].copy(endOriginal = i + 1) + } + + ++i + } else { + if (data.script.isEmpty() || + data.script[data.script.size - 1].endRevised != j || + data.script[data.script.size - 1].deltaType != DeltaType.INSERT + ) { + data.script.add(Change(DeltaType.INSERT, i, i, j, j + 1)) + } else { + data.script[data.script.size - 1] = + data.script[data.script.size - 1].copy(endRevised = j + 1) + } + + ++j + } + } + } + } else { + buildScript(data, start1, middle.start, start2, middle.start - middle.diag, progress) + buildScript(data, middle.end, end1, middle.end - middle.diag, end2, progress) + } + } + + private fun getMiddleSnake(data: DiffData, start1: Int, end1: Int, start2: Int, end2: Int): Snake? { + val m = end1 - start1 + val n = end2 - start2 + + if (m == 0 || n == 0) { + return null + } + + val delta = m - n + val sum = n + m + val offset = (if (sum % 2 == 0) sum else sum + 1) / 2 + data.vDown[1 + offset] = start1 + data.vUp[1 + offset] = end1 + 1 + + for (d in 0..offset) { + // Down + var k = -d + + while (k <= d) { + // First step + val i = k + offset + + if (k == -d || k != d && data.vDown[i - 1] < data.vDown[i + 1]) { + data.vDown[i] = data.vDown[i + 1] + } else { + data.vDown[i] = data.vDown[i - 1] + 1 + } + + var x = data.vDown[i] + var y = x - start1 + start2 - k + + while (x < end1 && y < end2 && equalizer.test(data.source[x], data.target[y])) { + data.vDown[i] = ++x + ++y + } + + // Second step + if (delta % 2 != 0 && delta - d <= k && k <= delta + d) { + if (data.vUp[i - delta] <= data.vDown[i]) { + return buildSnake(data, data.vUp[i - delta], k + start1 - start2, end1, end2) + } + } + + k += 2 + } + + // Up + k = delta - d + + while (k <= delta + d) { + // First step + val i = k + offset - delta + + if (k == delta - d || k != delta + d && data.vUp[i + 1] <= data.vUp[i - 1]) { + data.vUp[i] = data.vUp[i + 1] - 1 + } else { + data.vUp[i] = data.vUp[i - 1] + } + + var x = data.vUp[i] - 1 + var y = x - start1 + start2 - k + + while (x >= start1 && y >= start2 && equalizer.test(data.source[x], data.target[y])) { + data.vUp[i] = x-- + y-- + } + + // Second step + if (delta % 2 == 0 && -d <= k && k <= d) { + if (data.vUp[i] <= data.vDown[i + delta]) { + return buildSnake(data, data.vUp[i], k + start1 - start2, end1, end2) + } + } + + k += 2 + } + } + + // According to Myers, this cannot happen + error("Could not find a diff path") + } + + private fun buildSnake(data: DiffData, start: Int, diag: Int, end1: Int, end2: Int): Snake { + var end = start + + while (end - diag < end2 && end < end1 && equalizer.test(data.source[end], data.target[end - diag])) { + ++end + } + + return Snake(start, end, diag) + } + + private class DelegateAlgorithmListener( + val maxIdx: Int, + val delegate: DiffAlgorithmListener, + ) : DiffAlgorithmListener by delegate { + override fun diffStep(value: Int, max: Int) { + delegate.diffStep(value, maxIdx) + } + } + + private class DiffData( + @JvmField val source: List, + @JvmField val target: List, + ) { + @JvmField + val size = source.size + target.size + 2 + + @JvmField + val vDown = IntArray(size) + + @JvmField + val vUp = IntArray(size) + + @JvmField + val script = ArrayList() + } + + private class Snake( + @JvmField val start: Int, + @JvmField val end: Int, + @JvmField val diag: Int, + ) +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/PathNode.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/PathNode.kt index e8d4363..b6aa1bb 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/PathNode.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/algorithm/myers/PathNode.kt @@ -18,6 +18,8 @@ */ package io.github.petertrr.diffutils.algorithm.myers +import kotlin.jvm.JvmField + /** * A node in a diffpath. * @@ -29,20 +31,17 @@ package io.github.petertrr.diffutils.algorithm.myers * @param prev The previous node in the path, if any */ internal class PathNode( - val i: Int, - val j: Int, - val snake: Boolean, - val bootstrap: Boolean, + @JvmField val i: Int, + @JvmField val j: Int, + @JvmField val snake: Boolean, + @JvmField val bootstrap: Boolean, prev: PathNode? = null, ) { /** * The previous node in the path. */ - val prev: PathNode? = if (snake) { - prev - } else { - prev?.previousSnake() - } + @JvmField + val prev: PathNode? = if (snake) prev else prev?.previousSnake() /** * Skips sequences of [PathNodes][PathNode] until a snake or bootstrap node is found, or the end of the diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/ChangeDelta.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/ChangeDelta.kt index 3367b14..7974351 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/ChangeDelta.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/ChangeDelta.kt @@ -50,4 +50,7 @@ public data class ChangeDelta( override fun withChunks(original: Chunk, revised: Chunk): Delta = ChangeDelta(original, revised) + + override fun toString(): String = + "[ChangeDelta, position: ${source.position}, lines: ${source.lines} to ${target.lines}]" } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Chunk.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Chunk.kt index 2f83153..c4e2eef 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Chunk.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Chunk.kt @@ -18,6 +18,8 @@ */ package io.github.petertrr.diffutils.patch +import kotlin.jvm.JvmField + /** * Holds the information about the part of text involved in the diff process. * @@ -31,16 +33,16 @@ package io.github.petertrr.diffutils.patch * @param T The type of the compared elements in the 'lines' */ public data class Chunk( - val position: Int, - val lines: List, - val changePosition: List? = null, + @JvmField val position: Int, + @JvmField val lines: List, + @JvmField val changePosition: List? = null, ) { /** * Verifies that this chunk's saved text matches the corresponding text in the given sequence. * * @param target The sequence to verify against */ - public fun verify(target: List): VerifyChunk { + public fun verifyChunk(target: List): VerifyChunk { val targetSize = target.size if (position > targetSize || last() > targetSize) { diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/DeleteDelta.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/DeleteDelta.kt index f24a7d5..06a7473 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/DeleteDelta.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/DeleteDelta.kt @@ -41,4 +41,7 @@ public data class DeleteDelta( override fun withChunks(original: Chunk, revised: Chunk): Delta = DeleteDelta(original, revised) + + override fun toString(): String = + "[DeleteDelta, position: ${source.position}, lines: ${source.lines}]" } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Delta.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Delta.kt index 83c58ee..53984fb 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Delta.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Delta.kt @@ -29,7 +29,7 @@ public sealed class Delta(public val type: DeltaType) { * Verify the chunk of this delta, to fit the target. */ protected open fun verifyChunkToFitTarget(target: List): VerifyChunk = - source.verify(target) + source.verifyChunk(target) public open fun verifyAndApplyTo(target: MutableList): VerifyChunk { val verify = verifyChunkToFitTarget(target) diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/EqualDelta.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/EqualDelta.kt index 86a7fff..f7976cc 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/EqualDelta.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/EqualDelta.kt @@ -32,4 +32,7 @@ public data class EqualDelta( override fun withChunks(original: Chunk, revised: Chunk): Delta = EqualDelta(original, revised) + + override fun toString(): String = + "[EqualDelta, position: ${source.position}, lines: ${source.lines}]" } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/InsertDelta.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/InsertDelta.kt index b1b94f2..5ad0305 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/InsertDelta.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/InsertDelta.kt @@ -41,4 +41,7 @@ public data class InsertDelta( override fun withChunks(original: Chunk, revised: Chunk): Delta = InsertDelta(original, revised) + + override fun toString(): String = + "[InsertDelta, position: ${source.position}, lines: ${target.lines}]" } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Patch.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Patch.kt index d304098..e3c5075 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Patch.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/patch/Patch.kt @@ -19,6 +19,8 @@ package io.github.petertrr.diffutils.patch import io.github.petertrr.diffutils.algorithm.Change +import kotlin.jvm.JvmOverloads +import kotlin.jvm.JvmStatic /** * Describes the patch holding all deltas between the original and revised texts. @@ -87,17 +89,13 @@ public class Patch(private var conflictOutput: ConflictOutput = ExceptionP } public companion object { - public fun generate(original: List, revised: List, changes: List): Patch = - generate(original, revised, changes, false) - - private fun buildChunk(start: Int, end: Int, data: List): Chunk = - Chunk(start, data.subList(start, end)) - + @JvmStatic + @JvmOverloads public fun generate( original: List, revised: List, changes: List, - includeEquals: Boolean, + includeEquals: Boolean = false, ): Patch { val patch = Patch() var startOriginal = 0 @@ -144,5 +142,8 @@ public class Patch(private var conflictOutput: ConflictOutput = ExceptionP return patch } + + private fun buildChunk(start: Int, end: Int, data: List): Chunk = + Chunk(start, data.slice(start.. { + val list = ArrayList(line.length) + + for (character in line.toCharArray()) { + list.add(character.toString()) + } + + return list + } +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineNormalizer.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineNormalizer.kt new file mode 100644 index 0000000..45c79c1 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineNormalizer.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +public fun interface DiffLineNormalizer { + public fun normalize(line: String): String +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineProcessor.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineProcessor.kt new file mode 100644 index 0000000..5c78ec5 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffLineProcessor.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +public fun interface DiffLineProcessor { + public fun process(line: String): String +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRow.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRow.kt index 94434f6..4e72caa 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRow.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRow.kt @@ -18,10 +18,16 @@ */ package io.github.petertrr.diffutils.text +import kotlin.jvm.JvmField + /** * Describes the diff row in form `[tag, oldLine, newLine]` for showing the difference between two texts. */ -public data class DiffRow(val tag: Tag, val oldLine: String, val newLine: String) { +public data class DiffRow( + @JvmField val tag: Tag, + @JvmField val oldLine: String, + @JvmField val newLine: String, +) { public enum class Tag { INSERT, DELETE, diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRowGenerator.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRowGenerator.kt index f351389..9ecf650 100644 --- a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRowGenerator.kt +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffRowGenerator.kt @@ -18,6 +18,9 @@ */ package io.github.petertrr.diffutils.text +import io.github.petertrr.diffutils.algorithm.DiffEqualizer +import io.github.petertrr.diffutils.algorithm.EqualsDiffEqualizer +import io.github.petertrr.diffutils.algorithm.IgnoreWsStringDiffEqualizer import io.github.petertrr.diffutils.diff import io.github.petertrr.diffutils.patch.ChangeDelta import io.github.petertrr.diffutils.patch.Chunk @@ -30,139 +33,118 @@ import kotlin.math.max import kotlin.math.min /** - * This class for generating DiffRows for side-by-side view. You can customize + * This class for generating [DiffRow]s for side-by-side view. You can customize * the way of generating. For example, show inline diffs on not, ignoring white * spaces or/and blank lines and so on. All parameters for generating are * optional. If you do not specify them, the class will use the default values. + * + * @param columnWidth Set the column width of generated lines of original and revised texts. + * Making it < 0 doesn't make any sense. + * @param ignoreWhiteSpaces Ignore white spaces in generating diff rows or not + * @param equalizer Provide an equalizer for diff processing + * @param inlineDiffByWord Per default each character is separately processed. + * Setting this parameter to `true` introduces processing by word, which does + * not deliver in word changes. Therefore, the whole word will be tagged as changed: + * ``` + * false: (aBa : aba) -- changed: a(B)a : a(b)a + * true: (aBa : aba) -- changed: (aBa) : (aba) + * ``` + * Default: `false` + * @param inlineDiffSplitter To provide some customized splitting a splitter can be provided. + * Here someone could think about sentence splitter, comma splitter or stuff like that. + * @param mergeOriginalRevised Merge the complete result within the original text. + * This makes sense for one line display. + * Default: `false` + * @param newTag Generator for New-Text-Tags + * @param oldTag Generator for Old-Text-Tags + * @param reportLinesUnchanged Give the original old and new text lines to [DiffRow] + * without any additional processing and without any tags to highlight the change. + * Default: `false` + * @param lineNormalizer By default, [DiffRowGenerator] preprocesses lines for HTML output. + * Tabs and special HTML characters like "<" are replaced with its encoded value. + * To change this you can provide a customized line normalizer here. + * @param processDiffs Optional processor for diffed text parts. + * Here e.g. white characters could be replaced by something visible. + * @param showInlineDiffs Show inline diffs in generating diff rows or not. + * Default: `false` + * @param replaceOriginalLinefeedInChangesWithSpaces Sometimes it happens that a change + * contains multiple lines. If there is no correspondence in old and new. + * To keep the merged line more readable the line feeds could be replaced by spaces. + * Default: `false` + * @param decompressDeltas Deltas could be in a state, that would produce some unreasonable + * results within an inline diff. So the deltas are decompressed into smaller parts and rebuild. + * But this could result in more differences. + * Default: `true` */ @Suppress("LongParameterList") public class DiffRowGenerator( - /** - * Set the column width of generated lines of original and revised - * texts. Making it < 0 doesn't make any sense. - */ - public val columnWidth: Int = 80, - - /** - * Ignore white spaces in generating diff rows or not. - */ - public val ignoreWhiteSpaces: Boolean = false, - - /** - * Provide an equalizer for diff processing. - */ - private var equalizer: ((String, String) -> Boolean) = if (ignoreWhiteSpaces) IGNORE_WHITESPACE_EQUALIZER else DEFAULT_EQUALIZER, - - /** - * Per default each character is separately processed. Setting this parameter to `true` - * introduces processing by word, which does not deliver in word - * changes. Therefore, the whole word will be tagged as changed: - * - * ``` - *
-     * false:    (aBa : aba) --  changed: a(B)a : a(b)a
-     * true:     (aBa : aba) --  changed: (aBa) : (aba)
-     * 
* - * ``` - */ + private val columnWidth: Int = 80, + private val ignoreWhiteSpaces: Boolean = false, + private var equalizer: DiffEqualizer = if (ignoreWhiteSpaces) IgnoreWsStringDiffEqualizer() else EqualsDiffEqualizer(), inlineDiffByWord: Boolean = false, - - /** - * To provide some customized splitting a splitter can be provided. Here - * someone could think about sentence splitter, comma splitter or stuff - * like that. - */ - public val inlineDiffSplitter: (String) -> List = if (inlineDiffByWord) SPLITTER_BY_WORD else SPLITTER_BY_CHARACTER, - - /** - * Merge the complete result within the original text. This makes sense - * for one line display. - */ - public val mergeOriginalRevised: Boolean = false, - - /** - * Generator for New-Text-Tags. - */ - public val newTag: (DiffRow.Tag, Boolean) -> String = { _: DiffRow.Tag, f: Boolean -> if (f) "" else "" }, - - /** - * Generator for Old-Text-Tags. - */ - public val oldTag: (DiffRow.Tag, Boolean) -> String = { _: DiffRow.Tag, f: Boolean -> if (f) "" else "" }, - - /** - * Give the original old and new text lines to DiffRow without any - * additional processing and without any tags to highlight the change. - */ - public val reportLinesUnchanged: Boolean = false, - - /** - * By default DiffRowGenerator preprocesses lines for HTML output. Tabs - * and special HTML characters like "<" are replaced with its encoded - * value. To change this you can provide a customized line normalizer - * here. - */ - public val lineNormalizer: (String) -> String = LINE_NORMALIZER_FOR_HTML, - - /** - * Optional processor for diffed text parts. Here e.g. white characters could be - * replaced by something visible. - */ - public val processDiffs: ((String) -> String)? = null, - - /** - * Show inline diffs in generating diff rows or not. Default: false. - */ - public val showInlineDiffs: Boolean = false, - - /** - * Sometimes it happens that a change contains multiple lines. If there - * is no correspondence in old and new. To keep the merged line more - * readable the linefeeds could be replaced by spaces. - */ - public val replaceOriginalLinefeedInChangesWithSpaces: Boolean = false, + private val inlineDiffSplitter: DiffSplitter = if (inlineDiffByWord) WordDiffSplitter() else CharDiffSplitter(), + private val mergeOriginalRevised: Boolean = false, + private val newTag: DiffTagGenerator = NewDiffTagGenerator(), + private val oldTag: DiffTagGenerator = OldDiffTagGenerator(), + private val reportLinesUnchanged: Boolean = false, + private val lineNormalizer: DiffLineNormalizer = HtmlLineNormalizer(), + private val processDiffs: DiffLineProcessor? = null, + private val showInlineDiffs: Boolean = false, + private val replaceOriginalLinefeedInChangesWithSpaces: Boolean = false, + private val decompressDeltas: Boolean = true, ) { /** - * Get the DiffRows describing the difference between original and revised + * Get the [DiffRow]s describing the difference between original and revised * texts. Useful for displaying side-by-side diff. * - * @param original the original text - * @param revised the revised text - * @return the DiffRows between original and revised texts + * @param original The original text + * @param revised The revised text + * @return The [DiffRow]s between original and revised texts */ - public fun generateDiffRows(original: List, revised: List): List { - return generateDiffRows(original, diff(original, revised, equalizer)) - } + public fun generateDiffRows(original: List, revised: List): List = + generateDiffRows(original, diff(original, revised, equalizer)) /** - * Generates the DiffRows describing the difference between original and + * Generates the [DiffRow]s describing the difference between original and * revised texts using the given patch. Useful for displaying side-by-side * diff. * - * @param original the original text - * @param patch the given patch - * @return the DiffRows between original and revised texts + * @param original The original text + * @param patch The given patch + * @return The [DiffRow]s between original and revised texts */ + @Suppress("MemberVisibilityCanBePrivate") public fun generateDiffRows(original: List, patch: Patch): List { - val diffRows: MutableList = ArrayList() + val diffRows = ArrayList() var endPos = 0 - for (originalDelta in patch.deltas) { - for (delta in decompressDeltas(originalDelta)) { + + if (decompressDeltas) { + for (originalDelta in patch.deltas) { + for (delta in decompressDeltas(originalDelta)) { + endPos = transformDeltaIntoDiffRow(original, endPos, diffRows, delta) + } + } + } else { + for (delta in patch.deltas) { endPos = transformDeltaIntoDiffRow(original, endPos, diffRows, delta) } } - // Copy the final matching chunk if any. + // Copy the final matching chunk if any for (line in original.subList(endPos, original.size)) { diffRows.add(buildDiffRow(DiffRow.Tag.EQUAL, line, line)) } + return diffRows } + internal fun normalizeLines(list: List): List = + if (reportLinesUnchanged) list else list.map { lineNormalizer.normalize(it) } + /** - * Transforms one patch delta into a DiffRow object. + * Transforms one patch delta into a [DiffRow] object. * - * @param endPos line number after previous delta end + * @param endPos Line number after previous delta end */ private fun transformDeltaIntoDiffRow( original: List, @@ -170,33 +152,44 @@ public class DiffRowGenerator( diffRows: MutableList, delta: Delta, ): Int { - val orig: Chunk = delta.source - val rev: Chunk = delta.target + val orig = delta.source + val rev = delta.target + for (line in original.subList(endPos, orig.position)) { - // all lines since previous delta until the start of the current delta + // All lines since previous delta until the start of the current delta diffRows.add(buildDiffRow(DiffRow.Tag.EQUAL, line, line)) } + when (delta.type) { - DeltaType.INSERT -> for (line in rev.lines) { - diffRows.add(buildDiffRow(DiffRow.Tag.INSERT, "", line)) + DeltaType.INSERT -> { + for (line in rev.lines) { + val row = buildDiffRow(DiffRow.Tag.INSERT, "", line) + diffRows.add(row) + } } - DeltaType.DELETE -> for (line in orig.lines) { - diffRows.add(buildDiffRow(DiffRow.Tag.DELETE, line, "")) + DeltaType.DELETE -> { + for (line in orig.lines) { + val row = buildDiffRow(DiffRow.Tag.DELETE, line, "") + diffRows.add(row) + } } - else -> if (showInlineDiffs) { - diffRows.addAll(generateInlineDiffs(delta)) - } else { - for (j in 0 until max(orig.size(), rev.size())) { - diffRows.add( - buildDiffRow( - DiffRow.Tag.CHANGE, - orig.lines.getOrElse(j) { "" }, - rev.lines.getOrElse(j) { "" } + else -> { + if (showInlineDiffs) { + diffRows.addAll(generateInlineDiffs(delta)) + } else { + for (j in 0..): List> { if (delta.type == DeltaType.CHANGE && delta.source.size() != delta.target.size()) { - val deltas: MutableList> = ArrayList() - val minSize: Int = min(delta.source.size(), delta.target.size()) - val orig: Chunk = delta.source - val rev: Chunk = delta.target + val deltas = ArrayList>() + val minSize = min(delta.source.size(), delta.target.size()) + val orig = delta.source + val rev = delta.target + deltas.add( ChangeDelta( Chunk(orig.position, orig.lines.subList(0, minSize)), - Chunk(rev.position, rev.lines.subList(0, minSize)) + Chunk(rev.position, rev.lines.subList(0, minSize)), ) ) + if (orig.lines.size < rev.lines.size) { deltas.add( InsertDelta( Chunk(orig.position + minSize, emptyList()), - Chunk(rev.position + minSize, rev.lines.subList(minSize, rev.lines.size)) + Chunk(rev.position + minSize, rev.lines.subList(minSize, rev.lines.size)), ) ) } else { deltas.add( DeleteDelta( Chunk(orig.position + minSize, orig.lines.subList(minSize, orig.lines.size)), - Chunk(rev.position + minSize, emptyList()) + Chunk(rev.position + minSize, emptyList()), ) ) } + return deltas } + return listOf(delta) } - private fun buildDiffRow(type: DiffRow.Tag, orgline: String, newline: String): DiffRow { - return if (reportLinesUnchanged) { - DiffRow(type, orgline, newline) - } else { - var wrapOrg = preprocessLine(orgline) - if (DiffRow.Tag.DELETE == type) { - if (mergeOriginalRevised || showInlineDiffs) { - wrapOrg = oldTag.invoke(type, true) + wrapOrg + oldTag.invoke(type, false) - } + private fun buildDiffRow(type: DiffRow.Tag, orgLine: String, newLine: String): DiffRow { + if (reportLinesUnchanged) { + return DiffRow(type, orgLine, newLine) + } + + var wrapOrg = preprocessLine(orgLine) + + if (DiffRow.Tag.DELETE == type) { + if (mergeOriginalRevised || showInlineDiffs) { + wrapOrg = oldTag.generateOpen(type) + wrapOrg + oldTag.generateClose(type) } - var wrapNew = preprocessLine(newline) - if (DiffRow.Tag.INSERT == type) { - if (mergeOriginalRevised) { - wrapOrg = newTag.invoke(type, true) + wrapNew + newTag.invoke(type, false) - } else if (showInlineDiffs) { - wrapNew = newTag.invoke(type, true) + wrapNew + newTag.invoke(type, false) - } + } + + var wrapNew = preprocessLine(newLine) + + if (DiffRow.Tag.INSERT == type) { + if (mergeOriginalRevised) { + wrapOrg = newTag.generateOpen(type) + wrapNew + newTag.generateClose(type) + } else if (showInlineDiffs) { + wrapNew = newTag.generateOpen(type) + wrapNew + newTag.generateClose(type) } - DiffRow(type, wrapOrg, wrapNew) } - } - private fun buildDiffRowWithoutNormalizing(type: DiffRow.Tag, orgline: String, newline: String): DiffRow { - return DiffRow( - type, - wrapText(orgline, columnWidth), - wrapText(newline, columnWidth) - ) + return DiffRow(type, wrapOrg, wrapNew) } - internal fun normalizeLines(list: List): List { - return if (reportLinesUnchanged) list else list.map { lineNormalizer.invoke(it) } - } + private fun buildDiffRowWithoutNormalizing(type: DiffRow.Tag, oldLine: String, newLine: String): DiffRow = + DiffRow(type, wrapText(oldLine, columnWidth), wrapText(newLine, columnWidth)) /** * Add the inline diffs for given delta @@ -281,57 +273,54 @@ public class DiffRowGenerator( private fun generateInlineDiffs(delta: Delta): List { val orig = normalizeLines(delta.source.lines) val rev = normalizeLines(delta.target.lines) - val joinedOrig: String = orig.joinToString("\n") - val joinedRev: String = rev.joinToString("\n") - val origList = inlineDiffSplitter.invoke(joinedOrig).toMutableList() - val revList = inlineDiffSplitter.invoke(joinedRev).toMutableList() - // copying of `origList` and `revList` is needed because otherwise `wrapInTag` results in ConcurrentModificationException - val inlineDeltas: MutableList> = diff(origList.toList(), revList.toList(), equalizer) - .deltas - .asReversed() - .toMutableList() + val joinedOrig = orig.joinToString("\n") + val joinedRev = rev.joinToString("\n") + val origList = inlineDiffSplitter.split(joinedOrig) + val revList = inlineDiffSplitter.split(joinedRev) + + val diff = diff(origList, revList, equalizer) + val inlineDeltas = diff.deltas.reversed() + for (inlineDelta in inlineDeltas) { - val inlineOrig: Chunk = inlineDelta.source - val inlineRev: Chunk = inlineDelta.target + val inlineOrig = inlineDelta.source + val inlineRev = inlineDelta.target + when (inlineDelta.type) { DeltaType.DELETE -> { wrapInTag( - origList, - inlineOrig.position, - inlineOrig.position + inlineOrig.size(), - DiffRow.Tag.DELETE, - oldTag, - processDiffs, - replaceOriginalLinefeedInChangesWithSpaces && mergeOriginalRevised + sequence = origList, + startPosition = inlineOrig.position, + endPosition = inlineOrig.position + inlineOrig.size(), + tag = DiffRow.Tag.DELETE, + tagGenerator = oldTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = replaceOriginalLinefeedInChangesWithSpaces && mergeOriginalRevised, ) } DeltaType.INSERT -> { if (mergeOriginalRevised) { origList.addAll( inlineOrig.position, - revList.subList( - inlineRev.position, - inlineRev.position + inlineRev.size() - ) + revList.subList(inlineRev.position, inlineRev.position + inlineRev.size()), ) wrapInTag( - origList, - inlineOrig.position, - inlineOrig.position + inlineRev.size(), - DiffRow.Tag.INSERT, - newTag, - processDiffs, - false + sequence = origList, + startPosition = inlineOrig.position, + endPosition = inlineOrig.position + inlineRev.size(), + tag = DiffRow.Tag.INSERT, + tagGenerator = newTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = false, ) } else { wrapInTag( - revList, - inlineRev.position, - inlineRev.position + inlineRev.size(), - DiffRow.Tag.INSERT, - newTag, - processDiffs, - false + sequence = revList, + startPosition = inlineRev.position, + endPosition = inlineRev.position + inlineRev.size(), + tag = DiffRow.Tag.INSERT, + tagGenerator = newTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = false, ) } } @@ -339,188 +328,143 @@ public class DiffRowGenerator( if (mergeOriginalRevised) { origList.addAll( inlineOrig.position + inlineOrig.size(), - revList.subList( - inlineRev.position, - inlineRev.position + inlineRev.size() - ) + revList.subList(inlineRev.position, inlineRev.position + inlineRev.size()), ) wrapInTag( - origList, - inlineOrig.position + inlineOrig.size(), - inlineOrig.position + inlineOrig.size() + inlineRev.size(), - DiffRow.Tag.CHANGE, - newTag, - processDiffs, - false + sequence = origList, + startPosition = inlineOrig.position + inlineOrig.size(), + endPosition = inlineOrig.position + inlineOrig.size() + inlineRev.size(), + tag = DiffRow.Tag.CHANGE, + tagGenerator = newTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = false, ) } else { wrapInTag( - revList, - inlineRev.position, - inlineRev.position + inlineRev.size(), - DiffRow.Tag.CHANGE, - newTag, - processDiffs, - false + sequence = revList, + startPosition = inlineRev.position, + endPosition = inlineRev.position + inlineRev.size(), + tag = DiffRow.Tag.CHANGE, + tagGenerator = newTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = false, ) } wrapInTag( - origList, - inlineOrig.position, - inlineOrig.position + inlineOrig.size(), - DiffRow.Tag.CHANGE, - oldTag, - processDiffs, - replaceOriginalLinefeedInChangesWithSpaces && mergeOriginalRevised + sequence = origList, + startPosition = inlineOrig.position, + endPosition = inlineOrig.position + inlineOrig.size(), + tag = DiffRow.Tag.CHANGE, + tagGenerator = oldTag, + processDiffs = processDiffs, + replaceLinefeedWithSpace = replaceOriginalLinefeedInChangesWithSpaces && mergeOriginalRevised, ) } else -> error("Unexpected delta type ${inlineDelta.type}") } } + val origResult = StringBuilder() val revResult = StringBuilder() + for (character in origList) { origResult.append(character) } + for (character in revList) { revResult.append(character) } - // note: dropLastWhile here arose from compatibility with Java: Java's `split` discard trailing empty string by default - val original: List = origResult.toString().split("\n").dropLastWhile { it.isEmpty() } - val revised: List = revResult.toString().split("\n").dropLastWhile { it.isEmpty() } - val diffRows: MutableList = ArrayList() - for (j in 0 until max(original.size, revised.size)) { + + // Note: dropLastWhile here arose from compatibility with Java: Java's `split` discard + // trailing empty string by default + val original = origResult.split("\n").dropLastWhile(String::isEmpty) + val revised = revResult.split("\n").dropLastWhile(String::isEmpty) + val diffRows = ArrayList() + + for (j in 0.. Boolean = { o1: Any?, o2: Any? -> o1 == o2 } - internal val IGNORE_WHITESPACE_EQUALIZER: (String, String) -> Boolean = { original: String, revised: String -> - adjustWhitespace( - original - ) == adjustWhitespace(revised) - } - internal val LINE_NORMALIZER_FOR_HTML: (String) -> String = { normalize(it) } - - /** - * Splitting lines by character to achieve char by char diff checking. - */ - internal val SPLITTER_BY_CHARACTER = { line: String -> - val list: MutableList = ArrayList(line.length) - for (character in line.toCharArray()) { - list.add(character.toString()) + /** + * Wrap the elements in the sequence with the given tag + * + * @param startPosition The position from which tag should start. + * The counting start from a zero. + * @param endPosition The position before which tag should be closed. + * @param tagGenerator The tag generator + */ + @Suppress("LongParameterList", "ComplexMethod", "LoopWithTooManyJumpStatements", "NestedBlockDepth") + private fun wrapInTag( + sequence: MutableList, + startPosition: Int, + endPosition: Int, + tag: DiffRow.Tag, + tagGenerator: DiffTagGenerator, + processDiffs: DiffLineProcessor?, + replaceLinefeedWithSpace: Boolean, + ): List { + var endPos = endPosition + + while (endPos >= startPosition) { + // Search position for end tag + while (endPos > startPosition) { + if ("\n" != sequence[endPos - 1]) { + break + } else if (replaceLinefeedWithSpace) { + sequence[endPos - 1] = " " + break + } + + endPos-- } - list.toList() - } - internal val SPLIT_BY_WORD_PATTERN = Regex("\\s+|[,.\\[\\](){}/\\\\*+\\-#]") - - /** - * Splitting lines by word to achieve word by word diff checking. - */ - internal val SPLITTER_BY_WORD = { line: String -> - splitStringPreserveDelimiter( - line, - SPLIT_BY_WORD_PATTERN - ) - } - internal val WHITESPACE_PATTERN = Regex("\\s+") - private fun adjustWhitespace(raw: String): String { - return WHITESPACE_PATTERN.replace(raw.trim(), " ") - } + if (endPos == startPosition) { + break + } - internal fun splitStringPreserveDelimiter(str: String?, splitPattern: Regex): List { - val list: MutableList = mutableListOf() - if (str != null) { - val matchResults = splitPattern.findAll(str) - var pos = 0 - for (matchResult in matchResults) { - if (pos < matchResult.range.first) { - list.add(str.substring(pos, matchResult.range.first)) - } - list.add(matchResult.value) - pos = matchResult.range.last + 1 - } - if (pos < str.length) { - list.add(str.substring(pos)) - } + sequence.add(endPos, tagGenerator.generateClose(tag)) + + if (processDiffs != null) { + sequence[endPos - 1] = processDiffs.process(sequence[endPos - 1]) } - return list - } - /** - * Wrap the elements in the sequence with the given tag - * - * @param startPosition the position from which tag should start. The - * counting start from a zero. - * @param endPosition the position before which tag should should be closed. - * @param tagGenerator the tag generator - */ - @Suppress("LongParameterList", "ComplexMethod", "LoopWithTooManyJumpStatements", "NestedBlockDepth") - internal fun wrapInTag( - sequence: MutableList, - startPosition: Int, - endPosition: Int, - tag: DiffRow.Tag, - tagGenerator: (DiffRow.Tag, Boolean) -> String, - processDiffs: ((String) -> String)?, - replaceLinefeedWithSpace: Boolean, - ): MutableList { - var endPos = endPosition - while (endPos >= startPosition) { - // search position for end tag - while (endPos > startPosition) { - if ("\n" != sequence[endPos - 1]) { - break - } else if (replaceLinefeedWithSpace) { + endPos-- + + // Search position for end tag + while (endPos > startPosition) { + if ("\n" == sequence[endPos - 1]) { + if (replaceLinefeedWithSpace) { sequence[endPos - 1] = " " + } else { break } - endPos-- - } - if (endPos == startPosition) { - break } - sequence.add(endPos, tagGenerator.invoke(tag, false)) + if (processDiffs != null) { - sequence[endPos - 1] = processDiffs.invoke(sequence[endPos - 1]) + sequence[endPos - 1] = processDiffs.process(sequence[endPos - 1]) } - endPos-- - // search position for end tag - while (endPos > startPosition) { - if ("\n" == sequence[endPos - 1]) { - if (replaceLinefeedWithSpace) { - sequence[endPos - 1] = " " - } else { - break - } - } - if (processDiffs != null) { - sequence[endPos - 1] = processDiffs.invoke(sequence[endPos - 1]) - } - endPos-- - } - sequence.add(endPos, tagGenerator.invoke(tag, true)) endPos-- } - return sequence + + sequence.add(endPos, tagGenerator.generateOpen(tag)) + endPos-- } + + return sequence } } diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffSplitter.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffSplitter.kt new file mode 100644 index 0000000..23d43db --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffSplitter.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +public fun interface DiffSplitter { + public fun split(line: String): MutableList +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffTagGenerator.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffTagGenerator.kt new file mode 100644 index 0000000..e43bb3f --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/DiffTagGenerator.kt @@ -0,0 +1,21 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +public interface DiffTagGenerator { + public fun generateOpen(tag: DiffRow.Tag): String + public fun generateClose(tag: DiffRow.Tag): String +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/HtmlLineNormalizer.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/HtmlLineNormalizer.kt new file mode 100644 index 0000000..359484a --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/HtmlLineNormalizer.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +import io.github.petertrr.diffutils.text.normalize as normalizeFn + +internal class HtmlLineNormalizer : DiffLineNormalizer { + override fun normalize(line: String): String = + normalizeFn(line) +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/NewDiffTagGenerator.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/NewDiffTagGenerator.kt new file mode 100644 index 0000000..6d3af7a --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/NewDiffTagGenerator.kt @@ -0,0 +1,24 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +internal class NewDiffTagGenerator : DiffTagGenerator { + override fun generateOpen(tag: DiffRow.Tag): String = + "" + + override fun generateClose(tag: DiffRow.Tag): String = + "" +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/OldDiffTagGenerator.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/OldDiffTagGenerator.kt new file mode 100644 index 0000000..df6b071 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/OldDiffTagGenerator.kt @@ -0,0 +1,24 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +internal class OldDiffTagGenerator : DiffTagGenerator { + override fun generateOpen(tag: DiffRow.Tag): String = + "" + + override fun generateClose(tag: DiffRow.Tag): String = + "" +} diff --git a/src/commonMain/kotlin/io/github/petertrr/diffutils/text/WordDiffSplitter.kt b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/WordDiffSplitter.kt new file mode 100644 index 0000000..d8850b1 --- /dev/null +++ b/src/commonMain/kotlin/io/github/petertrr/diffutils/text/WordDiffSplitter.kt @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Peter Trifanov. + * + * 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. + */ +package io.github.petertrr.diffutils.text + +/** + * Splitting lines by word to achieve word by word diff checking. + */ +internal class WordDiffSplitter(private val pattern: Regex = Regex("\\s+|[,.\\[\\](){}/\\\\*+\\-#]")) : DiffSplitter { + override fun split(line: String): MutableList { + val matchResults = pattern.findAll(line) + val list = ArrayList() + var pos = 0 + + for (matchResult in matchResults) { + if (pos < matchResult.range.first) { + list.add(line.substring(pos, matchResult.range.first)) + } + + list.add(matchResult.value) + pos = matchResult.range.last + 1 + } + + if (pos < line.length) { + list.add(line.substring(pos)) + } + + return list + } +} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffTest.kt index 77b6216..ff73f08 100644 --- a/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffTest.kt +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffTest.kt @@ -20,54 +20,62 @@ package io.github.petertrr.diffutils.algorithm.myers import io.github.petertrr.diffutils.algorithm.DiffAlgorithmListener import io.github.petertrr.diffutils.patch.Patch -import io.github.petertrr.diffutils.utils.deleteDeltaOf -import io.github.petertrr.diffutils.utils.insertDeltaOf import kotlin.test.Test import kotlin.test.assertEquals -import kotlin.test.assertNotNull class MyersDiffTest { @Test fun testDiffMyersExample1Forward() { - val original: List = listOf("A", "B", "C", "A", "B", "B", "A") - val revised: List = listOf("C", "B", "A", "B", "A", "C") - val patch: Patch = Patch.generate(original, revised, MyersDiff().computeDiff(original, revised)) - assertNotNull(patch) + val original = listOf("A", "B", "C", "A", "B", "B", "A") + val revised = listOf("C", "B", "A", "B", "A", "C") + val patch = Patch.generate(original, revised, MyersDiff().computeDiff(original, revised)) + assertEquals(4, patch.deltas.size) assertEquals( - "Patch{deltas=[${deleteDeltaOf(0, listOf("A", "B"))}, ${insertDeltaOf(3, 1, listOf("B"))}, ${deleteDeltaOf(5, listOf("B"), 4)}, ${insertDeltaOf(7, 5, listOf("C"))}]}", - patch.toString() + "Patch{deltas=[" + + "[DeleteDelta, position: 0, lines: [A, B]], " + + "[InsertDelta, position: 3, lines: [B]], " + + "[DeleteDelta, position: 5, lines: [B]], " + + "[InsertDelta, position: 7, lines: [C]]" + + "]}", + patch.toString(), ) } @Test fun testDiffMyersExample1ForwardWithListener() { - val original: List = listOf("A", "B", "C", "A", "B", "B", "A") - val revised: List = listOf("C", "B", "A", "B", "A", "C") - val logdata: MutableList = ArrayList() - val patch: Patch = Patch.generate(original, revised, + val original = listOf("A", "B", "C", "A", "B", "B", "A") + val revised = listOf("C", "B", "A", "B", "A", "C") + val logData = ArrayList() + val patch = Patch.generate( + original, revised, MyersDiff().computeDiff(original, revised, object : DiffAlgorithmListener { override fun diffStart() { - logdata.add("start") + logData.add("start") } override fun diffStep(value: Int, max: Int) { - logdata.add("$value - $max") + logData.add("$value - $max") } override fun diffEnd() { - logdata.add("end") + logData.add("end") } }) ) - assertNotNull(patch) + assertEquals(4, patch.deltas.size) assertEquals( - "Patch{deltas=[${deleteDeltaOf(0, listOf("A", "B"))}, ${insertDeltaOf(3, 1, listOf("B"))}, " + - "${deleteDeltaOf(5, listOf("B"), 4)}, ${insertDeltaOf(7, 5, listOf("C"))}]}", - patch.toString() + "Patch{deltas=[" + + "[DeleteDelta, position: 0, lines: [A, B]], " + + "[InsertDelta, position: 3, lines: [B]], " + + "[DeleteDelta, position: 5, lines: [B]], " + + "[InsertDelta, position: 7, lines: [C]]" + + "]}", + patch.toString(), ) - println(logdata) - assertEquals(8, logdata.size) + + println(logData) + assertEquals(8, logData.size) } } diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpaceTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpaceTest.kt new file mode 100644 index 0000000..116395d --- /dev/null +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/algorithm/myers/MyersDiffWithLinearSpaceTest.kt @@ -0,0 +1,108 @@ +/* + * Copyright 2024 Peter Trifanov. + * Copyright 2021 java-diff-utils. + * + * 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. + * + * This file has been modified by Peter Trifanov when porting from Java to Kotlin. + */ +package io.github.petertrr.diffutils.algorithm.myers + +import io.github.petertrr.diffutils.algorithm.DiffAlgorithmListener +import io.github.petertrr.diffutils.diff +import io.github.petertrr.diffutils.patch.Patch +import kotlin.test.Ignore +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.time.measureTimedValue + +class MyersDiffWithLinearSpaceTest { + @Test + fun testDiffMyersExample1Forward() { + val original = listOf("A", "B", "C", "A", "B", "B", "A") + val revised = listOf("C", "B", "A", "B", "A", "C") + val changes = MyersDiffWithLinearSpace().computeDiff(original, revised) + val patch = Patch.generate(original, revised, changes) + println(patch) + + assertEquals(5, patch.deltas.size) + assertEquals( + "Patch{deltas=[" + + "[InsertDelta, position: 0, lines: [C]], " + + "[DeleteDelta, position: 0, lines: [A]], " + + "[DeleteDelta, position: 2, lines: [C]], " + + "[DeleteDelta, position: 5, lines: [B]], " + + "[InsertDelta, position: 7, lines: [C]]" + + "]}", + patch.toString(), + ) + } + + @Test + fun testDiffMyersExample1ForwardWithListener() { + val original = listOf("A", "B", "C", "A", "B", "B", "A") + val revised = listOf("C", "B", "A", "B", "A", "C") + val logData = ArrayList() + val progress = object : DiffAlgorithmListener { + override fun diffStart() { + logData.add("start") + } + + override fun diffStep(value: Int, max: Int) { + logData.add("$value - $max") + } + + override fun diffEnd() { + logData.add("end") + } + } + + val patch = Patch.generate( + original = original, + revised = revised, + changes = MyersDiffWithLinearSpace().computeDiff(original, revised, progress), + ) + + println(patch) + + assertEquals(5, patch.deltas.size) + assertEquals( + "Patch{deltas=[" + + "[InsertDelta, position: 0, lines: [C]], " + + "[DeleteDelta, position: 0, lines: [A]], " + + "[DeleteDelta, position: 2, lines: [C]], " + + "[DeleteDelta, position: 5, lines: [B]], " + + "[InsertDelta, position: 7, lines: [C]]" + + "]}", + patch.toString(), + ) + + println(logData) + assertEquals(11, logData.size) + } + + @Test + @Ignore + fun testPerformanceProblemsIssue124() { + val old = listOf("abcd") + val new = (0..<90000) + .map(Int::toString) + .toList() + + val (patch, duration) = measureTimedValue { + diff(old, new, MyersDiffWithLinearSpace()) + } + + println("Finished in ${duration.inWholeMilliseconds}ms and resulted ${patch.deltas.size} deltas") + } +} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/ChunkTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/ChunkTest.kt new file mode 100644 index 0000000..14c6572 --- /dev/null +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/ChunkTest.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2024 Peter Trifanov. + * Copyright 2021 java-diff-utils. + * + * 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. + * + * This file has been modified by Peter Trifanov when porting from Java to Kotlin. + */ +package io.github.petertrr.diffutils.patch + +import io.github.petertrr.diffutils.patch.VerifyChunk.CONTENT_DOES_NOT_MATCH_TARGET +import io.github.petertrr.diffutils.patch.VerifyChunk.OK +import kotlin.test.Test +import kotlin.test.assertEquals + +class ChunkTest { + @Test + fun verifyChunk() { + val chunk = Chunk(7, "test".toChars()) + + // Normal check + assertEquals(OK, chunk.verifyChunk("prefix test suffix".toChars())) + assertEquals(CONTENT_DOES_NOT_MATCH_TARGET, chunk.verifyChunk("prefix es suffix".toChars())) + } + + private fun String.toChars(): List = + toCharArray().toList() +} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchTest.kt deleted file mode 100644 index 829a51c..0000000 --- a/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchTest.kt +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2021 Peter Trifanov. - * Copyright 2009-2021 java-diff-utils. - * - * 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. - * - * This file has been modified by Peter Trifanov when porting from Java to Kotlin. - */ -package io.github.petertrr.diffutils.patch - -import io.github.petertrr.diffutils.diff -import io.github.petertrr.diffutils.patch -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.fail - -class PatchTest { - @Test - fun testPatch_Insert() { - val insertTest_from: List = listOf("hhh") - val insertTest_to: List = listOf("hhh", "jjj", "kkk", "lll") - val patch: Patch = diff(insertTest_from, insertTest_to) - try { - assertEquals(insertTest_to, patch(insertTest_from, patch)) - } catch (e: PatchFailedException) { - fail(e.message) - } - } - - @Test - fun testPatch_Delete() { - val deleteTest_from: List = listOf("ddd", "fff", "ggg", "hhh") - val deleteTest_to: List = listOf("ggg") - val patch: Patch = diff(deleteTest_from, deleteTest_to) - try { - assertEquals(deleteTest_to, patch(deleteTest_from, patch)) - } catch (e: PatchFailedException) { - fail(e.message) - } - } - - @Test - fun testPatch_Change() { - val changeTest_from: List = listOf("aaa", "bbb", "ccc", "ddd") - val changeTest_to: List = listOf("aaa", "bxb", "cxc", "ddd") - val patch: Patch = diff(changeTest_from, changeTest_to) - try { - assertEquals(changeTest_to, patch(changeTest_from, patch)) - } catch (e: PatchFailedException) { - fail(e.message) - } - } - - @Test - fun testPatch_Change_withExceptionProcessor() { - val changeTest_from = listOf("aaa", "bbb", "ccc", "ddd") - val changeTest_to = listOf("aaa", "bxb", "cxc", "ddd") - val patch: Patch = diff(changeTest_from, changeTest_to) - patch.withConflictOutput(ConflictProducingConflictOutput()) - try { - val data: List = patch( - changeTest_from.toMutableList().apply { this[2] = "CDC" }, - patch - ) - assertEquals(9, data.size) - assertEquals( - listOf( - "aaa", - "<<<<<< HEAD", - "bbb", - "CDC", - "======", - "bbb", - "ccc", - ">>>>>>> PATCH", - "ddd" - ), data - ) - } catch (e: PatchFailedException) { - fail(e.message) - } - } -} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffTest.kt new file mode 100644 index 0000000..c3e93c0 --- /dev/null +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffTest.kt @@ -0,0 +1,90 @@ +/* + * Copyright 2024 Peter Trifanov. + * Copyright 2021 java-diff-utils. + * + * 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. + * + * This file has been modified by Peter Trifanov when porting from Java to Kotlin. + */ +package io.github.petertrr.diffutils.patch + +import io.github.petertrr.diffutils.diff +import io.github.petertrr.diffutils.patch +import kotlin.test.Test +import kotlin.test.assertEquals + +class PatchWithMyersDiffTest { + @Test + fun testPatch_Insert() { + val insertTestFrom = listOf("hhh") + val insertTestTo = listOf("hhh", "jjj", "kkk", "lll") + val patch = diff(insertTestFrom, insertTestTo) + assertEquals(insertTestTo, patch(insertTestFrom, patch)) + } + + @Test + fun testPatch_Delete() { + val deleteTestFrom = listOf("ddd", "fff", "ggg", "hhh") + val deleteTestTo = listOf("ggg") + val patch = diff(deleteTestFrom, deleteTestTo) + assertEquals(deleteTestTo, patch(deleteTestFrom, patch)) + } + + @Test + fun testPatch_Change() { + val changeTestFrom = listOf("aaa", "bbb", "ccc", "ddd") + val changeTestTo = listOf("aaa", "bxb", "cxc", "ddd") + val patch = diff(changeTestFrom, changeTestTo) + assertEquals(changeTestTo, patch(changeTestFrom, patch)) + } + + @Test + fun testPatch_Change_withExceptionProcessor() { + val changeTestFrom = mutableListOf("aaa", "bbb", "ccc", "ddd") + val changeTestTo = listOf("aaa", "bxb", "cxc", "ddd") + val patch = diff(changeTestFrom, changeTestTo) + + changeTestFrom[2] = "CDC" + patch.withConflictOutput(ConflictProducingConflictOutput()) + + val data = patch(changeTestFrom, patch) + assertEquals(9, data.size) + assertEquals( + mutableListOf( + "aaa", + "<<<<<< HEAD", + "bbb", + "CDC", + "======", + "bbb", + "ccc", + ">>>>>>> PATCH", + "ddd" + ), + data + ) + } + + @Test + fun testPatchThreeWayIssue138() { + val base = "Imagine there's no heaven".split("\\s+".toRegex()) + val left = "Imagine there's no HEAVEN".split("\\s+".toRegex()) + val right = "IMAGINE there's no heaven".split("\\s+".toRegex()) + + val rightPatch = diff(base, right) + rightPatch.withConflictOutput(ConflictProducingConflictOutput()) + + val applied = rightPatch.applyTo(left) + assertEquals("IMAGINE there's no HEAVEN", applied.joinToString(separator = " ")) + } +} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffWithLinearSpaceTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffWithLinearSpaceTest.kt new file mode 100644 index 0000000..00a9e27 --- /dev/null +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/patch/PatchWithMyersDiffWithLinearSpaceTest.kt @@ -0,0 +1,60 @@ +/* + * Copyright 2024 Peter Trifanov. + * Copyright 2021 java-diff-utils. + * + * 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. + * + * This file has been modified by Peter Trifanov when porting from Java to Kotlin. + */ +package io.github.petertrr.diffutils.patch + +import io.github.petertrr.diffutils.algorithm.myers.MyersDiffWithLinearSpace +import io.github.petertrr.diffutils.diff +import io.github.petertrr.diffutils.patch +import kotlin.test.Test +import kotlin.test.assertEquals + +class PatchWithMyersDiffWithLinearSpaceTest { + @Test + fun testPatch_Change_withExceptionProcessor() { + val changeTestFrom = mutableListOf("aaa", "bbb", "ccc", "ddd") + val changeTestTo = mutableListOf("aaa", "bxb", "cxc", "ddd") + val patch = diff( + source = changeTestFrom, + target = changeTestTo, + algorithm = MyersDiffWithLinearSpace(), + ) + + changeTestFrom[2] = "CDC" + patch.withConflictOutput(ConflictProducingConflictOutput()) + + val data = patch(changeTestFrom, patch) + assertEquals(11, data.size) + assertEquals( + mutableListOf( + "aaa", + "bxb", + "cxc", + "<<<<<< HEAD", + "bbb", + "CDC", + "======", + "bbb", + "ccc", + ">>>>>>> PATCH", + "ddd", + ), + data, + ) + } +} diff --git a/src/commonTest/kotlin/io/github/petertrr/diffutils/text/DiffRowGeneratorTest.kt b/src/commonTest/kotlin/io/github/petertrr/diffutils/text/DiffRowGeneratorTest.kt index 2569a74..361df0f 100644 --- a/src/commonTest/kotlin/io/github/petertrr/diffutils/text/DiffRowGeneratorTest.kt +++ b/src/commonTest/kotlin/io/github/petertrr/diffutils/text/DiffRowGeneratorTest.kt @@ -181,14 +181,16 @@ class DiffRowGeneratorTest { @Test fun testSplitString() { - val list = DiffRowGenerator.splitStringPreserveDelimiter("test,test2", DiffRowGenerator.SPLIT_BY_WORD_PATTERN) + val splitter = WordDiffSplitter() + val list = splitter.split("test,test2") assertEquals(3, list.size) assertEquals("[test, ,, test2]", list.toString()) } @Test fun testSplitString2() { - val list = DiffRowGenerator.splitStringPreserveDelimiter("test , test2", DiffRowGenerator.SPLIT_BY_WORD_PATTERN) + val splitter = WordDiffSplitter() + val list = splitter.split("test , test2") println(list) assertEquals(5, list.size) assertEquals("[test, , ,, , test2]", list.toString()) @@ -196,7 +198,8 @@ class DiffRowGeneratorTest { @Test fun testSplitString3() { - val list = DiffRowGenerator.splitStringPreserveDelimiter("test,test2,", DiffRowGenerator.SPLIT_BY_WORD_PATTERN) + val splitter = WordDiffSplitter() + val list = splitter.split("test,test2,") println(list) assertEquals(4, list.size) assertEquals("[test, ,, test2, ,]", list.toString()) @@ -208,8 +211,8 @@ class DiffRowGeneratorTest { showInlineDiffs = true, mergeOriginalRevised = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows: List = generator.generateDiffRows( listOf("This is a test senctence."), @@ -225,8 +228,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows: List = generator.generateDiffRows( listOf("This is a test senctence.", "This is the second line.", "And here is the finish."), @@ -260,12 +263,13 @@ class DiffRowGeneratorTest { @Test fun testGeneratorIssue14() { + val splitter = WordDiffSplitter(Regex(",")) val generator = DiffRowGenerator( showInlineDiffs = true, mergeOriginalRevised = true, - inlineDiffSplitter = { line -> DiffRowGenerator.splitStringPreserveDelimiter(line, Regex(",")) }, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + inlineDiffSplitter = splitter, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows: List = generator.generateDiffRows( listOf("J. G. Feldstein, Chair"), @@ -282,8 +286,8 @@ class DiffRowGeneratorTest { showInlineDiffs = true, //show the ~ ~ and ** ** symbols on each difference inlineDiffByWord = true, //show the ~ ~ and ** ** around each different word instead of each letter //reportLinesUnchanged = true) //experiment - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val listOne: List = """ TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, NULLABLE, @@ -323,8 +327,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val aa = "This is a test senctence." val bb = "This is a test for diffutils.\nThis is the second line." @@ -351,8 +355,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val aa = "This is a test for diffutils.\nThis is the second line." val bb = "This is a test senctence." @@ -374,8 +378,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val aa = "This is a test senctence." val bb = "This is a test for diffutils.\nThis is the second line.\nAnd one more." @@ -417,8 +421,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, reportLinesUnchanged = true, - oldTag = { _, _ -> "~~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~~"), + newTag = MarkdownTagGenerator("**"), ) val rows: List = generator.generateDiffRows(listOf("
To do
"), listOf("
Done
")) assertEquals(DiffRow(DiffRow.Tag.CHANGE, "
~~T~~o~~ do~~
", "
**D**o**ne**
"), rows.single()) @@ -431,8 +435,8 @@ class DiffRowGeneratorTest { inlineDiffByWord = true, ignoreWhiteSpaces = true, mergeOriginalRevised = true, - oldTag = { _, _ -> "~" }, //introduce markdown style for strikethrough, - newTag = { _, _ -> "**" } //introduce markdown style for bold, + oldTag = MarkdownTagGenerator("~"), //introduce markdown style for strikethrough, + newTag = MarkdownTagGenerator("**") //introduce markdown style for bold, ) //compute the differences for two test texts. @@ -452,8 +456,8 @@ class DiffRowGeneratorTest { inlineDiffByWord = true, ignoreWhiteSpaces = true, mergeOriginalRevised = true, - oldTag = { _, _ -> "~" }, //introduce markdown style for strikethrough, - newTag = { _, _ -> "**" } //introduce markdown style for bold, + oldTag = MarkdownTagGenerator("~"), //introduce markdown style for strikethrough, + newTag = MarkdownTagGenerator("**") //introduce markdown style for bold, ) //compute the differences for two test texts. @@ -471,8 +475,8 @@ class DiffRowGeneratorTest { inlineDiffByWord = true, ignoreWhiteSpaces = true, mergeOriginalRevised = true, - oldTag = { _, _ -> "~" }, //introduce markdown style for strikethrough, - newTag = { _, _ -> "**" } //introduce markdown style for bold, + oldTag = MarkdownTagGenerator("~"), //introduce markdown style for strikethrough, + newTag = MarkdownTagGenerator("**") //introduce markdown style for bold, ) //compute the differences for two test texts. @@ -499,8 +503,8 @@ class DiffRowGeneratorTest { showInlineDiffs = true, inlineDiffByWord = true, mergeOriginalRevised = true, - oldTag = { _, _ -> "~" }, //introduce markdown style for strikethrough, - newTag = { _, _ -> "**" }, //introduce markdown style for bold, + oldTag = MarkdownTagGenerator("~"), //introduce markdown style for strikethrough, + newTag = MarkdownTagGenerator("**"), //introduce markdown style for bold, processDiffs = { str -> str.replace(" ", "/") }, ) @@ -517,8 +521,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, reportLinesUnchanged = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), mergeOriginalRevised = true, inlineDiffByWord = false, replaceOriginalLinefeedInChangesWithSpaces = true @@ -536,8 +540,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, reportLinesUnchanged = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), mergeOriginalRevised = false, inlineDiffByWord = false, ) @@ -554,8 +558,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = true, reportLinesUnchanged = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), mergeOriginalRevised = true, inlineDiffByWord = true, ) @@ -572,8 +576,8 @@ class DiffRowGeneratorTest { val generator = DiffRowGenerator( showInlineDiffs = false, reportLinesUnchanged = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), mergeOriginalRevised = true, inlineDiffByWord = false, ) @@ -631,8 +635,8 @@ Bengal tiger panther but singapura but bombay munchkin for cougar. And more.""". showInlineDiffs = true, mergeOriginalRevised = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows: List = generator.generateDiffRows( listOf(*original.split("\n").toTypedArray()), @@ -650,8 +654,8 @@ Bengal tiger panther but singapura but bombay munchkin for cougar. And more.""". val generator = DiffRowGenerator( showInlineDiffs = false, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows = generator.generateDiffRows(original, revised) for (diff in rows) { @@ -670,8 +674,8 @@ Bengal tiger panther but singapura but bombay munchkin for cougar. And more.""". val generator = DiffRowGenerator( showInlineDiffs = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), ) val rows = generator.generateDiffRows(original, revised) for (diff in rows) { @@ -704,9 +708,9 @@ Bengal tiger panther but singapura but bombay munchkin for cougar. And more.""". showInlineDiffs = true, mergeOriginalRevised = true, inlineDiffByWord = true, - oldTag = { _, _ -> "~" }, - newTag = { _, _ -> "**" }, - ) + oldTag = MarkdownTagGenerator("~"), + newTag = MarkdownTagGenerator("**"), + ) val rows: List = generator.generateDiffRows( original.split("\n"), revised.split("\n") @@ -714,4 +718,90 @@ Bengal tiger panther but singapura but bombay munchkin for cougar. And more.""". rows.filter { it.tag != DiffRow.Tag.EQUAL } .forEach { println(it) } } + + @Test + fun testIssue129WithDeltaDecompression() { + val lines1 = listOf( + "apple1", + "apple2", + "apple3", + "A man named Frankenstein abc to Switzerland for cookies!", + "banana1", + "banana2", + "banana3", + ) + + val lines2 = listOf( + "apple1", + "apple2", + "apple3", + "A man named Frankenstein", + "xyz", + "to Switzerland for cookies!", + "banana1", + "banana2", + "banana3", + ) + + val generator = DiffRowGenerator( + showInlineDiffs = true, + oldTag = CustomOldTagGenerator(), + newTag = CustomNewTagGenerator(), + ) + + val diffRows = generator.generateDiffRows(lines1, lines2) + val txt = diffRows.joinToString(separator = " ") { row -> row.tag.toString() } + assertEquals(txt, "EQUAL EQUAL EQUAL CHANGE INSERT INSERT EQUAL EQUAL EQUAL") + } + + @Test + fun testIssue129SkipDeltaDecompression() { + val lines1 = listOf( + "apple1", + "apple2", + "apple3", + "A man named Frankenstein abc to Switzerland for cookies!", + "banana1", + "banana2", + "banana3", + ) + + val lines2 = listOf( + "apple1", + "apple2", + "apple3", + "A man named Frankenstein", + "xyz", + "to Switzerland for cookies!", + "banana1", + "banana2", + "banana3", + ) + + val generator = DiffRowGenerator( + showInlineDiffs = true, + decompressDeltas = false, + oldTag = CustomOldTagGenerator(), + newTag = CustomNewTagGenerator(), + ) + + val diffRows = generator.generateDiffRows(lines1, lines2) + val txt = diffRows.joinToString(separator = " ") { row -> row.tag.toString() } + assertEquals(txt, "EQUAL EQUAL EQUAL CHANGE CHANGE CHANGE EQUAL EQUAL EQUAL") + } + + private class MarkdownTagGenerator(val str: String) : DiffTagGenerator { + override fun generateOpen(tag: DiffRow.Tag): String = str + override fun generateClose(tag: DiffRow.Tag): String = str + } + + private class CustomOldTagGenerator : DiffTagGenerator { + override fun generateOpen(tag: DiffRow.Tag): String = "==old$tag==>" + override fun generateClose(tag: DiffRow.Tag): String = "<==old==" + } + + private class CustomNewTagGenerator : DiffTagGenerator { + override fun generateOpen(tag: DiffRow.Tag): String = "==new$tag==>" + override fun generateClose(tag: DiffRow.Tag): String = "<==new==" + } }