Commit 46ffea25 authored by JJ Kasper's avatar JJ Kasper

update action

parent 6390e074
This diff is collapsed.
......@@ -24,7 +24,6 @@
"dev": "ncc build ./index.ts -w -o dist/",
"prerelease": "rimraf ./dist/",
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"prepublishOnly": "cd ../../ && turbo run build",
"build": "pnpm release"
},
"devDependencies": {
......
......@@ -20,7 +20,6 @@
],
"scripts": {
"build": "pnpm tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "pnpm tsc -d -w -p tsconfig.json",
"test": "jest"
},
......
......@@ -26,8 +26,7 @@
"prerelease": "rimraf ./dist/",
"types": "tsc index.ts --declaration --emitDeclarationOnly --declarationDir types --esModuleInterop",
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"build": "pnpm release && pnpm types",
"prepublishOnly": "cd ../../ && turbo run build"
"build": "pnpm release && pnpm types"
},
"devDependencies": {
"@vercel/ncc": "0.34.0",
......
......@@ -9,8 +9,7 @@
"directory": "packages/next-polyfill-module"
},
"scripts": {
"build": "microbundle -i src/index.js -o dist/polyfill-module.js -f iife --no-sourcemap --external none --no-pkg-main",
"prepublishOnly": "cd ../../ && turbo run build"
"build": "microbundle -i src/index.js -o dist/polyfill-module.js -f iife --no-sourcemap --external none --no-pkg-main"
},
"devDependencies": {
"microbundle": "0.15.0"
......
......@@ -9,8 +9,7 @@
"directory": "packages/next-polyfill-nomodule"
},
"scripts": {
"build": "microbundle -i src/index.js -o dist/polyfill-nomodule.js -f iife --no-sourcemap --external none --no-pkg-main",
"prepublishOnly": "cd ../../ && turbo run build"
"build": "microbundle -i src/index.js -o dist/polyfill-nomodule.js -f iife --no-sourcemap --external none --no-pkg-main"
},
"devDependencies": {
"core-js": "3.6.5",
......
......@@ -56,7 +56,6 @@
"dev": "taskr",
"release": "taskr release",
"build": "pnpm release && pnpm types",
"prepublishOnly": "cd ../../ && turbo run build",
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"typescript": "tsec --noEmit",
"ncc-compiled": "ncc cache clean && taskr ncc"
......
......@@ -13,9 +13,7 @@
"license": "MIT",
"scripts": {
"build": "rm -rf dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json"
"dev": "tsc -d -w -p tsconfig.json"
},
"dependencies": {
"@babel/code-frame": "7.12.11",
......
......@@ -13,7 +13,6 @@
"license": "MIT",
"scripts": {
"build": "rm -rf dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json"
},
"peerDependencies": {
......
......@@ -48,7 +48,7 @@ const cwd = process.cwd()
} catch (err) {
// don't block publishing other versions on single platform error
console.error(`Failed to publish`, platform)
throw err
// throw err
}
// lerna publish in next step will fail if git status is not clean
execSync(
......@@ -63,24 +63,31 @@ const cwd = process.cwd()
// Update name/version of wasm packages and publish
let wasmDir = path.join(cwd, 'packages/next-swc/crates/wasm')
for (let wasmTarget of ['web', 'nodejs']) {
let wasmPkg = JSON.parse(
await readFile(path.join(wasmDir, `pkg-${wasmTarget}/package.json`))
)
wasmPkg.name = `@next/swc-wasm-${wasmTarget}`
wasmPkg.version = version
try {
let wasmPkg = JSON.parse(
await readFile(path.join(wasmDir, `pkg-${wasmTarget}/package.json`))
)
wasmPkg.name = `@next/swc-wasm-${wasmTarget}`
wasmPkg.version = version
await writeFile(
path.join(wasmDir, `pkg-${wasmTarget}/package.json`),
JSON.stringify(wasmPkg, null, 2)
)
execSync(
`npm publish ${path.join(
wasmDir,
`pkg-${wasmTarget}`
)} --access public ${
gitref.includes('canary') ? ' --tag next-12-3-2' : '--tag next-12-3-2'
}`
)
await writeFile(
path.join(wasmDir, `pkg-${wasmTarget}/package.json`),
JSON.stringify(wasmPkg, null, 2)
)
execSync(
`npm publish ${path.join(
wasmDir,
`pkg-${wasmTarget}`
)} --access public ${
gitref.includes('canary')
? ' --tag next-12-3-2'
: '--tag next-12-3-2'
}`
)
} catch (err) {
console.error(`Failed to publish`, { wasmTarget })
// throw err
}
}
// Update optional dependencies versions
......
......@@ -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 next-12-3-2 --no-git-reset --no-verify-access --yes
./node_modules/.bin/lerna publish from-git --npm-tag next-12-3-2 --no-git-reset --no-verify-access --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 --no-git-reset --npm-tag next-12-3-2 --no-verify-access --yes
./node_modules/.bin/lerna publish from-git --no-git-reset --npm-tag next-12-3-2 --no-verify-access --yes
# Make sure to exit script with code 1 if publish failed
if [[ ! $? -eq 0 ]];then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment