Skip to content

Commit

Permalink
Remove tsc-watch and use tsc --watch built-in feature (#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc authored Jun 26, 2023
1 parent f882b99 commit 369a015
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 232 deletions.
1 change: 1 addition & 0 deletions node/src/tests/test-AudioLevelObserver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as mediasoup from '../';

const { createWorker } = mediasoup;

let worker: mediasoup.types.Worker;
Expand Down
4 changes: 2 additions & 2 deletions node/src/tests/test-mediasoup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('mediasoup.getSupportedRtpCapabilities() returns the mediasoup RTP capabili
const rtpCapabilities2 = getSupportedRtpCapabilities();

expect(rtpCapabilities2).not.toEqual(rtpCapabilities);
}, 500);
});

test('parseScalabilityMode() works', () =>
{
Expand Down Expand Up @@ -52,4 +52,4 @@ test('parseScalabilityMode() works', () =>

expect(parseScalabilityMode('L4T7_KEY_SHIFT'))
.toEqual({ spatialLayers: 4, temporalLayers: 7, ksvc: true });
}, 500);
});
8 changes: 7 additions & 1 deletion node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
"declaration": true,
"declarationMap": true
},
"include": [ "src" ]
"include": [ "src" ],
"watchOptions": {
"watchFile": "useFsEvents",
"watchDirectory": "useFsEvents",
"fallbackPolling": "dynamicPriority",
"synchronousWatchDirectory": true
}
}
9 changes: 1 addition & 8 deletions npm-scripts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,8 @@ async function run()

case 'typescript:watch':
{
// NOTE: Load dep on demand since it's a devDependency.
const { TscWatchClient } = await import('tsc-watch/client.js');

const watch = new TscWatchClient();

deleteNodeLib();

watch.on('success', replaceVersion);
watch.start('--project', 'node', '--pretty');
executeCmd('tsc --project node --watch');

break;
}
Expand Down
Loading

0 comments on commit 369a015

Please sign in to comment.