db-migrate / db-migrate/plugin-typescript

Usage with non-default tsconfig config

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
7
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu tại entry point db-migrate/bin/db-migrate và lần theo cách plugin TypeScript đăng ký ts-node. Tái hiện vấn đề với tsconfig không mặc định được nêu và lệnh tsconfig-paths, sau đó xác minh rằng một đăng ký hiện có được giữ nguyên và các migration chạy với cấu hình được yêu cầu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
node.js, typescript
Lĩnh vực
databases, tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.