> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PR settimanali per l'aggiornamento delle dipendenze

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="PR settimanali per l'aggiornamento delle dipendenze" description="Programma una sessione settimanale con Devin che individui i pacchetti obsoleti, esegua i test e apra PR di aggiornamento." prompt="Controlla la presenza di pacchetti npm obsoleti. Aggiorna tutte le versioni di patch e minor in un'unica PR: esegui la suite di test e includi una tabella delle modifiche. Per qualsiasi incremento di versione major, apri una PR separata con le note sulle modifiche incompatibili (breaking changes) tratte dal changelog." category="Automazioni" features="Pianificazioni" type="schedule" />

<div className="uc-detail-wrapper">
  <Tip>Non vuoi configurarlo manualmente? Incolla un collegamento a questa pagina in una sessione di Devin e chiedigli di impostare tutto per te.</Tip>

  <Steps>
    <Step title="Crea una pianificazione settimanale">
      Apri [app.devin.ai](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) e vai su **Settings > Schedules**. Fai clic su **Create schedule** e configurala:

      * **Frequency:** Weekly — ad es. ogni lunedì alle 7:00 AM UTC (`0 7 * * 1`)
      * **Prompt:** Incolla il prompt di aggiornamento delle dipendenze qui sotto

      <PromptBlock type="schedule">
        ```txt Weekly dependency update prompt theme={null}
        Controlla se ci sono pacchetti npm obsoleti nella repo acme/frontend. Per ciascuno:
        1. Aggiorna tutte le versioni patch e minor insieme in un'unica PR.
           Esegui l'intera suite di test e includi una tabella riepilogativa delle modifiche.
        2. Per ogni aggiornamento di versione major, apri una PR separata con:
           - Un riepilogo delle breaking change dal changelog del pacchetto
           - Eventuali modifiche al codice necessarie per la compatibilità
           - Il lockfile aggiornato
        3. Esegui `npm audit` e segnala qualsiasi pacchetto con vulnerabilità note.
        ```
      </PromptBlock>

      Se utilizzi un [Playbook](/it/product-guides/creating-playbooks) per definire come il tuo team gestisce gli upgrade delle dipendenze (ad es. eseguire sempre `npm run build` dopo l'aggiornamento o ignorare le `devDependencies`), allegalo alla pianificazione in modo che ogni esecuzione segua lo stesso processo.
    </Step>

    <Step title="Aggiungi Knowledge per guidare gli aggiornamenti">
      Non tutti i pacchetti devono essere aggiornati automaticamente. Vai su **Settings > Knowledge** e aggiungi voci che dicano a Devin cosa ignorare o gestire con attenzione:

      * `Do not update react past v18 — we're mid-migration to v19 on a separate branch.`
      * `Always pin @types/node to match our Node.js version (20.x).`
      * `Skip eslint-plugin-import — it conflicts with our custom lint config.`
      * `Our test command is npm run test:ci, not npm test.`

      Queste voci di [Knowledge](/it/product-guides/knowledge) persistono in ogni esecuzione pianificata, così Devin rispetta i tuoi vincoli senza che tu debba ripeterli nel prompt.
    </Step>

    <Step title="Rivedi ciò che Devin consegna">
      Ogni lunedì, Devin controlla la tua repo alla ricerca di pacchetti obsoleti e apre PR per tuo conto. Una settimana tipica potrebbe produrre:

      **PR #1 — Aggiornamenti sicuri (patch + minor):**

      ```
      ## Dependency Updates — Week of Feb 10

      | Package         | From    | To      | Type  |
      |-----------------|---------|---------|-------|
      | axios           | 1.6.2   | 1.6.8   | patch |
      | react-query     | 5.17.0  | 5.22.1  | minor |
      | tailwindcss     | 3.4.1   | 3.4.6   | patch |
      | typescript      | 5.3.3   | 5.3.5   | patch |

      Tutti gli 847 test superati. Nessuna vulnerabilità trovata da npm audit.
      ```

      **PR #2 — Aggiornamento major (separata, con note):**

      ```
      ## Major Update: zod 3.x → 4.0.0

      Breaking changes (dal CHANGELOG):
      - `z.object().strict()` è ora il comportamento predefinito
      - `z.enum` richiede almeno un valore
      - Rimosso il metodo deprecato `.check()`

      Modifiche al codice in questa PR:
      - Aggiornati 3 file di schema per rimuovere le chiamate `.strict()` esplicite
      - Aggiunto un valore di fallback all'enum vuoto in src/schemas/status.ts
      ```

      Devin esegue la tua suite di test su ciascuna PR in modo indipendente, così puoi fare subito il merge del batch di aggiornamenti sicuri e prenderti il tempo necessario per rivedere gli aggiornamenti major.
    </Step>

    <Step title="Itera e amplia">
      Una volta che la tua pianificazione settimanale è attiva, puoi affinarla nel tempo. Rispondi a qualsiasi sessione pianificata per fornire a Devin istruzioni di follow-up:

      <PromptBlock>
        ```txt Handle a major update theme={null}
        Procedi con la migrazione da zod v3 a v4. Controlla la migration guide su
        https://zod.dev/v4 e aggiorna tutti i file di schema di conseguenza.
        ```
      </PromptBlock>

      <PromptBlock>
        ```txt Expand to backend deps theme={null}
        Controlla anche se ci sono pacchetti Python obsoleti nella repo acme/backend usando pip.
        Aggiorna tutte le versioni compatibili e apri una PR separata. Esegui pytest prima di inviare.
        ```
      </PromptBlock>

      **Suggerimenti per mantenere tutto scorrevole:**

      * **Separa frontend e backend** — Se la tua repo contiene entrambi, crea due pianificazioni così ogni PR rimane focalizzata e facile da rivedere.
      * **Lascia che la CI si completi prima del merge** — Anche aggiornamenti minor apparentemente sicuri possono introdurre bug sottili. Devin esegue i tuoi test, ma la tua pipeline CI completa aggiunge un ulteriore livello di sicurezza.
      * **Controlla la pagina [Schedules](/it/product-guides/scheduled-sessions)** per monitorare la cronologia delle esecuzioni, mettere in pausa una pianificazione durante un code freeze o modificare l'espressione cron.
    </Step>
  </Steps>
</div>
