From 78a3c3bb85200877c2d6fc2c6942dbba8cbd3f83 Mon Sep 17 00:00:00 2001 From: nicholaslyang Date: Tue, 24 Sep 2024 16:21:48 -0400 Subject: [PATCH] Fix test --- crates/turborepo-lib/src/query/mod.rs | 4 ++-- turborepo-tests/integration/tests/affected.t | 6 +++--- turborepo-tests/integration/tests/command-query.t | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/turborepo-lib/src/query/mod.rs b/crates/turborepo-lib/src/query/mod.rs index 45d5f86a9d31f..f921e78551a4a 100644 --- a/crates/turborepo-lib/src/query/mod.rs +++ b/crates/turborepo-lib/src/query/mod.rs @@ -18,8 +18,7 @@ use turborepo_repository::package_graph::PackageName; use turborepo_scm::git::ChangedFiles; use crate::{ - get_version, - global_deps_package_change_mapper, + get_version, global_deps_package_change_mapper, query::file::File, run::{builder::RunBuilder, Run}, signal::SignalHandler, @@ -45,6 +44,7 @@ pub enum Error { Path(#[from] turbopath::PathError), #[error(transparent)] UI(#[from] turborepo_ui::Error), + #[error(transparent)] ChangeMapper(#[from] global_deps_package_change_mapper::Error), #[error(transparent)] Scm(#[from] turborepo_scm::Error), diff --git a/turborepo-tests/integration/tests/affected.t b/turborepo-tests/integration/tests/affected.t index d18481c7556b6..6671b6d11ed24 100644 --- a/turborepo-tests/integration/tests/affected.t +++ b/turborepo-tests/integration/tests/affected.t @@ -64,7 +64,7 @@ Also with `affectedFiles` in `turbo query` "affectedFiles": { "items": [ { - "path": "apps/my-app/new.js", + "path": "apps(\/|\\\\)my-app(\/|\\\\)new.js", (re) "affectedPackages": { "items": [ { @@ -133,7 +133,7 @@ Also with `affectedFiles` in `turbo query` "affectedFiles": { "items": [ { - "path": "apps/my-app/package.json", + "path": "apps(\/|\\\\)my-app(\/|\\\\)package.json", (re) "affectedPackages": { "items": [ { @@ -332,7 +332,7 @@ Also with `affectedFiles` in `turbo query` "affectedFiles": { "items": [ { - "path": "apps/my-app/package.json", + "path": "apps(\/|\\\\)my-app(\/|\\\\)package.json", (re) "affectedPackages": { "items": [ { diff --git a/turborepo-tests/integration/tests/command-query.t b/turborepo-tests/integration/tests/command-query.t index 96a7eeec1f786..1f5af9264a31d 100644 --- a/turborepo-tests/integration/tests/command-query.t +++ b/turborepo-tests/integration/tests/command-query.t @@ -212,7 +212,7 @@ Run the query WARNING query command is experimental and may change in the future { "data": { - "version": "2.1.3-canary.2" + "version": "[0-9]+\\.[0-9]+\\.[0-9]+(-canary\\.[0-9]+)?" }, } @@ -222,7 +222,7 @@ Query a file { "data": { "file": { - "path": "apps/my-app/package.json", + "path": "apps(\/|\\\\)my-app(\/|\\\\)package.json", (re) "contents": "{\n \"name\": \"my-app\",\n \"scripts\": {\n \"build\": \"echo building\",\n \"maybefails\": \"exit 4\"\n },\n \"dependencies\": {\n \"util\": \"*\"\n }\n}\n" } } @@ -234,7 +234,7 @@ Get the file's package { "data": { "file": { - "path": "apps/my-app/package.json", + "path": "apps(\/|\\\\)my-app(\/|\\\\)package.json", (re) "package": { "name": "my-app" }