browserify / browserify/static-module

Transform which ran with v1 not working with v3

Abierto
#48 16 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
75
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi! [cwise](https://github.com/scijs/cwise) has had some long-running issues/PRs to upgrade its usage of static-module and get rid of some security warnings, but it seems that the particular usage static-module is no longer functioning under static-module 3.*.

The [cwise transform](https://github.com/scijs/cwise/blob/master/lib/cwise-transform.js) finds references to `var cwise = require('cwise'); cwise({...})` and replaces them with evaluated code.

I'm guessing a bit, but it seems like maybe the usage as a bare function require as opposed to properties on the require (i.e. `require('cwise')(...)` as opposed to `require('fs).readFileSync(...)`) are not working.

FWIW, the transform has not changed and so _does_ still function and get triggered correctly.

I've detailed a test case [here](https://github.com/scijs/cwise/pull/25#issuecomment-442942342).

Glad to debug a bit further, but I'd thought I'd check to see if this might just need a small API usage update instead of involved debugging. Thanks!

/cc @archmoj @etpinard

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza con lib/cwise-transform.js y el caso de prueba descrito en cwise pull request #25; después compara cómo el transform gestiona el require de una función sin argumentos bajo static-module 3. Confirma si el transform todavía se activa e identifica el comportamiento relevante de la API de static-module. Se considera terminado cuando el caso enlazado de cwise funciona con static-module 3 sin advertencias de seguridad.

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

Evaluación

Stack tecnológico
javascript
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.