mongo-migrate-ts
mongo-migrate-ts copied to clipboard
tsx - isTsNode
I've identified an issue with the isTsNode
function, which seems to be dependent on another TypeScript compilation library. When running without ts-node
, errors occur, especially with .tsx
files.
https://github.com/mycodeself/mongo-migrate-ts/blob/cd4f247263eb7ab49d45c32f1f95487b8035f1b5/lib/utils/isTsNode.ts#L2-L5
To fix this:
- Update
isTsNode
to check variables and file types, including.cts
and.mts
.
Temporary fix:
TS_NODE_DEV=1 dotenv -c -- pnpm tsx ./migrations/config.ts up
This ensures compatibility while we address the underlying problem.
Hey @reslear, is this not something can be solve using the glob pattern option?