lukeed / ley

(WIP) Driver-agnostic database migrations
MIT License
259 stars 14 forks source link

Add ley new --ts option for .ts extension + ESM #38

Open karlhorky opened 5 months ago

karlhorky commented 5 months ago

Hey @lukeed 👋 hope you're well.

Quick PR to add a --ts option to ley new to add a .ts extension and use ESM in migrations:

$ ley new todos --ts
#=> migrations/004-todos.ts

$ cat migrations/004-todos.ts
#=> export async function up(client) {
#=> }
#=> 
#=> export async function down(client) {
#=> }
codecov-commenter commented 5 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0cf486e) 48.82% compared to head (1105a67) 48.82%.

Files Patch % Lines
index.js 0.00% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #38 +/- ## ======================================= Coverage 48.82% 48.82% ======================================= Files 2 2 Lines 213 213 ======================================= Hits 104 104 Misses 109 109 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.