[RRFC] Structured data for `deprecated` packages about migration paths

Aperta
#766 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
tooling

Direzione di ricerca

Esamina il comportamento attuale della proprietà deprecated in package.json, quindi confronta l’oggetto proposto con replacements.ts di Renovate e con l’issue dello schema OSV a cui si fa riferimento. Il lavoro è completato quando l’RFC raggiunge una rappresentazione strutturata condivisa per i metadati dei pacchetti sostitutivi e la loro compatibilità con l’uso esistente come stringa e booleano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Motivation ("The Why")

Currently, deprecated packages show a short string with some information from the deprecated property. This often includes information about another package to migrate to, either due to a package rename or a fork. Unfortunately, this makes it hard or impossible to automate any sort of migration, in the same way that tools like Dependabot or Renovate can for version upgrades.

Allowing structured data in the deprecated property, with information about a replacement package or packages, would allow these tools to perform package migrations as well as package upgrades.

Example

Renovate currently has a manually curated list of these package migrations^1, and I am discussing whether or not this addition makes sense as part of the Open Source Vulnerability schema^2. I think there are definitely security applications for deprecated packages that have CVEs, it would also be useful for general package migrations.

How
Current Behaviour

The deprecated property in package.json currently only allows a string or boolean to show some information about what package to migrate to. For example:

  "deprecated": "No longer supported. Migrate to @example/package-name"
Desired Behaviour

Allowing for structured data in the deprecated property would allow for automation to perform migrations in users code. For example:

  "deprecated": {
    "description": "No longer supported. Migrate to @example/package-name",
    "migration": {
      "name": "@example/package-name",
      "version": "2.0.0"
    }
  }
References
  • n/a
Lingua principale
JavaScript
Stelle
780
Fork
266
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di npm/rfcs

Tutte le issue di npm/rfcs

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.