Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.0.1

- The package ships its MIT `LICENSE`, and its author, homepage and issue links are up to date.
- The README opens with the new logo, and its images load on npmjs.com too.
- Releases are published from GitHub Actions through npm Trusted Publishing, with a provenance statement.

## 1.0.0

### Breaking changes
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/logo-wordmark-dark.svg" />
<img alt="react-clear-browser-cache" src="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/logo-wordmark-light.svg" width="444" />
</picture>
</p>

# react-clear-browser-cache

> Keep open tabs on your latest React build: notice a deploy, clear Cache Storage and reload, or ask the user first.
Expand All @@ -14,7 +21,7 @@ Users leave tabs open for days. After you deploy, those tabs still run the old b
**[▶ Try the live demo](https://devmaxxx.github.io/react-clear-browser-cache/)** — deploy a new version in one click and watch an open tab notice it, prompt, clear Cache Storage and reload.

<a href="https://devmaxxx.github.io/react-clear-browser-cache/">
<img alt="The demo after a deploy: the update prompt asks to reload, the event log shows meta.json returning v2 while the tab still runs v1." src="docs/demo-light.png" width="800" />
<img alt="The demo after a deploy: the update prompt offers v2 and asks to reload, while the tab still runs v1." src="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/demo-light.png" width="800" />
</a>

## Features
Expand Down
Binary file modified docs/demo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/logo-wordmark-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/logo-wordmark-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<title>react-clear-browser-cache</title>
</head>

Expand Down
14 changes: 14 additions & 0 deletions example/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion example/src/demo/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,16 @@ export default function Demo() {
<div className='page'>
<header className='hero'>
<p className='eyebrow'>Live demo · deploys simulated in your browser</p>
<h1>react-clear-browser-cache</h1>
<h1>
<img
className='logo'
src={`${import.meta.env.BASE_URL}favicon.svg`}
alt=''
width={40}
height={40}
/>
react-clear-browser-cache
</h1>
<p className='lede'>
Users keep old tabs open. When you ship, their page still runs the
last build and its lazy chunks are gone from the server. This boundary
Expand Down
9 changes: 9 additions & 0 deletions example/src/demo/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,19 @@ button.link {
}

.hero h1 {
display: flex;
align-items: center;
gap: 0.6rem;
font-size: clamp(1.5rem, 4vw, 2rem);
letter-spacing: -0.02em;
}

.logo {
flex: none;
width: 1.4em;
height: 1.4em;
}

.lede {
color: var(--muted);
font-size: 0.95rem;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-clear-browser-cache",
"version": "1.0.0",
"version": "1.0.1",
"author": {
"name": "Maksym Synenko",
"url": "https://devmaxxx.github.io/"
Expand Down
Loading