Skip to content

Commit

Permalink
remove warning in production (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbgt authored Oct 24, 2024
1 parent 935d9a8 commit 8307dcf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"eslint-plugin-prettier": "^5.2.1",
"prettier": "3.3.3",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0",
"vitest": "^2.1.1"
}
}
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"release-it": "^17.10.0",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0",
"vitest": "^2.1.1"
},
"dependencies": {
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import { findAvailablePort, openInBrowser } from "./helper/server";
import initCommandHandler from "./commands/init";
import { getConfigFromWorkDir, getOpenaiApiKeyFromConfig } from "./config";

// remove all warning.
// We need this because of some depreciation warning we have with 3rd party libraries
// Only on production so we still have them on devlopment
if (process.env.NODE_ENV !== "development") {
process.removeAllListeners("warning");
}

yargs(hideBin(process.argv))
// Global options, used for all commands
.options({
Expand Down

0 comments on commit 8307dcf

Please sign in to comment.