Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected console.log calls in v3.3.0 #83

Closed
2 tasks done
chrismeyers opened this issue Sep 18, 2022 · 1 comment
Closed
2 tasks done

Unexpected console.log calls in v3.3.0 #83

chrismeyers opened this issue Sep 18, 2022 · 1 comment

Comments

@chrismeyers
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.6.0

Plugin version

3.3.0

Node.js version

18.9.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

12.6

Description

It looks like some console.log calls were accidentally included in v3.3.0 of this library on npm

Steps to Reproduce

Start a fastify server with some validation (like the example on fastify.io) and the following logs appear at the top of the output:

{
  coerceTypes: 'array',
  useDefaults: true,
  removeAdditional: true,
  uriResolver: {
    normalize: [Function: normalize],
    resolve: [Function: resolve],
    resolveComponents: [Function: resolveComponents],
    equal: [Function: equal],
    serialize: [Function: serialize],
    parse: [Function: parse]
  },
  addUsedSchema: false,
  allErrors: false
}
{ schema: { type: 'object', properties: { name: [Object] } } }
{ schema: { type: 'object', properties: { name: [Object] } } }
{"level":30,"time":1663464487298,"pid":26754,"hostname":"...","msg":"Server listening at http://[::1]:3000"}
{"level":30,"time":1663464487299,"pid":26754,"hostname":"...","msg":"Server listening at http://127.0.0.1:3000"}

Looking into node_modules/@fastify/ajv-compiler/index.js, the console.log calls are on line 51 and 89

Expected Behavior

Just the following logs should be printed when starting the server:

{"level":30,"time":1663464487298,"pid":26754,"hostname":"...","msg":"Server listening at http://[::1]:3000"}
{"level":30,"time":1663464487299,"pid":26754,"hostname":"...","msg":"Server listening at http://127.0.0.1:3000"}
@Eomm
Copy link
Member

Eomm commented Sep 18, 2022

My fault: my local main branch has that console.log, not sure why our release tool did not block me.

I have released 3.3.1

Thank you very much for letting us know

@Eomm Eomm closed this as completed Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants