Skip to content

Commit

Permalink
build(deps): move pino-pretty to dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jun 15, 2022
1 parent 4f04c79 commit e31cba2
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 31 deletions.
74 changes: 56 additions & 18 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint:prettier:ci": "prettier . -c -u",
"prepare": "husky install",
"start": "node .",
"start:dev": "nodemon",
"start:dev": "nodemon | pino-pretty",
"test": "npm run lint && npm run jest"
},
"commitlint": {
Expand Down Expand Up @@ -80,6 +80,7 @@
"jest": "^28.1.1",
"license-checker": "^25.0.1",
"nodemon": "^2.0.16",
"pino-pretty": "^8.0.0",
"playwright": "^1.22.2",
"prettier": "^2.7.0"
},
Expand Down Expand Up @@ -115,7 +116,6 @@
"node-unrtf": "^2.0.9",
"physical-cpu-count": "^2.0.0",
"pino": "^8.0.0",
"pino-pretty": "^8.0.0",
"raw-body": "^2.5.1",
"redoc": "^2.0.0-rc.72",
"secure-json-parse": "^2.4.0",
Expand Down
2 changes: 0 additions & 2 deletions src/config/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ describe("Configuration", () => {
expect(config.fastifyInit.logger).toEqual({
formatters: { level: expect.any(Function) },
level: "info",
prettyPrint: false,
redact: ["req.body", "req.headers.authorization", "res.body"],
serializers: {
req: expect.any(Function),
Expand Down Expand Up @@ -215,7 +214,6 @@ describe("Configuration", () => {
expect(config.fastifyInit.logger).toEqual({
formatters: { level: expect.any(Function) },
level: LOG_LEVEL,
prettyPrint: false,
redact: ["req.body", "req.headers.authorization", "res.body"],
serializers: {
req: expect.any(Function),
Expand Down
9 changes: 0 additions & 9 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,6 @@ async function getConfig() {
},
},
level: env.LOG_LEVEL || "info",
/**
* Pretty output to stdout if not in production.
* Replaces using `pino-pretty` in scripts, as it does not play
* well with Nodemon
*/
prettyPrint:
env.NODE_ENV.toLowerCase() !== "production" &&
(!env.LOG_ROTATION_FILENAME ||
env.LOG_ROTATION_FILENAME === ""),
/**
* Fastify does not log the req or res body anyway but better
* to be safe as a future change could break it
Expand Down

0 comments on commit e31cba2

Please sign in to comment.