Skip to content

Commit 888d1a4

Browse files
committed
chore(release): 1.0.0
1 parent 1e22dac commit 888d1a4

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
## 1.0.0
4+
5+
### Breaking changes
6+
7+
- React 18 or newer is required.
8+
- The package ships ESM and CommonJS builds through `exports`; deep imports into `dist/` no longer resolve.
9+
- The stored version is saved only when the cache is cleared, so `isLatestVersion` stays `false` until the reload.
10+
- `lazyRetry(fn, 0)` makes one attempt instead of retrying forever.
11+
- `debug` receives `error: unknown` and always receives `state`.
12+
13+
See [Upgrading from 0.x](README.md#upgrading-from-0x).
14+
15+
### Features
16+
17+
- `onUpdate` (`'prompt' | 'reload' | 'flag'`) decides what a check that finds a newer build does. `auto` still works and is deprecated.
18+
- `prompt` asks the user to reload with your own component, which receives `UpdatePromptProps`; `promptOnChunkError` asks before reloading for a chunk error too.
19+
- `reloadWhenHidden` reloads into a new build when the tab goes to the background, and checks once on the way.
20+
- `canReload` holds back reloads the user did not start.
21+
- `blocking={false}` renders the app before the first check.
22+
- A tab that gets focus back after a whole `duration` checks at once.
23+
- Next.js support: the bundle is marked `'use client'`, renders on the server and hydrates without a mismatch; Turbopack chunk errors are recognised.
24+
- `defaultErrorCheckers` and `isCacheError` are exported.
25+
26+
### Fixes
27+
28+
- `lazyRetry` no longer retries forever on `0`, and keeps its result type.
29+
- Chunk errors from Vite, mini-css-extract-plugin, native dynamic `import()` in every major browser, and chunks answered with HTML are recognised; 0.2 knew only webpack and one SyntaxError form.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "react-clear-browser-cache",
3-
"version": "0.3.0",
3+
"version": "1.0.0",
44
"author": "arenuzzz",
55
"description": "Library for clearing browser cache after react app updates",
66
"license": "MIT",
7-
"repository": "arenuzzz/react-clear-browser-cache",
7+
"repository": "devmaxxx/react-clear-browser-cache",
88
"type": "commonjs",
99
"sideEffects": false,
1010
"main": "./dist/index.cjs",

0 commit comments

Comments
 (0)