Skip to content

Commit 5e5439e

Browse files
authored
fix: Use node internal path / fs for store.ts (#1712)
1 parent a1be6e8 commit 5e5439e

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- [utils]: Use node internal `path` / `fs` for `store.ts`
6+
57
## 4.2.4
68

79
- [browser]: Use `withScope` in `Ember` integration instead of manual `pushPop/popScope` calls

packages/utils/src/fs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { mkdir, mkdirSync, readFile, statSync } from 'fs';
2-
import { dirname, resolve } from './path';
2+
import { dirname, resolve } from 'path';
33

44
const _0777 = parseInt('0777', 8);
55

packages/utils/src/store.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { existsSync, readFileSync, writeFileSync } from 'fs';
2+
import { dirname, join } from 'path';
23
import { mkdirpSync } from './fs';
3-
import { dirname, join } from './path';
44

55
/**
6+
* Note, this class is only compatible with Node.
67
* Lazily serializes data to a JSON file to persist. When created, it loads data
78
* from that file if it already exists.
89
*/

packages/utils/test/store.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from 'chai';
22
import * as fs from 'fs';
33
import * as os from 'os';
4-
import { join } from '../path';
4+
import { join } from 'path';
55

66
import { Store } from '../src/store';
77

0 commit comments

Comments
 (0)