ioredis 4.27.3 → 4.27.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/Changelog.md +7 -0
- package/built/command.js +1 -1
- package/built/commander.js +2 -4
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [4.27.4](https://github.com/luin/ioredis/compare/v4.27.3...v4.27.4) (2021-06-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Performance Improvements
|
|
5
|
+
|
|
6
|
+
* Serialize error stack only when needed ([#1359](https://github.com/luin/ioredis/issues/1359)) ([62b6a64](https://github.com/luin/ioredis/commit/62b6a648910eccc3d83a3acd2db873704fd2080a))
|
|
7
|
+
|
|
1
8
|
## [4.27.3](https://github.com/luin/ioredis/compare/v4.27.2...v4.27.3) (2021-05-22)
|
|
2
9
|
|
|
3
10
|
|
package/built/command.js
CHANGED
|
@@ -101,7 +101,7 @@ class Command {
|
|
|
101
101
|
this.resolve = this._convertValue(resolve);
|
|
102
102
|
if (this.errorStack) {
|
|
103
103
|
this.reject = (err) => {
|
|
104
|
-
reject(utils_1.optimizeErrorStack(err, this.errorStack, __dirname));
|
|
104
|
+
reject(utils_1.optimizeErrorStack(err, this.errorStack.stack, __dirname));
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
else {
|
package/built/commander.js
CHANGED
|
@@ -110,9 +110,7 @@ function generateFunction(functionName, _commandName, _encoding) {
|
|
|
110
110
|
callback = undefined;
|
|
111
111
|
}
|
|
112
112
|
const options = {
|
|
113
|
-
errorStack: this.options.showFriendlyErrorStack
|
|
114
|
-
? new Error().stack
|
|
115
|
-
: undefined,
|
|
113
|
+
errorStack: this.options.showFriendlyErrorStack ? new Error() : undefined,
|
|
116
114
|
keyPrefix: this.options.keyPrefix,
|
|
117
115
|
replyEncoding: _encoding,
|
|
118
116
|
};
|
|
@@ -153,7 +151,7 @@ function generateScriptingFunction(functionName, commandName, script, encoding)
|
|
|
153
151
|
options = { replyEncoding: encoding };
|
|
154
152
|
}
|
|
155
153
|
if (this.options.showFriendlyErrorStack) {
|
|
156
|
-
options.errorStack = new Error()
|
|
154
|
+
options.errorStack = new Error();
|
|
157
155
|
}
|
|
158
156
|
// No auto pipeline, use regular command sending
|
|
159
157
|
if (!autoPipelining_1.shouldUseAutoPipelining(this, functionName, commandName)) {
|