Skip to content

Commit

Permalink
Fixing integration tests by sorting
Browse files Browse the repository at this point in the history
Upgrading node-semver
  • Loading branch information
NicholasLYang committed Feb 7, 2025
1 parent b51125d commit 2c36794
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion crates/turborepo-lib/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ impl Engine<Built> {

validation_errors.extend(self.validate_interactive(ui_mode));

validation_errors.sort();

match validation_errors.is_empty() {
true => Ok(()),
false => Err(validation_errors),
Expand Down Expand Up @@ -547,7 +549,7 @@ impl Engine<Built> {
}
}

#[derive(Debug, Error, Diagnostic)]
#[derive(Debug, Error, Diagnostic, PartialEq, PartialOrd, Eq, Ord)]
pub enum ValidateError {
#[error("Cannot find task definition for {task_id} in package {package_name}")]
MissingTask {
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-repository/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ globwalk = { version = "0.1.0", path = "../turborepo-globwalk" }
itertools = { workspace = true }
lazy-regex = "2.5.0"
miette = { workspace = true }
node-semver = { git = "https://github.com/nicholaslyang/node-semver-rs", branch = "upgrade-miette" }
node-semver = "2.2.0"
petgraph = { workspace = true }
regex = { workspace = true }
rust-ini = "0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion turborepo-tests/integration/tests/bad-turbo-json.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Run build with package task in non-root turbo.json
Error: unnecessary_package_task_syntax (https://turbo.build/messages/unnecessary-package-task-syntax)

x "my-app#build". Use "build" instead.
,-(apps/my-app/turbo.json:8:21)
,-\(apps(\/|\\)my-app(\/|\\)turbo.json:8:21\) (re)
7 | // this comment verifies that turbo can read .json files with comments
8 | ,-> "my-app#build": {
9 | | "outputs": ("banana.txt", "apple.json"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
x Invalid task configuration

Error:
x "pkg-a#dev" is a persistent task, "pkg-a#build" cannot depend on it
x "pkg-a#dev" is a persistent task, "app-a#build" cannot depend on it
,-[turbo.json:5:21]
4 | "build": {
5 | "dependsOn": ["pkg-a#dev"]
Expand All @@ -30,7 +30,7 @@
`----

Error:
x "pkg-a#dev" is a persistent task, "app-a#build" cannot depend on it
x "pkg-a#dev" is a persistent task, "pkg-a#build" cannot depend on it
,-[turbo.json:5:21]
4 | "build": {
5 | "dependsOn": ["pkg-a#dev"]
Expand Down

0 comments on commit 2c36794

Please sign in to comment.