@atlaspack/core 2.12.1-canary.3400 → 2.12.1-canary.3402

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,14 @@ function toFileSystemV3(fs) {
11
11
  canonicalize: (0, _jsCallable.jsCallable)(path => fs.realpathSync(path)),
12
12
  createDirectory: (0, _jsCallable.jsCallable)(path => fs.mkdirp(path)),
13
13
  cwd: (0, _jsCallable.jsCallable)(() => fs.cwd()),
14
- readFile: (0, _jsCallable.jsCallable)((path, encoding) => fs.readFileSync(path, encoding ?? 'utf8')),
14
+ readFile: (0, _jsCallable.jsCallable)((path, encoding) => {
15
+ if (!encoding) {
16
+ // $FlowFixMe
17
+ return [...fs.readFileSync(path)];
18
+ } else {
19
+ return fs.readFileSync(path, encoding);
20
+ }
21
+ }),
15
22
  isFile: path => {
16
23
  try {
17
24
  return fs.statSync(path).isFile();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/core",
3
- "version": "2.12.1-canary.3400+414fc639c",
3
+ "version": "2.12.1-canary.3402+8fb577a4c",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,20 +20,20 @@
20
20
  "check-ts": "tsc --noEmit index.d.ts"
21
21
  },
22
22
  "dependencies": {
23
- "@atlaspack/cache": "2.12.1-canary.3400+414fc639c",
24
- "@atlaspack/diagnostic": "2.12.1-canary.3400+414fc639c",
25
- "@atlaspack/events": "2.12.1-canary.3400+414fc639c",
26
- "@atlaspack/feature-flags": "2.12.1-canary.3400+414fc639c",
27
- "@atlaspack/fs": "2.12.1-canary.3400+414fc639c",
28
- "@atlaspack/graph": "3.2.1-canary.3400+414fc639c",
29
- "@atlaspack/logger": "2.12.1-canary.3400+414fc639c",
30
- "@atlaspack/package-manager": "2.12.1-canary.3400+414fc639c",
31
- "@atlaspack/plugin": "2.12.1-canary.3400+414fc639c",
32
- "@atlaspack/profiler": "2.12.1-canary.3400+414fc639c",
33
- "@atlaspack/rust": "2.12.1-canary.3400+414fc639c",
34
- "@atlaspack/types": "2.12.1-canary.3400+414fc639c",
35
- "@atlaspack/utils": "2.12.1-canary.3400+414fc639c",
36
- "@atlaspack/workers": "2.12.1-canary.3400+414fc639c",
23
+ "@atlaspack/cache": "2.12.1-canary.3402+8fb577a4c",
24
+ "@atlaspack/diagnostic": "2.12.1-canary.3402+8fb577a4c",
25
+ "@atlaspack/events": "2.12.1-canary.3402+8fb577a4c",
26
+ "@atlaspack/feature-flags": "2.12.1-canary.3402+8fb577a4c",
27
+ "@atlaspack/fs": "2.12.1-canary.3402+8fb577a4c",
28
+ "@atlaspack/graph": "3.2.1-canary.3402+8fb577a4c",
29
+ "@atlaspack/logger": "2.12.1-canary.3402+8fb577a4c",
30
+ "@atlaspack/package-manager": "2.12.1-canary.3402+8fb577a4c",
31
+ "@atlaspack/plugin": "2.12.1-canary.3402+8fb577a4c",
32
+ "@atlaspack/profiler": "2.12.1-canary.3402+8fb577a4c",
33
+ "@atlaspack/rust": "2.12.1-canary.3402+8fb577a4c",
34
+ "@atlaspack/types": "2.12.1-canary.3402+8fb577a4c",
35
+ "@atlaspack/utils": "2.12.1-canary.3402+8fb577a4c",
36
+ "@atlaspack/workers": "2.12.1-canary.3402+8fb577a4c",
37
37
  "@mischnic/json-sourcemap": "^0.1.0",
38
38
  "@parcel/source-map": "^2.1.1",
39
39
  "base-x": "^3.0.8",
@@ -55,5 +55,5 @@
55
55
  "browser": {
56
56
  "./src/serializerCore.js": "./src/serializerCore.browser.js"
57
57
  },
58
- "gitHead": "414fc639cce1e1392c3a69efae5f431f5e52c25b"
58
+ "gitHead": "8fb577a4c89f40de0c9e734abcbf31bec4011c90"
59
59
  }
@@ -15,9 +15,14 @@ export function toFileSystemV3(fs: ClassicFileSystem): FileSystem {
15
15
  canonicalize: jsCallable((path: FilePath) => fs.realpathSync(path)),
16
16
  createDirectory: jsCallable((path: FilePath) => fs.mkdirp(path)),
17
17
  cwd: jsCallable(() => fs.cwd()),
18
- readFile: jsCallable((path: string, encoding?: Encoding) =>
19
- fs.readFileSync(path, encoding ?? 'utf8'),
20
- ),
18
+ readFile: jsCallable((path: string, encoding?: Encoding) => {
19
+ if (!encoding) {
20
+ // $FlowFixMe
21
+ return [...fs.readFileSync(path)];
22
+ } else {
23
+ return fs.readFileSync(path, encoding);
24
+ }
25
+ }),
21
26
  isFile: (path: string) => {
22
27
  try {
23
28
  return fs.statSync(path).isFile();