From 32daad92dbf600aad14dc320dbddd6368c2010db Mon Sep 17 00:00:00 2001 From: Maia Teegarden Date: Thu, 12 Aug 2021 17:12:37 -0700 Subject: [PATCH 1/3] Publish native packages publicly --- scripts/publish-native.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/publish-native.js b/scripts/publish-native.js index 07190f13ff3fe27..a46bdf171af000a 100755 --- a/scripts/publish-native.js +++ b/scripts/publish-native.js @@ -33,9 +33,10 @@ const cwd = process.cwd() JSON.stringify(pkg, null, 2) ) execSync( - `npm publish ${path.join(nativePackagesDir, platform)}${ - gitref.includes('canary') ? ' --tag canary' : '' - }` + `npm publish ${path.join( + nativePackagesDir, + platform + )} --access public ${gitref.includes('canary') ? ' --tag canary' : ''}` ) // lerna publish in next step will fail if git status is not clean execSync( From 6fdd2785da9a403d49729621151e48164839fa0d Mon Sep 17 00:00:00 2001 From: Maia Teegarden Date: Thu, 12 Aug 2021 17:13:30 -0700 Subject: [PATCH 2/3] Remove unnecessary await --- scripts/publish-native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish-native.js b/scripts/publish-native.js index a46bdf171af000a..2cf276466fd4d09 100755 --- a/scripts/publish-native.js +++ b/scripts/publish-native.js @@ -15,7 +15,7 @@ const cwd = process.cwd() // Copy binaries to package folders, update version, and publish let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm') - let platforms = await (await readdir(nativePackagesDir)).filter( + let platforms = await readdir(nativePackagesDir).filter( (name) => name !== '.gitignore' ) for (let platform of platforms) { From 52360549dca139b3ff50f5c735525a569030702b Mon Sep 17 00:00:00 2001 From: Maia Teegarden Date: Thu, 12 Aug 2021 18:54:54 -0700 Subject: [PATCH 3/3] Use --no-git-reset lerna option --- scripts/publish-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 0cd68c3e0530cda..329fa28583f4dd5 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -15,7 +15,7 @@ fi if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary" - yarn run lerna publish from-git --npm-tag canary --yes + yarn run lerna publish from-git --npm-tag canary --no-git-reset --yes # Make sure to exit script with code 1 if publish failed if [[ ! $? -eq 0 ]];then @@ -27,7 +27,7 @@ fi if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then echo "Publishing stable" - yarn run lerna publish from-git --yes + yarn run lerna publish from-git --no-git-reset --yes # Make sure to exit script with code 1 if publish failed if [[ ! $? -eq 0 ]];then