Skip to content

Transform which ran with v1 not working with v3 #48

Open
@rreusser

Description

@rreusser

Hi! 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 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions