Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

0.1.2

Compare
Choose a tag to compare
@kristianfreeman kristianfreeman released this 21 May 21:25
856d753
  • Features

    • Support for defaultDocument configuration - boemekeld, pull/161

      This PR adds support for customizing the defaultDocument option in getAssetFromKV. In situations where a project does not use index.html as the default document for a path, this can now be customized to values like index.shtm:

      return getAssetFromKV(event, { 
        defaultDocument: "index.shtm"
      })
  • Fixes

    • Fire mapRequestToAsset for all requests, if explicitly defined - Cherry, pull/159

      This PR fixes an issue where a custom mapRequestToAsset handler weren't fired if a matching asset path was found in ASSET_MANIFEST data. By correctly checking for this handler, we can conditionally handle any assets with this handler even if they exist in the ASSET_MANIFEST.

      Note that this is a breaking change, as previously, the mapRequestToAsset function was ignored if you set it, and an exact match was found in the ASSET_MANIFEST. That being said, this behavior was a bug, and unexpected behavior, as documented in issue/158.

    • Etag logic refactor - shagamemnon, pull/133

      This PR refactors a great deal of the Etag functionality introduced in 0.0.11. kv-asset-handler will now correctly set strong and weak Etags both to the Cloudflare CDN and to client eyeballs, allowing for higher cache percentages with Workers Sites projects.

    • Fix path decoding issue - xiaolanglanglang, pull/142

      This PR improves support for non-alphanumeric character paths in kv-asset-handler, for instance, if the path requested is in Chinese.

    • Check HTTP method after mapRequestToAsset - oliverpool, pull/178

      This PR fixes an issue where the HTTP method for an asset is checked before the mapRequestToAsset handler is called. This has caused issues for users in the past, where they need to generate a requestKey based on an asset path, even if the request method is not GET. This fixes issue/151.

  • Maintenance

    • Add Markdown linting workflow to GitHub Actions - jbampton, pull/135

      Our GitHub Actions workflow now includes a linting workflow for Markdown in the project, including the README, this CHANGELOG, and any other .md files in the source code.

    • Dependabot updates

      A number of dependabot patch-level updates have been merged since our last release:

      • Bump @types/node from 15.30.0 to 15.30.1 (pull/180)
      • Bump hosted-git-info from 2.8.8 to 2.8.9 (pull/176)
      • Bump ini from 1.3.5 to 1.3.8 (pull/160)
      • Bump lodash from 4.17.19 to 4.17.21 (pull/175)
      • Bump urijs from 1.19.2 to 1.19.6 (pull/168)
      • Bump y18n from 4.0.0 to 4.0.1 (pull/173)
    • Repository maintenance - Cherry, pull/179

      New project maintainer Cherry did a ton of maintenance in this release, improving workflows, code quality, and more. Check out the full list in the PR.

  • Documentation

    • Update README.md - signalnerve, pull/177

      This PR adds context to our README, with mentions about what this project is, how to use it, and some new things since the last version of this package: namely, Cloudflare Pages and the new Cloudflare Workers Discord server

    • Add instructions for updating version in related repos - caass, [pull/171]

      This PR adds instructions for updating the kv-asset-handler version in related repositories, such as our templates, that use kv-asset-handler and are exposed to end-users of Wrangler and Workers.