diff --git a/.envrc.example b/.envrc.example new file mode 100644 index 0000000..fb9d00c --- /dev/null +++ b/.envrc.example @@ -0,0 +1,2 @@ +use flake +dotenv_if_exists .env diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 21ef171..43d9863 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -4,11 +4,9 @@ jobs: clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: wasm32-unknown-unknown,x86_64-unknown-linux-gnu - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + - name: Clippy + run: cargo clippy --all-targets --all-features diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 311b2f6..69dc7f6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: wasm32-unknown-unknown,x86_64-unknown-linux-gnu diff --git a/.gitignore b/.gitignore index 662d957..7b76580 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ **.vsix .DS_Store .idea -.vscode \ No newline at end of file +.vscode +.direnv diff --git a/Cargo.lock b/Cargo.lock index 93ec216..46715b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,13 +4,14 @@ version = 3 [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -22,6 +23,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" + [[package]] name = "anes" version = "0.1.6" @@ -469,11 +476,12 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "allocator-api2", ] [[package]] @@ -605,7 +613,6 @@ dependencies = [ "anyhow", "assert_cmd", "assert_fs", - "atty", "clap", "clap_complete", "colored", @@ -821,18 +828,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.65" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92de25114670a878b1261c79c9f8f729fb97e95bac93f6312f583c60dd6a1dfe" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.30" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5907a1b7c277254a8b15170f6e7c97cfa60ee7872a3217663bb81151e48184bb" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -896,9 +903,9 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "regress" -version = "0.6.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9ecfa0cb04d0b04dddb99b8ccf4f66bc8dfd23df694b398570bd8ae3a50fb" +checksum = "1541daf4e4ed43a0922b7969bdc2170178bcacc5dabf7e39bc508a9fa3953a7a" dependencies = [ "hashbrown", "memchr", @@ -1009,9 +1016,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.26" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -1049,22 +1056,22 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "thiserror" -version = "1.0.31" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 1.0.86", + "syn 2.0.89", ] [[package]] @@ -1144,34 +1151,35 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.89", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1179,22 +1187,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" @@ -1326,3 +1334,23 @@ dependencies = [ "colored", "xshell", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] diff --git a/Cargo.toml b/Cargo.toml index e9990b4..fe7d837 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [workspace] members = [ - "crates/melody_cli", - "crates/melody_compiler", - "crates/melody_wasm", - "xtask", + "crates/melody_cli", + "crates/melody_compiler", + "crates/melody_wasm", + "xtask", ] resolver = "2" diff --git a/crates/melody_cli/Cargo.toml b/crates/melody_cli/Cargo.toml index fd442c7..177c396 100644 --- a/crates/melody_cli/Cargo.toml +++ b/crates/melody_cli/Cargo.toml @@ -6,27 +6,25 @@ repository = "https://github.com/yoav-lavi/melody" readme = "README.md" version = "0.19.0" edition = "2021" -rust = "1.65.0" license = "MIT OR Apache-2.0" keywords = ["melody", "melodylang", "language", "cli"] categories = ["command-line-utilities"] [dependencies] -clap = { version = "4.1.4", features = ["derive"] } -colored = "2.0.0" -thiserror = "1.0.31" -anyhow = "1.0.58" +clap = { version = "4", features = ["derive"] } +colored = "2" +thiserror = "2" +anyhow = "1" melody_compiler = { version = "0.19.0", path = "../melody_compiler" } -atty = "0.2.14" -exitcode = "1.1.2" -clap_complete = "4.1.1" -regress = "0.6.0" +exitcode = "1" +clap_complete = "4" +regress = "0.10" [dev-dependencies] -assert_cmd = "2.0.4" -assert_fs = "1.0.7" -unindent = "0.2.2" -tempfile = "3.3.0" +assert_cmd = "2" +assert_fs = "1" +unindent = "0.2" +tempfile = "3" [[bin]] name = "melody" diff --git a/crates/melody_cli/src/main.rs b/crates/melody_cli/src/main.rs index a2add69..50663dd 100644 --- a/crates/melody_cli/src/main.rs +++ b/crates/melody_cli/src/main.rs @@ -29,7 +29,7 @@ fn main() { ShouldColorize::from_env(); match try_main() { - Ok(_) => process::exit(exitcode::OK), + Ok(()) => process::exit(exitcode::OK), Err(error) => handle_error(&error), }; } diff --git a/crates/melody_cli/src/types.rs b/crates/melody_cli/src/types.rs index 9bbc20e..f46e18e 100644 --- a/crates/melody_cli/src/types.rs +++ b/crates/melody_cli/src/types.rs @@ -1,5 +1,5 @@ -use atty::Stream; use clap::Parser; +use std::io::IsTerminal; #[derive(Parser, Debug)] #[clap(about, version, author)] @@ -61,9 +61,9 @@ pub struct Streams { impl Streams { pub fn new() -> Self { Self { - stdin: !atty::is(Stream::Stdin), - stdout: !atty::is(Stream::Stdout), - // stderr: !atty::is(Stream::Stderr), + stdin: !std::io::stdin().is_terminal(), + stdout: !std::io::stdout().is_terminal(), + // stderr: !std::io::stderr().is_terminal(), } } pub const fn any_pipe(&self) -> bool { diff --git a/crates/melody_compiler/Cargo.toml b/crates/melody_compiler/Cargo.toml index dfe35e5..37fc729 100644 --- a/crates/melody_compiler/Cargo.toml +++ b/crates/melody_compiler/Cargo.toml @@ -6,7 +6,6 @@ repository = "https://github.com/yoav-lavi/melody" readme = "README.md" version = "0.19.0" edition = "2021" -rust = "1.65.0" license = "MIT OR Apache-2.0" keywords = ["melody", "melodylang", "language", "compiler"] categories = ["compilers"] @@ -15,15 +14,15 @@ categories = ["compilers"] fuzzer = ["arbitrary"] [dependencies] -pest = "2.1.3" -pest_derive = "2.1.0" -once_cell = "1.12.0" -arbitrary = { version = "1.1.3", features = ["derive"], optional = true } -thiserror = "1.0.31" +pest = "2" +pest_derive = "2" +once_cell = "1" +arbitrary = { version = "1", features = ["derive"], optional = true } +thiserror = "2" [dev-dependencies] -criterion = "0.5.1" -indoc = "2.0.3" +criterion = "0.5" +indoc = "2" [[bench]] name = "benchmark" diff --git a/crates/melody_compiler/src/ast/utils.rs b/crates/melody_compiler/src/ast/utils.rs index b61ddc8..2591e00 100644 --- a/crates/melody_compiler/src/ast/utils.rs +++ b/crates/melody_compiler/src/ast/utils.rs @@ -52,7 +52,7 @@ pub fn unquote_escape_literal(pair: &Pair<'_, Rule>) -> String { match quote_type { '"' => literal.replace(r#"\""#, r#"""#), - '\'' => literal.replace(r#"\'"#, r#"'"#), + '\'' => literal.replace(r"\'", r"'"), _ => unreachable!(), } } diff --git a/crates/melody_compiler/tests/mod.rs b/crates/melody_compiler/tests/mod.rs index 27a6458..7e8e129 100644 --- a/crates/melody_compiler/tests/mod.rs +++ b/crates/melody_compiler/tests/mod.rs @@ -7,7 +7,7 @@ fn quantifier_test() { let output = compiler(indoc! { r#" 5 of "A"; - "# + "# }); assert_eq!(output.unwrap(), "A{5}"); } @@ -20,7 +20,7 @@ fn capture_test() { 5 of "A"; 0 to 9; } - "# + "# }); assert_eq!(output.unwrap(), "(A{5}[0-9])"); } @@ -51,10 +51,10 @@ fn number_quantifier_range_test() { #[test] fn uppercase_range_test() { let output = compiler(indoc! { - r#" + r" A to Z; 7 of A to Z; - "#, + ", }); assert_eq!(output.unwrap(), "[A-Z][A-Z]{7}"); } @@ -62,10 +62,10 @@ fn uppercase_range_test() { #[test] fn lowercase_range_test() { let output = compiler(indoc! { - r#" + r" a to z; 8 of a to z; - "#, + ", }); assert_eq!(output.unwrap(), "[a-z][a-z]{8}"); } @@ -95,7 +95,7 @@ fn start_end_test() { #[test] fn symbol_test() { let output = compiler(indoc! { - r#" + r" ; ; ; @@ -127,7 +127,7 @@ fn symbol_test() { ; not ; ; - "#, + ", }); assert_eq!( output.unwrap(), @@ -138,7 +138,7 @@ fn symbol_test() { #[test] fn symbol_unicode_category_test() { let output = compiler(indoc! { - r#" + r" ; ; ; @@ -178,7 +178,7 @@ fn symbol_unicode_category_test() { ; ; 5 of ; - "#, + ", }); assert_eq!( output.unwrap(), @@ -189,7 +189,7 @@ fn symbol_unicode_category_test() { #[test] fn symbol_unicode_category_negative_test() { let output = compiler(indoc! { - r#" + r" not ; not ; not ; @@ -229,7 +229,7 @@ fn symbol_unicode_category_negative_test() { not ; not ; 5 of not ; - "#, + ", }); assert_eq!( output.unwrap(), @@ -254,12 +254,12 @@ fn match_test() { fn comment_test() { let output = compiler(indoc! { r#" - /* a single digit in the range of 0 to 5 */ + /* a single digit in the range of 0 to 5 */ // other comment - 0 to 5; - match { + 0 to 5; + match { "x"; - } + } "#, }); assert_eq!(output.unwrap(), "[0-5](?:x)"); @@ -268,9 +268,9 @@ fn comment_test() { #[test] fn char_test() { let output = compiler(indoc! { - r#" + r" 3 of ; - "#, + ", }); assert_eq!(output.unwrap(), ".{3}"); } @@ -278,10 +278,10 @@ fn char_test() { #[test] fn negative_range_test() { let output = compiler(indoc! { - r#" + r" not 3 to 5; not a to z; - "#, + ", }); assert_eq!(output.unwrap(), "[^3-5][^a-z]"); } @@ -289,9 +289,9 @@ fn negative_range_test() { #[test] fn some_test() { let single_output = compiler(indoc! { - r#" + r" some of ; - "#, + ", }); assert_eq!(single_output.unwrap(), ".+"); let multiple_output = compiler(indoc! { @@ -305,9 +305,9 @@ fn some_test() { #[test] fn option_test() { let single_output = compiler(indoc! { - r#" + r" option of ; - "#, + ", }); assert_eq!(single_output.unwrap(), ".?"); let multiple_output = compiler(indoc! { @@ -339,9 +339,9 @@ fn either_test() { #[test] fn any_test() { let single_output = compiler(indoc! { - r#" + r" any of ; - "#, + ", }); assert_eq!(single_output.unwrap(), ".*"); let multiple_output = compiler(indoc! { @@ -355,9 +355,9 @@ fn any_test() { #[test] fn directly_quantifiable() { let single_output = compiler(indoc! { - r#" + r" 5 of ; - "#, + ", }); assert_eq!(single_output.unwrap(), r"\w{5}"); } @@ -365,9 +365,9 @@ fn directly_quantifiable() { #[test] fn raw_test() { let output = compiler(indoc! { - r#" + r" 5 of `.*\``; - "#, + ", }); assert_eq!(output.unwrap(), "(?:.*`){5}"); } @@ -396,10 +396,10 @@ fn assertion_test() { #[test] fn negative_char_class_test() { let output = compiler(indoc! { - r#" + r" not abcd; 5 of not abcd; - "#, + ", }); assert_eq!(output.unwrap(), "[^abcd][^abcd]{5}"); } @@ -407,9 +407,9 @@ fn negative_char_class_test() { #[test] fn single_quote_test() { let output = compiler(indoc! { - r#" + r" 'hello \'quoted\''; - "#, + ", }); assert_eq!(output.unwrap(), "hello 'quoted'"); } diff --git a/crates/melody_wasm/Cargo.toml b/crates/melody_wasm/Cargo.toml index fe94008..f1df65d 100644 --- a/crates/melody_wasm/Cargo.toml +++ b/crates/melody_wasm/Cargo.toml @@ -2,7 +2,6 @@ name = "melody_wasm" version = "0.19.0" edition = "2021" -rust = "1.65.0" description = "WASM bindings for the Melody language compiler" license = "MIT OR Apache-2.0" repository = "https://github.com/yoav-lavi/melody" @@ -13,6 +12,6 @@ categories = ["webassembly"] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = "0.2.81" -console_error_panic_hook = "0.1.7" +wasm-bindgen = "0.2" +console_error_panic_hook = "0.1" melody_compiler = { version = "0.19.0", path = "../melody_compiler", default-features = false } diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..74c0019 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1731797254, + "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..be69244 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "Melody"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + nixpkgs, + flake-utils, + ... + }: let + inherit (nixpkgs.lib) optional; + systems = flake-utils.lib.system; + in + flake-utils.lib.eachDefaultSystem + (system: let + pkgs = import nixpkgs { + inherit system; + }; + in { + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; + [ + nodejs + nodePackages.prettier + rustup + ] + ++ optional (system == systems.aarch64-darwin) [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.SystemConfiguration + libiconv + ]; + + shellHook = '' + export CARGO_INSTALL_ROOT="$(git rev-parse --show-toplevel)/.cargo" + export PATH="$CARGO_INSTALL_ROOT/bin:$PATH" + ''; + }; + }); +} diff --git a/integrations/babel-plugin-melody/package.json b/integrations/babel-plugin-melody/package.json index 422d741..d986a48 100644 --- a/integrations/babel-plugin-melody/package.json +++ b/integrations/babel-plugin-melody/package.json @@ -7,9 +7,9 @@ "melodyc": "^0.19.0" }, "devDependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^7.26.0", "babel-plugin-tester": "^11.0.4", - "jest": "^29.6.1" + "jest": "^29.7.0" }, "files": [ "src/index.js" diff --git a/playground/package.json b/playground/package.json index f93d842..3449923 100644 --- a/playground/package.json +++ b/playground/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "devDependencies": { - "typescript": "^5.1.6", - "vite": "^4.4.4" + "typescript": "^5.7.2", + "vite": "^5.4.11" }, "dependencies": { - "monaco-editor": "^0.40.0" + "monaco-editor": "^0.52.0" } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 80e3968..06bea96 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] profile = "default" -channel = "1.71" +channel = "1.82" diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index febe136..39df8da 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -xshell = "0.2.2" -anyhow = "1.0.58" -colored = "2.0.0" +xshell = "0.2" +anyhow = "1" +colored = "2" diff --git a/xtask/src/help.rs b/xtask/src/help.rs index 902c44f..902d977 100644 --- a/xtask/src/help.rs +++ b/xtask/src/help.rs @@ -100,38 +100,38 @@ impl Display for Help { fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Main => formatter.write_str( - r#"commands: + r"commands: run [arguments] runs the melody_cli binary benchmark runs benchmarks fuzz runs fuzz testing on specific crates publish publishes specific crates or projects wasm builds wasm dependencies for specific projects - "#, + ", ), Self::Fuzz => formatter.write_str( - r#"fuzz subcommands: + r"fuzz subcommands: compiler runs fuzz testing on the compiler - "#, + ", ), Self::Publish => formatter.write_str( - r#"publish subcommands: + r"publish subcommands: cli publishes the melody_cli crate to crates.io compiler publishes the melody_compiler crate to crates.io playground publishes the playground to vercel node publishes the melodyc npm package extension publishes specific extensions - "#, + ", ), Self::PublishExtension => formatter.write_str( - r#"publish extension subcommands: + r"publish extension subcommands: vscode publishes the vscode extension to the market - "#, + ", ), Self::Wasm => formatter.write_str( - r#"wasm subcommands: + r"wasm subcommands: playground builds wasm dependencies for the playground node builds wasm dependencies for nodejs - "#, + ", ), } }