Skip to content

Commit

Permalink
Add publint checks (#12445)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Nov 15, 2024
1 parent 8e135b6 commit cec4af8
Show file tree
Hide file tree
Showing 31 changed files with 147 additions and 42 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ jobs:
- name: Build Packages
run: pnpm run build

- name: Lint
- name: Lint source code
run: pnpm run lint:ci

- name: Lint publish code
run: pnpm run publint

test:
name: "Test: ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})"
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git"
"url": "git+https://github.com/withastro/astro.git"
},
"scripts": {
"release": "pnpm run build && changeset publish",
Expand Down Expand Up @@ -37,6 +37,7 @@
"lint": "biome lint && eslint . --report-unused-disable-directives",
"lint:ci": "biome ci --formatter-enabled=false --organize-imports-enabled=false --reporter=github && eslint . --report-unused-disable-directives",
"lint:fix": "biome lint --write --unsafe",
"publint": "pnpm -r --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --no-bail exec publint",
"version": "changeset version && node ./scripts/deps/update-example-versions.js && pnpm install --no-frozen-lockfile && pnpm run format",
"preinstall": "npx only-allow pnpm"
},
Expand Down Expand Up @@ -65,6 +66,7 @@
"only-allow": "^1.2.1",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"publint": "^0.2.12",
"turbo": "^2.2.3",
"typescript": "~5.6.3",
"typescript-eslint": "^8.13.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-prism/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"bugs": "https://github.com/withastro/astro/issues",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/astro-prism"
},
"homepage": "https://docs.astro.build/en/reference/api-reference/#prism-",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-rss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/astro-rss"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/astro"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/create-astro"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/db"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/alpinejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/alpinejs"
},
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@astrojs/cloudflare",
"version": "0.0.0",
"private": true,
"type": "module",
"keywords": [],
"dont_remove": "This is a placeholder for the sake of the docs smoke test"
}
7 changes: 2 additions & 5 deletions packages/integrations/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/lit"
},
"keywords": [
Expand All @@ -21,10 +21,7 @@
"homepage": "https://docs.astro.build/en/guides/integrations-guide/lit/",
"exports": {
".": "./dist/index.js",
"./server.js": {
"default": "./server.js",
"types": "./server.d.ts"
},
"./server.js": "./server.js",
"./client-shim.js": "./client-shim.js",
"./dist/client.js": "./dist/client.js",
"./hydration-support.js": "./hydration-support.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/markdoc"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/mdx"
},
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@astrojs/netlify",
"version": "0.0.0",
"private": true,
"type": "module",
"keywords": [],
"dont_remove": "This is a placeholder for the sake of the docs smoke test"
}
1 change: 1 addition & 0 deletions packages/integrations/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@astrojs/node",
"version": "0.0.0",
"private": true,
"type": "module",
"keywords": [],
"dont_remove": "This is a placeholder for the sake of the docs smoke test"
}
2 changes: 1 addition & 1 deletion packages/integrations/partytown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/partytown"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/preact"
},
"keywords": [
Expand Down
12 changes: 3 additions & 9 deletions packages/integrations/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/react"
},
"keywords": [
Expand All @@ -24,14 +24,8 @@
"./actions": "./dist/actions.js",
"./client.js": "./client.js",
"./client-v17.js": "./client-v17.js",
"./server.js": {
"default": "./server.js",
"types": "./server.d.ts"
},
"./server-v17.js": {
"default": "./server-v17.js",
"types": "./server-v17.d.ts"
},
"./server.js": "./server.js",
"./server-v17.js": "./server-v17.js",
"./package.json": "./package.json",
"./jsx-runtime": "./jsx-runtime.js"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/sitemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/sitemap"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/solid"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/svelte"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/tailwind"
},
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@astrojs/vercel",
"version": "0.0.0",
"private": true,
"type": "module",
"keywords": [],
"dont_remove": "This is a placeholder for the sake of the docs smoke test"
}
7 changes: 2 additions & 5 deletions packages/integrations/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/vue"
},
"keywords": [
Expand All @@ -24,10 +24,7 @@
"./editor": "./dist/editor.cjs",
"./*": "./*",
"./client.js": "./client.js",
"./server.js": {
"default": "./server.js",
"types": "./server.d.ts"
},
"./server.js": "./server.js",
"./package.json": "./package.json"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/web-vitals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/integrations/web-vitals"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/internal-helpers"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/remark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/markdown/remark"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/studio"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/telemetry"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/underscore-redirects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/underscore-redirects"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/withastro/astro.git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/upgrade"
},
"bugs": "https://github.com/withastro/astro/issues",
Expand Down
Loading

0 comments on commit cec4af8

Please sign in to comment.