ts-node
ts-node copied to clipboard
Make it easier to test on specific TS versions locally
On CI, we do this at the top-level:
npm install typescript@<version>
However, this predates our current testing setup, which installs ts-node into ./tests/node_modules. Not only that, but the test cases themselves are responsible for invoking npm install
I think we can change this to npm install typescript@<version> into ./tests/node_modulesalongsidets-node`. This'll be compatible with npm@7's auto-peer-dep behavior and will make it easier to test locally against ancient TS versions while still using modern TS to compile.
While we're at it, can we intelligently avoid the npm install step when nothing has changed? To speed up npm run test-local?