browserify / browserify/static-module
Transform which ran with v1 not working with v3
- Langage dominant
- JavaScript
- Étoiles
- 75
- Forks
- 22
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par lib/cwise-transform.js et le cas de test décrit dans cwise pull request #25, puis comparez la manière dont le transform gère le require de fonction nu avec static-module 3. Confirmez si le transform se déclenche toujours et identifiez le comportement pertinent de l’API de static-module. C’est terminé lorsque le cas cwise lié fonctionne avec static-module 3 sans avertissements de sécurité.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100