Repository navigation
Fix dlx installs when caller enables constraint checks - #348
Conversation
✅ Deploy Preview for yarn-v6 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
⏱️ Benchmark Resultsgatsby install-full-cold
📊 Raw benchmark data (gatsby install-full-cold)Base times: 4.518s, 4.420s, 4.395s, 4.445s, 4.480s, 4.563s, 4.444s, 4.572s, 4.485s, 4.552s, 4.446s, 4.405s, 4.417s, 4.480s, 4.454s, 4.446s, 4.461s, 4.471s, 4.469s, 4.468s, 4.415s, 4.473s, 4.417s, 4.382s, 4.397s, 4.514s, 4.402s, 4.426s, 4.531s, 4.563s Head times: 4.470s, 4.479s, 4.476s, 4.431s, 4.456s, 4.508s, 4.589s, 4.517s, 4.445s, 4.516s, 4.516s, 4.577s, 4.526s, 4.482s, 4.450s, 4.564s, 4.543s, 4.494s, 4.456s, 4.475s, 4.449s, 4.490s, 4.554s, 4.457s, 4.434s, 4.524s, 4.409s, 4.554s, 4.511s, 4.500s gatsby install-cache-only
📊 Raw benchmark data (gatsby install-cache-only)Base times: 1.354s, 1.359s, 1.349s, 1.369s, 1.363s, 1.347s, 1.370s, 1.360s, 1.379s, 1.365s, 1.381s, 1.393s, 1.362s, 1.355s, 1.358s, 1.342s, 1.347s, 1.342s, 1.375s, 1.362s, 1.365s, 1.365s, 1.364s, 1.366s, 1.376s, 1.380s, 1.365s, 1.360s, 1.345s, 1.362s Head times: 1.345s, 1.341s, 1.347s, 1.357s, 1.363s, 1.369s, 1.349s, 1.355s, 1.349s, 1.361s, 1.387s, 1.347s, 1.370s, 1.373s, 1.362s, 1.388s, 1.384s, 2.020s, 1.361s, 1.379s, 1.374s, 1.359s, 1.385s, 1.384s, 1.379s, 1.366s, 1.354s, 1.376s, 1.353s, 1.367s gatsby install-cache-and-lock (warm, with lockfile)
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))Base times: 0.389s, 0.391s, 0.393s, 0.390s, 0.389s, 0.391s, 0.387s, 0.389s, 0.389s, 0.408s, 0.390s, 0.378s, 0.386s, 0.385s, 0.383s, 0.379s, 0.390s, 0.386s, 0.387s, 0.382s, 0.391s, 0.384s, 0.388s, 0.389s, 0.389s, 0.385s, 0.383s, 0.381s, 0.383s, 0.386s Head times: 0.386s, 0.389s, 0.399s, 0.387s, 0.388s, 0.381s, 0.379s, 0.384s, 0.380s, 0.384s, 0.390s, 0.387s, 0.395s, 0.393s, 0.390s, 0.382s, 0.387s, 0.385s, 0.392s, 0.388s, 0.383s, 0.392s, 0.386s, 0.391s, 0.397s, 0.395s, 0.392s, 0.394s, 0.383s, 0.388s |
Context
yarn dlxinherits the caller'senableConstraintsChecks: truesetting, but installs into a temporary project without the caller'syarn.config.cjs. Its install then fails withConstraints configuration file not found, preventing one-off commands from running.Change
Skip automatic constraint checks for the temporary install used by
dlx. Normal project installs continue to honorenableConstraintsChecks.Validation
Validated with a caller project that enables constraint checks and has a failing constraint:
yarn dlxcompletes, whileyarn installstill reports the constraint violation. The release build and focused integration suites passed on the currentmainbase.Note
Low Risk
Narrow opt-out for dlx temp installs only; normal installs unchanged aside from the new flag defaulting to false.
Overview
Fixes
yarn dlxfailing when the caller hasenableConstraintsChecks: truebut the ephemeral dlx project has noyarn.config.cjs(previously surfaced as a missing constraints config error).Adds
skip_constraints_checkonRunInstallOptionsand sets it for dlx’s temporary install so automatic constraint validation is skipped there. Regularyarn installstill runs constraint checks when the setting is enabled.Adds an acceptance test:
dlxsucceeds under a failing constraint setup, whileinstallstill rejects with a constraint failure.Reviewed by Cursor Bugbot for commit 81ec42c. Bugbot is set up for automated code reviews on this repo. Configure here.