@zenfs/core 1.0.3 → 1.0.4
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/dist/browser.min.js +5 -5
- package/dist/browser.min.js.map +4 -4
- package/eslint.shared.js +0 -4
- package/package.json +2 -3
- package/scripts/build.js +27 -24
package/eslint.shared.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* Shared eslint rules */
|
|
2
2
|
import eslint from '@eslint/js';
|
|
3
|
-
import stylistic from '@stylistic/eslint-plugin';
|
|
4
3
|
import globals from 'globals';
|
|
5
4
|
import tseslint from 'typescript-eslint';
|
|
6
5
|
|
|
@@ -14,12 +13,9 @@ export default [
|
|
|
14
13
|
ecmaVersion: 'latest',
|
|
15
14
|
sourceType: 'module',
|
|
16
15
|
},
|
|
17
|
-
plugins: { stylistic },
|
|
18
16
|
rules: {
|
|
19
17
|
'no-useless-escape': 'warn',
|
|
20
|
-
'stylistic/no-mixed-spaces-and-tabs': 'warn',
|
|
21
18
|
'no-unreachable': 'warn',
|
|
22
|
-
'stylistic/no-extra-semi': 'warn',
|
|
23
19
|
'no-fallthrough': 'warn',
|
|
24
20
|
'no-empty': 'warn',
|
|
25
21
|
'no-case-declarations': 'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenfs/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A filesystem, anywhere",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -66,12 +66,11 @@
|
|
|
66
66
|
"eventemitter3": "^5.0.1",
|
|
67
67
|
"minimatch": "^9.0.3",
|
|
68
68
|
"readable-stream": "^4.5.2",
|
|
69
|
-
"utilium": "^0.7.
|
|
69
|
+
"utilium": "^0.7.4"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@eslint/js": "^9.8.0",
|
|
73
73
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
74
|
-
"@stylistic/eslint-plugin": "^2.6.1",
|
|
75
74
|
"@types/eslint__js": "^8.42.3",
|
|
76
75
|
"esbuild": "^0.21.0",
|
|
77
76
|
"eslint": "^9.8.0",
|
package/scripts/build.js
CHANGED
|
@@ -20,11 +20,31 @@ const { watch, keep, quiet, globalName, entry } = parseArgs({
|
|
|
20
20
|
}).values;
|
|
21
21
|
|
|
22
22
|
async function exportsOf(name) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
return Object.keys(await import(name)).filter(key => key != 'default');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const plugins = [
|
|
27
|
+
{
|
|
28
|
+
name: 'tsc+counter',
|
|
29
|
+
setup({ onStart, onEnd }) {
|
|
30
|
+
onStart(start);
|
|
31
|
+
|
|
32
|
+
if (watch && !quiet) {
|
|
33
|
+
onEnd(() => console.log(`--------------- Built #${buildCount}`));
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
if (globalName != 'ZenFS') {
|
|
40
|
+
plugins.push(
|
|
41
|
+
globalExternals({
|
|
42
|
+
'@zenfs/core': {
|
|
43
|
+
varName: 'ZenFS',
|
|
44
|
+
namedExports: await exportsOf('@zenfs/core'),
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
);
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
function start() {
|
|
@@ -41,7 +61,7 @@ function start() {
|
|
|
41
61
|
|
|
42
62
|
const config = {
|
|
43
63
|
entryPoints: [entry || 'src/index.ts'],
|
|
44
|
-
target: '
|
|
64
|
+
target: 'es2021',
|
|
45
65
|
globalName,
|
|
46
66
|
outfile: 'dist/browser.min.js',
|
|
47
67
|
sourcemap: true,
|
|
@@ -49,24 +69,7 @@ const config = {
|
|
|
49
69
|
bundle: true,
|
|
50
70
|
minify: true,
|
|
51
71
|
platform: 'browser',
|
|
52
|
-
plugins
|
|
53
|
-
globalExternals({
|
|
54
|
-
'@zenfs/core': {
|
|
55
|
-
varName: 'ZenFS',
|
|
56
|
-
namedExports: await exportsOf('@zenfs/core'),
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
{
|
|
60
|
-
name: 'tsc+counter',
|
|
61
|
-
setup({ onStart, onEnd }) {
|
|
62
|
-
onStart(start);
|
|
63
|
-
|
|
64
|
-
if (watch && !quiet) {
|
|
65
|
-
onEnd(() => console.log(`--------------- Built #${buildCount}`));
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
72
|
+
plugins,
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
if (watch) {
|