Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:denoland/fresh
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base:2.0.2
Choose a base ref
Loading
...
head repository:denoland/fresh
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare:2.1.0
Choose a head ref
Loading
  • 11commits
  • 36files changed
  • 4contributors

Commits on Sep 14, 2025

  1. fix(init): correct temporary directory creation in tests (#3425)

    The tests for the `init` package were failing with a `PermissionDenied`error in Jules container environment when creating temporarydirectories. This was because the tests were attempting to create thetemporary directories in the root of the project, where permissions areoften restricted.This change corrects the issue by removing the local `withTmpDir` helperfunction in `packages/init/src/init_test.ts` and instead using the onefrom `../../fresh/src/test_utils.ts`. The shared helper functioncorrectly creates temporary directories in the operating system'sdefault temporary directory, which resolves the permission issue.Sample error message from Jules before this fix:``` ERRORS init - new project => ./packages/init/src/init_test.ts:99:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);                         ^    at Object.makeTempDir (ext:deno_fs/30_fs.js:168:10)    at withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:26)    at withTmpDir (file:///app/packages/init/src/init_test.ts:41:10)    at file:///app/packages/init/src/init_test.ts:100:27init - create project dir => ./packages/init/src/init_test.ts:107:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async file:///app/packages/init/src/init_test.ts:108:21init - with tailwind => ./packages/init/src/init_test.ts:122:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);                         ^    at Object.makeTempDir (ext:deno_fs/30_fs.js:168:10)    at withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:26)    at withTmpDir (file:///app/packages/init/src/init_test.ts:41:10)    at file:///app/packages/init/src/init_test.ts:123:27init - with vscode => ./packages/init/src/init_test.ts:140:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async file:///app/packages/init/src/init_test.ts:141:21init - fmt, lint, and type check project => ./packages/init/src/init_test.ts:153:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async fn (file:///app/packages/init/src/init_test.ts:159:23)init with tailwind - fmt, lint, and type check project => ./packages/init/src/init_test.ts:179:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async file:///app/packages/init/src/init_test.ts:182:23init - can start dev server => ./packages/init/src/init_test.ts:205:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async fn (file:///app/packages/init/src/init_test.ts:211:23)init - can start built project => ./packages/init/src/init_test.ts:233:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);              ^    at async withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:15)    at async file:///app/packages/init/src/init_test.ts:234:21init - errors on missing build cache in prod => ./packages/init/src/init_test.ts:265:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);                         ^    at Object.makeTempDir (ext:deno_fs/30_fs.js:168:10)    at withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:26)    at withTmpDir (file:///app/packages/init/src/init_test.ts:41:10)    at file:///app/packages/init/src/init_test.ts:266:27init - with vite => ./packages/init/src/init_test.ts:348:6error: PermissionDenied: Permission denied (os error 13): tmpdir  const dir = await Deno.makeTempDir(options);                         ^    at Object.makeTempDir (ext:deno_fs/30_fs.js:168:10)    at withTmpDir (file:///app/packages/fresh/src/test_utils.ts:136:26)    at withTmpDir (file:///app/packages/init/src/init_test.ts:41:10)    at file:///app/packages/init/src/init_test.ts:349:27 FAILURES init - new project => ./packages/init/src/init_test.ts:99:6init - create project dir => ./packages/init/src/init_test.ts:107:6init - with tailwind => ./packages/init/src/init_test.ts:122:6init - with vscode => ./packages/init/src/init_test.ts:140:6init - fmt, lint, and type check project => ./packages/init/src/init_test.ts:153:6init with tailwind - fmt, lint, and type check project => ./packages/init/src/init_test.ts:179:6init - can start dev server => ./packages/init/src/init_test.ts:205:6init - can start built project => ./packages/init/src/init_test.ts:233:6init - errors on missing build cache in prod => ./packages/init/src/init_test.ts:265:6init - with vite => ./packages/init/src/init_test.ts:348:6FAILED | 449 passed (14 steps) | 10 failed | 17 ignored (2m38s)```---------Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
    @fry69@google-labs-jules
    fry69 andgoogle-labs-jules[bot] authoredSep 14, 2025
    Configuration menu
    Copy the full SHA
    a12e20dView commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2025

  1. fix(vite): keep require calls in ESM file (#3433)

    Detect if a file is ESM based on file extension or finding ESM-onlystatements. When we know that it's an ESM file we should keep`require()` calls as is, because some libraries use it as a conditionalcheck like `npm:motion`.Fixes#3429
    @marvinhagemeister
    marvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    b31f362View commit details
    Browse the repository at this point in the history
  2. fix: bring back support for middleware Array (#3434)

    Our validation didn't account for `_middleware` files exporting an Arrayof middlewares.Fixes#3400
    @marvinhagemeister
    marvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    f9ba541View commit details
    Browse the repository at this point in the history
  3. feat: add CSP and header middleware (#3421)

    Added a CSP and header middleware to simplify the HTTP Security ResponseHeader creation.Fixes:-#1705Example:```ts// main.tsexport const app = new App<State>()    .use(csp({        reportTo: '/api/csp-reports',    }))    .use(headers({        'Cross-Origin-Resource-Policy': 'same-site',        'Cross-Origin-Embedder-Policy': 'require-corp',        'Cross-Origin-Opener-Policy': 'same-origin',        'Permissions-Policy':            'geolocation=(), camera=(), microphone=(), payment=(), usb=(), bluetooth=(), magnetometer=(), gyroscope=(), accelerometer=()',        'Referrer-Policy': 'strict-origin-when-cross-origin',        'X-Content-Type-Options': 'nosniff',        'X-Frame-Options': 'DENY',        'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload',    }))```Endpoint example:```ts// routes/api/csp-handler.tsimport { Context } from 'fresh';import { State } from '../../main.ts';export const handler = {    async POST(ctx: Context<State>) {        try {            const text = await ctx.req.text();            const body = JSON.parse(text);            const logEntry = {                timestamp: new Date().toISOString(),                report: body,                userAgent: ctx.req.headers.get('user-agent') || 'unknown',            };            await Deno.writeFile('csp-reports.log', new TextEncoder().encode(JSON.stringify(logEntry) + '\n'), { append: true });            return new Response(JSON.stringify({ status: "ok" }), { status: 200 });        } catch (error) {            console.error("Error handling CSP report:", error);            return new Response(JSON.stringify({ status: "error", error: String(error) }), { status: 500 });        }    },};```Implementing these headers improved the security report at [SecurityHeaders](securityheaders.com) from F to A and helps to prevent securityvulnerabilities like Cross-Site Scripting and Clickjacking.**Before**<img width="1200" height="308" alt="image"src="https://github.com/user-attachments/assets/01adfff4-5bb4-4cc6-bd8f-5e74b471301b"/>**After**<img width="1200" height="335" alt="image"src="https://github.com/user-attachments/assets/c5a9b07e-babf-4797-b47d-4368de70cbc3"/>---------Co-authored-by: Marvin Hagemeister <marvin@deno.com>
    @emilkrebs@marvinhagemeister
    emilkrebs andmarvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    b4bb004View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    016f94eView commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3fb3cd9View commit details
    Browse the repository at this point in the history
  6. fix(vite): nested islands not working (#3440)

    This PR makes nested islands work. Problem was that only entry fileshave the `src` property in the vite manifest. For that we need to ensurethat every island is an entry point.Fixes#3439
    @marvinhagemeister
    marvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    399cbc3View commit details
    Browse the repository at this point in the history
  7. docs: fix testing docs (#3419)

    This fixes the testing page in the docs for real this time.Every test is hand checked now. Thanks to a certain button, whichappeared recently.Optionally I can also split this page up in separate pages:- Middlewars- AppWrappers and Layouts- Routing and Handlers- SSR and Islands
    @fry69
    fry69 authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    999b895View commit details
    Browse the repository at this point in the history
  8. fix: improve missing build cache error message (#3441)

    Hoping that this helps folks who ignore the migration guide and keep theentry pointed to `main.ts`.
    @marvinhagemeister
    marvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    3867e60View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    78b886dView commit details
    Browse the repository at this point in the history
  10. chore: release 2.1.0 (#3443)

    - @fresh/core@2.1.0- @fresh/plugin-vite@1.0.3- @fresh/update@2.1.0- @fresh/init@2.0.9
    @marvinhagemeister
    marvinhagemeister authoredSep 15, 2025
    Configuration menu
    Copy the full SHA
    de9b8a7View commit details
    Browse the repository at this point in the history
Loading

[8]ページ先頭

©2009-2025 Movatter.jp