lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
582 stars 75 forks source link

Upgrade lasso-require to fix transforms #153

Closed austinkelleher closed 8 years ago

austinkelleher commented 8 years ago

When using lasso-babel-transform, I received the following error:

node_modules/lasso-tools/node_modules/lasso/node_modules/lasso-require/src/util/Transforms.js:49
        return input.pipe(transformFunc(path));
                          ^

TypeError: transformFunc is not a function
    at applyTransform (node_modules/lasso-tools/node_modules/lasso/node_modules/lasso-require/src/util/Transforms.js:49:27)
    at DeferredReadable.<anonymous> (node_modules/lasso-tools/node_modules/lasso/node_modules/lasso-require/src/util/Transforms.js:73:19)
    at DeferredReadable._read (node_modules/lasso-tools/node_modules/lasso/lib/util/DeferredReadable.js:73:38)
    at DeferredReadable.Readable.read (_stream_readable.js:336:10)
    at resume_ (_stream_readable.js:726:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickDomainCallback (node.js:397:17)

Upon further investigation, I found that lasso-require had fixed this bug in a new version.

philidem commented 8 years ago

Technically, the change from lasso-require 3.0 to 3.1 does not actually need to be changed in package.json because node.js will automatically download 3.1 when installing dependencies when using ^3.0.0 pattern.

patrick-steele-idem commented 8 years ago

@philidem is correct, but I will merge anyway. FYI, lasso-require was updated to make it easier to write transforms that don't require the more verbose stream-based API that is required when using the browserify stream API. Streams are only helpful if the receiving end can handle things in chunks. If all of the chunks need to be collected together then there is really no benefit to using streams. lasso-babel-transform depends on the improved API.

patrick-steele-idem commented 8 years ago

Oh, @philidem already merged :)

austinkelleher commented 8 years ago

Whoops. I did know that. Didn't even think about it when investigating.