This document will cover the migration process from v0 to v1.
tsr is the new name, removing the unnecessary parts from the name @line/ts-remove-unused 😉
npm i tsr
In v0, the default behavior of the CLI was to edit files in place. This was reasonable because the command was long npx @line/ts-remove-unused. However, the rename from @line/ts-remove-unused to tsr will likely increase the risk of accidentally executing the CLI with npx tsr. In order to reduce the possibility of this, --check will be the new default behavior, and the editing feature will be available with --write.
npx tsr --write 'src/main\.ts$' ## use --write to edit filesThe --skip option has been replaced with variadic arguments to simplify the command line interface.
npx @line/ts-remove-unused --skip 'src/main\.ts$' ## v0
npx tsr 'src/main\.ts$' ## v1The JavaScript API has changed.
import { remove } from '@line/ts-remove-unused'; // before
import { tsr } from 'tsr'; // afterCheckout import('tsr').Config for more available options.