ionic-team / ionic-team/ionicons

Lighthouse Issues And Legacy JavaScript In Codebase

Abierto
#1,382 1 comentario 0 reacciones 0 asignados Ver en GitHub
help wanted
Lenguaje dominante
TypeScript
Estrellas
18.2k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con los bundles de CDN en dist/ionicons/ionicons.esm.js y dist/ionicons/ionicons.js, y después usa la reproducción vinculada de Lighthouse para confirmar los hallazgos reportados. Revisa cómo se generan estos archivos antes de determinar los cambios compatibles; se considera terminado cuando las advertencias de legacy-method indicadas y el problema de tamaño del bundle reportado se hayan resuelto sin regresiones.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, typescript
Área
frontend, performance
Tipo de issue
Refactorización
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.