Skip to content

Commit

Permalink
fix(cli): support mikro-orm-esm on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 11, 2023
1 parent 759b7b8 commit c491af9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"node": ">= 14.0.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy && yarn run -T gen-esm-wrapper dist/index.js dist/index.mjs",
"build": "yarn clean && yarn compile && yarn copy && cp src/esm.cmd dist/esm.cmd && yarn run -T gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "node ../../scripts/copy.mjs"
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/esm.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\esm" %*
2 changes: 1 addition & 1 deletion packages/cli/src/esm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('@jercle/yargonaut')
Expand Down

0 comments on commit c491af9

Please sign in to comment.