Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Conversation

dobesv
Copy link
Contributor

@dobesv dobesv commented Aug 28, 2023

When a scoped package specifies a "bin" key with a string instead of an object, the name of the bin script is taken as the package name without the scope.

For example, given a package.json like:

{
"name": "@foo/bar",
"bin": "./bin/cli.js"
}

Running yarn run bar would run ./bin/cli.js from that package.

Prior to this change, depcheck was calculating the name of the bin script to the fully scoped package name @foo/bar, which is not correct.

dev-goformative and others added 2 commits June 3, 2022 10:50
When a scoped package specifies a "bin" key with a string instead of an object, the name of the bin script is taken as the package name without the scope.

For example, given a package.json like:

```
{
"name": "@foo/bar",
"bin": "./bin/cli.js"
}
```

Running `yarn run bar` would run `./bin/cli.js`.

Prior to this change, `depcheck` was calculating the name of the bin script to the fully scoped package name `@foo/bar`, which is not correct.
@rumpl rumpl merged commit d24d28f into depcheck:main Sep 11, 2023
@dobesv dobesv deleted the scoped-package-bin-no-key-fixup branch September 11, 2023 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants