[workspace] resolver = "2" members = ["pnpm/crates/*", "pnpm/tasks/*", "pnpr/crates/*"] exclude = ["vendor/tar"] [workspace.package] authors = ["Yagiz Nizipli . dashmap = { git = "https://github.com/pnpm/dashmap", rev = "4401b5c0b2626266dd5d5a9202677bca8b53e57a" } [workspace.metadata.workspaces] allow_branch = "main" # Declares the `dylint_lib = "perfectionist"` cfg used by the # `cfg_attr(dylint_lib = "perfectionist", feature(register_tool))` / # `register_tool(perfectionist)` lines at each pacquet crate's root. # Those `cfg_attr`s register the perfectionist tool name under dylint's # nightly toolchain (so `#[expect(perfectionist::lint, reason = "...")]` # at use sites compiles cleanly without a wrapper); this `check-cfg` # entry tells stable `cargo check` that the cfg name is expected even # though it's never set off-dylint. [workspace.lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(dylint_lib, values("perfectionist"))'] } [workspace.lints.clippy] pedantic = { level = "warn", priority = -1 } nursery = { level = "warn", priority = -1 } # Windows sizes `PathBuf` 8 bytes wider, carrying `InstallFrozenLockfileError` past the # 128-byte threshold it clears on unix, and with it every `install`, `add`, `update` and # `remove` signature that wraps that error. result_large_err = "allow" # deferred: shrink `SymlinkDirectDependenciesError::SymlinkPackage`, the variant at the root of that chain doc_link_with_quotes = "allow" # false positive: matches markdown link titles unreadable_literal = "allow" # false positive: octal file modes case_sensitive_file_extension_comparisons = "allow" # extension checks are intentionally case-sensitive implicit_hasher = "allow" # only matters across a public API unnecessary_debug_formatting = "allow" # keeps the quoted `Path` output option_option = "allow" # distinguishes missing from null cast_possible_truncation = "allow" # deliberate numeric narrowing cast_sign_loss = "allow" cast_possible_wrap = "allow" cast_precision_loss = "allow" missing_errors_doc = "allow" # error enums are self-documenting (#[display] + #[diagnostic(code)]); a # Errors section would just restate them missing_panics_doc = "allow" # deferred: refactor away / document / #[expect] each panic before enabling too_many_lines = "allow" # pacquet mirrors pnpm's function decomposition struct_excessive_bools = "allow" # option structs mirror pnpm's fn_params_excessive_bools = "allow" # mirrors pnpm's option parameters match_same_arms = "allow" # arms kept explicit to mirror pnpm's switch cases unnecessary_wraps = "allow" unused_async = "allow" # deferred: audit each async signature (trait/seam-required?) before enabling similar_names = "allow" # names ported verbatim from pnpm items_after_statements = "allow" needless_continue = "allow" many_single_char_names = "allow" # perfectionist's single_letter_* lints already cover this with finer per-position control map_unwrap_or = "allow" # its map_or/map_or_else suggestion puts the fallback before the value; the map/unwrap_or_else chain reads in evaluation order # nursery-group opt-outs (the group is experimental; these lints are either # false positives on this code or fight conventions the project keeps on purpose) use_self = "allow" # spelling out the concrete type name over Self is left to author discretion too_long_first_doc_paragraph = "allow" # doc comments deliberately open with a detailed pnpm-parity summary, not a one-line lede missing_const_for_fn = "allow" # const-ness is a forward semver commitment and this nursery lint is noisy / churns as const-eval grows option_if_let_else = "allow" # the suggested map_or_else closures read worse than the if-let they replace significant_drop_tightening = "allow" # the flagged guards are held deliberately (atomic check-then-act); early-dropping is FP-prone and behavioral redundant_pub_crate = "allow" # pub(crate) is kept to document intended visibility even where technically redundant derive_partial_eq_without_eq = "allow" # deriving Eq is a forward semver commitment that all fields stay Eq branches_sharing_code = "allow" # false-positive-prone: clippy itself flags its own suggestion as needing adjustment useless_let_if_seq = "allow" # rewrites large init blocks into an awkward if-as-expression single_option_map = "allow" # flags test helpers that exist precisely to dedupe a `.map` over an Option iter_with_drain = "allow" # false positive: drain(..) reuses the batch Vec's allocation across loop iterations; into_iter() would consume it literal_string_with_formatting_args = "allow" # false positive: `${VAR:-default}` strings are .npmrc / env-replace fixtures, not Rust format args collection_is_never_read = "allow" # false positive: the flagged Vec owns sockets to keep them alive, it is never meant to be read # restriction lints opted into individually — not part of any default group or # the nursery group, so these lines are what enable them (kept on purpose). clone_on_ref_ptr = "warn" if_then_some_else_none = "warn" mod_module_files = "warn" # forbids mod.rs, enforcing the flat module.rs layout (see CODE_STYLE_GUIDE.md) undocumented_unsafe_blocks = "warn" unnecessary_safety_comment = "warn" todo = "warn" unimplemented = "warn" exit = "warn" infinite_loop = "warn" mem_forget = "warn" unused_result_ok = "warn" pathbuf_init_then_push = "warn" string_add = "warn" verbose_file_reads = "warn" print_stderr = "warn" # `eprintln!` panics on a closed stderr; use `pnpm_diagnostics::eprintln!` (pnpm/pnpm#16904) print_stdout = "warn" # `println!` panics on a closed stdout; use `pnpm_diagnostics::println!` (pnpm/tasks#132) # cargo-group lints opted into individually (the cargo group is otherwise off). negative_feature_names = "warn" redundant_feature_names = "warn" wildcard_dependencies = "warn" [profile.release] opt-level = 3 lto = "fat" codegen-units = 1 strip = "symbols" debug = false panic = "abort" # Let it crash and force ourselves to write safe Rust. # Use the `--profile release-debug` flag to show symbols in release mode. # e.g. `cargo build --profile release-debug` [profile.release-debug] inherits = "release" strip = false debug = true # Profile for the Node.js NAPI addon (`pacquet-node-api`, a cdylib loaded # into a host `node` process). The `release` profile above uses # `panic = "abort"`, which would abort the entire host process on any Rust # panic that unwinds to the FFI boundary. napi-rs catches unwinding panics # and turns them into JS exceptions, so the addon must be built with # `panic = "unwind"` instead. [profile.napi-release] inherits = "release" panic = "unwind"