@fireproof/core 0.7.0-alpha.2 → 0.7.0-alpha.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import { mkdir, writeFile } from 'fs/promises';
1
+ // import { mkdir, writeFile } from 'fs/promises'
2
2
  import { join, dirname } from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { Base } from './base.js';
@@ -62,7 +62,7 @@ function loadSync(filename) {
62
62
  }
63
63
  }
64
64
  async function writeSync(fullpath, stringValue) {
65
- await mkdir(dirname(fullpath), { recursive: true });
65
+ await fs.promises.mkdir(dirname(fullpath), { recursive: true });
66
66
  // writeFileSync(fullpath, stringValue)
67
- await writeFile(fullpath, stringValue);
67
+ await fs.promises.writeFile(fullpath, stringValue);
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/core",
3
- "version": "0.7.0-alpha.2",
3
+ "version": "0.7.0-alpha.4",
4
4
  "description": "Live data for React, accelerated by proofs, powered by IPFS",
5
5
  "main": "dist/src/fireproof.js",
6
6
  "module": "dist/src/fireproof.mjs",
@@ -1,5 +1,5 @@
1
1
 
2
- import { mkdir, writeFile } from 'fs/promises'
2
+ // import { mkdir, writeFile } from 'fs/promises'
3
3
  import { join, dirname } from 'path'
4
4
  import { homedir } from 'os'
5
5
  import { Base } from './base.js'
@@ -68,7 +68,7 @@ function loadSync (filename) {
68
68
  }
69
69
 
70
70
  async function writeSync (fullpath, stringValue) {
71
- await mkdir(dirname(fullpath), { recursive: true })
71
+ await fs.promises.mkdir(dirname(fullpath), { recursive: true })
72
72
  // writeFileSync(fullpath, stringValue)
73
- await writeFile(fullpath, stringValue)
73
+ await fs.promises.writeFile(fullpath, stringValue)
74
74
  }