Pin @wordpress/env in CI instead of resolving latest on every run
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start by reading .github/workflows/ci.yml and .github/dependabot.yml, then check .gitignore, .gitattributes, and contributor docs for existing package and wp-env guidance. Add an exact @wordpress/env dev dependency and lockfile, install with npm ci in the phpunit job, and use the local wp-env binary. Done when the CI steps, Dependabot configuration, archive decision, and any affected docs are updated.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The phpunit job in .github/workflows/ci.yml runs npx @wordpress/env start ... and npx @wordpress/env run .... The repo has no package.json or lockfile, so npx installs whatever version of @wordpress/env (and its whole dependency tree) is latest at the time of each run.
That means:
- CI is not reproducible: a new wp-env release can break the PHPUnit jobs on an unrelated PR.
- Unreviewed code from the npm registry runs in CI on every run.
- Contributors may be running a different wp-env version locally than CI uses.
Proposal
Add a package.json and package-lock.json with @wordpress/env as an exact-version dev dependency, and install it with npm ci.
- Add
package.json("private": true,@wordpress/envpinned exactly indevDependencies) and commit the generatedpackage-lock.json - Add
node_modules/to.gitignoreif not already present - In the
phpunitjob, add annpm cistep after "Set up Node" - Change both wp-env steps from
npx @wordpress/env ...tonpx wp-env ...so they use the locally installed binary - Add an
npmentry to.github/dependabot.ymlso the pin gets updated - Decide whether
package.json/package-lock.jsonshould be excluded from the Composer distribution archive (e.g.export-ignorein.gitattributes) - Update contributor docs if they reference
npx @wordpress/env
Alternative considered
Pin the version inline (npx @wordpress/[email protected] ...). Smaller change, but it only pins the top-level package, leaves transitive dependencies floating, and Dependabot can't update a version inside a run: string.
Context
Follow-up to #42. Deliberately left out of that PR to keep it focused.
- Lingua principale
- PHP
- Stelle
- 4
- Fork
- 4
- Merge medio
- 1g 23h
- PR unite (30g)
- 18
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WordPress/abilities
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
WordPress/abilities#53 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Registration gating in `register_all()` applies unevenlyForse già presa @nikmclaughlin l’ha presa oggi. Aperta
WordPress/abilities#54 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Better enforce core fidelity for canonical backportsForse già presa @nikmclaughlin l’ha presa 3 giorni fa. Aperta
WordPress/abilities#47 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di WordPress/abilities
Issue simili
-
🐛 Web Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
omeka/plugin-Commenting#72 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quantum-php/framework#739 ·
I maintainer di solito rispondono entro 1 giorno
-
`mercure()` Twig function: the `lastEventId` option adds query parameters that Mercure hubs 1.0+ ignoreForse già presa @daFish l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100