Skip to content

Commit be8c006

Browse files
committed
fix(build): fix release-it using npm publish instead of yarn npm publish
1 parent dcf5caa commit be8c006

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"react-test-renderer": "16.13.1",
4040
"react-native-webview": "11.0.0",
4141
"@release-it/conventional-changelog": "patch:@release-it/[email protected]#patches/@release-it-conventional-changelog.patch",
42-
"release-it": "14.3.0"
42+
"release-it": "patch:release-it@14.3.0#patches/release-it.patch"
4343
},
4444
"author": "Jules Sam. Randolph <[email protected]> (https://github.com/jsamr)",
4545
"license": "MIT",

patches/release-it.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lib/plugin/npm/npm.js b/lib/plugin/npm/npm.js
2+
index 12a28d26db8d78fa7ce011d8d201668fb21b8f97..65be3f3bd7fb370cf95cee794c288ded15149558 100644
3+
--- a/lib/plugin/npm/npm.js
4+
+++ b/lib/plugin/npm/npm.js
5+
@@ -229,7 +229,7 @@ class npm extends Plugin {
6+
this.log.warn('Skip publish: package is private.');
7+
return false;
8+
}
9+
- return this.exec(`npm publish ${publishPath} --tag ${tag} ${otpArg} ${dryRunArg}`, { options })
10+
+ return (this.config.isDryRun ? this.exec(`npm publish ${publishPath} --tag ${tag} ${otpArg} ${dryRunArg}`, { options }) : this.exec(`yarn npm publish --tag ${tag}`, { options }))
11+
.then(() => {
12+
this.setContext({ isReleased: true });
13+
})

yarn.lock

+39-1
Original file line numberDiff line numberDiff line change
@@ -15286,7 +15286,7 @@ fsevents@^1.2.7:
1528615286
languageName: unknown
1528715287
linkType: soft
1528815288

15289-
"release-it@npm:14.3.0":
15289+
1529015290
version: 14.3.0
1529115291
resolution: "release-it@npm:14.3.0"
1529215292
dependencies:
@@ -15324,6 +15324,44 @@ fsevents@^1.2.7:
1532415324
languageName: node
1532515325
linkType: hard
1532615326

15327+
"release-it@patch:[email protected]#patches/release-it.patch::locator=plugins-project%40workspace%3A.":
15328+
version: 14.3.0
15329+
resolution: "release-it@patch:release-it@npm%3A14.3.0#patches/release-it.patch::version=14.3.0&hash=915f03&locator=plugins-project%40workspace%3A."
15330+
dependencies:
15331+
"@iarna/toml": 2.2.5
15332+
"@octokit/rest": 18.0.14
15333+
async-retry: 1.3.1
15334+
chalk: 4.1.0
15335+
cosmiconfig: 7.0.0
15336+
debug: 4.3.1
15337+
deprecated-obj: 2.0.0
15338+
execa: 5.0.0
15339+
find-up: 5.0.0
15340+
form-data: 3.0.0
15341+
git-url-parse: 11.4.3
15342+
globby: 11.0.2
15343+
got: 11.8.1
15344+
import-cwd: 3.0.0
15345+
inquirer: 7.3.3
15346+
is-ci: 2.0.0
15347+
lodash: 4.17.20
15348+
mime-types: 2.1.28
15349+
ora: 5.3.0
15350+
os-name: 4.0.0
15351+
parse-json: 5.2.0
15352+
semver: 7.3.4
15353+
shelljs: 0.8.4
15354+
update-notifier: 5.0.1
15355+
url-join: 4.0.1
15356+
uuid: 8.3.2
15357+
yaml: 1.10.0
15358+
yargs-parser: 20.2.4
15359+
bin:
15360+
release-it: bin/release-it.js
15361+
checksum: 42a5d8423c58cc1b129d058dbf21c307f8c22babe29c42b65150da1adfcdade5c8ea778ee3c830b49ec8033c06006e296557690b169ae7c66af09a0591fdf090
15362+
languageName: node
15363+
linkType: hard
15364+
1532715365
"remove-trailing-separator@npm:^1.0.1":
1532815366
version: 1.1.0
1532915367
resolution: "remove-trailing-separator@npm:1.1.0"

0 commit comments

Comments
 (0)