Skip to content

Commit

Permalink
Include core-js by default to make it work more easily in old environ…
Browse files Browse the repository at this point in the history
…ments like PhantomJS - fixes #19
  • Loading branch information
dumbmatter committed May 1, 2017
1 parent b469b75 commit e048de1
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.0.2 (2017-05-01)

* Include core-js by default to make it work more easily in old environments like PhantomJS

# 2.0.1 (2017-04-29)

* Minor updates to README
Expand Down
10 changes: 10 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# binary tree

write tests for RecordStore, including benchmarks

implement

balance?

---

revisit setImmediate
- *-exception-order race condition
- on some it's not even a race condition, like idbcursor ones seem to always fail, but idbobjectstore ones are intermittent
Expand Down
1 change: 1 addition & 0 deletions lib/FDBCursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBCursor").default;
1 change: 1 addition & 0 deletions lib/FDBCursorWithValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBCursorWithValue").default;
1 change: 1 addition & 0 deletions lib/FDBDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBDatabase").default;
1 change: 1 addition & 0 deletions lib/FDBFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBFactory").default;
1 change: 1 addition & 0 deletions lib/FDBIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBIndex").default;
1 change: 1 addition & 0 deletions lib/FDBKeyRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBKeyRange").default;
1 change: 1 addition & 0 deletions lib/FDBObjectStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBObjectStore").default;
1 change: 1 addition & 0 deletions lib/FDBOpenDBRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBOpenDBRequest").default;
1 change: 1 addition & 0 deletions lib/FDBRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBRequest").default;
1 change: 1 addition & 0 deletions lib/FDBTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBTransaction").default;
1 change: 1 addition & 0 deletions lib/FDBVersionChangeEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// <https://github.com/Microsoft/TypeScript/issues/2719> and <http://stackoverflow.com/q/30302747/786644>. It should not
// be used internally, only externally.

require("core-js");
module.exports = require("../build/FDBVersionChangeEvent").default;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"lib"
],
"dependencies": {
"core-js": "^2.4.1",
"realistic-structured-clone": "^1.0.1",
"setimmediate": "^1.0.5"
},
"devDependencies": {
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.13",
"babel-polyfill": "^6.23.0",
"browserify": "^14.0.0",
"mocha": "^3.2.0",
"node-qunit-phantomjs": "^1.5.0",
Expand Down
1 change: 1 addition & 0 deletions src/global.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "core-js";
import fakeIndexedDB from "./fakeIndexedDB";
import FDBCursor from "./FDBCursor";
import FDBCursorWithValue from "./FDBCursorWithValue";
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "core-js";
import fakeIndexedDB from "./fakeIndexedDB";

module.exports = fakeIndexedDB;
1 change: 0 additions & 1 deletion src/test/indexedDBmock/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<div id="qunit-fixture"></div>

<script src="../../../node_modules/qunitjs/qunit/qunit.js" type="text/javascript"></script>
<script src="../../../node_modules/babel-polyfill/dist/polyfill.js" type="text/javascript"></script>
<script src="exports-qunit-bundle.js" type="text/javascript"></script>
<script src="setup.js" type="text/javascript"></script>
<script src="database.js" type="text/javascript"></script>
Expand Down

0 comments on commit e048de1

Please sign in to comment.