-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: utilize timestamps in build and renderDocument for AUS #6964
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Jun 24, 2024 9:53 PM (UTC)
|
4bea7f7
to
11d5785
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change from cacheControl: 'public, max-age=10',
to cacheControl: 'public, max-age=0',
in the manifest upload line 141 in scripts/uploadBundles.ts
Would suggest |
9a548a8
to
92a7452
Compare
db5a043
to
c85ae09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it with test studio, looks good thanks!
Description
This pull request introduces updates to the timestamp handling in our import map injector script. The key changes include:
TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT
now replaces the existing build-time timestamps insanity-cdn
URLs with runtime-generated timestamps.addImportMapToHtml
toaddTimestampedImportMapScriptToHtml
.@types/jsdom
for improved type checking in tests.Context and Dependency
This change is designed to address the issue of version consistency during a release. By dynamically replacing the build-time timestamps in
sanity-cdn
URLs with runtime-generated timestamps, we ensure that the latest version of the script is always loaded. This prevents scenarios where different parts of the application might load different versions of the script due to caching or other factors.This PR depends on another PR in the
module-server
repository before it can be merged:https://github.com/sanity-io/module-server/pull/52
The dependent PR updates the module service to correctly handle the timestamped URLs, ensuring seamless integration with the changes introduced in this PR.
What to review
renderDocument.ts
andconstants.ts
.renderDocument.test.tsx
for accuracy and completeness.uploadBundles.ts
correctly include timestamps.pnpm-lock.yaml
.Testing
The following tests have been added/updated:
Notes for release
N/A