Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing path

Aperta Adatta ai principianti
#1,365 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@RaphaelFakhri ci sta già lavorando.

Dal 22/10/2026.

  • #1366 di @RaphaelFakhri — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Individua il controllo CdnPreconnect e i relativi test, poi leggi come confronta i valori di href e come vengono verificate le violazioni previste. Aggiungi casi per il solo host CDN e l’URL relativa al protocollo, oltre al percorso example.com che non dovrebbe corrispondere; esegui i test mirati del controllo. Il lavoro è concluso quando vengono segnalati i primi due tag e non il terzo.

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

Descrizione

CdnPreconnect matches the href with the pattern .+cdn.shopify.com.+, wrapped in whitespace anchors. The pattern requires at least one character after cdn.shopify.com, so the most common form of the tag is never reported:

<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
<link rel="preconnect" href="//cdn.shopify.com">

Because the dots are unescaped and the host is not anchored, the pattern also reports links to other hosts that only contain the text in their path:

<link rel="preconnect" href="https://example.com/cdn.shopify.com.html">

The Ruby theme-check version of this check reported any href that contains cdn.shopify.com, so the first case is a regression from the port.

Expected behavior

The first two tags are reported. The third tag is not reported.

Actual behavior

The first two tags produce no offense. The third tag is reported.

Steps to reproduce

  1. Add <link rel="preconnect" href="https://cdn.shopify.com" crossorigin> to layout/theme.liquid.
  2. Run shopify theme check.
  3. No CdnPreconnect offense appears. Changing the href to https://cdn.shopify.com/ reports the offense.
Lingua principale
TypeScript
Stelle
239
Fork
104
Merge medio
1g 2h
PR unite (30g)
23

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 Shopify/theme-tools

Tutte le issue di Shopify/theme-tools

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.