mongo-migrate-ts icon indicating copy to clipboard operation
mongo-migrate-ts copied to clipboard

tsx - isTsNode

Open reslear opened this issue 10 months ago • 1 comments

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:

  1. 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.

reslear avatar Apr 04 '24 17:04 reslear

Hey @reslear, is this not something can be solve using the glob pattern option?

mycodeself avatar May 16 '24 20:05 mycodeself