UNPKG

7.43 kBMarkdownView Raw
1# CHANGELOG
2
3:information_source: For all later changes, please see https://github.com/NekR/offline-plugin/releases
4
5### 4.8.1
6
7* Fix TypeScript typings
8
9### 4.8.0
10
11* [Internals]: Async `waitUntil` is now a thing (polyfilled)
12* Added `TypeScript` definitions
13* RegExp support in cache paths [#205](https://github.com/NekR/offline-plugin/pull/205)
14* Added `ServiceWorker.minify` option to force to minify [#204](https://github.com/NekR/offline-plugin/pull/204) & [#206](https://github.com/NekR/offline-plugin/pull/206)
15* Allow ServiceWorker to be installed on any local IP (`127.*.*.*`) [#251](https://github.com/NekR/offline-plugin/pull/251)
16* Ship `ServiceWorker.minify` option which controls if ServiceWorker's code will be minified or not
17
18### 4.7.0
19
20* ServiceWorker can now be registered at `127.0.0.1` [#188](https://github.com/NekR/offline-plugin/pull/188)
21* New `ServiceWorker.navigateFallbackForRedirects` option which is `true` by default (compatibility reasons) [#230](https://github.com/NekR/offline-plugin/pull/230)
22* Fixed new security restriction introduced in browsers regardless navigation requests and redirects [#231](https://github.com/NekR/offline-plugin/issues/231)
23
24### 4.6.2
25
26* Wrap `applicationCache.update()` with `try..catch` #189
27
28### 4.6.1
29
30* Fixed syntax error in `runtime-template.js`
31
32### 4.6.0
33
34* Fixed compatibility with `hard-source-webpack-plugin` #148
35* Added `autoUpdate` option and `runtime.update()` method #169
36
37### 4.5.5
38
39* Fix `request.headers` typo in `validatePrefetch` which was preventing setting custom headers for prefetch requests
40
41### 4.5.4
42
43* Use `compilation.errors` instead of `callback(new Error('...'))` when runtime is missing
44
45### 4.0.0 - 4.5.3
46
47* `relativePaths` is now automatically set to `false` when `publicPath` is used
48* `publicPath` now uses `webpack.config.js`'s `output.publicPath` by default (when not set in `OfflinePlugin` itself)
49* Added `AppCache.output` which is replacement for `AppCache.directory`. The last is deprecated now
50* Added `ServiceWorker.publicPath` and `AppCache.publicPath`
51* Added `:externals:` keyword for caches. When used, keyword is replaced with URLs listed in `externals` option
52* `caches: 'all'` is now equivalent of `caches: { main: [':rest:', ':externals:'] }`. In other words, `externals` URLs are now included in `caches` by default
53* Default options of `offline-plugin` are now exposed as `require('offline-plugin').defaultOptions`
54* `ignoreSearch` isn't applied to assets added with `externals` anymore. i.e. full URLs with `?query` can now be added to the caches
55* Added `responseStrategy` option. Thanks to [@MoOx](https://github.com/MoOx). [#112](https://github.com/NekR/offline-plugin/pull/112)
56* Added `ServiceWorker.cacheName` option. Useful (but very dangerous) when you need to run more than one project on the same domain
57* Make `updateStrategy` default to `'changed'`
58* Added `ServiceWorker.prefetchRequest` option
59* Plugin now outputs its version to generated `ServiceWorker`/`AppCache` files
60* Implemented `cacheMaps` option
61* Made AppCache to not include cross origin URLs by default (because they don't work there on HTTPS). Could be returned back with `AppCache.includeCrossOrigin = true`
62* Dropped Node 0.10, Node 0.12 and IO.js support
63* Updated `minimatch` to 3.*
64* Add AppVeyor CI tests
65
66
67### 3.4.0
68
69* Added `ServiceWorker.navigateFallbackURL` option (see #71)
70* Added warning about development mode in `runtime.js` when used without `OfflinePlugin` in `webpack.config.js` (see #74)
71
72### 3.3.0
73
74* Fixed absolute URLs being prefixed with relative path when `relativePaths: true` is used ([#39](https://github.com/NekR/offline-plugin/issues/39), [#60](https://github.com/NekR/offline-plugin/issues/60))
75* Added `scope` option to ServiceWorker ([#19](https://github.com/NekR/offline-plugin/issues/19)). See [ServiceWorker.register](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register) docs.
76
77### 3.0.0 - 3.2.0
78
79* All assets are now requested cache-bust query parameter (`__uncache=${ Date.now() }`)
80* Assets matching in caches now ignores search (query) path of URLs
81* Rename `scope` option to `publicPath` (`scope` is deprecated now and will produce warnings upon use)
82* Make `publicPath: ''` (empty string) by default
83* Make `relativePaths: true` by default
84* Cache sections `'additional'` and `'optional'` are now allowed only when `updateStrategy` option is set to `'changed'`
85* `changed` is now default `updateStrategy` and `hash` strategy is gone. `offline-plugin` now uses webpack's build hashes to apply `change` update strategy even when generate file names are the same. [Issue 6](https://github.com/NekR/offline-plugin/issues/6). More details about change in docs.
86* Any of `updateStrategy` is now using `version` option for its version tag
87* `version` now is not set by default and returns (when not set, e.g. default) compilation hash for `updateStrategy: 'changed'` and `version` for `updateStrategy: 'all'`
88* `version` now has interpolation value, use `[hash]` to insert compilation hash to your version string
89* `install()` method signature now is `install(options)` (callbacks are removed)
90* Runtime events are not implemented for ServiceWorker (and some for AppCache): `onUpdating`, `onUpdateReady`, `onUpdated`, `onInstalled`.
91 Example: `runtime.install({ onInstalled: () => ... })`
92* Added `applyUpdate()` method to runtime
93* Absolute URLs can now be specified in `caches` as any other assets (they are required to be marked as `externals`)
94* Added basic test and Travis CI
95
96### 2.2.0
97
98* Disallow pattern matching in `externals`
99
100### 2.1.0
101
102* Allow pattern matching in `externals`
103
104### 2.0.0
105
106* Added `relativePaths` option. When `true`, all generated paths are relative to `ServiceWorker` file or `AppCache` folder. Useful in cases when app isn't in the root of domain, e.g. Github Pages. Setting `scope` to `''` (empty string) is the same now as `relativePaths: true`.
107* Added `excludes` option to exclude assets from caches. Exclusion is global and is performed before any assets added to cache sections.
108* Not specified sections in caches now equals to empty selection. Previously, `:rest:` keyword was added automatically, now isn't.
109* ':rest:' keyword is now handled after all caches sections were handled. Previously it was handled immediately when found.
110* Plugin now throws an error when keyword `:rest:` is used more than once.
111* `ServiceWorker` generation now used Child Compilation instead weird hacks with entry injections.
112
113### 1.3.1
114
115Improved `ServiceWorker` entry generation: use `compilation.namedChunks` instead of `compilation.assets` to access service-entry and replace it. See #10 for more details.
116
117### 1.3
118
119Added `FALLBACK` back section for `AppCache` and fixed generation of a `NETWORK` section.
120
121### 1.2
122
123Remove support of multi-stage caching from `AppCache`. Reason is that files cached in second manifest cannot be accessed from page cached by first one, since `NETWORK` section can only dictate to use _network_ (`*`) or _nothing_ (pretend offline), but not _fallback to browser defaults_. This means that any attempt to access files of second manifest goes to the network or fails immediately, instead of reading from cache.
124
125### 1.1
126
127Fix `ServiceWorker` login to not cache `additional`'s section assets on `activate` event, instead, cache them without blocking any events. Other `ServiceWorker` logic fixes.
128
129### 1.0
130
131Release