Skip to content

4.0.0

Compare
Choose a tag to compare
@1999 1999 released this 05 Mar 09:54
· 68 commits to master since this release

A huge work has been done to support library in all major browsers. Now Sklad supports stable versions of Chrome, Firefox, IE11 in Win8/10, Microsoft Edge, Safari9 desktop/mobile and Android browser. All tests run in SauceLabs platform for continuous integration through TravisCI. Special thanks goes to Paul Kilmurray, you're the man!

Short list of changes:

  • breaking change: promises now reject with Error instances, not DOMError. The reason for this is that interface is supported only in Firefox/Chrome. If you checked name field of err to understand what kind of error occured, nothing changes for you (related commit)
  • new: support for IE11 and Microsoft Edge introduced
  • new: support for Safari9 introduced
  • new: support for Firefox introduced
  • I got rid of separate Makefile and now all targets are described inside package.json which is more natural to Javascript project (related commit)

Check this PR if you want to see all changes: https://github.com/1999/sklad/pull/15/files

IE support

sklad is now working in IE11 and Microsoft Edge browsers. Still there is one browser bug which cannot be fixed inside library: both IE11 and Edge don't support multiEntry indexes (more info). Other library features like working with data, upgrading database and others work as expected. An absence of autoIncrement field in IDBObjectStore (both IE11 and Edge) is patched inside library (related commit, bug).

IE11 is missing support for native Promise, so you should add some. I was using promise-polyfill inside my tests mostly because it's simple and doesn't replace native Promise with its own implementation.

Safari9 support

Safari8 IndexedDB implementation is buggy and is not available to be replaced/shimmed with indexeddbshim so I had to give up on its support. Still IndexedDB implementation in Safari9 is quite okay and sklad is now working in these browsers (desktop/mobile). Still there are some browser bugs which you should keep in mind:

  • Safari doesn't throw ConstraintErrors for unique keys (link, test)
  • Safari doesn't expose existing indexes in 2+ upgradeneeded (link). So you can't use indexNames of object store inside versionchange transaction.

Safari also fails to work with multiple object stores inside one transaction, but I made a patch for this inside sklad library (related commit).

Firefox support

Tests are now passing in Firefox.