Skip to content

Commit

Permalink
fix: Audit 11/03 (#1167)
Browse files Browse the repository at this point in the history
* Force ci.

* Fix mql.

* Fix json.
  • Loading branch information
milesj authored Nov 3, 2023
1 parent f92ac8b commit 10151b1
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .yarn/versions/bd79fcf5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
releases:
"@moonrepo/cli": patch
"@moonrepo/core-linux-arm64-gnu": patch
"@moonrepo/core-linux-arm64-musl": patch
"@moonrepo/core-linux-x64-gnu": patch
"@moonrepo/core-linux-x64-musl": patch
"@moonrepo/core-macos-arm64": patch
"@moonrepo/core-macos-x64": patch
"@moonrepo/core-windows-x64-msvc": patch
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ starbase_archive = { version = "0.2.4", default-features = false, features = [
starbase_events = { version = "0.2.2" }
starbase_sandbox = "0.1.12"
starbase_styles = { version = "0.1.16", features = ["relative-path"] }
starbase_utils = { version = "0.3.6", default-features = false, features = [
starbase_utils = { version = "0.3.7", default-features = false, features = [
"editor-config",
"glob",
"json",
Expand Down
3 changes: 1 addition & 2 deletions crates/cli/src/commands/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use moon::{build_action_graph, generate_project_graph};
use moon_action_context::ActionContext;
use moon_action_graph::{ActionGraph, RunRequirements};
use moon_action_pipeline::Pipeline;
use moon_common::is_ci;
use moon_common::path::WorkspaceRelativePathBuf;
use moon_project_graph::ProjectGraph;
use moon_target::Target;
Expand Down Expand Up @@ -175,7 +174,7 @@ fn generate_action_graph(

// Run dependents to ensure consumers still work correctly
let requirements = RunRequirements {
ci: is_ci(),
ci: true,
dependents: true,
touched_files: Some(touched_files),
..Default::default()
Expand Down
10 changes: 7 additions & 3 deletions nextgen/query/src/mql.pest
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
WHITESPACE = _{ " " }

key = @{ ASCII_ALPHANUMERIC+ }
value = @{ (ASCII_ALPHANUMERIC | "-" | "_" | "/" | "@")+ }
key = @{ ASCII_ALPHANUMERIC+ }

// Other characters are required for IDs
value = @{ (ASCII_ALPHANUMERIC | "-" | "_" | "/" | "." | "@")+ }

value_glob = @{ (ASCII_ALPHANUMERIC | "-" | "_" | "*" | "!" | "." | "," | "/" | "\\" | "{" | "}" | "<" | ">" | "[" | "]" | "?" | "$" | ":" | "@")+ }
value_list = { "[" ~ value ~ ("," ~ value)* ~ "]" }

value_list = { "[" ~ value ~ ("," ~ value)* ~ "]" }

// Operators

Expand Down
9 changes: 9 additions & 0 deletions nextgen/query/tests/parser_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,15 @@ mod mql_parse {
);
}

#[test]
fn id_patterns() {
assert!(parse_query("key=id").is_ok());
assert!(parse_query("key=id-dash").is_ok());
assert!(parse_query("key=id_underscore").is_ok());
assert!(parse_query("key=id/slash").is_ok());
assert!(parse_query("key=id.period").is_ok());
}

#[test]
fn like_glob_patterns() {
assert_eq!(
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
- More accurately monitors signals (ctrl+c) and shutdowns.
- Tasks can now be configured with a timeout.

## Unreleased

#### 🐞 Fixes

- Fixed `moon ci` not treating dependents as "CI only" when running locally.
- Fixed the MQL parser failing on projects that contain a `.`.
- Fixed JSON comment stripping not handling docblock styled comments (`/** **/`).

## 1.16.0

#### 🚀 Updates
Expand Down

0 comments on commit 10151b1

Please sign in to comment.