diff --git a/Cargo.lock b/Cargo.lock index 8dd5196c2e..caacd13414 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,21 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" version = "0.7.7" @@ -90,7 +105,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -104,24 +119,24 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -147,6 +162,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "better_scoped_tls" version = "0.1.1" @@ -241,19 +271,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "clearscreen" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f3f22f1a586604e62efd23f78218f3ccdecf7a33c4500db2d37d85a24fe994" -dependencies = [ - "nix", - "terminfo", - "thiserror", - "which", - "winapi", -] - [[package]] name = "colored" version = "2.0.0" @@ -267,9 +284,9 @@ dependencies = [ [[package]] name = "command-group" -version = "2.1.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5080df6b0f0ecb76cab30808f00d937ba725cebe266a3da8cd89dff92f2a9916" +checksum = "a68fa787550392a9d58f44c21a3022cfb3ea3e2458b7f85d3b399d0ceeccf409" dependencies = [ "async-trait", "nix", @@ -316,7 +333,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset", "scopeguard", ] @@ -336,7 +353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4056f63fce3b82d852c3da92b08ea59959890813a7f4ce9c0ff85b10cf301b" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -353,32 +370,21 @@ dependencies = [ "rayon", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "difflib" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -430,6 +436,15 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "faster-hex" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" +dependencies = [ + "serde", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -440,15 +455,21 @@ dependencies = [ ] [[package]] -name = "filetime" -version = "0.2.21" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -475,7 +496,7 @@ dependencies = [ "pmutil", "proc-macro2", "swc_macros_common", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -555,7 +576,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -600,24 +621,30 @@ dependencies = [ ] [[package]] -name = "gix-actor" -version = "0.20.0" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848efa0f1210cea8638f95691c82a46f98a74b9e3524f01d4955ebc25a8f84f3" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "gix-actor" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eadca029ef716b4378f7afb19f7ee101fde9e58ba1f1445971315ac866db417" dependencies = [ "bstr", "btoi", "gix-date", "itoa", - "nom", "thiserror", + "winnow", ] [[package]] name = "gix-config" -version = "0.22.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d252a0eddb6df74600d3d8872dc9fe98835a7da43110411d705b682f49d4ac1" +checksum = "5cae98c6b4c66c09379bc35274b172587d6b0ac369a416c39128ad8c6454f9bb" dependencies = [ "bstr", "gix-config-value", @@ -626,20 +653,19 @@ dependencies = [ "gix-path", "gix-ref", "gix-sec", - "log", "memchr", - "nom", "once_cell", "smallvec", "thiserror", "unicode-bom", + "winnow", ] [[package]] name = "gix-config-value" -version = "0.12.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786861e84a5793ad5f863d846de5eb064cd23b87e61ad708c8c402608202e7be" +checksum = "52e0be46f4cf1f8f9e88d0e3eb7b29718aff23889563249f379119bd1ab6910e" dependencies = [ "bitflags 2.3.3", "bstr", @@ -650,9 +676,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.5.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99056f37270715f5c7584fd8b46899a2296af9cae92463bf58b8bd1f5a78e553" +checksum = "fb7f3dfb72bebe3449b5e642be64e3c6ccbe9821c8b8f19f487cf5bfbbf4067e" dependencies = [ "bstr", "itoa", @@ -662,30 +688,32 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.29.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf69b0f5c701cc3ae22d3204b671907668f6437ca88862d355eaf9bc47a4f897" +checksum = "4d46a4a5c6bb5bebec9c0d18b65ada20e6517dbd7cf855b87dd4bbdce3a771b2" dependencies = [ "gix-hash", + "gix-trace", "libc", + "prodash", "sha1_smol", "walkdir", ] [[package]] name = "gix-fs" -version = "0.1.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b37a1832f691fdc09910bd267f9a2e413737c1f9ec68c6e31f9e802616278a9" +checksum = "20e86eb040f5776a5ade092282e51cdcad398adb77d948b88d17583c2ae4e107" dependencies = [ "gix-features", ] [[package]] name = "gix-glob" -version = "0.7.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07c98204529ac3f24b34754540a852593d2a4c7349008df389240266627a72a" +checksum = "5db19298c5eeea2961e5b3bf190767a2d1f09b8802aeb5f258e42276350aff19" dependencies = [ "bitflags 2.3.3", "bstr", @@ -695,19 +723,19 @@ dependencies = [ [[package]] name = "gix-hash" -version = "0.11.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078eec3ac2808cc03f0bddd2704cb661da5c5dc33b41a9d7947b141d499c7c42" +checksum = "1f8cf8c2266f63e582b7eb206799b63aa5fa68ee510ad349f637dfe2d0653de0" dependencies = [ - "hex", + "faster-hex", "thiserror", ] [[package]] name = "gix-lock" -version = "5.0.1" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c693d7f05730fa74a7c467150adc7cea393518410c65f0672f80226b8111555" +checksum = "7e5c65e6a29830a435664891ced3f3c1af010f14900226019590ee0971a22f37" dependencies = [ "gix-tempfile", "gix-utils", @@ -716,30 +744,31 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.29.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9bb30ce0818d37096daa29efe361a4bc6dd0b51a5726598898be7e9a40a01e1" +checksum = "740f2a44267f58770a1cb3a3d01d14e67b089c7136c48d4bddbb3cfd2bf86a51" dependencies = [ "bstr", "btoi", "gix-actor", + "gix-date", "gix-features", "gix-hash", "gix-validate", - "hex", "itoa", - "nom", "smallvec", "thiserror", + "winnow", ] [[package]] name = "gix-path" -version = "0.8.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc78f47095a0c15aea0e66103838f0748f4494bf7a9555dfe0f00425400396c" +checksum = "b8dd0998ab245f33d40ca2267e58d542fe54185ebd1dc41923346cf28d179fb6" dependencies = [ "bstr", + "gix-trace", "home", "once_cell", "thiserror", @@ -747,11 +776,12 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.29.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e03989e9d49954368e1b526578230fc7189d1634acdfbe79e9ba1de717e15d5" +checksum = "0ec2f6d07ac88d2fb8007ee3fa3e801856fb9d82e7366ec0ca332eb2c9d74a52" dependencies = [ "gix-actor", + "gix-date", "gix-features", "gix-fs", "gix-hash", @@ -761,15 +791,15 @@ dependencies = [ "gix-tempfile", "gix-validate", "memmap2", - "nom", "thiserror", + "winnow", ] [[package]] name = "gix-sec" -version = "0.8.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794520043d5a024dfeac335c6e520cb616f6963e30dab995892382e998c12897" +checksum = "78f6dce0c6683e2219e8169aac4b1c29e89540a8262fef7056b31d80d969408c" dependencies = [ "bitflags 2.3.3", "gix-path", @@ -779,9 +809,9 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "5.0.3" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71a0d32f34e71e86586124225caefd78dabc605d0486de580d717653addf182" +checksum = "388dd29114a86ec69b28d1e26d6d63a662300ecf61ab3f4cc578f7d7dc9e7e23" dependencies = [ "gix-fs", "libc", @@ -791,19 +821,25 @@ dependencies = [ ] [[package]] -name = "gix-utils" -version = "0.1.1" +name = "gix-trace" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10b69beac219acb8df673187a1f07dde2d74092f974fb3f9eb385aeb667c909" +checksum = "e8e1127ede0475b58f4fe9c0aaa0d9bb0bad2af90bbd93ccd307c8632b863d89" + +[[package]] +name = "gix-utils" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de6225e2de30b6e9bca2d9f1cc4731640fcef0fb3cabddceee366e7e85d3e94f" dependencies = [ - "fastrand", + "fastrand 2.0.1", ] [[package]] name = "gix-validate" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd629d3680773e1785e585d76fd4295b740b559cad9141517300d99a0c8c049" +checksum = "ac7cc36f496bd5d96cdca0f9289bb684480725d40db60f48194aa7723b883854" dependencies = [ "bstr", "thiserror", @@ -878,12 +914,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "home" version = "0.5.5" @@ -922,9 +952,27 @@ dependencies = [ [[package]] name = "ignore-files" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7ef2262641fef97d2e3230dc14b50d80418a2b7a22497457f23c533e8a75de" +checksum = "2728edd85c6346554464b4d0f8df9704ecf53f75be9c6eb773615f2fa2f9df45" +dependencies = [ + "dunce", + "futures", + "gix-config", + "ignore", + "miette", + "project-origins", + "radix_trie", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "ignore-files" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac9009f32a28b8f63fdec730f593d582a607d5b48cdbce7c8b26a71543a42e19" dependencies = [ "dunce", "futures", @@ -988,7 +1036,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -1107,9 +1155,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -1163,20 +1211,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -1208,7 +1247,7 @@ checksum = "4c65c625186a9bcce6699394bee511e1b1aec689aa7e3be1bf4e996e75834153" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -1218,15 +1257,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mio" -version = "0.8.6" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1305,16 +1353,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "cfg-if", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", ] [[package]] @@ -1335,20 +1380,21 @@ checksum = "cf22e319b2e3cb517350572e3b70c6822e0a520abfb5c78f690e829a73e8d9f2" [[package]] name = "notify" -version = "5.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", + "log", "mio", "walkdir", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -1420,11 +1466,12 @@ dependencies = [ "colored", "crossbeam-channel", "dashmap", + "dunce", "fs_extra", "globset", "hashbrown 0.14.3", "ignore", - "ignore-files", + "ignore-files 2.0.0", "itertools", "napi", "napi-build", @@ -1452,6 +1499,15 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.18.0" @@ -1493,42 +1549,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" -[[package]] -name = "phf" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" -dependencies = [ - "phf_shared 0.11.1", -] - -[[package]] -name = "phf_codegen" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770" -dependencies = [ - "phf_generator 0.11.1", - "phf_shared 0.11.1", -] - [[package]] name = "phf_generator" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ - "phf_shared 0.10.0", - "rand", -] - -[[package]] -name = "phf_generator" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" -dependencies = [ - "phf_shared 0.11.1", + "phf_shared", "rand", ] @@ -1541,20 +1568,11 @@ dependencies = [ "siphasher", ] -[[package]] -name = "phf_shared" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1570,9 +1588,15 @@ checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1614,18 +1638,24 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" dependencies = [ "unicode-ident", ] [[package]] -name = "project-origins" -version = "1.2.0" +name = "prodash" +version = "26.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629e0d57f265ca8238345cb616eea8847b8ecb86b5d97d155be2c8963a314379" +checksum = "794b5bf8e2d19b53dcdcec3e4bba628e20f5b6062503ba89281fa7037dd7bbcf" + +[[package]] +name = "project-origins" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a076d4a3bf0fc61496e60f5a7a96421697a8fc45f4c53ee0a3b93573dbb93fd2" dependencies = [ "futures", "tokio", @@ -1663,9 +1693,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1738,15 +1768,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.3.5" @@ -1765,17 +1786,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regex" version = "1.9.1" @@ -1857,6 +1867,12 @@ dependencies = [ "syn 1.0.107", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc-hash" version = "1.1.0" @@ -1912,22 +1928,22 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] @@ -2026,7 +2042,7 @@ dependencies = [ "new_debug_unreachable", "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared", "precomputed-hash", "serde", ] @@ -2037,8 +2053,8 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", + "phf_generator", + "phf_shared", "proc-macro2", "quote", ] @@ -2053,7 +2069,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2168,7 +2184,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2180,7 +2196,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2204,7 +2220,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2220,9 +2236,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" dependencies = [ "proc-macro2", "quote", @@ -2242,25 +2258,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", - "fastrand", + "fastrand 1.9.0", "redox_syscall 0.3.5", "rustix", "windows-sys 0.45.0", ] -[[package]] -name = "terminfo" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666cd3a6681775d22b200409aad3b089c5b99fb11ecdd8a204d9d62f8148498f" -dependencies = [ - "dirs", - "fnv", - "nom", - "phf", - "phf_codegen", -] - [[package]] name = "termtree" version = "0.4.0" @@ -2269,22 +2272,22 @@ checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2298,13 +2301,15 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ + "deranged", "itoa", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -2312,15 +2317,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -2342,11 +2347,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -2359,13 +2364,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] @@ -2381,11 +2386,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -2394,20 +2398,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -2550,17 +2554,16 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "watchexec" -version = "2.3.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b97d05a9305a9aa6a7bedef64cd012ebc9b6f1f5ed0368fb48f0fe58f96988" +checksum = "b4ffe232bb6205a38dae0832b972b25039bdb80a2b1d915448c8c1ba280f1fee" dependencies = [ "async-priority-channel", "async-recursion", "atomic-take", - "clearscreen", "command-group", "futures", - "ignore-files", + "ignore-files 1.3.2", "miette", "nix", "normalize-path", @@ -2572,13 +2575,14 @@ dependencies = [ "tracing", "watchexec-events", "watchexec-signals", + "watchexec-supervisor", ] [[package]] name = "watchexec-events" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01603bbe02fd75918f010dadad456d47eda14fb8fdcab276b0b4b8362f142ae3" +checksum = "8fa905a7f327bfdda78b9c06831d3180a419b7b722bd1ef779ac13ff2ab69df0" dependencies = [ "nix", "notify", @@ -2587,23 +2591,24 @@ dependencies = [ [[package]] name = "watchexec-filterer-ignore" -version = "1.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f345f020367ccdb7a19fcd59cafe5b8e99acdaf937b19d5847a6a1b81fd44ea3" +checksum = "624fe4924bd0cf2bd102a994a30bea7baaa65606e2e99e82d287bb030e0b6b99" dependencies = [ "dunce", "ignore", - "ignore-files", + "ignore-files 2.0.0", "tracing", "watchexec", + "watchexec-events", "watchexec-signals", ] [[package]] name = "watchexec-signals" -version = "1.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2a5df96c388901c94ca04055fcd51d4196ca3e971c5e805bd4a4b61dd6a7e5" +checksum = "af0a778522cf0fc2fa8a8f1380e32893208cb2e7fd33e64de8bd81a00a2a7838" dependencies = [ "miette", "nix", @@ -2611,14 +2616,18 @@ dependencies = [ ] [[package]] -name = "which" -version = "4.4.0" +name = "watchexec-supervisor" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "6214815382a9cadf1f0e521e3c28ae4e02541b96622d0e78053f03b730a1437f" dependencies = [ - "either", - "libc", - "once_cell", + "command-group", + "futures", + "nix", + "tokio", + "tracing", + "watchexec-events", + "watchexec-signals", ] [[package]] @@ -2654,26 +2663,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-targets 0.48.0", + "windows-core", + "windows-targets 0.52.0", ] [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.52.0", ] [[package]] @@ -2694,6 +2698,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -2724,6 +2737,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -2736,6 +2764,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -2748,6 +2782,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -2760,6 +2800,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -2772,6 +2818,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -2784,6 +2836,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -2796,6 +2854,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -2808,6 +2872,21 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +dependencies = [ + "memchr", +] + [[package]] name = "wyz" version = "0.5.1" @@ -2840,5 +2919,5 @@ checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.46", ] diff --git a/packages/nx/Cargo.toml b/packages/nx/Cargo.toml index 246f74e1a4..86dcb1da38 100644 --- a/packages/nx/Cargo.toml +++ b/packages/nx/Cargo.toml @@ -8,11 +8,12 @@ anyhow = "1.0.71" colored = "2" crossbeam-channel = '0.5' dashmap = { version = "5.5.3", features = ["rayon"] } +dunce = "1" fs_extra = "1.3.0" globset = "0.4.10" hashbrown = { version = "0.14.3", features = ["rayon", "rkyv"] } ignore = '0.4' -ignore-files = "1.3.0" +ignore-files = "2.0.0" itertools = "0.10.5" once_cell = "1.18.0" parking_lot = { version = "0.12.1", features = ["send_guard"] } @@ -31,10 +32,10 @@ tokio = { version = "1.28.2", features = ["fs"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } walkdir = '2.3.3' -watchexec = "2.3.0" -watchexec-events = "1.0.0" -watchexec-filterer-ignore = "1.2.1" -watchexec-signals = "1.0.0" +watchexec = "3.0.1" +watchexec-events = "2.0.1" +watchexec-filterer-ignore = "3.0.0" +watchexec-signals = "2.1.0" xxhash-rust = { version = '0.8.5', features = ['xxh3', 'xxh64'] } swc_common = "0.31.16" swc_ecma_parser = { version = "0.137.1", features = ["typescript"] } diff --git a/packages/nx/src/native/tests/watcher.spec.ts b/packages/nx/src/native/tests/watcher.spec.ts index 07a0c51517..580c93cee5 100644 --- a/packages/nx/src/native/tests/watcher.spec.ts +++ b/packages/nx/src/native/tests/watcher.spec.ts @@ -8,11 +8,14 @@ describe('watcher', () => { temp = new TempFs('watch-dir'); temp.createFilesSync({ '.gitignore': 'node_modules/\n.env.local', - '.nxignore': 'app2/\n!.env.local', + '.nxignore': 'app2/\n!.env.*\nboo.txt', '.env.local': '', 'app1/main.js': '', 'app1/main.css': '', 'app2/main.js': '', + 'inner/.gitignore': '.env.inner', + 'inner/boo.txt': '', + 'inner/.env.inner': '', 'nested-ignore/.gitignore': '*', 'nested-ignore/file.js': '', 'node_modules/module/index.js': '', @@ -51,7 +54,7 @@ describe('watcher', () => { await wait(); temp.createFileSync('app1/main.html', JSON.stringify({})); }); - }, 10000); + }, 15000); it('should trigger the callback when files are updated', async () => { return new Promise(async (done) => { @@ -76,7 +79,7 @@ describe('watcher', () => { await wait(); temp.appendFile('app1/main.js', 'update'); }); - }, 10000); + }, 15000); it('should watch file renames', async () => { return new Promise(async (done) => { @@ -103,7 +106,7 @@ describe('watcher', () => { await wait(); temp.renameFile('app1/main.js', 'app1/rename.js'); }); - }, 10000); + }, 15000); it('should trigger on deletes', async () => { return new Promise(async (done) => { @@ -125,7 +128,7 @@ describe('watcher', () => { await wait(); temp.removeFileSync('app1/main.js'); }); - }, 10000); + }, 15000); it('should ignore nested gitignores', async () => { return new Promise(async (done) => { @@ -137,7 +140,7 @@ describe('watcher', () => { expect(paths).toMatchInlineSnapshot(` [ { - "path": "boo.txt", + "path": "bar.txt", "type": "create", }, ] @@ -149,21 +152,27 @@ describe('watcher', () => { // should not be triggered temp.createFileSync('nested-ignore/hello1.txt', ''); await wait(); - temp.createFileSync('boo.txt', ''); + temp.createFileSync('bar.txt', ''); }); - }, 10000); + }, 15000); - it('should include files that are negated in nxignore but are ignored in gitignore', async () => { + it('prioritize nxignore over gitignores', async () => { return new Promise(async (done) => { await wait(); watcher = new Watcher(temp.tempDir); watcher.watch((err, paths) => { expect(paths.some(({ path }) => path === '.env.local')).toBeTruthy(); + expect( + paths.some(({ path }) => path === 'inner/.env.inner') + ).toBeTruthy(); + expect(paths.some(({ path }) => path === 'inner/boo.txt')).toBeFalsy(); done(); }); await wait(2000); temp.appendFile('.env.local', 'hello'); + temp.appendFile('inner/.env.inner', 'hello'); + temp.appendFile('inner/boo.txt', 'hello'); }); }, 15000); }); diff --git a/packages/nx/src/native/watch/mod.rs b/packages/nx/src/native/watch/mod.rs index 75a4914bd8..6feb2cb034 100644 --- a/packages/nx/src/native/watch/mod.rs +++ b/packages/nx/src/native/watch/mod.rs @@ -1,5 +1,4 @@ mod types; mod utils; -mod watch_config; mod watch_filterer; mod watcher; diff --git a/packages/nx/src/native/watch/watch_config.rs b/packages/nx/src/native/watch/watch_config.rs deleted file mode 100644 index 62adf4faac..0000000000 --- a/packages/nx/src/native/watch/watch_config.rs +++ /dev/null @@ -1,54 +0,0 @@ -use std::sync::Arc; - -use ignore_files::IgnoreFilter; -use tracing::trace; -use watchexec::config::RuntimeConfig; -use watchexec_filterer_ignore::IgnoreFilterer; - -use crate::native::watch::utils::{get_ignore_files, get_nx_ignore}; -use crate::native::watch::watch_filterer::WatchFilterer; - -pub(super) async fn create_runtime( - origin: &str, - additional_globs: &[&str], - use_ignore: bool, -) -> napi::Result { - let ignore_files = get_ignore_files(use_ignore, origin); - let nx_ignore_file = get_nx_ignore(origin); - - trace!( - ?use_ignore, - ?additional_globs, - ?ignore_files, - "Using these ignore files for the watcher" - ); - let mut filter = if let Some(ignore_files) = ignore_files { - IgnoreFilter::new(origin, &ignore_files) - .await - .map_err(anyhow::Error::from)? - } else { - IgnoreFilter::empty(origin) - }; - - filter - .add_globs(additional_globs, Some(&origin.into())) - .map_err(anyhow::Error::from)?; - - // always add the .nxignore file after all other ignores are loaded so that it has the highest priority - if let Some(nx_ignore_file) = nx_ignore_file { - filter - .add_file(&nx_ignore_file) - .await - .map_err(anyhow::Error::from)?; - } - - let mut runtime = RuntimeConfig::default(); - runtime.filterer(Arc::new(WatchFilterer { - inner: IgnoreFilterer(filter), - })); - - // let watch_directories = get_watch_directories(origin); - // trace!(directories = ?watch_directories, "watching"); - runtime.pathset([&origin]); - Ok(runtime) -} diff --git a/packages/nx/src/native/watch/watch_filterer.rs b/packages/nx/src/native/watch/watch_filterer.rs index 2ed067c5e9..38398bc014 100644 --- a/packages/nx/src/native/watch/watch_filterer.rs +++ b/packages/nx/src/native/watch/watch_filterer.rs @@ -1,16 +1,53 @@ +use ignore::Match; use tracing::trace; use watchexec::error::RuntimeError; use watchexec::filter::Filterer; use watchexec_events::filekind::{CreateKind, FileEventKind, ModifyKind, RemoveKind}; +use ignore_files::IgnoreFilter; use watchexec_events::{Event, FileType, Priority, Source, Tag}; use watchexec_filterer_ignore::IgnoreFilterer; -use crate::native::watch::utils::transform_event; +use crate::native::watch::utils::{get_ignore_files, get_nx_ignore, transform_event}; #[derive(Debug)] pub struct WatchFilterer { - pub inner: IgnoreFilterer, + pub nx_ignore: Option, + pub git_ignore: IgnoreFilterer, +} + +impl WatchFilterer { + fn filter_event(&self, event: &Event, priority: Priority) -> bool { + let mut pass = true; + for (path, file_type) in event.paths() { + let path = dunce::simplified(path); + let is_dir = file_type.map_or(false, |t| matches!(t, FileType::Dir)); + let nx_ignore_match_type = if let Some(nx_ignore) = &self.nx_ignore { + nx_ignore.match_path(path, is_dir) + } else { + Match::None + }; + + // if the nxignore file contains this file as a whitelist, + // we do not want gitignore to filter it out, so it will always pass as true + if matches!(nx_ignore_match_type, Match::Whitelist(_)) { + trace!(?path, "nxignore whitelist match, ignoring gitignore"); + pass &= true; + // If the nxignore file contains this file as an ignore, + // then there's no point in checking the gitignore file + } else if matches!(nx_ignore_match_type, Match::Ignore(_)) { + trace!(?path, "nxignore ignore match, ignoring gitignore"); + pass &= false; + } else { + pass &= self + .git_ignore + .check_event(event, priority) + .expect("git ignore check never errors") + } + } + + pass + } } /// Used to filter out events that that come from watchexec @@ -19,12 +56,11 @@ impl Filterer for WatchFilterer { let transformed = transform_event(watch_event); let event = transformed.as_ref().unwrap_or(watch_event); - if !self.inner.check_event(event, priority)? { + trace!(?event, "checking if event is valid"); + if !self.filter_event(event, priority) { return Ok(false); } - trace!(?event, "checking if event is valid"); - // // Tags will be a Vec that contains multiple types of information for a given event // We are only interested if: @@ -67,3 +103,51 @@ impl Filterer for WatchFilterer { Ok(true) } } + +pub(super) async fn create_filter( + origin: &str, + additional_globs: &[String], + use_ignore: bool, +) -> anyhow::Result { + let ignore_files = get_ignore_files(use_ignore, origin); + let nx_ignore_file = get_nx_ignore(origin); + + trace!( + ?use_ignore, + ?additional_globs, + ?ignore_files, + "Using these ignore files for the watcher" + ); + let mut git_ignore = if let Some(ignore_files) = ignore_files { + IgnoreFilter::new(origin, &ignore_files) + .await + .map_err(anyhow::Error::from)? + } else { + IgnoreFilter::empty(origin) + }; + + git_ignore + .add_globs( + &additional_globs + .iter() + .map(String::as_ref) + .collect::>(), + Some(&origin.into()), + ) + .map_err(anyhow::Error::from)?; + + let nx_ignore = if let Some(nx_ignore_file) = nx_ignore_file { + Some( + IgnoreFilter::new(origin, &[nx_ignore_file]) + .await + .map_err(anyhow::Error::from)?, + ) + } else { + None + }; + + Ok(WatchFilterer { + git_ignore: IgnoreFilterer(git_ignore), + nx_ignore, + }) +} diff --git a/packages/nx/src/native/watch/watcher.rs b/packages/nx/src/native/watch/watcher.rs index 8026d5b7d6..97e6086803 100644 --- a/packages/nx/src/native/watch/watcher.rs +++ b/packages/nx/src/native/watch/watcher.rs @@ -1,10 +1,10 @@ use std::collections::hash_map::Entry; use std::collections::HashMap; -use std::convert::Infallible; use std::path::MAIN_SEPARATOR; use std::sync::Arc; use crate::native::watch::types::{EventType, WatchEvent, WatchEventInternal}; +use crate::native::watch::watch_filterer; use napi::bindgen_prelude::*; use napi::threadsafe_function::{ ThreadSafeCallContext, ThreadsafeFunction, ThreadsafeFunctionCallMode, @@ -13,15 +13,10 @@ use napi::{Env, JsFunction, JsObject}; use rayon::prelude::*; use tracing::trace; use tracing_subscriber::EnvFilter; -use watchexec::action::{Action, Outcome}; -use watchexec::config::{InitConfig, RuntimeConfig}; -use watchexec::event::Tag; use watchexec::Watchexec; -use watchexec_events::{Event, Keyboard, Priority}; +use watchexec_events::{Event, Priority, Tag}; use watchexec_signals::Signal; -use crate::native::watch::watch_config; - #[napi] pub struct Watcher { pub origin: String, @@ -42,26 +37,23 @@ impl Watcher { origin: String, additional_globs: Option>, use_ignore: Option, - ) -> Result { - let watch_exec = Watchexec::new(InitConfig::default(), RuntimeConfig::default()) - .map_err(anyhow::Error::from)?; - + ) -> Watcher { // always have these globs come before the additional globs let mut globs = vec![".git/".into(), "node_modules/".into(), ".nx/".into()]; if let Some(additional_globs) = additional_globs { globs.extend(additional_globs); } - Ok(Watcher { + Watcher { origin: if cfg!(window) { origin.replace('/', "\\") } else { origin }, - watch_exec, + watch_exec: Arc::new(Watchexec::default()), additional_globs: globs, use_ignore: use_ignore.unwrap_or(true), - }) + } } #[napi] @@ -95,98 +87,76 @@ impl Watcher { callback_tsfn.unref(&env)?; let origin = self.origin.clone(); - let watch_exec = self.watch_exec.clone(); - let additional_globs = self.additional_globs.clone(); - let use_ignore = self.use_ignore; - let start = async move { - let mut runtime = watch_config::create_runtime( - &origin, - &additional_globs - .iter() - .map(String::as_ref) - .collect::>(), - use_ignore, - ) - .await?; + self.watch_exec.config.on_action(move |mut action| { + let signals: Vec = action.signals().collect(); - runtime.on_action(move |action: Action| { - let ok_future = async { Ok::<(), Infallible>(()) }; - let signals: Vec = action.events.iter().flat_map(Event::signals).collect(); + if signals.contains(&Signal::Terminate) { + trace!("terminate - ending watch"); + action.quit(); + return action; + } - if signals.contains(&Signal::Terminate) { - trace!("terminate - ending watch"); - action.outcome(Outcome::both(Outcome::Stop, Outcome::Exit)); - return ok_future; - } + if signals.contains(&Signal::Interrupt) { + trace!("interrupt - ending watch"); + action.quit(); + return action; + } - if signals.contains(&Signal::Interrupt) { - trace!("interrupt - ending watch"); - action.outcome(Outcome::both(Outcome::Stop, Outcome::Exit)); - return ok_future; - } + let mut origin_path = origin.clone(); + if !origin_path.ends_with(MAIN_SEPARATOR) { + origin_path.push(MAIN_SEPARATOR); + } + trace!(?origin_path); - let is_keyboard_eof = action - .events - .iter() - .any(|e| e.tags.contains(&Tag::Keyboard(Keyboard::Eof))); + let events = action + .events + .par_iter() + .map(|ev| { + let mut watch_event: WatchEventInternal = ev.into(); + watch_event.origin = Some(origin_path.clone()); + watch_event + }) + .collect::>(); - if is_keyboard_eof { - trace!("ending watch"); - action.outcome(Outcome::both(Outcome::Stop, Outcome::Exit)); - return ok_future; - } + let mut group_events: HashMap = HashMap::new(); + for g in events.into_iter() { + let path = g.path.display().to_string(); - let mut origin_path = origin.clone(); - if !origin_path.ends_with(MAIN_SEPARATOR) { - origin_path.push(MAIN_SEPARATOR); - } - trace!(?origin_path); - - let events = action - .events - .par_iter() - .map(|ev| { - let mut watch_event: WatchEventInternal = ev.into(); - watch_event.origin = Some(origin_path.clone()); - watch_event - }) - .collect::>(); - - let mut group_events: HashMap = HashMap::new(); - for g in events.into_iter() { - let path = g.path.display().to_string(); - - // Delete > Create > Modify - match group_events.entry(path) { - // Delete should override anything - Entry::Occupied(mut e) if matches!(g.r#type, EventType::delete) => { - e.insert(g); - } - // Create should override update - Entry::Occupied(mut e) - if matches!(g.r#type, EventType::create) - && matches!(e.get().r#type, EventType::update) => - { - e.insert(g); - } - Entry::Occupied(_) => {} - // If its empty, insert - Entry::Vacant(e) => { - e.insert(g); - } + // Delete > Create > Modify + match group_events.entry(path) { + // Delete should override anything + Entry::Occupied(mut e) if matches!(g.r#type, EventType::delete) => { + e.insert(g); + } + // Create should override update + Entry::Occupied(mut e) + if matches!(g.r#type, EventType::create) + && matches!(e.get().r#type, EventType::update) => + { + e.insert(g); + } + Entry::Occupied(_) => {} + // If its empty, insert + Entry::Vacant(e) => { + e.insert(g); } } - callback_tsfn.call(Ok(group_events), ThreadsafeFunctionCallMode::NonBlocking); + } + callback_tsfn.call(Ok(group_events), ThreadsafeFunctionCallMode::NonBlocking); - action.outcome(Outcome::Start); - ok_future - }); + action + }); + let origin = self.origin.clone(); + let additional_globs = self.additional_globs.clone(); + let use_ignore = self.use_ignore; + let watch_exec = self.watch_exec.clone(); + let start = async move { trace!("configuring watch exec"); - watch_exec - .reconfigure(runtime) - .map_err(anyhow::Error::from)?; - + watch_exec.config.pathset([&origin.as_str()]); + watch_exec.config.filterer( + watch_filterer::create_filter(&origin, &additional_globs, use_ignore).await?, + ); trace!("starting watch exec"); watch_exec.main().await.map_err(anyhow::Error::from)?.ok(); Ok(())