Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: add deprecation warnings to aliased packages#678

Merged
harlan-zw merged 1 commit into
mainfrom
fix/531-deprecate-alias-packages
Mar 10, 2026
Merged

chore: add deprecation warnings to aliased packages#678
harlan-zw merged 1 commit into
mainfrom
fix/531-deprecate-alias-packages

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds console.warn deprecation notices to @unhead/dom, @unhead/shared, and @unhead/ssr alias packages
  • Users are directed to migrate to unhead/dom, unhead/shared, unhead/ssr respectively
  • Re-exports still work, just with a warning

Closes #531

Summary by CodeRabbit

  • Deprecations
    • @unhead/dom is deprecated; migrate to unhead/client.
    • @unhead/shared is deprecated; migrate to unhead/utils.
    • @unhead/ssr is deprecated; migrate to unhead/server.

Add runtime console.warn notices to @unhead/dom, @unhead/shared, and @unhead/ssr
so users importing these legacy packages are directed to migrate to the new
unhead/client, unhead/utils, and unhead/server entry points respectively.

Closes #531
@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2689c833-b096-4bfb-b7fa-97bbddfe6be4

📥 Commits

Reviewing files that changed from the base of the PR and between 4838b84 and a915c02.

📒 Files selected for processing (6)
  • packages-aliased/dom/package.json
  • packages-aliased/dom/src/index.ts
  • packages-aliased/shared/package.json
  • packages-aliased/shared/src/index.ts
  • packages-aliased/ssr/package.json
  • packages-aliased/ssr/src/index.ts

📝 Walkthrough

Walkthrough

The PR deprecates three alias packages (@unhead/dom, @unhead/shared, @unhead/ssr) by adding runtime deprecation warnings guiding users to migrate to canonical counterparts, while updating package configurations to mark them as containing side effects.

Changes

Cohort / File(s) Summary
Package Configurations
packages-aliased/dom/package.json, packages-aliased/shared/package.json, packages-aliased/ssr/package.json
Updated sideEffects flag from false to true in all alias package configurations.
Deprecation Warnings & Re-exports
packages-aliased/dom/src/index.ts, packages-aliased/shared/src/index.ts, packages-aliased/ssr/src/index.ts
Added runtime console.warn deprecation messages and introduced re-exports from canonical packages (unhead/client, unhead/utils, unhead/server respectively).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 The alias packages take their bow,
With warnings kind to show them how,
To migrate far, to the canonical way,
Where unhead's true names hold sway!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is missing required sections from the template. It lacks the 'Linked issue' section header, 'Type of change' checkboxes, and the structured description format specified in the repository template. Add the missing template sections: link the issue (Resolves #531) and check the appropriate type of change box (Chore).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: add deprecation warnings to aliased packages' clearly and concisely describes the main change—adding deprecation warnings to alias packages. It follows conventional commits and accurately summarizes the primary objective.
Linked Issues check ✅ Passed The PR fully meets the requirements of issue #531: deprecation warnings are added to @unhead/dom, @unhead/shared, and @unhead/ssr packages, directing users to migrate to the non-aliased packages, and re-exports remain functional.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #531. The sideEffects flag updates in package.json files and deprecation warnings in index.ts files are appropriate changes for deprecating alias packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/531-deprecate-alias-packages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Bundle Size Gzipped
Client (Minimal) 10.5 kB 4.3 kB
Server (Minimal) 10.2 kB 4.2 kB
Vue Client (Minimal) 11.4 kB 4.7 kB
Vue Server (Minimal) 11.1 kB 4.6 kB

@harlan-zw harlan-zw merged commit c27077d into main Mar 10, 2026
6 checks passed
@harlan-zw harlan-zw mentioned this pull request Apr 4, 2026
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

Successfully merging this pull request may close these issues.

Deprecate Alias Packages

1 participant