Open reslear opened 5 months ago
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.
isTsNode
ts-node
.tsx
https://github.com/mycodeself/mongo-migrate-ts/blob/cd4f247263eb7ab49d45c32f1f95487b8035f1b5/lib/utils/isTsNode.ts#L2-L5
To fix this:
.cts
.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?
I've identified an issue with the
isTsNode
function, which seems to be dependent on another TypeScript compilation library. When running withoutts-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:
isTsNode
to check variables and file types, including.cts
and.mts
.Temporary fix:
This ensures compatibility while we address the underlying problem.