ionic-team / ionic-team/ionicons

Lighthouse Issues And Legacy JavaScript In Codebase

Ouverte
#1,382 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
help wanted
Langage dominant
TypeScript
Étoiles
18.2k
Forks
2.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Current Behavior

The Below Functions On Line 15 Of The CDN Delivered Version Of Ionicons Are Considered As _Legacy_ Function And **Should Be Updated** Ideally ( **Yes Its Version 7.1.0** )

* Array.prototype.fill
* Array.prototype.filter
* Array.prototype.find
* Array.prototype.findIndex
* Array.prototype.forEach
* Array.from
* Array.prototype.map
* Array.prototype.some
* Number.isInteger
* Number.isSafeInteger
* Object.entries
* Object.freeze
* Object.getOwnPropertyDescriptors
* Object.getPrototypeOf
* Object.isExtensible
* Object.isFrozen
* Object.isSealed
* Object.keys
* Object.preventExtensions
* Object.seal
* Object.values
* String.prototype.codePointAt
* String.fromCodePoint
* String.raw
* String.prototype.repeat

### Expected Behavior

The Above Mentioned Methods Should Ideally Be In The More Modern Version Of Themselves So That We Can Potentially Save **23.0 KiB** ( As Per Lighthouse ) On The Size Of The Package And It Should Result In Better Compatibility On Modern Browsers

### For Example

**Array.prototype.map** Can Be Changes To Well **array.map()**
And Much More

### Steps to Reproduce

https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js
https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js

Just Import Them In A Good Enough HTML Page That Can Be **Recognised By Lighthouse** And Run The Test Then View The Performance Section For This Issue It Will Be Displayed There With Potential Suggestions As Well

### Code Reproduction URL

https://gist.github.com/myselfgautham/5ee7d88dce240c245796c6a7b380dd4f

### Additional Information

They Are An Easy Fix They Require Changing Existing Legacy Methods To Their Modern Counterparts. For Your Information This Was Spotted Since Chrome Version _125.0.6422.60 ( 64Bit )_. I Will Try To Look Into It If I Can And If Time Is Available

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par les bundles CDN dans dist/ionicons/ionicons.esm.js et dist/ionicons/ionicons.js, puis utilisez la reproduction Lighthouse liée pour confirmer les résultats signalés. Examinez la manière dont ces fichiers sont générés avant de déterminer les modifications compatibles ; le travail est terminé lorsque les avertissements legacy-method listés et le problème de taille du bundle signalé sont résolus sans régressions.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, typescript
Domaine
frontend, performance
Type d'issue
Refactorisation
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.