isomorphic-git / lightning-fs

A lean and fast 'fs' for the browser
MIT License
477 stars 47 forks source link

Update README.md #17

Closed billiegoose closed 5 years ago

billiegoose commented 5 years ago

close #16

@hsablonniere What do you think? Would this warning have been enough to save you from the issue you ran into? I'd be happy to change the appearance (make it red? highlight it?) or wording, or consider more technical solutions.

The main issue with a technical solution, is really it's 100% OK to create multiple instances using the same IndexedDB store as long as they aren't being used at the same time. For instance, one might have a "Wipe FS" button that performs:

fs = new FS('cool-app')

$('#wipeButton').on('click', () => {
  fs = new FS('cool-app', {wipe: true})
})

(whoa.... it felt weird to write jQuery-esque code. I've been in React-world too long.)

Or another realistic scenario is running fs = new FS('test', {wipe: true}) for each test in a test suite, but then the tests run in serial and the fs variable gets garbage collected between tests.

isomorphic-git-bot commented 5 years ago

:tada: This PR is included in version 3.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: