@themartiancompany/opfs 2.0.10 → 2.0.11

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.
package/fs-worker CHANGED
@@ -2,18 +2,20 @@
2
2
 
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
- /** ----------------------------------------------------------------------
5
+ /** ----------------------------------------------------------------
6
+ * fs-worker
7
+ * ----------------------------------------------------------------
6
8
  * Copyright ©
7
9
  * Pellegrino Prevete
8
- * 2025, 2026
10
+ * 2024, 2025, 2026
9
11
  *
10
12
  * All rights reserved
11
- * ----------------------------------------------------------------------
13
+ * ----------------------------------------------------------------
12
14
  *
13
- * This program is free software: you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation, either version 3 of the License, or
16
- * (at your option) any later version.
15
+ * This program is free software: you can redistribute it and/or
16
+ * modify it under the terms of the GNU General Public License as
17
+ * published by the Free Software Foundation, either version 3 of
18
+ * the License, or (at your option) any later version.
17
19
  *
18
20
  * This program is distributed in the hope that it will be useful,
19
21
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,12 +23,14 @@
21
23
  * GNU General Public License for more details.
22
24
  *
23
25
  * You should have received a copy of the GNU General Public License
24
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
26
+ * along with this program.
27
+ * If not, see <https://www.gnu.org/licenses/>.
25
28
  */
26
29
 
27
30
  const
28
31
  _fs =
29
- require("opfs");
32
+ require(
33
+ "opfs");
30
34
  _sync_agent =
31
35
  _fs.startSyncAgent;
32
36
 
@@ -1,3 +1,30 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /** ----------------------------------------------------------------
4
+ * fs-worker.webpack.config.cjs
5
+ * ----------------------------------------------------------------
6
+ * Copyright ©
7
+ * Pellegrino Prevete
8
+ * 2025, 2026
9
+ *
10
+ * All rights reserved
11
+ * ----------------------------------------------------------------
12
+ *
13
+ * This program is free software: you can redistribute it and/or
14
+ * modify it under the terms of the GNU General Public License as
15
+ * published by the Free Software Foundation, either version 3 of
16
+ * the License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU General Public
24
+ * License along with this program.
25
+ * If not, see <https://www.gnu.org/licenses/>.
26
+ */
27
+
1
28
  const
2
29
  _path =
3
30
  require(
@@ -19,6 +46,21 @@ const
19
46
  filename:
20
47
  _output_file_name
21
48
  };
49
+ const
50
+ _node_fs_ignore =
51
+ { resourceRegExp:
52
+ /^node:fs_process$/ };
53
+ const
54
+ _webpack =
55
+ require(
56
+ "webpack");
57
+ const
58
+ _ignore_plugin =
59
+ _webpack.IgnorePlugin;
60
+ const
61
+ _node_fs_ignore_plugin =
62
+ new _ignore_plugin(
63
+ _node_fs_ignore);
22
64
  const
23
65
  _input_file =
24
66
  `./${_input_file_name}`;
@@ -32,8 +74,12 @@ module.exports = {
32
74
  },
33
75
  resolve: {
34
76
  fallback: {
35
- "fs":
77
+ "node:fs":
36
78
  false,
79
+ "fs":
80
+ _path.resolve(
81
+ __dirname,
82
+ 'node_modules/fs/fs'),
37
83
  "opfs":
38
84
  _path.resolve(
39
85
  __dirname,
@@ -45,5 +91,8 @@ module.exports = {
45
91
  __dirname,
46
92
  'node_modules/@std/path/mod.js'),
47
93
  }
48
- }
94
+ },
95
+ plugins: [
96
+ _node_fs_ignore_plugin,
97
+ ]
49
98
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description":
5
5
  "Browser-compatible (OPFS) Node/Deno 'fs' module.",
6
6
  "version":
7
- "2.0.10",
7
+ "2.0.11",
8
8
  "homepage":
9
9
  "https://github.com/themartiancompany/opfs",
10
10
  "license":
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@eslint/js":
78
- "^9.32.0",
78
+ "^10.0.1",
79
79
  "eslint":
80
80
  "^10.3.0",
81
81
  "webpack":