@static-pages/core 7.0.0-alpha.0 → 7.0.0-alpha.1

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.
@@ -47,7 +47,7 @@ async function* createReader({ fs = node_fs_1.default, cwd = 'pages', pattern, i
47
47
  for (const filename of filenames) {
48
48
  try {
49
49
  const content = await new Promise((resolve, reject) => {
50
- fs.readFile((0, node_path_1.join)(cwd, filename), null, (err, data) => {
50
+ fs.readFile((0, node_path_1.join)(cwd, filename), (err, data) => {
51
51
  if (err)
52
52
  reject(err);
53
53
  else
package/cjs/helpers.d.ts CHANGED
@@ -20,14 +20,11 @@ export interface Filesystem {
20
20
  withFileTypes: true;
21
21
  recursive: boolean;
22
22
  }, callback: (err: Error | null, files: Dirent[]) => void): void;
23
- readFile(path: string | URL, options: {
24
- encoding: 'utf8';
25
- }, callback: (err: Error | null, data: string) => void): void;
26
- readFile(path: string | URL, options: null, callback: (err: Error | null, data: Uint8Array) => void): void;
27
23
  stat(path: string | URL, callback: (err: Error | null, stats: Stats) => void): void;
28
24
  mkdir(path: string | URL, options: {
29
25
  recursive: true;
30
26
  }, callback: (err: Error | null, path?: string) => void): void;
27
+ readFile(path: string | URL, callback: (err: Error | null, data: Uint8Array) => void): void;
31
28
  writeFile(path: string | URL, data: string | Uint8Array, callback: (err: Error | null) => void): void;
32
29
  }
33
30
  export declare const isFilesystem: (x: unknown) => x is Filesystem;
@@ -41,7 +41,7 @@ export async function* createReader({ fs = nodeFs, cwd = 'pages', pattern, ignor
41
41
  for (const filename of filenames) {
42
42
  try {
43
43
  const content = await new Promise((resolve, reject) => {
44
- fs.readFile(join(cwd, filename), null, (err, data) => {
44
+ fs.readFile(join(cwd, filename), (err, data) => {
45
45
  if (err)
46
46
  reject(err);
47
47
  else
package/esm/helpers.d.ts CHANGED
@@ -20,14 +20,11 @@ export interface Filesystem {
20
20
  withFileTypes: true;
21
21
  recursive: boolean;
22
22
  }, callback: (err: Error | null, files: Dirent[]) => void): void;
23
- readFile(path: string | URL, options: {
24
- encoding: 'utf8';
25
- }, callback: (err: Error | null, data: string) => void): void;
26
- readFile(path: string | URL, options: null, callback: (err: Error | null, data: Uint8Array) => void): void;
27
23
  stat(path: string | URL, callback: (err: Error | null, stats: Stats) => void): void;
28
24
  mkdir(path: string | URL, options: {
29
25
  recursive: true;
30
26
  }, callback: (err: Error | null, path?: string) => void): void;
27
+ readFile(path: string | URL, callback: (err: Error | null, data: Uint8Array) => void): void;
31
28
  writeFile(path: string | URL, data: string | Uint8Array, callback: (err: Error | null) => void): void;
32
29
  }
33
30
  export declare const isFilesystem: (x: unknown) => x is Filesystem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@static-pages/core",
3
- "version": "7.0.0-alpha.0",
3
+ "version": "7.0.0-alpha.1",
4
4
  "description": "General purpose static pages renderer.",
5
5
  "type": "module",
6
6
  "main": "cjs/index.js",