Skip to content

Commit

Permalink
Merge pull request #662 from localForage/release-1.5
Browse files Browse the repository at this point in the history
Release 1.5
  • Loading branch information
tofumatt committed Feb 18, 2017
2 parents f524ed5 + d50d845 commit e09ee39
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,9 @@
This file will include all API breakage, new features, and upgrade info in
localForage's lifetime.

### [1.5](https://github.com/mozilla/localForage/releases/tag/1.5.0)
* **Major storage engine change for Safari**: We now use IndexedDB as the storage engine for Saferi v10.1 (and above). This means sites using localForage for data storage with users using Safari `< 10.1` will experience "data loss". In fact no data is lost but the engine will change so localForage will seem empty. You can still force a connection to WebSQL using [localForage's config](https://localforage.github.io/localForage/#settings-api-setdriver) to either keep using your existing WebSQL database or migrate to IndexedDB.

### [1.4.2](https://github.com/mozilla/localForage/releases/tag/1.4.2)
* Fixes #562.

Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Expand Up @@ -16,7 +16,7 @@ module.exports = exports = function(grunt) {
' localForage -- Offline Storage, Improved\n' +
' Version ' + grunt.file.readJSON('package.json').version + '\n' +
' https://localforage.github.io/localForage\n' +
' (c) 2013-2016 Mozilla, Apache License 2.0\n' +
' (c) 2013-2017 Mozilla, Apache License 2.0\n' +
'*/\n';

var babelModuleIdProvider = function getModuleId(moduleName) {
Expand Down
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -50,6 +50,10 @@ is usually online from 8am-8pm GMT (London Time).

[tofumatt]: http://tofumatt.com/

## Safari 10.1+

Since Safari 10.1 we default to IndexedDB; see the [CHANGELOG](https://github.com/localForage/localForage/blob/master/CHANGELOG.md) for more info.

# How to use localForage

## Callbacks vs Promises
Expand All @@ -58,7 +62,7 @@ Because localForage uses async storage, it has an async API.
It's otherwise exactly the same as the
[localStorage API](https://hacks.mozilla.org/2009/06/localstorage/).

localForage has a dual API that allows you to either use Node-style callbacks
localForage has a dual API that allows you to either use Node-style callbacks
or [Promises](https://www.promisejs.org/). If you are unsure which one is right for you, it's recommended to use Promises.

Here's an example of the Node-style callback form:
Expand All @@ -67,7 +71,7 @@ Here's an example of the Node-style callback form:
localforage.setItem('key', 'value', function (err) {
// if err is non-null, we got an error
localforage.getItem('key', function (err, value) {
// if err is non-null, we got an error. otherwise, value is the value
// if err is non-null, we got an error. otherwise, value is the value
});
});
```
Expand All @@ -84,7 +88,7 @@ localforage.setItem('key', 'value').then(function () {
});
```

For more examples, please visit [the API docs](https://localforage.github.io/localForage).
For more examples, please visit [the API docs](https://localforage.github.io/localForage).

## Storing Blobs, TypedArrays, and other JS objects

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -25,5 +25,5 @@
"assert": "~0.1.0",
"modernizr": "~2.8.1"
},
"version": "1.4.3"
"version": "1.5.0"
}
2 changes: 1 addition & 1 deletion component.json
@@ -1,6 +1,6 @@
{
"name": "localforage",
"version": "1.4.3",
"version": "1.5.0",
"dependencies": {
"then/promise": "5.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions dist/localforage.js
@@ -1,8 +1,8 @@
/*!
localForage -- Offline Storage, Improved
Version 1.4.3
Version 1.5.0
https://localforage.github.io/localForage
(c) 2013-2016 Mozilla, Apache License 2.0
(c) 2013-2017 Mozilla, Apache License 2.0
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
(function (global){
Expand Down Expand Up @@ -343,7 +343,7 @@ if (typeof global.Promise !== 'function') {
},{"2":2}],4:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

Expand Down
6 changes: 3 additions & 3 deletions dist/localforage.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/localforage.nopromises.js
@@ -1,13 +1,13 @@
/*!
localForage -- Offline Storage, Improved
Version 1.4.3
Version 1.5.0
https://localforage.github.io/localForage
(c) 2013-2016 Mozilla, Apache License 2.0
(c) 2013-2017 Mozilla, Apache License 2.0
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

Expand Down
6 changes: 3 additions & 3 deletions dist/localforage.nopromises.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"storage",
"websql"
],
"version": "1.4.3",
"version": "1.5.0",
"homepage": "https://github.com/localForage/localForage",
"repository": {
"type": "git",
Expand Down

0 comments on commit e09ee39

Please sign in to comment.