Skip to content

Conversation

@levino
Copy link
Owner

@levino levino commented Jan 22, 2026

Closes #182

Summary

Fixes circular dependency warnings during build by restructuring imports in the blog package.

Changes

  • Moved tagSchema and Tag type from index.ts to tags.ts
  • Updated Astro components to import tag utilities directly from tags.ts

Generated with Claude Code

Move `tagSchema` and `Tag` type from index.ts to tags.ts to break the
circular dependency. Update Astro components to import tag utilities
directly from tags.ts instead of through the index barrel export.

This eliminates Vite warnings about re-exports between modules that
are dependencies of each other.

Closes #182

Co-authored-by: Levin Keller <[email protected]>
Copilot AI review requested due to automatic review settings January 22, 2026 20:17
@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: b0b07ef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@levino/shipyard-blog Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
shipyard-demos-server-mode b0b07ef Commit Preview URL

Branch Preview URL
Jan 22 2026, 05:07 PM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes circular dependency warnings in the blog package by restructuring the module imports. The circular dependency was caused by index.ts and tags.ts importing from each other.

Changes:

  • Moved tagSchema and Tag type definitions from index.ts to tags.ts to eliminate circular dependency
  • Updated Astro component imports to reference tag utilities directly from tags.ts instead of index.ts
  • Improved variable naming in loadTagsMap function to avoid shadowing

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/blog/src/tags.ts Added tagSchema and Tag type definitions; improved variable naming in loadTagsMap
packages/blog/src/index.ts Removed duplicate definitions; added re-exports for Tag type and tagSchema from tags module
packages/blog/astro/BlogTagsIndex.astro Updated import to get tag utilities directly from ../src/tags
packages/blog/astro/BlogTagPage.astro Split imports: getReadingTime from index, tag utilities from tags
.changeset/fix-circular-dependency.md Added changeset describing the circular dependency fix

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.

weird warnings

2 participants