aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/cloudflare')
-rw-r--r--packages/integrations/cloudflare/CHANGELOG.md52
-rw-r--r--packages/integrations/cloudflare/package.json11
-rw-r--r--packages/integrations/cloudflare/src/index.ts20
-rw-r--r--packages/integrations/cloudflare/test/fixtures/basics/astro.config.mjs2
-rw-r--r--packages/integrations/cloudflare/test/prerender.test.js4
-rw-r--r--packages/integrations/cloudflare/test/routesJson.js6
-rw-r--r--packages/integrations/cloudflare/tsconfig.json2
7 files changed, 84 insertions, 13 deletions
diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md
index 2a53e71bd..6111c047e 100644
--- a/packages/integrations/cloudflare/CHANGELOG.md
+++ b/packages/integrations/cloudflare/CHANGELOG.md
@@ -1,5 +1,57 @@
# @astrojs/cloudflare
+## 7.0.0-beta.1
+
+### Minor Changes
+
+- [#7846](https://github.com/withastro/astro/pull/7846) [`ea30a9d4f`](https://github.com/withastro/astro/commit/ea30a9d4f2d7a12345869e971f3051cf803dbe74) Thanks [@schummar](https://github.com/schummar)! - More efficient \_routes.json
+
+### Patch Changes
+
+- Updated dependencies [[`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6), [`3c3100851`](https://github.com/withastro/astro/commit/3c31008519ce68b5b1b1cb23b71fbe0a2d506882), [`34cb20021`](https://github.com/withastro/astro/commit/34cb2002161ba88df6bcb72fecfd12ed867c134b), [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671), [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae), [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2), [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40), [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9), [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d)]:
+ - astro@3.0.0-beta.1
+ - @astrojs/underscore-redirects@0.3.0-beta.0
+
+## 7.0.0-beta.0
+
+### Major Changes
+
+- [`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
+
+- [`c022a4217`](https://github.com/withastro/astro/commit/c022a4217a805d223c1494e9eda4e48bbf810388) Thanks [@Princesseuh](https://github.com/Princesseuh)! - When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users
+
+### Minor Changes
+
+- [`9b4f70a62`](https://github.com/withastro/astro/commit/9b4f70a629f55e461759ba46f68af7097a2e9215) Thanks [@ematipico](https://github.com/ematipico)! - Introduced the concept of feature map. A feature map is a list of features that are built-in in Astro, and an Adapter
+ can tell Astro if it can support it.
+
+ ```ts
+ import { AstroIntegration } from './astro';
+
+ function myIntegration(): AstroIntegration {
+ return {
+ name: 'astro-awesome-list',
+ // new feature map
+ supportedAstroFeatures: {
+ hybridOutput: 'experimental',
+ staticOutput: 'stable',
+ serverOutput: 'stable',
+ assets: {
+ supportKind: 'stable',
+ isSharpCompatible: false,
+ isSquooshCompatible: false,
+ },
+ },
+ };
+ }
+ ```
+
+### Patch Changes
+
+- Updated dependencies [[`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81), [`76ddef19c`](https://github.com/withastro/astro/commit/76ddef19ccab6e5f7d3a5740cd41acf10e334b38), [`9b4f70a62`](https://github.com/withastro/astro/commit/9b4f70a629f55e461759ba46f68af7097a2e9215), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`2f951cd40`](https://github.com/withastro/astro/commit/2f951cd403dfcc2c3ca6aae618ae3e1409516e32), [`c022a4217`](https://github.com/withastro/astro/commit/c022a4217a805d223c1494e9eda4e48bbf810388), [`67becaa58`](https://github.com/withastro/astro/commit/67becaa580b8f787df58de66b7008b7098f1209c), [`bc37331d8`](https://github.com/withastro/astro/commit/bc37331d8154e3e95a8df9131e4e014e78a7a9e7), [`dfc2d93e3`](https://github.com/withastro/astro/commit/dfc2d93e3c645995379358fabbdfa9aab99f43d8), [`3dc1ca2fa`](https://github.com/withastro/astro/commit/3dc1ca2fac8d9965cc5085a5d09e72ed87b4281a), [`1be84dfee`](https://github.com/withastro/astro/commit/1be84dfee3ce8e6f5cc624f99aec4e980f6fde37), [`35f01df79`](https://github.com/withastro/astro/commit/35f01df797d23315f2bee2fc3fd795adb0559c58), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`78de801f2`](https://github.com/withastro/astro/commit/78de801f21fd4ca1653950027d953bf08614566b), [`59d6e569f`](https://github.com/withastro/astro/commit/59d6e569f63e175c97e82e94aa7974febfb76f7c), [`7723c4cc9`](https://github.com/withastro/astro/commit/7723c4cc93298c2e6530e55da7afda048f22cf81), [`fb5cd6b56`](https://github.com/withastro/astro/commit/fb5cd6b56dc27a71366ed5e1ab8bfe9b8f96bac5), [`631b9c410`](https://github.com/withastro/astro/commit/631b9c410d5d66fa384674027ba95d69ebb5063f)]:
+ - astro@3.0.0-beta.0
+ - @astrojs/underscore-redirects@0.3.0-beta.0
+
## 6.8.0
### Minor Changes
diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json
index 128083ae6..ffd036038 100644
--- a/packages/integrations/cloudflare/package.json
+++ b/packages/integrations/cloudflare/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers/Pages",
- "version": "6.8.0",
+ "version": "7.0.0-beta.1",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -39,21 +39,20 @@
"test:match": "mocha --exit --timeout 30000 -g"
},
"dependencies": {
- "@astrojs/underscore-redirects": "^0.2.0",
+ "@astrojs/underscore-redirects": "workspace:*",
"@cloudflare/workers-types": "^4.20230518.0",
- "esbuild": "^0.17.19",
+ "esbuild": "^0.18.16",
"tiny-glob": "^0.2.9"
},
"peerDependencies": {
- "astro": "workspace:^2.10.9"
+ "astro": "workspace:^3.0.0-beta.2"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
"cheerio": "1.0.0-rc.12",
- "kill-port": "^2.0.1",
"mocha": "^9.2.2",
- "wrangler": "^3.5.0"
+ "wrangler": "^2.0.23"
}
}
diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts
index 5f02184fa..6b64a0a1f 100644
--- a/packages/integrations/cloudflare/src/index.ts
+++ b/packages/integrations/cloudflare/src/index.ts
@@ -24,11 +24,31 @@ export function getAdapter(isModeDirectory: boolean): AstroAdapter {
name: '@astrojs/cloudflare',
serverEntrypoint: '@astrojs/cloudflare/server.directory.js',
exports: ['onRequest', 'manifest'],
+ supportedAstroFeatures: {
+ hybridOutput: 'stable',
+ staticOutput: 'unsupported',
+ serverOutput: 'stable',
+ assets: {
+ supportKind: 'stable',
+ isSharpCompatible: false,
+ isSquooshCompatible: false,
+ },
+ },
}
: {
name: '@astrojs/cloudflare',
serverEntrypoint: '@astrojs/cloudflare/server.advanced.js',
exports: ['default'],
+ supportedAstroFeatures: {
+ hybridOutput: 'stable',
+ staticOutput: 'unsupported',
+ serverOutput: 'stable',
+ assets: {
+ supportKind: 'stable',
+ isSharpCompatible: false,
+ isSquooshCompatible: false,
+ },
+ },
};
}
diff --git a/packages/integrations/cloudflare/test/fixtures/basics/astro.config.mjs b/packages/integrations/cloudflare/test/fixtures/basics/astro.config.mjs
index 105247b1b..407dc4355 100644
--- a/packages/integrations/cloudflare/test/fixtures/basics/astro.config.mjs
+++ b/packages/integrations/cloudflare/test/fixtures/basics/astro.config.mjs
@@ -6,5 +6,5 @@ process.env.SECRET_STUFF = 'secret'
export default defineConfig({
adapter: cloudflare(),
- output: 'server',
+ output: 'server'
});
diff --git a/packages/integrations/cloudflare/test/prerender.test.js b/packages/integrations/cloudflare/test/prerender.test.js
index fe0721f27..6c2b8c5bb 100644
--- a/packages/integrations/cloudflare/test/prerender.test.js
+++ b/packages/integrations/cloudflare/test/prerender.test.js
@@ -23,7 +23,7 @@ describe('Prerendering', () => {
expect(foundRoutes).to.deep.equal({
version: 1,
- include: ['/'],
+ include: ['/', '/_image'],
exclude: [],
});
});
@@ -51,7 +51,7 @@ describe('Hybrid rendering', () => {
expect(foundRoutes).to.deep.equal({
version: 1,
- include: ['/one'],
+ include: ['/one', '/_image'],
exclude: [],
});
});
diff --git a/packages/integrations/cloudflare/test/routesJson.js b/packages/integrations/cloudflare/test/routesJson.js
index 927e4c38e..1714dfb89 100644
--- a/packages/integrations/cloudflare/test/routesJson.js
+++ b/packages/integrations/cloudflare/test/routesJson.js
@@ -24,7 +24,7 @@ describe('_routes.json generation', () => {
expect(routes).to.deep.equal({
version: 1,
- include: ['/a/*'],
+ include: ['/a/*', '/_image'],
exclude: ['/a/', '/a/redirect', '/a/index.html'],
});
});
@@ -70,8 +70,8 @@ describe('_routes.json generation', () => {
expect(routes).to.deep.equal({
version: 1,
- include: ['/'],
- exclude: ['/'],
+ include: ['/_image'],
+ exclude: [],
});
});
});
diff --git a/packages/integrations/cloudflare/tsconfig.json b/packages/integrations/cloudflare/tsconfig.json
index 64d4ef454..af1b43564 100644
--- a/packages/integrations/cloudflare/tsconfig.json
+++ b/packages/integrations/cloudflare/tsconfig.json
@@ -5,6 +5,6 @@
"allowJs": true,
"module": "ES2022",
"outDir": "./dist",
- "target": "ES2021"
+ "target": "ES2022"
}
}