@netflix/nerror 1.1.2 → 1.1.3

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 CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="1.1.3"></a>
2
+ ### 1.1.3 (2019-11-27)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * **nerror:** don't call extsprintf if single string passed to VError constructor (#11) ([89b2088b](https://github.com/Netflix/nerror/commit/89b2088b))
8
+
9
+
1
10
  <a name="1.1.2"></a>
2
11
  ### 1.1.2 (2019-07-26)
3
12
 
package/lib/verror.js CHANGED
@@ -134,7 +134,10 @@ function parseConstructorArguments(args) {
134
134
 
135
135
  if (sprintf_args.length === 0) {
136
136
  shortmessage = '';
137
- } else if (options.skipPrintf) {
137
+ } else if (
138
+ options.skipPrintf ||
139
+ (sprintf_args.length === 1 && typeof sprintf_args[0] === 'string')
140
+ ) {
138
141
  assert.equal(
139
142
  sprintf_args.length,
140
143
  1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netflix/nerror",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "main": "lib/index.js",
5
5
  "description": "Rich errors",
6
6
  "homepage": "https://github.com/Netflix/nerror",