hubspot-cms-sync 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubspot-cms-sync",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Git-backed bidirectional sync for HubSpot CMS themes, content, blogs, forms, and assets.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -166,10 +166,13 @@ export async function buildStatic({ siteDir, outDir, baseUrl = '', assetBase = '
166
166
  redirectCount = lines.length;
167
167
  }
168
168
 
169
+ // /assets/* are content-hashed, so immutable is safe. css/js use STABLE filenames, so
170
+ // immutable would pin stale styles at the edge for a year after a deploy — they must
171
+ // revalidate instead (cheap 304s) so CSS/JS fixes actually reach users.
169
172
  await writeFile(join(outDir, '_headers'),
170
173
  '/assets/*\n Cache-Control: public, max-age=31536000, immutable\n'
171
- + '/css/*\n Cache-Control: public, max-age=31536000, immutable\n'
172
- + '/js/*\n Cache-Control: public, max-age=31536000, immutable\n'
174
+ + '/css/*\n Cache-Control: public, max-age=0, must-revalidate\n'
175
+ + '/js/*\n Cache-Control: public, max-age=0, must-revalidate\n'
173
176
  + '/*\n X-Content-Type-Options: nosniff\n X-Frame-Options: SAMEORIGIN\n Referrer-Policy: strict-origin-when-cross-origin\n',
174
177
  'utf8');
175
178