Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/adapter-cloudflare

Package Overview
Dependencies
Maintainers
4
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-cloudflare - npm Package Compare versions

Comparing version 2.3.3 to 2.3.4

6

files/worker.js

@@ -50,3 +50,3 @@ // src/worker.js

return res;
let { pathname } = new URL(req.url);
let { pathname, search } = new URL(req.url);
try {

@@ -62,6 +62,8 @@ pathname = decodeURIComponent(pathname);

}
const location = pathname.at(-1) === "/" ? stripped_pathname : pathname + "/";
let location = pathname.at(-1) === "/" ? stripped_pathname : pathname + "/";
if (is_static_asset || prerendered.has(pathname)) {
res = await env.ASSETS.fetch(req);
} else if (location && prerendered.has(location)) {
if (search)
location += search;
res = new Response("", {

@@ -68,0 +70,0 @@ status: 308,

@@ -6,3 +6,3 @@ import { writeFileSync } from 'node:fs';

/** @type {import('.').default} */
/** @type {import('./index.js').default} */
export default function (options = {}) {

@@ -71,4 +71,4 @@ return {

* @param {string[]} assets
* @param {import('./index').AdapterOptions['routes']} routes
* @returns {import('.').RoutesJSONSpec}
* @param {import('./index.js').AdapterOptions['routes']} routes
* @returns {import('./index.js').RoutesJSONSpec}
*/

@@ -75,0 +75,0 @@ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>'] }) {

{
"name": "@sveltejs/adapter-cloudflare",
"version": "2.3.3",
"version": "2.3.4",
"description": "Adapter for building SvelteKit applications on Cloudflare Pages with Workers integration",

@@ -45,3 +45,3 @@ "repository": {

"build": "esbuild src/worker.js --bundle --outfile=files/worker.js --external:SERVER --external:MANIFEST --format=esm",
"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"lint": "prettier --check .",
"format": "pnpm lint --write",

@@ -48,0 +48,0 @@ "check": "tsc --skipLibCheck"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc