Skip to content

Commit

Permalink
Merge branch 'main' into feat/reduce-route-json
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderniebuhr authored Sep 23, 2024
2 parents 0bdc386 + 6cc9d05 commit 342d0a3
Show file tree
Hide file tree
Showing 60 changed files with 630 additions and 673 deletions.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"files": {
"ignore": [
"**/dist",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@astrojs/check": "^0.9.3",
"@biomejs/biome": "1.8.3",
"@biomejs/biome": "1.9.1",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.8",
"@types/node": "^20.16.5",
Expand All @@ -56,8 +56,8 @@
"only-allow": "^1.2.1",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"turbo": "^2.1.1",
"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0"
"turbo": "^2.1.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.6.0"
}
}
6 changes: 6 additions & 0 deletions packages/cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/cloudflare

## 11.0.5

### Patch Changes

- [#387](https://github.com/withastro/adapters/pull/387) [`04e5c38`](https://github.com/withastro/adapters/commit/04e5c389f251efa02fe7b973ed95cdc61fad3389) Thanks [@veitbjarsch](https://github.com/veitbjarsch)! - Fixes a bug which was caused on windows when splitting static file paths

## 11.0.4

### Patch Changes
Expand Down
16 changes: 8 additions & 8 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers/Pages",
"version": "11.0.4",
"version": "11.0.5",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand Down Expand Up @@ -30,28 +30,28 @@
"dependencies": {
"@astrojs/internal-helpers": "0.4.1",
"@astrojs/underscore-redirects": "^0.3.4",
"@cloudflare/workers-types": "^4.20240903.0",
"@cloudflare/workers-types": "^4.20240909.0",
"esbuild": "^0.21.5",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.11",
"miniflare": "^3.20240821.1",
"miniflare": "^3.20240909.2",
"tiny-glob": "^0.2.9",
"wrangler": "^3.75.0",
"@inox-tools/astro-when": "^0.2.2"
"wrangler": "^3.78.3",
"@inox-tools/astro-when": "^0.2.3"
},
"peerDependencies": {
"astro": "^4.10.3"
},
"devDependencies": {
"@astrojs/test-utils": "workspace:*",
"astro": "^4.15.4",
"astro": "^4.15.6",
"astro-scripts": "workspace:*",
"cheerio": "1.0.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
"rollup": "^4.21.2",
"rollup": "^4.21.3",
"strip-ansi": "^7.1.0",
"vite": "^5.4.3"
"vite": "^5.4.6"
},
"publishConfig": {
"provenance": true
Expand Down
6 changes: 3 additions & 3 deletions packages/cloudflare/src/utils/generate-routes-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { AstroConfig, AstroIntegrationLogger, RouteData, RoutePart } from '

import { existsSync } from 'node:fs';
import { writeFile } from 'node:fs/promises';
import { posix } from 'node:path';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import {
prependForwardSlash,
Expand Down Expand Up @@ -211,7 +211,7 @@ export async function createRoutesFile(
const staticPath = staticFile;

const segments = removeLeadingForwardSlash(staticPath)
.split(posix.sep)
.split(path.sep)
.filter(Boolean)
.map((s: string) => {
return getParts(s);
Expand Down Expand Up @@ -257,7 +257,7 @@ export async function createRoutesFile(
for (const page of pages) {
if (page.pathname === '404') hasPrerendered404 = true;
const pageSegments = removeLeadingForwardSlash(page.pathname)
.split(posix.sep)
.split(path.posix.sep)
.filter(Boolean)
.map((s) => {
return getParts(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
},
"devDependencies": {
"wrangler": "^3.75.0"
"wrangler": "^3.78.3"
}
}
4 changes: 2 additions & 2 deletions packages/cloudflare/test/fixtures/astro-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
},
"devDependencies": {
"wrangler": "^3.75.0"
"wrangler": "^3.78.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
2 changes: 1 addition & 1 deletion packages/cloudflare/test/fixtures/no-output/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
2 changes: 1 addition & 1 deletion packages/cloudflare/test/fixtures/routes-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"@astrojs/solid-js": "^4.4.1",
"astro": "^4.15.4",
"astro": "^4.15.6",
"solid-js": "^1.8.22"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
6 changes: 6 additions & 0 deletions packages/netlify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/netlify

## 5.5.3

### Patch Changes

- [#388](https://github.com/withastro/adapters/pull/388) [`3f280f1`](https://github.com/withastro/adapters/commit/3f280f113ce768b1c27a2e3cfb36cbc4c43bafa7) Thanks [@hrishikesh-k](https://github.com/hrishikesh-k)! - Allows `-` in hostnames for Netlify Image CDN RegEx

## 5.5.2

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/netlify/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/netlify",
"description": "Deploy your site to Netlify",
"version": "5.5.2",
"version": "5.5.3",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand Down Expand Up @@ -36,7 +36,7 @@
"@netlify/functions": "^2.8.0",
"@vercel/nft": "^0.27.4",
"esbuild": "^0.21.5",
"vite": "^5.4.2"
"vite": "^5.4.6"
},
"peerDependencies": {
"astro": "^4.2.0"
Expand All @@ -46,13 +46,13 @@
"@netlify/edge-functions": "^2.10.0",
"@netlify/edge-handler-types": "^0.34.1",
"@types/node": "^20.16.5",
"astro": "^4.15.4",
"astro": "^4.15.6",
"astro-scripts": "workspace:*",
"cheerio": "1.0.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
"strip-ansi": "^7.1.0",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"astro": {
"external": true
Expand Down
6 changes: 3 additions & 3 deletions packages/netlify/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export function remotePatternToRegex(
if (hostname) {
if (hostname.startsWith('**.')) {
// match any number of subdomains
regexStr += '([a-z0-9]+\\.)*';
regexStr += '([a-z0-9-]+\\.)*';
hostname = hostname.substring(3);
} else if (hostname.startsWith('*.')) {
// match one subdomain
regexStr += '([a-z0-9]+\\.)?';
regexStr += '([a-z0-9-]+\\.)?';
hostname = hostname.substring(2); // Remove '*.' from the beginning
}
// Escape dots in the hostname
Expand Down Expand Up @@ -380,7 +380,7 @@ export default function netlifyIntegration(
ip:
typeof req.headers['x-nf-client-connection-ip'] === 'string'
? req.headers['x-nf-client-connection-ip']
: req.socket.remoteAddress ?? '127.0.0.1',
: (req.socket.remoteAddress ?? '127.0.0.1'),
server: {
region: 'local-dev',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
},
"dependencies": {
"@astrojs/netlify": "workspace:*",
"astro": "^4.15.4"
"astro": "^4.15.6"
}
}
6 changes: 6 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/node

## 8.3.4

### Patch Changes

- [#398](https://github.com/withastro/adapters/pull/398) [`0cf7e91`](https://github.com/withastro/adapters/commit/0cf7e912607fcd76072bf710b8f857dc8cc07a33) Thanks [@bluwy](https://github.com/bluwy)! - Updates `send` dependency to 0.19.0

## 8.3.3

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/node",
"description": "Deploy your site to a Node.js server",
"version": "8.3.3",
"version": "8.3.4",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand All @@ -26,7 +26,7 @@
"test": "astro-scripts test \"test/**/*.test.js\""
},
"dependencies": {
"send": "^0.18.0",
"send": "^0.19.0",
"server-destroy": "^1.0.1"
},
"peerDependencies": {
Expand All @@ -37,11 +37,11 @@
"@types/node": "^18.19.50",
"@types/send": "^0.17.4",
"@types/server-destroy": "^1.0.4",
"astro": "^4.15.4",
"astro": "^4.15.6",
"astro-scripts": "workspace:*",
"cheerio": "1.0.0",
"express": "^4.19.2",
"node-mocks-http": "^1.15.1"
"express": "^4.21.0",
"node-mocks-http": "^1.16.0"
},
"publishConfig": {
"provenance": true
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const hostOptions = (host: Options['host']): string => {
};

export default function standalone(app: NodeApp, options: Options) {
const port = process.env.PORT ? Number(process.env.PORT) : options.port ?? 8080;
const port = process.env.PORT ? Number(process.env.PORT) : (options.port ?? 8080);
const host = process.env.HOST ?? hostOptions(options.host);
const handler = createStandaloneHandler(app, options);
const server = createServer(handler, host, port);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/api-route/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/bad-urls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/encoded/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/headers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/locals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/node/test/fixtures/node-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.6",
"@astrojs/node": "workspace:*"
}
}
Loading

0 comments on commit 342d0a3

Please sign in to comment.