Closed shusak closed 5 years ago
I have a feeling this API change was unintentional. It's not in the examples..
@shusak, thanks for reporting this. @light24bulbs, yes, it was unintentional, sorry for that, guys. I submitted a commit that should fix backward compatibility. It should be possible to require a module by any of both methods:
const copyNodeModules = require('copy-node-modules');
or
const copyNodeModules = require('copy-node-modules').default;
@arloliu, can you check it and publish a fix to NPM?
@ezze, sure, I had published v1.1.1 for this backward compatibility issue.
Since the code switched to use
export
, this broke backwards compatibility for existing implementations.Now instead of
const copyNodeModules = require('copy-node-modules');
one needs to useconst copyNodeModules = require('copy-node-modules').default;
Why didn't the semver change to 2.x to indicate this breaking change?