Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update all deps and fix database schema #37

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

ya-woodcutter
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jun 24, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling af31115 on update-deps into 2721cfc on master.

@@ -1,7 +1,7 @@
{
"name": "unity-cache",
"version": "2.1.0",
"description": "Cache abstraction around localforage.",
"version": "2.2.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You updated node to major version. I think it should been updated to major.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node is used only in testing environment. I'm not sure about the major version.

"version": "2.1.0",
"description": "Cache abstraction around localforage.",
"version": "2.2.0",
"description": "Cache abstraction around Dexie.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

config: {},
db: null
db: null,
config: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's like a tree 🌲

stores = stores.reduce((result, storeName) => {
if (!RE_BIN.test(storeName)) {
throw new UnityCacheError(`Store names can only be alphanumeric, '${storeName}' given`);
}

result[storeName] = '&';
result[storeName] = '&key, value, expire';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove EXPIRE_BIN

const { db } = cacheInstance;
const expire = Date.now() + Number(ttl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number('fdfff') // NaN

I think it would be better to check its type before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to rewrite it to typescript. The check doesn't help at all.


const indexedDB = require('fake-indexeddb');
const FDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange');

window.Promise = global.Promise;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause Dexie uses Promise from window.

@ya-woodcutter ya-woodcutter merged commit 9dd55e4 into master Jun 25, 2019
@ya-woodcutter ya-woodcutter deleted the update-deps branch June 25, 2019 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants