Skip to content

fix(config): allow LogLevel to work with isolatedModules and update all warns and errors to respect logLevel - #30350

Merged
brandyscarney merged 20 commits into
mainfrom
FW-6442
Apr 16, 2025
Merged

fix(config): allow LogLevel to work with isolatedModules and update all warns and errors to respect logLevel#30350
brandyscarney merged 20 commits into
mainfrom
FW-6442

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Apr 10, 2025

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

  • LogLevel throws error Error: Cannot access ambient const enums when 'isolatedModules' is enabled
  • Several existing console warns and errors are not calling the function that respects the logLevel config

What is the new behavior?

  • Remove const from the enum to work with isolatedModules
  • Update console.warns to printIonWarning
  • Update console.errors to printIonError

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 8.5.5-dev.11744729748.174bf7e0

@vercel

vercel Bot commented Apr 10, 2025

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2025 4:23pm

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Apr 10, 2025
@github-actions github-actions Bot removed package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Apr 14, 2025
@brandyscarney
brandyscarney marked this pull request as ready for review April 15, 2025 16:45
@brandyscarney
brandyscarney requested a review from a team as a code owner April 15, 2025 16:45
@brandyscarney
brandyscarney requested a review from thetaPC April 15, 2025 16:45

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 🎉

@brandyscarney
brandyscarney added this pull request to the merge queue Apr 16, 2025
Merged via the queue into main with commit d52fca0 Apr 16, 2025
@brandyscarney
brandyscarney deleted the FW-6442 branch April 16, 2025 16:33

@Aravind-blip Aravind-blip left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This change correctly removes const from the enum to resolve the isolatedModules error and consistently replaces direct console logs with printIonWarning and printIonError to ensure logLevel is respected. Updates are applied systematically across components and corresponding tests are adjusted to match the new log format. The implementation is cohesive and aligned with the stated goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants