next-on-pages

CLI to build and develop Next.js apps for Cloudflare Pages

MIT License

Downloads
440.7K
Stars
1.2K
Committers
47

Bot releases are visible (Hide)

next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 072af87: Temporarily revert the change to package-manager-manager so that the bug fix in the latest release for new next.js versions can still be releases, while a fix for #474 is investigated in the meantime.
next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • cd2f7ee: correctly handle newly introduced .prefetch.rsc suffixes
  • 5b4a5b7: improve package managers and package handling by using the package-manager-manager third party library
  • b585099: Avoid using the Vercel custom config hack for Bun package manager support when a version of the Vercel CLI that supports Bun is used.
  • 628f6bb: Ignore invalid nodejs i18n functions with valid alternatives.
next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 0168496: Fix named capture groups in has entries in the build output config not applying to route destination paths.
  • f764fff: Fix process.env not being enumerable due to being a proxy.
  • 1e25a97: Fix dynamic parameters with an underscore leading to an incorrect param being provided.
  • c06b437: Normalize the injected function entrypoints for Windows.
next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 291bfde: Support for the internal fetch (suspense) cache, and next/cache data revalidation.

Patch Changes

  • cb32baf: avoid the default is not a function unclear error

    if there is some issue evaluating a lazy loaded edge function
    its default export ends up not being a function and that results
    in an unhelpful error like the following:

     TypeError: u.default is not a function
    

    slightly improve the user experience by catching such error and
    letting the user know that something went wrong with the edge
    function's evaluation:

     Error: An error occurred while evaluating the target edge function (<edge-function-path>)
    
  • 291bfde: Stop the cache property in fetch requests causing internal server error.

  • 4570aa6: add vercel@31 as a peer dependency

  • c788def: fix package version detection for yarn

  • fe6ea04: Add vercel@32 as a peer dependency

next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 7da1fd8: fix package version detection not correctly working with yarn v1

  • 5bfbbe1: Add workaround so that people can use standard not-found routes in their app directory applications

    The problem is that:

    • if there's a static not-found route in app dir, that generates a serverless (edge incompatible) function (_not-found)
    • if there's a dynamic not-found route in app dir, that generates two serverless (edge incompatible) functions (_not-found, _error)

    The workaround being introduced here is:

    • if there's a static not-found route in app dir, we delete the generated _not-found serverless function
      (which is not needed as we can just fallback to the static 404 html)
    • if there's a dynamic not-found route in app dir, we can't actually fix it but provide a warning for the user

    Besides the above the no-app-not-found-runtime eslint rule has been introduced to try to help developers avoid
    the issue

  • 7f94fd2: Apply search params to rewritten URLs in matching.

  • 7da1fd8: install vercel yarn dev dependency only when not already present

next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 5bfbbe1: Add workaround so that people can use standard not-found routes in their app directory applications

    The problem is that:

    • if there's a static not-found route in app dir, that generates a serverless (edge incompatible) function (_not-found)
    • if there's a dynamic not-found route in app dir, that generates two serverless (edge incompatible) functions (_not-found, _error)

    The workaround being introduced here is:

    • if there's a static not-found route in app dir, we delete the generated _not-found serverless function
      (which is not needed as we can just fallback to the static 404 html)
    • if there's a dynamic not-found route in app dir, we can't actually fix it but provide a warning for the user

    Besides the above the no-app-not-found-runtime eslint rule has been introduced to try to help developers avoid
    the issue

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • ea98a8f: Support for defining an _routes.json file in the root of the project. Entries in the root's file are copied over to the generated one in the output directory.
  • 9faf701: add warning indicating that usage under windows is not advised
  • c6621c6: Support for using Bun as a package manager in projects.

Patch Changes

  • 3affd17: Normalize injected import paths for builds done on Windows machines.

  • 226d562: Specify the framework is nextjs in the Vercel project.json file.

  • 5aefce5: watch mode only on file changes

    only watch for file changes instead of watching for all possible changes (such as directories additions/removals, etc...),
    making sure that we don't rerun the build process unnecessarily

