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

Issue with Nullish Coalescing Operator (??) on Chrome 79 and below #1775

Closed
hchangjae opened this issue Aug 8, 2023 · 4 comments · Fixed by #1780
Closed

Issue with Nullish Coalescing Operator (??) on Chrome 79 and below #1775

hchangjae opened this issue Aug 8, 2023 · 4 comments · Fixed by #1780

Comments

@hchangjae
Copy link
Contributor

hchangjae commented Aug 8, 2023

Hello pino maintainers,

I've come across an issue while using the pino library in an environment running Chrome version 79 and below [can i use] It appears that the Nullish Coalescing Operator (??) used in the library isn't recognized by these older versions of Chrome, leading to a SyntaxError: Unexpected token '?'.

Given the widespread usage of Chrome and potential for projects to require support for older versions, it might be worth considering either:

  • A transpilation step for backwards compatibility
  • Adding a note in the documentation regarding the minimum supported browser versions.

Steps to reproduce:

  1. Use pino library in a project with browser options. pino({ browser: { ... } })
  2. Run the project in Chrome 79 or an older version.
  3. Observe the SyntaxError.

I also tested this on Android Chrome version 78.0.3904 and observed the same issue.

Thank you for your work on this library, and I appreciate your attention to this matter.

image
@mcollina
Copy link
Member

mcollina commented Aug 8, 2023

I don't think we have the bandwidth to do either. I think the only solution for your problem is to remove ??.. and a PR would be highly appreciated.

@jsumners
Copy link
Member

jsumners commented Aug 8, 2023

Chrome 79 was released in 2019 (https://cloud.google.com/blog/products/chrome-enterprise/admin-insider-whats-new-in-chrome-enterprise-release-79). Chrome's LTS version is at 102 at the time of this post (https://support.google.com/chrome/a/answer/11333726). I do not see any reason we should try and support such an old release as 79.

@hchangjae
Copy link
Contributor Author

Next.js supports Chrome 64+. Given that pino is recommended by Next.js, it would be beneficial for pino to also support this version. This ensures a consistent experience for developers using both tools.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants