Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/grumpy-socks-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-seo-schema': minor
---

Switch build system to tsup
2 changes: 1 addition & 1 deletion .github/workflows/pkgpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:

- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpx pkg-pr-new publish './packages/astro-purgecss' './packages/astro-seo-meta' './packages/astro-gtm'
- run: pnpx pkg-pr-new publish './packages/astro-purgecss' './packages/astro-seo-meta' './packages/astro-seo-schema' './packages/astro-gtm'
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ To include a changeset in your PR:

1. Create a changeset using the following command within your project directory:

```bash
pnpm changeset
```
```bash
pnpm changeset
```

2. Follow the prompts to describe the changes introduced in your PR. Ensure the changeset adheres to our contribution guidelines.

Expand Down
25 changes: 10 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,18 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.7",
"@types/node": "^22.18.5",
"astro": "^5.15.6",
"commander": "^14.0.1",
"esbuild": "^0.27.0",
"esbuild-plugin-clean": "^1.0.1",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.29.8",
"@types/node": "^22.19.11",
"astro": "^5.17.2",
"kleur": "^4.1.5",
"ora": "^9.0.0",
"pkg-pr-new": "^0.0.63",
"prettier": "^3.6.2",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"tiny-glob": "^0.2.9",
"tsup": "^8.5.0",
"turbo": "^2.5.6",
"typescript": "^5.9.2",
"vite-tsconfig-paths": "^6.0.0",
"vitest": "^4.0.0"
"tsup": "^8.5.1",
"turbo": "^2.8.7",
"typescript": "^5.9.3",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.0.18"
}
}
1 change: 0 additions & 1 deletion packages/astro-build/CHANGELOG.md

This file was deleted.

29 changes: 0 additions & 29 deletions packages/astro-build/package.json

This file was deleted.

27 changes: 0 additions & 27 deletions packages/astro-build/src/commands.mjs

This file was deleted.

35 changes: 0 additions & 35 deletions packages/astro-build/src/index.mjs

This file was deleted.

16 changes: 8 additions & 8 deletions packages/astro-seo-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@
"directory": "packages/astro-seo-schema"
},
"scripts": {
"build": "astro-build --src src/index.ts src/jsonld.ts src/Schema.astro",
"typecheck": "tsc --declaration --emitDeclarationOnly"
"build": "tsup",
"check-types": "tsc --declaration --emitDeclarationOnly",
"check-exports": "attw --pack . --profile esm-only --ignore-rules internal-resolution-error",
"typecheck": "pnpm check-types && pnpm check-exports"
},
"type": "module",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"main": "./dist/index.mjs",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
"default": "./dist/index.js"
}
}
},
Comment on lines 35 to 42

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"

"peerDependencies": {
"astro": "^5.0.0",
"schema-dts": "^1.1.0"
},
"devDependencies": {
"astro-build": "workspace:*"
}
}
3 changes: 2 additions & 1 deletion packages/astro-seo-schema/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"noEmit": false,
"outDir": "./dist",
"allowImportingTsExtensions": false
}
},
"include": ["./src/*.ts"]
}
17 changes: 17 additions & 0 deletions packages/astro-seo-schema/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from 'tsup';

export default defineConfig({
entry: ['src/index.ts', 'src/jsonld.ts', 'src/*.astro'],
format: ['esm'],
outDir: 'dist',
clean: true,
minify: true,
sourcemap: true,
splitting: false,
treeshake: true,
platform: 'node',
dts: false,
loader: {
'.astro': 'copy'
}
});
Loading
Loading