Yarn: Make @yarnpkg/lockfile a proper Node package

Created on 24 Apr 2018  路  4Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

One index.js file for all.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

@yarnpkg/lockfile doesn't advertise itself as a CLI tool, but it contains a shebang. The expected behavior would be providing a proper entry point for using as a package (so it doesn't require special treatment from bundlers) and a separate bin file handling CLI scenarios.

Please mention your node.js, yarn and operating system version.

cat-bug good first issue help wanted

Most helpful comment

@imsnif No, I do not need a CLI. I have a small utility for processing Yarn lock files and use this package for parsing. I'm building it with Webpack and it doesn't like shebangs 馃榾

All 4 comments

@yarnpkg/lockfile is not a command-line utility and should not have a shebang. It has one in error because this commit added a 2nd entry file webpack in scripts/build-webpack.js which had the shebang in place for the main yarn command build.

The correct fix here is to remove that shebang header for the lockfile webpack build.

@the-spyke - out of curiosity, could I ask if you needed it as a CLI tool for anything specific?

@imsnif No, I do not need a CLI. I have a small utility for processing Yarn lock files and use this package for parsing. I'm building it with Webpack and it doesn't like shebangs 馃榾

@arcanis Any chance to see 1.0.1 this week?

Was this page helpful?
0 / 5 - 0 ratings