Skip to content

Commit

Permalink
fix(generators): Use module format for JS Knex migrations (#3444)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Mar 13, 2024
1 parent 742c4b6 commit 3feaa71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/generators/src/connection/templates/knex.tpl.ts
Expand Up @@ -55,13 +55,13 @@ export const generate = (ctx: ConnectionGeneratorContext) =>
.then(renderSource(knexfile, toFile('knexfile')))
.then(
mergeJSON<ConnectionGeneratorContext>(
{
(ctx) => ({
scripts: {
migrate: 'knex migrate:latest',
'migrate:make': 'knex migrate:make',
'migrate:make': 'knex migrate:make' + ctx.language === 'js' ? ' -x mjs' : '',
test: 'cross-env NODE_ENV=test npm run migrate && npm run mocha'
}
},
}),
toFile('package.json')
)
)
Expand Down

0 comments on commit 3feaa71

Please sign in to comment.