Compare commits

...

2 Commits

Author SHA1 Message Date
Anthony LC 797d9442ac 🔖(patch) release 1.8.2
Changed:

- ♻️(SW) change strategy html caching
2024-11-28 15:31:03 +01:00
Anthony LC 573d054748 ♻️(SW) change strategy html caching
We will use the network first strategy for the html
files. This will allow us to always have the
latest version of the html files.
2024-11-28 09:30:06 +01:00
13 changed files with 40 additions and 16 deletions
+10 -2
View File
@@ -10,11 +10,18 @@ and this project adheres to
## [Unreleased]
## [1.8.2] - 2024-11-28
## Changed
- ♻️(SW) change strategy html caching #460
## [1.8.1] - 2024-11-27
## Fixed
🐛(frontend) link not clickable and flickering firefox #457
- 🐛(frontend) link not clickable and flickering firefox #457
## [1.8.0] - 2024-11-25
@@ -275,7 +282,8 @@ and this project adheres to
- 🚀 Impress, project to manage your documents easily and collaboratively.
[unreleased]: https://github.com/numerique-gouv/impress/compare/v1.8.1...main
[unreleased]: https://github.com/numerique-gouv/impress/compare/v1.8.2...main
[v1.8.2]: https://github.com/numerique-gouv/impress/releases/v1.8.2
[v1.8.1]: https://github.com/numerique-gouv/impress/releases/v1.8.1
[v1.8.0]: https://github.com/numerique-gouv/impress/releases/v1.8.0
[v1.7.0]: https://github.com/numerique-gouv/impress/releases/v1.7.0
+1 -1
View File
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "impress"
version = "1.8.1"
version = "1.8.2"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "app-e2e",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"scripts": {
"lint": "eslint . --ext .ts",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "app-impress",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"scripts": {
"dev": "next dev",
@@ -47,9 +47,13 @@ setCacheNameDetails({
const getStrategy = (
options?: NetworkFirstOptions | StrategyOptions,
): NetworkFirst | CacheFirst => {
return SW_DEV_URL.some((devDomain) =>
const isDev = SW_DEV_URL.some((devDomain) =>
self.location.origin.includes(devDomain),
) || isApiUrl(self.location.href)
);
const isApi = isApiUrl(self.location.href);
const isHTMLRequest = options?.cacheName?.includes('html');
return isDev || isApi || isHTMLRequest
? new NetworkFirst(options)
: new CacheFirst(options);
};
@@ -77,7 +81,7 @@ self.addEventListener('activate', function (event) {
}),
);
})
.then(void self.clients.claim()),
.then(() => self.clients.claim()),
);
});
@@ -139,6 +143,18 @@ setCatchHandler(async ({ request, url, event }) => {
}
});
// HTML documents
registerRoute(
({ request }) => request.destination === 'document',
new NetworkFirst({
cacheName: getCacheNameVersion('html'),
plugins: [
new CacheableResponsePlugin({ statuses: [0, 200] }),
new ExpirationPlugin({ maxAgeSeconds: 24 * 60 * 60 * DAYS_EXP }),
],
}),
);
/**
* External urls cache strategy
*/
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "impress",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"workspaces": {
"packages": [
@@ -1,6 +1,6 @@
{
"name": "eslint-config-impress",
"version": "1.8.1",
"version": "1.8.2",
"license": "MIT",
"scripts": {
"lint": "eslint --ext .js ."
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "packages-i18n",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"scripts": {
"extract-translation": "yarn extract-translation:impress",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "server-y-provider",
"version": "1.8.1",
"version": "1.8.2",
"description": "Y.js provider for docs",
"repository": "https://github.com/numerique-gouv/impress",
"license": "MIT",
+1 -1
View File
@@ -2,4 +2,4 @@ apiVersion: v2
name: extra
description: A Helm chart to add some manifests to impress
type: application
version: 1.8.1
version: 1.8.2
+1 -1
View File
@@ -62,6 +62,6 @@ releases:
environments:
dev:
values:
- version: 1.8.1
- version: 1.8.2
secrets:
- env.d/{{ .Environment.Name }}/secrets.enc.yaml
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: v2
type: application
name: impress
version: 1.8.1
version: 1.8.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mail_mjml",
"version": "1.8.1",
"version": "1.8.2",
"description": "An util to generate html and text django's templates from mjml templates",
"type": "module",
"dependencies": {