Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turborepo 2.0 #8294

Merged
merged 50 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
302ce3a
chore: remove legacy filter flags (#7970)
chris-olszewski Apr 16, 2024
98e1889
fix(cli): fix bad merge conflict resolution (#8035)
chris-olszewski Apr 24, 2024
9f37d0d
chore(turbo)!: remove check for legacy turbo config in package.json (…
mehulkar Apr 25, 2024
7ee1d98
chore(turbo)! hard error on env vars in task and global dependencies …
mehulkar Apr 25, 2024
0c67ac9
feat: require packageManager in package.json (#8017)
chris-olszewski May 9, 2024
d39d2e0
feat(filter): no longer infer scope in filters (#8137)
chris-olszewski May 15, 2024
9e9d7fe
chore!(create-turbo): remove old pm arg (#8150)
tknickman May 15, 2024
680f3b0
feat: error on empty package name (#8152)
chris-olszewski May 16, 2024
638cf4c
feat(filter): error on invalid filters (#8142)
chris-olszewski May 16, 2024
cbd25f2
Move fs cache location. (#8126)
anthonyshew May 17, 2024
c3aa141
refactor(turborepo): Rename `outputMode` to `outputLogs` in `turbo.js…
NicholasLYang May 17, 2024
d347d43
feat: --only now applies to package dependencies (#8163)
chris-olszewski May 17, 2024
de85f97
Rename `pipeline` to `tasks`. (#8157)
anthonyshew May 21, 2024
f511b4c
feat: add doublestar to exact dir paths (#8180)
chris-olszewski May 21, 2024
7c944a9
chore: unbreak turborepo_2 (#8183)
chris-olszewski May 21, 2024
5a92e13
chore: remove `globalDotEnv` and `dotEnv` fields (#8181)
chris-olszewski May 21, 2024
6747c17
chore: make env mode strict by default (#8182)
chris-olszewski May 22, 2024
6e1850e
feat: allow for negative globs in globalDeps (#8190)
chris-olszewski May 22, 2024
6a8fa27
chore: change turborepo licenses to MIT (#8197)
chris-olszewski May 23, 2024
36da86a
feat(codemod): add missing package names (#8186)
tknickman May 23, 2024
56d19b6
chore: remove --ignore flag (#8201)
chris-olszewski May 23, 2024
a2c85a5
feat: all dependencies of root package contribute to global hash (#8202)
chris-olszewski May 23, 2024
8758a02
release(turborepo): 2.0.0-canary.0 (#8206)
github-actions[bot] May 23, 2024
06d5b2c
chore: bump daemon version (#8226)
chris-olszewski May 28, 2024
e0fbbdc
fix: remove unused package manager argument parameter (#8224)
chris-olszewski May 28, 2024
343d3ba
chore(turborepo): Improve pipeline error message (#8231)
NicholasLYang May 28, 2024
935d996
chore(@turbo/utils): update tests/fixtures to use tasks key (#8225)
mehulkar May 29, 2024
50f53a8
feat: enable UI by default (#8245)
chris-olszewski May 29, 2024
b3a690f
feat: factor engines into global cache key (#8173)
chris-olszewski May 29, 2024
4c94e5c
feat: JS package updates for pipeline -> tasks (#8253)
chris-olszewski May 30, 2024
bbe31ea
feat(turborepo): Migrate dot env codemod (#8248)
NicholasLYang May 30, 2024
2f33f27
chore: stabilize ui (#8254)
chris-olszewski May 30, 2024
ed61bdd
chore: migrate dot-env migration to support latest schema (#8258)
chris-olszewski May 30, 2024
b44b711
chore: add codemod for stabilizing ui (#8257)
chris-olszewski May 30, 2024
17391de
feat(codemod): add logic for major version bump (#8260)
chris-olszewski May 31, 2024
16e0299
release(turborepo): 2.0.0-canary.1 (#8261)
github-actions[bot] May 31, 2024
e559bee
chore(turborepo): adjust error message for pipeline (#8264)
NicholasLYang May 31, 2024
31b4ae4
fix(ui): ensure prelude gets printed before ui starts (#8265)
chris-olszewski May 31, 2024
2774fc9
feat(codemod): place tasks last in turbo.json rewrites (#8268)
chris-olszewski May 31, 2024
c4b1ace
release(turborepo): 2.0.0-canary.2 (#8270)
github-actions[bot] May 31, 2024
1d00575
fix(ui): disable UI on all dry runs (#8269)
chris-olszewski Jun 3, 2024
95d9d0f
fix(turborepo): stderr log (#8267)
NicholasLYang Jun 3, 2024
951fc46
fix(turborepo): non-determinism with root internal deps hash. (#8277)
NicholasLYang Jun 3, 2024
a36c358
fix(codemod): support jsonc when parsing root turbo.json (#8279)
chris-olszewski Jun 3, 2024
d6e95a8
fix(codemod): respect --dry flag (#8280)
chris-olszewski Jun 3, 2024
d35c3b8
release(turborepo): 2.0.0-canary.3 (#8283)
github-actions[bot] Jun 3, 2024
85fe92d
fix: update integration test to expect correct output (#8285)
chris-olszewski Jun 3, 2024
ec7db77
chore: remove cpuprofile flag (#8282)
chris-olszewski Jun 4, 2024
9a45c86
feat: change values of "ui" in turbo.json (#8289)
chris-olszewski Jun 4, 2024
33e2649
release(turborepo): 2.0.0-canary.4 (#8292)
github-actions[bot] Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
374 changes: 4 additions & 370 deletions cli/LICENSE

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": "https://github.com/vercel/turbo",
"bugs": "https://github.com/vercel/turbo/issues",
"homepage": "https://turbo.build/repo",
"license": "MPL-2.0",
"license": "MIT",
"os": ["{{Os}}"],
"cpu": ["{{Arch}}"],
"preferUnplugged": true
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-analytics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-analytics"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-api-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-api-client"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-auth"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "turborepo-cache"
version = "0.1.0"
license = "MPL-2.0"
license = "MIT"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
24 changes: 6 additions & 18 deletions crates/turborepo-cache/src/async_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,8 @@ mod tests {
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]);

// Confirm that fs cache file does *not* exist
assert!(!fs_cache_path.exists());
Expand Down Expand Up @@ -389,12 +385,8 @@ mod tests {
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]);

// Confirm that fs cache file exists
assert!(fs_cache_path.exists());
Expand Down Expand Up @@ -483,12 +475,8 @@ mod tests {
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]);

// Confirm that fs cache file exists
assert!(fs_cache_path.exists());
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-cache/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl FSCache {
if let Some(override_dir) = override_dir {
AbsoluteSystemPathBuf::from_unknown(repo_root, override_dir)
} else {
repo_root.join_components(&["node_modules", ".cache", "turbo"])
repo_root.join_components(&[".turbo", "cache"])
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-ci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-ci"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-dirs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-dirs"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-env"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
16 changes: 0 additions & 16 deletions crates/turborepo-env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ use thiserror::Error;

const DEFAULT_ENV_VARS: [&str; 1] = ["VERCEL_ANALYTICS_ID"];

/// Environment mode after we've resolved the `Infer` variant
#[derive(Debug, Clone, Copy)]
pub enum ResolvedEnvMode {
Loose,
Strict,
}

impl std::fmt::Display for ResolvedEnvMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ResolvedEnvMode::Loose => write!(f, "loose"),
ResolvedEnvMode::Strict => write!(f, "strict"),
}
}
}

#[derive(Clone, Debug, Error)]
pub enum Error {
#[error("Failed to parse regex: {0}")]
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name = "turborepo-errors"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-filewatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "turborepo-filewatch"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 3 additions & 1 deletion crates/turborepo-filewatch/src/hash_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,9 @@ mod tests {
.unwrap();
repo_root
.join_component("package.json")
.create_with_contents(r#"{"workspaces": ["packages/*"]}"#)
.create_with_contents(
r#"{"workspaces": ["packages/*"], "packageManager": "npm@10.0.0"}"#,
)
.unwrap();
repo_root
.join_component("package-lock.json")
Expand Down
30 changes: 18 additions & 12 deletions crates/turborepo-filewatch/src/package_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ mod test {
// write workspaces to root
repo_root
.join_component("package.json")
.create_with_contents(r#"{"workspaces":["packages/*"]}"#)
.create_with_contents(
r#"{"workspaces":["packages/*"], "packageManager": "npm@10.0.0"}"#,
)
.unwrap();

let watcher = FileSystemWatcher::new_with_default_cookie_dir(&repo_root).unwrap();
Expand Down Expand Up @@ -703,7 +705,9 @@ mod test {
// write workspaces to root
repo_root
.join_component("package.json")
.create_with_contents(r#"{"workspaces":["packages/*", "packages2/*"]}"#)
.create_with_contents(
r#"{"workspaces":["packages/*", "packages2/*"], "packageManager": "npm@10.0.0"}"#,
)
.unwrap();

let watcher = FileSystemWatcher::new_with_default_cookie_dir(&repo_root).unwrap();
Expand Down Expand Up @@ -743,7 +747,9 @@ mod test {
// update workspaces to no longer cover packages2
repo_root
.join_component("package.json")
.create_with_contents(r#"{"workspaces":["packages/*"]}"#)
.create_with_contents(
r#"{"workspaces":["packages/*"], "packageManager": "npm@10.0.0"}"#,
)
.unwrap();

let mut data = package_watcher.discover_packages_blocking().await.unwrap();
Expand Down Expand Up @@ -804,7 +810,7 @@ mod test {
let root_package_json_path = repo_root.join_component("package.json");
// Start with no workspace glob
root_package_json_path
.create_with_contents(r#"{"packageManager": "pnpm@7.0"}"#)
.create_with_contents(r#"{"packageManager": "pnpm@7.0.0"}"#)
.unwrap();
repo_root
.join_component("pnpm-lock.yaml")
Expand Down Expand Up @@ -873,7 +879,7 @@ mod test {
let root_package_json_path = repo_root.join_component("package.json");
// Start with no workspace glob
root_package_json_path
.create_with_contents(r#"{"packageManager": "npm@7.0"}"#)
.create_with_contents(r#"{"packageManager": "npm@7.0.0"}"#)
.unwrap();
repo_root
.join_component("package-lock.json")
Expand All @@ -896,7 +902,7 @@ mod test {
.unwrap_err();

root_package_json_path
.create_with_contents(r#"{"packageManager": "pnpm@7.0", "workspaces": ["foo/*"]}"#)
.create_with_contents(r#"{"packageManager": "npm@7.0.0", "workspaces": ["foo/*"]}"#)
.unwrap();

let resp = package_watcher.discover_packages_blocking().await.unwrap();
Expand All @@ -911,7 +917,7 @@ mod test {

// Create an invalid workspace glob
root_package_json_path
.create_with_contents(r#"{"packageManager": "pnpm@7.0", "workspaces": ["foo/***"]}"#)
.create_with_contents(r#"{"packageManager": "npm@7.0.0", "workspaces": ["foo/***"]}"#)
.unwrap();

// We expect an error due to invalid workspace glob
Expand All @@ -922,7 +928,7 @@ mod test {

// Set it back to valid, ensure we recover
root_package_json_path
.create_with_contents(r#"{"packageManager": "pnpm@7.0", "workspaces": ["foo/*"]}"#)
.create_with_contents(r#"{"packageManager": "npm@7.0.0", "workspaces": ["foo/*"]}"#)
.unwrap();
let resp = package_watcher.discover_packages_blocking().await.unwrap();
assert_eq!(resp.package_manager, PackageManager::Npm);
Expand All @@ -945,7 +951,7 @@ mod test {
let root_package_json_path = repo_root.join_component("package.json");
// Start with no workspace glob
root_package_json_path
.create_with_contents(r#"{"packageManager": "pnpm@7.0"}"#)
.create_with_contents(r#"{"packageManager": "pnpm@7.0.0"}"#)
.unwrap();
let pnpm_lock_file = repo_root.join_component("pnpm-lock.yaml");
pnpm_lock_file.create_with_contents("").unwrap();
Expand All @@ -963,8 +969,8 @@ mod test {
let resp = package_watcher.discover_packages_blocking().await.unwrap();
assert_eq!(resp.package_manager, PackageManager::Pnpm);

pnpm_lock_file.remove_file().unwrap();
// No more lock file, verify we're in an invalid state
workspaces_path.remove_file().unwrap();
// No more workspaces file, verify we're in an invalid state
package_watcher
.discover_packages_blocking()
.await
Expand All @@ -980,7 +986,7 @@ mod test {

// update package.json to complete the transition
root_package_json_path
.create_with_contents(r#"{"packageManager": "npm@7.0", "workspaces": ["foo/*"]}"#)
.create_with_contents(r#"{"packageManager": "npm@7.0.0", "workspaces": ["foo/*"]}"#)
.unwrap();
let resp = package_watcher.discover_packages_blocking().await.unwrap();
assert_eq!(resp.package_manager, PackageManager::Npm);
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-fs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "turborepo-fs"
version = "0.1.0"
license = "MPL-2.0"
license = "MIT"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-globwalk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "globwalk"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
Loading
Loading