Skip to content

[astro-seo-schema] change build system to tsup#1283

Merged
mhdcodes merged 4 commits intomainfrom
astro-schema/change-build-setup
Feb 12, 2026
Merged

[astro-seo-schema] change build system to tsup#1283
mhdcodes merged 4 commits intomainfrom
astro-schema/change-build-setup

Conversation

@mhdcodes
Copy link
Copy Markdown
Member

@mhdcodes mhdcodes commented Feb 12, 2026

Summary by CodeRabbit

  • New Features

    • astro-seo-schema added to the automated publishing workflow.
  • Refactor

    • astro-seo-schema build system moved to a new bundler; packaging updated to include main/module/types.
    • Removed the astro-build package and its CLI.
  • Chores

    • Updated development dependencies.
    • Removed Renovate configuration.
    • Added a changeset for astro-seo-schema release.
  • Documentation

    • Minor formatting tweak in CONTRIBUTING.md.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: d4d8a0c

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

This PR includes changesets to release 1 package
Name Type
astro-seo-schema Minor

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Removes the astro-build package and its CLI/build modules, migrates astro-seo-schema to tsup with updated package exports and type checks, updates devDependencies, deletes renovate.json, adds ./packages/astro-seo-schema to the pkg-pr publish workflow, and tweaks CONTRIBUTING.md formatting.

Changes

Cohort / File(s) Summary
Removed package & CLI
packages/astro-build/package.json, packages/astro-build/CHANGELOG.md, packages/astro-build/src/...
Deleted the astro-build package manifest, changelog header, and CLI/build implementation (commands.mjs, index.mjs).
astro-seo-schema (build & types)
packages/astro-seo-schema/package.json, packages/astro-seo-schema/tsup.config.ts, packages/astro-seo-schema/tsconfig.json, packages/astro-seo-schema/...
Switched build system to tsup, added main/module/types fields, updated exports.default to dist/index.js, added check-types/check-exports and combined typecheck script, and added tsup config and tsconfig include.
Monorepo tooling & CI
.github/workflows/pkgpr.yml, renovate.json
Added ./packages/astro-seo-schema to pkg-pr publish list; removed renovate.json.
Root package & docs
package.json, CONTRIBUTING.md
Bumped/trimmed devDependencies (removed esbuild/ora/tiny-glob and others); small formatting change to a fenced code block in CONTRIBUTING.md.
Release metadata
.changeset/grumpy-socks-dance.md
Added a changeset declaring a minor release for astro-seo-schema noting the tsup migration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through code with a tiny cheer,
astro-build sleeps while tsup draws near.
Exports polished, types checked anew,
workflows nudged and deps tidied too.
🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main change: migrating the astro-seo-schema package's build system from astro-build to tsup, which is the central objective of this pull request.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch astro-schema/change-build-setup

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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/codiume/orbit/astro-gtm@1283
npm i https://pkg.pr.new/codiume/orbit/astro-purgecss@1283
npm i https://pkg.pr.new/codiume/orbit/astro-seo-meta@1283
npm i https://pkg.pr.new/codiume/orbit/astro-seo-schema@1283

