Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyush Rawal <royalrawal.2001@gmail.com>2021-09-11 11:06:09 +0300
committerGar <gar+gh@danger.computer>2021-09-15 00:07:34 +0300
commitb807cd62eabe337e3243415c9870ea36d9289e12 (patch)
treecb54fb077bd4fd016bcb844db98d2eb58f19a6ec /lib/search
parentb4aac345b0a7cdec4d713c5be4daea37330b2b26 (diff)
fix(search): return valid json for no results
PR-URL: https://github.com/npm/cli/pull/3738 Credit: @AyushRawal Close: #3738 Reviewed-by: @wraithgar
Diffstat (limited to 'lib/search')
-rw-r--r--lib/search/format-package-stream.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/search/format-package-stream.js b/lib/search/format-package-stream.js
index c88df5eb4..fb7d81856 100644
--- a/lib/search/format-package-stream.js
+++ b/lib/search/format-package-stream.js
@@ -42,7 +42,7 @@ class JSONOutputStream extends Minipass {
}
end () {
- super.write(this._didFirst ? ']\n' : '\n]\n')
+ super.write(this._didFirst ? ']\n' : '\n[]\n')
super.end()
}
}