UNPKG

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