commit: d4d8a0c

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/astro-seo-schema/package.json`:
- Around line 35-42: The package exports map only exposes ".", so imports like
"astro-seo-schema/jsonld" and direct imports of .astro components will fail;
update the package.json "exports" map to add a "./jsonld" entry that points to
the built jsonld artifacts (e.g., map "./jsonld": { "import":
"./dist/jsonld.js", "types": "./dist/jsonld.d.ts" }) and add subpath exports for
the distributed .astro components (e.g., map "./<name>.astro" or a components/*
pattern to the corresponding "./dist/*.astro" files) so consumers can resolve
the built jsonld (from src/jsonld.ts) and the copied .astro files; ensure the
referenced files (./dist/jsonld.js, ./dist/jsonld.d.ts, and ./dist/*.astro) are
produced by the tsup build.
🧹 Nitpick comments (3)
packages/astro-seo-schema/tsup.config.ts (2)

8-8: Consider disabling minification for a library package.

Minifying a library makes it harder for consumers to debug issues and read stack traces. Sourcemaps help but aren't always loaded. Most library packages ship unminified code and leave minification to the consuming application's bundler.

Suggested change
-  minify: true,
+  minify: false,

13-13: dts: false — type declarations rely on the typecheck script, not build.

Since dts is disabled, running the package's build script alone won't produce .d.ts files. Declarations are only emitted as a side effect of tsc --declaration --emitDeclarationOnly in the typecheck script. This works in the full turbo pipeline (turbo run build && turbo run typecheck), but local pnpm build within the package directory won't produce a complete dist/.

Consider either enabling dts: true in tsup, or moving declaration generation into the build script to make the package self-contained.

packages/astro-seo-schema/package.json (1)

22-27: Build script doesn't generate type declarations.

As noted in the tsup config review, the build script only runs tsup, which has dts: false. Declaration files (.d.ts) are generated by check-types under typecheck. This means the package's build script alone doesn't produce a publishable dist/ — it relies on typecheck being run afterward.

Consider adding declaration generation to the build script:

Suggested change
-    "build": "tsup",
+    "build": "tsup && tsc --declaration --emitDeclarationOnly",

Comment on lines 35 to 42
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
"default": "./dist/index.js"
}
}
},
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check what's exported from index.ts — does it re-export jsonld?
echo "=== index.ts ==="
cat packages/astro-seo-schema/src/index.ts 2>/dev/null || echo "File not found"

echo ""
echo "=== jsonld.ts ==="
cat packages/astro-seo-schema/src/jsonld.ts 2>/dev/null || echo "File not found"

echo ""
echo "=== .astro files ==="
fd -e astro . packages/astro-seo-schema/src/ 2>/dev/null || echo "No .astro files found"

echo ""
echo "=== Full package.json exports section and build config ==="
sed -n '/"exports"/,/^  }/p' packages/astro-seo-schema/package.json 2>/dev/null || echo "Could not extract"

echo ""
echo "=== Check for tsup config ==="
cat packages/astro-seo-schema/tsup.config.ts 2>/dev/null || echo "Not found"
test -f packages/astro-seo-schema/tsup.config.js && cat packages/astro-seo-schema/tsup.config.js || echo "tsup.config.js not found"

echo ""
echo "=== Check package.json for tsup/build config in scripts or config section ==="
cat packages/astro-seo-schema/package.json | head -60

Repository: codiume/orbit

Length of output: 4702


Missing export entries for jsonld and .astro files.

tsup is configured to build src/jsonld.ts as a separate entry point and copy .astro files to dist/, but the exports map only defines ".". Consumers using strict exports-based resolution (e.g., Node.js or modern bundlers) won't be able to import astro-seo-schema/jsonld or the Astro components directly. The check-exports script suppresses internal-resolution-error warnings, indicating these resolution failures are already known.

Since jsonld.ts is intentionally separate from index.ts (not re-exported), it needs an explicit export entry. Add corresponding export entries for both:

Suggested exports map
   "exports": {
     ".": {
       "import": {
         "types": "./dist/index.d.ts",
         "default": "./dist/index.js"
       }
-    }
+    },
+    "./jsonld": {
+      "import": {
+        "types": "./dist/jsonld.d.ts",
+        "default": "./dist/jsonld.js"
+      }
+    },
+    "./*.astro": "./dist/*.astro"
   },
🤖 Prompt for AI Agents
In `@packages/astro-seo-schema/package.json` around lines 35 - 42, The package
exports map only exposes ".", so imports like "astro-seo-schema/jsonld" and
direct imports of .astro components will fail; update the package.json "exports"
map to add a "./jsonld" entry that points to the built jsonld artifacts (e.g.,
map "./jsonld": { "import": "./dist/jsonld.js", "types": "./dist/jsonld.d.ts" })
and add subpath exports for the distributed .astro components (e.g., map
"./<name>.astro" or a components/* pattern to the corresponding "./dist/*.astro"
files) so consumers can resolve the built jsonld (from src/jsonld.ts) and the
copied .astro files; ensure the referenced files (./dist/jsonld.js,
./dist/jsonld.d.ts, and ./dist/*.astro) are produced by the tsup build.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we don't want to expose "astro-seo-schema/jsonld"

@mhdcodes mhdcodes changed the title [astro-seo-schema] change build to tsup [astro-seo-schema] change build system to tsup Feb 12, 2026
@mhdcodes mhdcodes merged commit 45f7056 into main Feb 12, 2026
8 checks passed
@mhdcodes mhdcodes deleted the astro-schema/change-build-setup branch February 12, 2026 19:07
@github-actions github-actions Bot mentioned this pull request Feb 12, 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.

1 participant