Closed aabmass closed 2 years ago
My guess is ts-mocha is not affected by the breaking changes introduced in mocha@9.
Can we include || ^9.X.X
in the peer dependency list of ts-mocha?
https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes
My guess is ts-mocha is not affected by the breaking changes introduced in mocha@9.
Can we include
|| ^9.X.X
in the peer dependency list of ts-mocha?https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes
mocha@9 became an ESM module. ts-mocha may need some tweaks to make ts-node work with es modules (ESM): https://github.com/TypeStrong/ts-node/issues/1007#issue-598417180
FWIW, here's a configuration for Mocha, TypeScript, and ESM that finally worked for me: https://gist.github.com/jordansexton/2a0c3c360aa700cc9528e89620e82c3d
"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"]
was the clincher.
mocha@9 became an ESM module.
This is incorrect, Mocha@9 still is a CommonJS module.
Released a new version of ts-mocha@9, please test.
And any plans to support mocha 9?
npm WARN ts-mocha@9.0.0-alpha1 requires a peer of mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X but none is installed. You must install peer dependencies yourself.
Originally posted by @teolag in https://github.com/piotrwitek/ts-mocha/issues/61#issuecomment-862343195