0.1.3
-
Performance
-
Only parse
ASSET_MANIFEST
once on startup - Cherry, pull/185This PR improves performance of the
getAssetFromKV
function by only parsing the asset manifest once on startup, instead of on each request. This can have a significant improvement in response times for larger sites. An example of the performance improvement with an asset manifest of over 50k files:Before change:
100 iterations: Done. Mean kv response time is 16.61
1000 iterations: Done. Mean kv response time is 17.798
After change:
100 iterations: Done. Mean kv response time is 6.62
1000 iterations: Done. Mean kv response time is 7.296
-
-
Fixes
-
ESM compatibility: fix crash on missing global environment variables - ttraenkler, pull/188
This PR fixes the library from crashing when global environment variables such as
__STATIC_CONTENT
and__STATIC_CONTENT_MANIFEST
are missing, which is currently the case when using the new ESM module syntax.Note that whilst this partially resolves the issue discussed in issue/174, it does not provide full ESM compatibility yet. Please see issue/174 for further discussion.
-
-
Maintenance
-
Tweak GitHub Actions Workflow for proper PR testing - Cherry, pull/185
This PR tweaks the GitHub Actions Workflow to test PRs properly, both in terms of linting and the repository tests. It runs
prettier
to maintain code quality and style, and all unit tests on every PR to ensure no regressions occur. -
Add test for
mapRequestToAsset
asset override - Cherry, pull/186This PR adds a test for the functionality added in pull/159. This tests that when overriding the
mapRequestToAsset
function in its entirety, this function is always run. -
Dependabot updates
A number of dependabot patch-level updates have been merged:
- Bump @types/node from 15.3.1 to 15.6.0 (pull/183)
- Bump @types/node from 15.6.0 to 15.6.1 (pull/184)
- Bump @types/node from 15.6.1 to 15.9.0 (pull/189)
- Bump @types/node from 15.9.0 to 15.12.0 (pull/190)
- Bump @types/node from 15.12.0 to 15.12.1 (pull/191)
- Bump @types/node from 15.12.1 to 15.12.2 (pull/193)
- Bump typescript from 4.2.4 to 4.3.2 (pull/187)
- Bump prettier from 2.3.0 to 2.3.1 (pull/192)
-