next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

Patch Changes

  • 660ed5e: Prevent prerender files from overwriting in the output directory when the file hashes are the same.
  • 660ed5e: Completely avoid processing rsc functions due to them being identical to non-rsc functions.
  • f08f2b9: Fix next.config.js rewrites unintentionally redirecting the user instead of rewriting the request.
  • 6c28128: Fix middleware redirects not always bailing out of the routing stages.
  • 9734795: clarify that Yarn Plug'n'Play can't be used simply because not supported by vercel
  • 551fa05: Fix the /_next/static exclusion in _routes.json being incorrect when the directory is not in the root.
next-on-pages - [email protected]

Published by github-actions[bot] about 1 year ago

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 619beea: bundle assets produced by the Vercel build and make them accessible via fetch

    Vercel/Next can allow access binary assets bundled with their edge functions in the following manner:

    const font = fetch(new URL('../../assets/asset-x', import.meta.url)).then(
      (res) => res.arrayBuffer(),
    );
    

    As you can see in this @vercel/og example:
    https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation/og-image-examples#using-a-custom-font

    This sort of access to bindings is necessary for the @vercel/og package to work and might be used in other packages
    as well, so it is something that we need to support.
    We do so by making sure that we properly bind the assets found in the Vercel build output into our worker
    and that fetches to such assets (using blob urls) are correctly handled (this requires us to patch the global fetch function)

  • 76a8bb4: Fix multiple search params with the same key not being preserved

next-on-pages - [email protected]

Published by github-actions[bot] over 1 year ago

next-on-pages - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • f1f5a95: remove eslint missing-image-loader rule

    the missing-image-loader rule is no longer needed since @cloudflare/next-on-pages
    version 1.3.0 as basic support for the Image component has been introduced
    (in the following PR: https://github.com/cloudflare/next-on-pages/pull/357), therefore there isn't
    a real need to warn developers not to use the Image component without a custom loader
    (since the component will just work by default).

    Warning
    This is technically a breaking change to the eslint-plugin-next-on-pages package
    since linting would break for users specifically including the missing-image-loader
    rule (causing Definition for rule 'next-on-pages/missing-loader' was not found errors)
    however currently we don't assume that many people are using the plugin with the rule
    specifically included, moreover the resolution for the breaking change is to simply
    remove the rule from the application's eslint configuration so it is also extremely
    simple to fix, thus we didn't consider this worth a major bump

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • 2f9cf97: Support for using a custom output directory for the generated worker and static assets, through a --outdir flag.

Patch Changes

  • f879ffd: Prevent middleware redirects applying search params.

    When a middleware function results in a redirect, the location header specified in the response is the full destination, including any search params, as written by the developer. Previously, we always applied search params to redirects found during the routing process, no matter what. This meant that we accidentally were applying search params to middleware redirects, which would alter the intended final destination. This change prevents that from happening.

  • 3a95489: Fix middleware returning new NextResponse resulting in 404 for routes that don't exist in the build output.

  • 2dceb75: Fix middleware being invoked multiple times in a phase during routing when there is more than one config entry.

next-on-pages - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • daa32fd: update no-unsupported-config rules (to match the latest supported configs table)

  • c21c995: add fallback detection check in no-unsupported-configs rule

    add an additional check in the no-unsupported-configs rule so that if the rule
    were to fail detecting the config's name as a last resort we fall back checking
    the variable declaration present just after the "/*_ @type {import('next').NextConfig} _/"
    comment

next-on-pages - @cloudflare/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • 2c87481: Display a summary about the build at the end of the build process.

Patch Changes

  • b1c3a33: fix --info showing [object Promise] for relevant packages instead of their versions

  • a9b8c3c: Overwrite prerendered files if they already exist in the output directory.

    When using --skip-build, it would fail if a prerendered file already existed, so we need to override the files so that the build process can continue like normal. This was problematic as after the first build, the prerendered files would now exist in the output directory as static assets, preventing any additional builds.

  • b1c3a33: fix vercel command not found issue