Comments (5)
kvs/packages/storage/src/storage.ts
Lines 120 to 131 in 7b4953e
Maybe, we need to write version to storage.
TODO
- Add tests
- Fix storage implementation
from kvs.
Can you provide reproduce example?
browser:
(async () => {
const { kvsEnvStorage } = await import("https://cdn.skypack.dev/@kvs/[email protected]");
const storage = await kvsEnvStorage({
name: "database-name",
version: 2,
async upgrade({ kvs, oldVersion, newVersion }) {
console.log({
oldVersion, // 0
newVersion // 2
});
}
});
})();
node:
https://replit.com/@azu2/kvs-env-new-version?v=1#index.js
from kvs.
It is reproducible it in your node replit example. Check ~/kvs-env-new-version/.cache/kvs-node-localstorage/database-name.__.__kvs_version__
. Version is always 1
, regardless of the version in the app.
from kvs.
Another example:
https://replit.com/@Kalabasa-/kvs-env-new-version#index.js
from kvs.
Fixed in https://github.com/azu/kvs/releases/tag/v2.1.3
from kvs.
Related Issues (20)
- ES5 Version HOT 1
- CI: codesandbox
- Can not use { [index:string]: User } schema? HOT 2
- Safari 14 is hanged on opening IndexedDB
- Iterating a specific kvsEnvStorage returns all key-value pairs for all databases HOT 5
- codesandbox example is broken HOT 2
- IndexedDB: remove debug option
- Change `target` to `es2018`
- get function returns JsonValue that needs to be re-cast every time HOT 3
- Add release script
- Uncaught TypeError: Failed to resolve module specifier "@kvs/env". Relative references must start with either "/", "./", or "../". HOT 2
- Karma is deprecated HOT 2
- Possibility to configure quota with node-localstorage? HOT 1
- Store files as value?
- Document: types
- table(store) is not generated in indexeddb.
- Sync Version
- document: support env HOT 1
- first upgrade: 0 → 1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvs.