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

chore: update tslog from 3.2.1 to 4.9.2 #11717

Merged
merged 8 commits into from
Oct 17, 2023
Merged

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Oct 5, 2023

What does this PR do?

Issue

  • Next.js app router is incompatible with v3 of tslog. For example, log.debug() or log.info() throws the Undefined Variable Error.
  • In the snippet of code, from which the Undefined Variable Error originates, either this.settings.stdOut or this.settings.stdErris undefined when the component in the app router is rendered.

Solution

  • Upgrading tslog from v3 to v4 (e.g., v4.9.2, the latest)
  • This must come hand in hand with some changes: (1) In v4, getChildLogger() is renamed to getSubLogger(), (2) setSettings() is replaced with .settings.${prop} = ... (3) In v4, the structure/names of the properties used for configuration have changed

Requirement/Documentation

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • How to reproduce: Go to this /event-types-1 at the linked branch/repo and try to use the logger of v3.2.1 tslog at the page.

You will be able to reproduce this error:
err

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@vercel
Copy link

vercel bot commented Oct 5, 2023

@hbjORbj is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 7:04pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 7:04pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
qa ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 7:04pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/_error 26.71 KB 182.69 KB 52.20% (🟢 -5.72%)
/apps/[slug]/[...pages] 536.43 KB 692.41 KB 197.83% (🟢 -3.70%)
/bookings/[status] 313.11 KB 469.09 KB 134.03% (🟢 -5.57%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@hbjORbj hbjORbj changed the title Update tslog from 3.2.1 to 4.9.2 chore: update tslog from 3.2.1 to 4.9.2 Oct 6, 2023
@github-actions github-actions bot added the 🚨 merge conflict This PR has a merge conflict that has to be addressed label Oct 10, 2023
@github-actions github-actions bot removed the 🚨 merge conflict This PR has a merge conflict that has to be addressed label Oct 10, 2023
@PeerRich PeerRich added the Medium priority Created by Linear-GitHub Sync label Oct 11, 2023
@github-actions github-actions bot added the 🚨 merge conflict This PR has a merge conflict that has to be addressed label Oct 13, 2023
@github-actions github-actions bot removed the 🚨 merge conflict This PR has a merge conflict that has to be addressed label Oct 17, 2023
Copy link
Member

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and changes LGTM. Waiting for checks to pass before merging.

@zomars zomars enabled auto-merge (squash) October 17, 2023 18:57
@socket-security
Copy link

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: tslog@3.3.3

@zomars zomars merged commit 63416d4 into calcom:main Oct 17, 2023
29 of 35 checks passed
@zomars zomars deleted the tslog-fix branch October 17, 2023 19:02
hbjORbj added a commit to codemod-com/cal.com-demo that referenced this pull request Nov 28, 2023
Co-authored-by: zomars <zomars@me.com>
hbjORbj added a commit to codemod-com/cal.com-demo that referenced this pull request Dec 21, 2023
Co-authored-by: zomars <zomars@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants