Skip to content

fix: Deprecated useAppConfig in favour of getAppConfig - #2487

Merged
aklinker1 merged 7 commits into
wxt-dev:mainfrom
fkatsuhiro:feat/deprecated-useAppConfig
Jul 26, 2026
Merged

aklinker1 merged 7 commits into
wxt-dev:mainfrom
fkatsuhiro:feat/deprecated-useAppConfig

Conversation

@fkatsuhiro

Copy link
Copy Markdown
Collaborator

Overview

Follow up to #1911. This PR marks the old useAppConfig function as deprecated to prepare for its complete removal in v1.0.

Since getAppConfig has already been introduced as an alias in #2144, this change ensures users are properly warned to migrate their code before the v1.0 major release.

  • Added @deprecated JSDoc tag to useAppConfig to display linting warnings and strikethroughs in IDEs.
  • Added a runtime deprecation warning using console.warn (omitted in production environments).

Manual Testing

  • A warning for the deprecation is displayed in the editer
  • In documentation, add the deprecation item in useAppConfig page
スクリーンショット 2026-07-06 1 29 54

Related Issue

This PR fixes #2145

@fkatsuhiro
fkatsuhiro requested a review from aklinker1 as a code owner July 5, 2026 16:31
@netlify

netlify Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit c3e7427
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a6637f166f1d60008e14c3e
😎 Deploy Preview https://deploy-preview-2487--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Jul 5, 2026
@nishu-murmu nishu-murmu changed the title fix: Deprecated useAppConfig in favior of getAppConfig fix: Deprecated useAppConfig in favour of getAppConfig Jul 5, 2026
Updated logger usage to use wxt.logger instead of logger.

@nishu-murmu nishu-murmu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@fkatsuhiro
Use wxt logger instead of consola logger.

@codecov

codecov Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.46%. Comparing base (299b0ad) to head (c3e7427).

Files with missing lines Patch % Lines
packages/wxt/src/utils/app-config.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2487      +/-   ##
==========================================
+ Coverage   79.32%   79.46%   +0.13%     
==========================================
  Files         134      134              
  Lines        4005     4007       +2     
  Branches      910      911       +1     
==========================================
+ Hits         3177     3184       +7     
+ Misses        737      732       -5     
  Partials       91       91              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fkatsuhiro

Copy link
Copy Markdown
Collaborator Author

@fkatsuhiro Use wxt logger instead of consola logger.

Thank you for your revewing and updating!
Noted.

@aklinker1 aklinker1 mentioned this pull request Jul 26, 2026
29 tasks done

@aklinker1 aklinker1 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.

Checks are failing because we imported the wxt object into a runtime API. For runtime warnings, use console.warn("[wxt] ...").

Comment thread packages/wxt/src/utils/app-config.ts Resolved
Comment thread packages/wxt/src/utils/app-config.ts Resolved
@aklinker1 aklinker1 changed the title fix: Deprecated useAppConfig in favour of getAppConfig fix: Deprecated useAppConfig in favour of getAppConfig Jul 26, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2487

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2487

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2487

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2487

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2487

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2487

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2487

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2487

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2487

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2487

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2487

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2487

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2487

wxt

npm i https://pkg.pr.new/wxt@2487

commit: c3e7427

@aklinker1
aklinker1 merged commit 9698f2f into wxt-dev:main Jul 26, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

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

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate useAppConfig → getAppConfig

3 participants