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

Add Filer.fs to support creating a filesystem like node.js #651

Merged
merged 2 commits into from
Jan 3, 2019

Conversation

humphd
Copy link
Contributor

@humphd humphd commented Jan 3, 2019

To be more in sync with how node.js works, this adds Filer.fs, which lazily creates a filesystem instance. It also adds Filer.path to match what node devs would expect, and allows users to do the following:

const { fs, Buffer, path } = require('filer');

I have kept Filer.Path to not break the API, but we could remove it later if we wanted.

I also spotted a stray WebSQL reference in the tests, which this also removes.

@codecov-io
Copy link

codecov-io commented Jan 3, 2019

Codecov Report

Merging #651 into master will decrease coverage by 0.06%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #651      +/-   ##
==========================================
- Coverage    86.6%   86.54%   -0.07%     
==========================================
  Files          17       17              
  Lines        1740     1746       +6     
==========================================
+ Hits         1507     1511       +4     
- Misses        233      235       +2
Impacted Files Coverage Δ
src/index.js 57.14% <57.14%> (-42.86%) ⬇️
src/filesystem/interface.js 93.52% <0%> (+0.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85a8c21...7ada0d6. Read the comment docs.

@humphd
Copy link
Contributor Author

humphd commented Jan 3, 2019

NOTE: the lower coverage on src/index.js is because we can't run this in our current coverage environment (node) because it depends on indexeddb--it's fine.

@humphd humphd merged commit f4ff2e9 into filerjs:master Jan 3, 2019
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.

2 participants