Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gilamran/tsc-watch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.2.0
Choose a base ref
...
head repository: gilamran/tsc-watch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3b21f1e6bfe0b38ca923b1b772d2bd682231cbb7
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Nov 13, 2024

  1. Copy the full SHA
    8525c8d View commit details
  2. v6.2.1

    gilamran committed Nov 13, 2024
    Copy the full SHA
    061f7fb View commit details
  3. 6.2.1

    gilamran committed Nov 13, 2024
    Copy the full SHA
    3b21f1e View commit details
Showing with 24 additions and 17 deletions.
  1. +3 −0 CHANGELOG.md
  2. +11 −10 package-lock.json
  3. +2 −2 package.json
  4. +8 −5 src/lib/stdout-manipulator.ts
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# @gilamran/tsc-watch CHANGELOG

## v6.2.1 - 13/11/2024
- bug fix: Fixed new version of Typescript clear codes. thanks to @staszekj

## v6.2.0 - 28/03/2024
- feature: Using prepublish. thanks to @llllvvuu

21 changes: 11 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsc-watch",
"version": "6.2.0",
"version": "6.2.1",
"description": "The TypeScript compiler with onSuccess command",
"scripts": {
"clean": "rimraf dist && rimraf tmp",
@@ -65,6 +65,6 @@
"jest": "^29.5.0",
"rimraf": "^5.0.0",
"ts-jest": "^29.1.0",
"typescript": "^4.6.3"
"typescript": "^5.6.3"
}
}
13 changes: 8 additions & 5 deletions src/lib/stdout-manipulator.ts
Original file line number Diff line number Diff line change
@@ -76,11 +76,14 @@ export function print(
}

export function deleteClear(line: string): string {
const buffer = Buffer.from(line);
if (buffer.length >= 2 && buffer[0] === 0x1b && buffer[1] === 0x63) {
return line.substr(2);
}
return line;
// '\x1bc11:40:16 - Starting compilation in watch mode...'
// '\x1b[2J\x1b[3J\x1b[H11:33:28 - Starting compilation in watch mode...'
const result = line
.replace(/^\x1b\[2J/, '')
.replace(/^\x1b\[3J/, '')
.replace(/^\x1b\[H/, '')
.replace(/^\x1bc/, '');
return result;
}

export function manipulate(line: string): string {