@yao-pkg/pkg 6.0.1 → 6.1.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.
- package/package.json +4 -4
- package/prelude/bootstrap.js +6 -2
- package/prelude/diagnostic.js +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yao-pkg/pkg",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Package your Node.js project into an executable",
|
|
5
5
|
"main": "lib-es5/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@babel/generator": "^7.23.0",
|
|
26
26
|
"@babel/parser": "^7.23.0",
|
|
27
27
|
"@babel/types": "^7.23.0",
|
|
28
|
-
"@yao-pkg/pkg-fetch": "3.5.
|
|
28
|
+
"@yao-pkg/pkg-fetch": "3.5.17",
|
|
29
29
|
"into-stream": "^6.0.0",
|
|
30
30
|
"minimist": "^1.2.6",
|
|
31
31
|
"multistream": "^4.1.0",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"eslint-config-prettier": "^9.0.0",
|
|
61
61
|
"eslint-plugin-import": "^2.28.1",
|
|
62
62
|
"json-stable-stringify": "^1.0.1",
|
|
63
|
-
"lint-staged": "^
|
|
63
|
+
"lint-staged": "^15.2.10",
|
|
64
64
|
"prettier": "^3.0.3",
|
|
65
65
|
"release-it": "^16.2.1",
|
|
66
66
|
"rimraf": "^3.0.2",
|
|
67
|
-
"simple-git-hooks": "
|
|
67
|
+
"simple-git-hooks": "^2.11.1",
|
|
68
68
|
"typescript": "^4.7.2"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
package/prelude/bootstrap.js
CHANGED
|
@@ -1722,12 +1722,16 @@ function payloadFileSync(pointer) {
|
|
|
1722
1722
|
fs.promises.stat = util.promisify(fs.stat);
|
|
1723
1723
|
fs.promises.lstat = util.promisify(fs.lstat);
|
|
1724
1724
|
|
|
1725
|
-
/*
|
|
1726
1725
|
fs.promises.read = util.promisify(fs.read);
|
|
1727
1726
|
fs.promises.realpath = util.promisify(fs.realpath);
|
|
1728
1727
|
fs.promises.fstat = util.promisify(fs.fstat);
|
|
1728
|
+
fs.promises.statfs = util.promisify(fs.fstat);
|
|
1729
1729
|
fs.promises.access = util.promisify(fs.access);
|
|
1730
|
-
|
|
1730
|
+
|
|
1731
|
+
// TODO: all promises methods that try to edit files in snapshot should throw
|
|
1732
|
+
// TODO implement missing methods
|
|
1733
|
+
// fs.promises.readlink ?
|
|
1734
|
+
// fs.promises.opendir ?
|
|
1731
1735
|
}
|
|
1732
1736
|
|
|
1733
1737
|
// ///////////////////////////////////////////////////////////////
|
package/prelude/diagnostic.js
CHANGED
|
@@ -80,7 +80,7 @@ function humanSize(bytes) {
|
|
|
80
80
|
return totalSize;
|
|
81
81
|
}
|
|
82
82
|
function wrap(obj, name) {
|
|
83
|
-
const f =
|
|
83
|
+
const f = obj[name];
|
|
84
84
|
obj[name] = (...args) => {
|
|
85
85
|
const args1 = Object.values(args);
|
|
86
86
|
console.log(
|
|
@@ -111,6 +111,7 @@ function humanSize(bytes) {
|
|
|
111
111
|
wrap(fs, 'open');
|
|
112
112
|
wrap(fs, 'readSync');
|
|
113
113
|
wrap(fs, 'read');
|
|
114
|
+
wrap(fs, 'readFile');
|
|
114
115
|
wrap(fs, 'writeSync');
|
|
115
116
|
wrap(fs, 'write');
|
|
116
117
|
wrap(fs, 'closeSync');
|
|
@@ -131,6 +132,18 @@ function humanSize(bytes) {
|
|
|
131
132
|
wrap(fs, 'exists');
|
|
132
133
|
wrap(fs, 'accessSync');
|
|
133
134
|
wrap(fs, 'access');
|
|
135
|
+
|
|
136
|
+
wrap(fs.promises, 'open');
|
|
137
|
+
wrap(fs.promises, 'read');
|
|
138
|
+
wrap(fs.promises, 'readFile');
|
|
139
|
+
wrap(fs.promises, 'write');
|
|
140
|
+
wrap(fs.promises, 'readdir');
|
|
141
|
+
wrap(fs.promises, 'realpath');
|
|
142
|
+
wrap(fs.promises, 'stat');
|
|
143
|
+
wrap(fs.promises, 'lstat');
|
|
144
|
+
wrap(fs.promises, 'fstat');
|
|
145
|
+
wrap(fs.promises, 'access');
|
|
146
|
+
wrap(fs.promises, 'copyFile');
|
|
134
147
|
}
|
|
135
148
|
}
|
|
136
149
|
})();
|