From f38e1d4e15edb999288d542bb4cc01a85ae17435 Mon Sep 17 00:00:00 2001 From: yanzheliu Date: Mon, 22 Mar 2021 21:08:50 +0800 Subject: [PATCH] fix(publish): fix The "path" argument must be of type string --- lib/publish.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/publish.js b/lib/publish.js index f8e0eafe11886..64b49ccb0638b 100644 --- a/lib/publish.js +++ b/lib/publish.js @@ -137,7 +137,10 @@ class Publish extends BaseCommand { publishConfigToOpts (publishConfig) { // create a new object that inherits from the config stack // then squash the css-case into camelCase opts, like we do - return flatten({...this.npm.config.list[0], ...publishConfig}) + + return flatten( + Object.assign(Object.create(this.npm.config.list[0]), publishConfig) + ) } } module.exports = Publish