From a1cc8136ec2d7fd346ec3cb7259608e6e62e5a81 Mon Sep 17 00:00:00 2001 From: Ludwig Stecher Date: Tue, 21 Mar 2023 23:18:43 +0100 Subject: [PATCH] bump versions, update deps, change wasm package name --- CHANGELOG.md | 5 +- Cargo.lock | 207 +++++++++++++++++-------------- README.md | 18 ++- benchmark/Cargo.toml | 2 +- pomsky-bin/Cargo.toml | 4 +- pomsky-lib/Cargo.toml | 10 +- pomsky-macro/Cargo.toml | 4 +- pomsky-syntax/Cargo.toml | 2 +- pomsky-wasm/Cargo.lock | 230 ++++++++++++++++++++++++++--------- pomsky-wasm/Cargo.toml | 10 +- pomsky-wasm/justfile | 11 ++ pomsky-wasm/pkg/package.json | 18 ++- 12 files changed, 344 insertions(+), 177 deletions(-) create mode 100644 pomsky-wasm/justfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 263da3e..a70c881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.10.0] - 2023-03-21 + ### New - Brand new tooling arrived! @@ -19,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The [set of Unicode properties](https://pomsky-lang.org/docs/reference/unicode-properties/) was extended to support all general categories, scripts, blocks and boolean properties as of Unicode 15.0. When a property isn't supported by the regex flavor, an error is reported. -- Add `--list shorthands` CLI flag to list all supported Unicode properties and shorthands +- Added `--list shorthands` CLI flag to list all supported Unicode properties and shorthands ### Changed @@ -459,6 +461,7 @@ The repository was moved to its own organization! 🎉 It also has a new website Initial release [unreleased]: https://github.com/pomsky-lang/pomsky/compare/v0.10...HEAD +[0.10.0]: https://github.com/pomsky-lang/pomsky/compare/v0.9...v0.10 [0.9.0]: https://github.com/pomsky-lang/pomsky/compare/v0.8...v0.9 [0.8.0]: https://github.com/pomsky-lang/pomsky/compare/v0.7...v0.8 [0.7.0]: https://github.com/pomsky-lang/pomsky/compare/v0.6...v0.7 diff --git a/Cargo.lock b/Cargo.lock index c1e4e99..9c93b91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,24 +37,31 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + [[package]] name = "arbitrary" -version = "1.2.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e90af4de65aa7b293ef2d09daff88501eb254f58edde2e1ac02c82d873eadad" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" dependencies = [ "derive_arbitrary", ] [[package]] name = "assert_cmd" -version = "2.0.8" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" +checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" dependencies = [ + "anstyle", "bstr", "doc-comment", - "predicates", + "predicates 3.0.1", "predicates-core", "predicates-tree", "wait-timeout", @@ -62,13 +69,14 @@ dependencies = [ [[package]] name = "assert_fs" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94b2a3f3786ff2996a98afbd6b4e5b7e890d685ccf67577f508ee2342c71cc9" +checksum = "e9d5bf7e5441c6393b5a9670a5036abe6b4847612f594b870f7332dbf10cf6fa" dependencies = [ + "anstyle", "doc-comment", "globwalk", - "predicates", + "predicates 3.0.1", "predicates-core", "predicates-tree", "tempfile", @@ -140,9 +148,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -358,13 +366,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.2.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8beee4701e2e229e8098bbdecdca12449bc3e322f137d269182fa1291e20bd00" +checksum = "f3cdeb9ec472d588e539a818b2dee436825730da08ad0017c4b1a17676bdc8b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -591,19 +599,20 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", "windows-sys 0.45.0", ] [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", @@ -728,15 +737,15 @@ dependencies = [ [[package]] name = "miette" -version = "5.5.0" +version = "5.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd9b301defa984bbdbe112b4763e093ed191750a0d914a78c1106b2d0fe703" +checksum = "07749fb52853e739208049fb513287c6f448de9103dfa78b05ae01f2fc5809bb" dependencies = [ - "atty", + "is-terminal", "miette-derive", "once_cell", "owo-colors", - "supports-color 1.3.1", + "supports-color", "supports-hyperlinks", "supports-unicode", "terminal_size", @@ -747,13 +756,13 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.5.0" +version = "5.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c2401ab7ac5282ca5c8b518a87635b1a93762b0b90b9990c509888eeccba29" +checksum = "2a07ad93a80d1b92bb44cb42d7c49b49c9aab1778befefad49cceb5e4c5bf460" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -834,9 +843,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "owo-colors" @@ -903,7 +912,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -953,7 +962,7 @@ dependencies = [ [[package]] name = "pomsky" -version = "0.9.0" +version = "0.10.0" dependencies = [ "arbitrary", "atty", @@ -976,22 +985,22 @@ dependencies = [ "lexopt", "miette", "pomsky", - "predicates", + "predicates 2.1.5", "serde", "serde_json", - "supports-color 2.0.0", + "supports-color", ] [[package]] name = "pomsky-macro" -version = "0.9.0" +version = "0.10.0" dependencies = [ "pomsky", ] [[package]] name = "pomsky-syntax" -version = "0.9.0" +version = "0.10.0" dependencies = [ "arbitrary", "strsim 0.10.0", @@ -1011,17 +1020,29 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba7d6ead3e3966038f68caa9fc1f860185d95a793180bbcfe0d0da47b3961ed" +dependencies = [ + "anstyle", + "difflib", + "itertools", + "predicates-core", +] + [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -1038,9 +1059,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5308e8208729c3e1504a6cfad0d5daacc4614c9a2e65d1ea312a34b5cb00fe84" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -1078,9 +1099,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" dependencies = [ "aho-corasick", "memchr", @@ -1095,9 +1116,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-test" @@ -1116,9 +1137,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.36.9" +version = "0.36.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" dependencies = [ "bitflags", "errno", @@ -1151,22 +1172,22 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.155" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.155" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.4", ] [[package]] @@ -1215,16 +1236,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "supports-color" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" -dependencies = [ - "atty", - "is_ci", -] - [[package]] name = "supports-color" version = "2.0.0" @@ -1237,20 +1248,20 @@ dependencies = [ [[package]] name = "supports-hyperlinks" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" +checksum = "4b4806e0b03b9906e76b018a5d821ebf198c8e9dc0829ed3328eeeb5094aed60" dependencies = [ - "atty", + "is-terminal", ] [[package]] name = "supports-unicode" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" +checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" dependencies = [ - "atty", + "is-terminal", ] [[package]] @@ -1264,6 +1275,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c622ae390c9302e214c31013517c2061ecb2699935882c60a9b37f82f8625ae" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tempfile" version = "3.4.0" @@ -1298,9 +1320,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "textwrap" @@ -1330,22 +1352,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.4", ] [[package]] @@ -1425,12 +1447,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -1461,7 +1482,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -1483,7 +1504,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1572,9 +1593,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1587,42 +1608,42 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" diff --git a/README.md b/README.md index 446a8f8..6cc7af6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Pomsky -A portable, modern regular expression language +A portable1, modern regular expression language **[documentation](https://pomsky-lang.org/docs/get-started/introduction/) · [website](https://pomsky-lang.org) · [Discord server](https://discord.gg/uwap2uxMFp)** @@ -125,6 +125,22 @@ desired on the targeted regex engine. **Note**: You should enable Unicode support in your regex engine, if it isn't enabled by default. This is [explained here][enable-unicode]. +## Portability + +Pomsky aims to be as portable as possible, polyfilling Unicode and unsupported features where feasible. That said, there are some cases where portability is not possible: + +- Some features (e.g. lookaround, backreferences, Unicode properties) aren't supported in every flavor. Pomsky fails to compile when you're using an unsupported feature. + +- `\b` (word boundaries) are not Unicode aware in JavaScript. Pomsky therefore only allows word boundaries when Unicode is disabled. + +- `\w` in .NET handles Unicode incorrectly, with no way to polyfill it properly. This means that in .NET, `[word]` only matches the `L`, `Mn`, `Nd`, and `Pc` general categories, instead of `Alphabetic`, `M`, `Nd`, `Pc` and `Join_Control`. + +- In .NET, `.`, `Codepoint` and character classes (e.g. `[Latin]`) only match a single UTF-16 code unit rather than a codepoint. + +- `[space]` matches slightly different code points in JavaScript than in Java. This will be fixed. + +- Backreferences behave differently in JavaScript and Python when the referenced group has no captured text. There is nothing we can do about it, but we could add a warning for this in the future. + ## Security **Never compile or execute an untrusted Pomsky expression on your critical infrastructure**. diff --git a/benchmark/Cargo.toml b/benchmark/Cargo.toml index 895876d..ffee8e1 100644 --- a/benchmark/Cargo.toml +++ b/benchmark/Cargo.toml @@ -7,7 +7,7 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -pomsky = { version = "0.9.0", path = "../pomsky-lib" } +pomsky = { version = "0.10.0", path = "../pomsky-lib" } criterion = { git = "https://github.com/bheisler/criterion.rs", branch = "version-0.4" } melody_compiler = "0.18.1" diff --git a/pomsky-bin/Cargo.toml b/pomsky-bin/Cargo.toml index 34527e3..ce645fe 100644 --- a/pomsky-bin/Cargo.toml +++ b/pomsky-bin/Cargo.toml @@ -27,11 +27,11 @@ serde_json = "1.0.91" serde = { version = "1.0.152", features = ["derive"] } [dependencies.miette] -version = "5.5.0" +version = "5.6.0" features = ["fancy-no-backtrace"] [dependencies.pomsky] -version = "0.9.0" +version = "0.10.0" path = "../pomsky-lib" features = ["dbg", "miette", "suggestions"] diff --git a/pomsky-lib/Cargo.toml b/pomsky-lib/Cargo.toml index 803d707..0fc23ba 100644 --- a/pomsky-lib/Cargo.toml +++ b/pomsky-lib/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pomsky" description = "A new regular expression language" -version = "0.9.0" +version = "0.10.0" edition = "2021" authors = ["Ludwig Stecher "] license = "MIT OR Apache-2.0" @@ -21,19 +21,19 @@ dbg = ["pomsky-syntax/dbg"] suggestions = ["pomsky-syntax/suggestions"] [dependencies] -pomsky-syntax = { version = "0.9.0", path = "../pomsky-syntax" } +pomsky-syntax = { version = "0.10.0", path = "../pomsky-syntax" } arbitrary = { version = "1.2.2", features = ["derive"], optional = true } [dependencies.miette] -version = "5.5.0" +version = "5.6.0" optional = true features = ["fancy-no-backtrace"] [dev-dependencies] lexopt = "0.3.0" atty = "0.2.14" -once_cell = "1.17.0" -regex = "1.7.1" +once_cell = "1.17.1" +regex = "1.7.2" regex-test = { path = "../regex-test" } [[test]] diff --git a/pomsky-macro/Cargo.toml b/pomsky-macro/Cargo.toml index 764c6bd..e0fe2d2 100644 --- a/pomsky-macro/Cargo.toml +++ b/pomsky-macro/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pomsky-macro" description = "Macro for converting pomsky expressions to regexes" -version = "0.9.0" +version = "0.10.0" edition = "2021" authors = ["Ludwig Stecher "] license = "MIT OR Apache-2.0" @@ -19,4 +19,4 @@ default = [] diagnostics = [] [dependencies] -pomsky = { version = "0.9.0", path = "../pomsky-lib" } +pomsky = { version = "0.10.0", path = "../pomsky-lib" } diff --git a/pomsky-syntax/Cargo.toml b/pomsky-syntax/Cargo.toml index 9b4d782..ab8ce34 100644 --- a/pomsky-syntax/Cargo.toml +++ b/pomsky-syntax/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pomsky-syntax" description = "Parser for pomsky, a new regular expression language" -version = "0.9.0" +version = "0.10.0" edition = "2021" authors = ["Ludwig Stecher "] license = "MIT OR Apache-2.0" diff --git a/pomsky-wasm/Cargo.lock b/pomsky-wasm/Cargo.lock index 6ca3e33..4cca7c1 100644 --- a/pomsky-wasm/Cargo.lock +++ b/pomsky-wasm/Cargo.lock @@ -26,17 +26,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "backtrace" version = "0.3.66" @@ -52,6 +41,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bumpalo" version = "3.12.0" @@ -70,6 +65,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "compiler-web" +version = "0.10.0" +dependencies = [ + "console_error_panic_hook", + "miette", + "pomsky", + "wasm-bindgen", + "wasm-bindgen-test", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -80,6 +86,27 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "gimli" version = "0.26.2" @@ -88,11 +115,31 @@ checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "io-lifetimes" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi", "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +dependencies = [ + "hermit-abi", + "io-lifetimes", + "rustix", + "windows-sys", ] [[package]] @@ -112,9 +159,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.127" +version = "0.2.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505e71a4706fa491e9b1b55f51b95d4037d0821ee40131190475f692b35b009b" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "log" @@ -133,12 +186,12 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "miette" -version = "5.5.0" +version = "5.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd9b301defa984bbdbe112b4763e093ed191750a0d914a78c1106b2d0fe703" +checksum = "07749fb52853e739208049fb513287c6f448de9103dfa78b05ae01f2fc5809bb" dependencies = [ - "atty", "backtrace", + "is-terminal", "miette-derive", "once_cell", "owo-colors", @@ -153,9 +206,9 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.5.0" +version = "5.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c2401ab7ac5282ca5c8b518a87635b1a93762b0b90b9990c509888eeccba29" +checksum = "2a07ad93a80d1b92bb44cb42d7c49b49c9aab1778befefad49cceb5e4c5bf460" dependencies = [ "proc-macro2", "quote", @@ -194,9 +247,7 @@ checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b" [[package]] name = "pomsky" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac47a8ae929b40981ff7310dc730c8faca0f4c00a9d7c423c298a394f54a88" +version = "0.10.0" dependencies = [ "miette", "pomsky-syntax", @@ -204,24 +255,11 @@ dependencies = [ [[package]] name = "pomsky-syntax" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a106f83db6bdca4a59121f653a4ae87fb718e7c6e29c0d10cf705e9c53a5f0e" +version = "0.10.0" dependencies = [ "strsim", ] -[[package]] -name = "pomsky-wasm" -version = "0.9.1" -dependencies = [ - "console_error_panic_hook", - "miette", - "pomsky", - "wasm-bindgen", - "wasm-bindgen-test", -] - [[package]] name = "proc-macro2" version = "1.0.43" @@ -263,6 +301,20 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +[[package]] +name = "rustix" +version = "0.36.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "scoped-tls" version = "1.0.0" @@ -283,30 +335,30 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "supports-color" -version = "1.3.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9" +checksum = "4950e7174bffabe99455511c39707310e7e9b440364a2fcb1cc21521be57b354" dependencies = [ - "atty", + "is-terminal", "is_ci", ] [[package]] name = "supports-hyperlinks" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" +checksum = "4b4806e0b03b9906e76b018a5d821ebf198c8e9dc0829ed3328eeeb5094aed60" dependencies = [ - "atty", + "is-terminal", ] [[package]] name = "supports-unicode" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" +checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" dependencies = [ - "atty", + "is-terminal", ] [[package]] @@ -384,9 +436,9 @@ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -394,9 +446,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -421,9 +473,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -431,9 +483,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -444,9 +496,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-bindgen-test" @@ -503,3 +555,69 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" diff --git a/pomsky-wasm/Cargo.toml b/pomsky-wasm/Cargo.toml index 4703b41..83d3161 100644 --- a/pomsky-wasm/Cargo.toml +++ b/pomsky-wasm/Cargo.toml @@ -2,10 +2,10 @@ members = ["."] [package] -name = "pomsky-wasm" +name = "compiler-web" description = "A portable, modern regular expression language" homepage = "https://pomsky-lang.org" -version = "0.9.1" +version = "0.10.0" authors = ["Ludwig Stecher "] edition = "2021" license = "MIT OR Apache-2.0" @@ -19,13 +19,13 @@ default = ["console_error_panic_hook"] suggestions = ["pomsky/suggestions"] [dependencies] -wasm-bindgen = "0.2.83" +wasm-bindgen = "0.2.84" console_error_panic_hook = { version = "0.1.7", optional = true } -pomsky = { version = "0.9.0", features = ["miette"] } +pomsky = { version = "0.10.0", path = "../pomsky-lib", features = ["miette"] } -miette = { version = "5.5.0", features = ["fancy"] } +miette = { version = "5.6.0", features = ["fancy"] } [dev-dependencies] wasm-bindgen-test = "0.3.33" diff --git a/pomsky-wasm/justfile b/pomsky-wasm/justfile new file mode 100644 index 0000000..90c3ef5 --- /dev/null +++ b/pomsky-wasm/justfile @@ -0,0 +1,11 @@ +set export + +just_msg := "\nDone. Make sure to add 'snippets' to the 'files' array in package.json!\nCheck if you set to package name correctly!\nDon't forget to publish with --access=public!\n" + +build-web: + wasm-pack build --target=web --scope=pomsky-lang -- --features suggestions + echo "$just_msg" + +build-node: + wasm-pack build --scope=pomsky-lang -- --features suggestions + echo "$just_msg" diff --git a/pomsky-wasm/pkg/package.json b/pomsky-wasm/pkg/package.json index 7a26409..54365a2 100644 --- a/pomsky-wasm/pkg/package.json +++ b/pomsky-wasm/pkg/package.json @@ -1,27 +1,25 @@ { - "name": "pomsky-wasm", + "name": "@pomsky-lang/compiler-web", "collaborators": [ "Ludwig Stecher " ], "description": "A portable, modern regular expression language", - "version": "0.9.2", + "version": "0.10.0", "license": "MIT OR Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/rulex-rs/pomsky" + "url": "https://github.com/pomsky-lang/pomsky" }, "files": [ "snippets", - "pomsky_wasm_bg.wasm", - "pomsky_wasm.js", - "pomsky_wasm.d.ts", + "compiler_web_bg.wasm", + "compiler_web.js", + "compiler_web.d.ts", "LICENSE_MIT", "LICENSE_APACHE" ], - "main": "pomsky_wasm.js", - "type": "module", - "module": "pomsky_wasm.js", + "module": "compiler_web.js", "homepage": "https://pomsky-lang.org", - "types": "pomsky_wasm.d.ts", + "types": "compiler_web.d.ts", "sideEffects": false }