tsc-files icon indicating copy to clipboard operation
tsc-files copied to clipboard

.tsbuildinfo file is not deleted automatically

Open DmitryBerdnikov opened this issue 2 years ago • 1 comments

Hello!

Problem

After running tsc-files command I have temporary .tsbuildinfo file (for example, tsconfig.d5ixp4o4o2.tsbuildinfo)

Possible solution

Delete .tsbuildinfo file automatically

PR #40

DmitryBerdnikov avatar Jun 23 '22 09:06 DmitryBerdnikov

I have the same problem. Thanks for the PR @DmitryBerdnikov

robicano22 avatar Sep 01 '22 16:09 robicano22

Unfortunately looks like the project's abandoned.

A workaround for this issue with lint-staged and husky is to write your own cleanup in .husky/pre-commit. This works for me for both error and success cases:

#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

# Swallow error temporarily to allow cleanup even in case of error
staged_exit=0
if ! npx lint-staged; then
  staged_exit=1
fi

# Workaround to clean up temporary files generated by tsc-files
# See https://github.com/gustavopch/tsc-files/issues/39
rm -f ./tsconfig.*.tsbuildinfo

exit $staged_exit

gpoole avatar Jun 06 '23 03:06 gpoole

Unfortunately, I haven't had any free time and I'm not using this project myself anymore, so no time to update it. But the whole thing is less than a 100 lines. I suggest to just copy from the source and use as a local script where you can freely adjust to your needs.

gustavopch avatar Jun 06 '23 12:06 gustavopch