这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/turbo-trace/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Utilities for tracing and analyzing import dependencies in JavaScript and
//! TypeScript files. Provides functionality to discover and track module
//! imports across a codebase. Used for `turbo boundaries`

#![deny(clippy::all)]
mod import_finder;
mod tracer;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-api-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! HTTP client for interacting with the Remote Cache API.
//! Provides authentication, caching, and telemetry endpoints for Remote Cache
//! operations. By default configured for Vercel API

#![feature(error_generic_member_access)]
#![feature(assert_matches)]
#![deny(clippy::all)]
Expand Down
6 changes: 6 additions & 0 deletions crates/turborepo-cache/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//! Cache management for task outputs
//! Provides local and remote caching capabilities and a "multiplexed" cache
//! which operates over both. When both are in use local is preferred and remote
//! writes are done asynchronously. Under the hood cache artifacts are stored a
//! gzipped tarballs.

#![feature(error_generic_member_access)]
#![feature(assert_matches)]
#![feature(box_patterns)]
Expand Down
7 changes: 6 additions & 1 deletion crates/turborepo-ci/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#![deny(clippy::all)]
//! CI/CD vendor detection and vendor-specific behavior
//! Detects CI vendors and provides:
//! - Env var containing current commit SHA
//! - Env var containing current branch
//! - Env var containing current user
//! - Any vendor specific behavior for producing well formatted logs

mod vendor_behavior;
mod vendors;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-dirs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Platform-specific directory utilities
//! A small patch on top of `dirs_next` that makes use of turbopath and respects
//! `VERCEL_CONFIG_DIR_PATH` as an override.

use dirs_next::config_dir as dirs_config_dir;
use thiserror::Error;
use turbopath::{AbsoluteSystemPathBuf, PathError};
Expand Down
2 changes: 2 additions & 0 deletions crates/turborepo-env/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Environment variable filtering for tasks and hashing for cache keys.

#![deny(clippy::all)]

use std::{
Expand Down
5 changes: 5 additions & 0 deletions crates/turborepo-errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! Diagnostic utilities to preserve source for more actionable error messages
//! Used in conjunction with `miette` to include source snippets in errors.
//! Any parsing of files should attempt to produce value of `Spanned<T>` so if
//! we need to reference where T came from the span is available.

use std::{
fmt::Display,
iter,
Expand Down
5 changes: 5 additions & 0 deletions crates/turborepo-fixed-map/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! A specialized map data structure with fixed keys determined at construction.
//! Provides thread-safe, one-time initialization of values for predefined keys.
//! This is exclusively used so we can lazily load `turbo.json`, cache the
//! results, and return a reference to the loaded `turbo.json`.

#![deny(clippy::all)]

use std::sync::OnceLock;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-frameworks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Framework detection and configuration inference for Turborepo.
//! Automatically identifies JavaScript frameworks and what environment
//! variables impact it.

use std::{collections::HashMap, sync::OnceLock};

use serde::Deserialize;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-fs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
//! File system utilities for used by Turborepo.
//! At the moment only used for `turbo prune` to copy over package directories.

#![deny(clippy::all)]

use std::{
fs::{DirBuilder, FileType, Metadata},
io,
};

// `fs_err` preserves paths in the error messages unlike `std::fs`
use fs_err as fs;
use ignore::WalkBuilder;
use turbopath::{AbsoluteSystemPath, AnchoredSystemPathBuf};
Expand Down
5 changes: 5 additions & 0 deletions crates/turborepo-globwalk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! Glob pattern matching and directory walking
//! This is a layer on top of `wax` that performs some corrections to user
//! provided globs as well as escaping characters that `wax` considers special,
//! but we do not support.

#![feature(assert_matches)]
#![deny(clippy::all)]

Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-graph-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Additional utilities to be used with `petgraph`
//! Provides transitive closure calculation and cycle detection with cut
//! candidates to break cycles

mod walker;

use std::{collections::HashSet, fmt::Display, hash::Hash};
Expand Down
10 changes: 10 additions & 0 deletions crates/turborepo-lockfiles/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//! Package manager lockfile parsing, analysis, and serialization
//!
//! Parsing and analysis are used to track which external packages a workspace
//! package depends on. This allows Turborepo to not perform a global
//! invalidation on a lockfile change, but instead only the packages which
//! depend on the changed external packages.
//!
//! Serialization is exclusively used by `turbo prune` and is far more error
//! prone than deserialization and analysis.

#![deny(clippy::all)]
// the pest proc macro adds an empty doc comment.
#![allow(clippy::empty_docs)]
Expand Down
9 changes: 9 additions & 0 deletions crates/turborepo-microfrontends/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//! `@vercel/microfrontends` configuration parsing
//! This crate is only concerned with parsing the minimal amount of information
//! that Turborepo needs to correctly invoke a local proxy. This allows this
//! crate to avoid being kept in lock step with `@vercel/microfrontends`.
//!
//! The information required for the local proxy is the default package and the
//! package names that are a part of microfrontend and their development task
//! names.

#![feature(assert_matches)]
#![deny(clippy::all)]
mod configv1;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-pidlock/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Process ID lock file management used by the daemon
//! Forked from the `pidlock` crate in order to add Windows support and the
//! ability to query the owner of the pidlock.

#![deny(clippy::all)]
#![feature(assert_matches)]

Expand Down
8 changes: 8 additions & 0 deletions crates/turborepo-repository/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
//! Repository detection and package discovery for Turborepo.
//! Handles monorepo structure, package graph construction, and dependency
//! analysis.
//!
//! Primarily in a separate crate from the rest of the logic so the
//! `@turbo/repository` NPM package can avoid depending on the entire Turborepo
//! binary.

#![feature(assert_matches)]
#![feature(error_generic_member_access)]
#![allow(clippy::result_large_err)]
Expand Down
14 changes: 14 additions & 0 deletions crates/turborepo-task-id/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
//! Identifiers for Turborepo tasks
//!
//! Consists of `TaskName`s and `TaskId`s
//! `TaskId`s are fully qualified tasks that include the package and the task
//! name e.g. `turbo#build` is the `build` task for the `turbo` package.
//!
//! `TaskName`s are what we accept as a user input for a "task".
//! They do not need to be fully qualified, but can be.
//! For example `dependsOn` takes `TaskName`s which allows for
//! `"dependsOn": ["build", "schema#gen"]` where the package's build task is run
//! along with the `schema` package's `gen` task.
//!
//! All `TaskId`s are valid `TaskName`s, but not vice versa.

use std::{
borrow::{Borrow, Cow},
fmt,
Expand Down
3 changes: 3 additions & 0 deletions crates/turborepo-unescape/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Marker type for biome parsed JSON strings which are not escaped
//! See https://github.com/biomejs/biome/issues/1596 for more information

use std::{
fmt::{self, Display},
ops::{Deref, DerefMut},
Expand Down
2 changes: 2 additions & 0 deletions crates/turborepo-vercel-api-mock/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Mock server implementation for a subset of the Vercel API.

#![deny(clippy::all)]

use std::{collections::HashMap, fs::OpenOptions, io::Write, net::SocketAddr, sync::Arc};
Expand Down
Loading