Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/12joan/yarn-bisect
Bisect an NPM package to locate the version where an error first occurred
https://github.com/12joan/yarn-bisect
Last synced: about 1 month ago
JSON representation
Bisect an NPM package to locate the version where an error first occurred
- Host: GitHub
- URL: https://github.com/12joan/yarn-bisect
- Owner: 12joan
- License: mit
- Created: 2024-06-22T20:19:00.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T07:14:12.000Z (4 months ago)
- Last Synced: 2024-10-26T16:53:20.789Z (3 months ago)
- Language: TypeScript
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yarn-bisect
Bisect an NPM package to locate the version where an error first occurred
## Installation
```bash
git clone https://github.com/12joan/yarn-bisect
cd yarn-bisect
npm install --global
# To uninstall:
# npm uninstall --global yarn-bisect
```## Usage
For usage instructions, see `yarn-bisect help`.
## Example
In the following example, we use `yarn-bisect` to locate the first version of `typescript` that fails to build our project.
```bash
$ yarn-bisect start typescript --no-filter-versions # Include dev versions
Preparing to bisect typescriptGood version: null (Specify this with `yarn-bisect good [version]`)
Bad version: null (Specify this with `yarn-bisect bad [version]`)Currently testing version 5.5.2. Run `yarn-bisect reset` to stop bisecting.
$ yarn-bisect bad
Preparing to bisect typescriptGood version: null (Specify this with `yarn-bisect good [version]`)
Bad version: 5.5.2Currently testing version 5.5.2. Run `yarn-bisect reset` to stop bisecting.
$ yarn-bisect good 5.4.5
Installing [email protected]Bisecting typescript
Good version: 5.4.5
Bad version: 5.5.2103 version(s) left to check
Currently testing version 5.5.0-dev.20240414. Run `yarn-bisect reset` to stop bisecting.
$ yarn typecheck && yarn-bisect good || yarn-bisect bad
# After several iterations
$ yarn typecheck && yarn-bisect good || yarn-bisect bad
Finised bisecting typescriptGood version: 5.5.0-dev.20240304
Bad version: 5.5.0-dev.202403050 version(s) left to check
First bad version is 5.5.0-dev.20240305
Currently testing version 5.5.0-dev.20240304. Run `yarn-bisect reset` to stop bisecting.
$ yarn-bisect reset
Installing typescript@^5.5.2
```## Compatibility
Tested with the following versions of Yarn:
- 1.22.19
- 4.1.1