db-migrate / db-migrate/plugin-typescript
Usage with non-default tsconfig config
- 主要语言
- JavaScript
- 星标
- 7
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi, we are happily using db-migrate in an nx mono-repo. When we started using tsconfig-paths, our migrations stopped working. As we have a custom tsconfig we need to point the script to, we tried using: `npx ts-config --project tsconfig.migration.ts -r tsconfig-paths/require -r -- node_modules/db-migrate/bin/db-migrate`. This still didn't work correctly.
So digging deeper, we found out that db-migrate-plugin-typescript requires ts-node again and this time without configuration. This seems to overwrite whatever we have configured in the command line. By simply forking this repo and commenting out the require, we were able to get things running again.
**My questions**:
- Do I need to register the `.ts` extension via a plugin and keep my fork?
- Could this plugin only require ts-node if it was not already registered?
Thank you!
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/81615705-usage-with-non-default-tsconfig-config?utm_campaign=plugin&utm_content=tracker%2F45756452&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F45756452&utm_medium=issues&utm_source=github).
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 db-migrate/bin/db-migrate 入口点开始,跟踪 TypeScript 插件如何注册 ts-node。使用所示的非默认 tsconfig 和 tsconfig-paths 命令重现该问题,然后验证现有注册是否得到保留,以及迁移是否使用请求的配置运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js, typescript
- 领域
- databases, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100