Don't use deprecated "lerna publish --require-scripts" (#10558) [skip ci]

This commit is contained in:
Nicolò Ribaudo 2019-10-16 22:13:21 +02:00 committed by GitHub
parent d234ff6572
commit 2254542010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 40 deletions

View File

@ -193,7 +193,7 @@ new-version:
# NOTE: Run make new-version first
publish: prepublish
yarn lerna publish from-git --require-scripts
yarn lerna publish from-git
$(MAKE) clean
publish-ci: prepublish

View File

@ -8,6 +8,10 @@
"publishConfig": {
"access": "public"
},
"scripts": {
"prepublishOnly": "cp dist/polyfill.min.js browser.js",
"postpublish": "rm browser.js"
},
"repository": "https://github.com/babel/babel/tree/master/packages/babel-polyfill",
"main": "lib/index.js",
"dependencies": {

View File

@ -1,8 +0,0 @@
"use strict";
const fs = require("fs");
const path = require("path");
try {
fs.unlinkSync(path.join(__dirname, "../browser.js"));
} catch (err) {}

View File

@ -1,13 +0,0 @@
"use strict";
const fs = require("fs");
const path = require("path");
function relative(loc) {
return path.join(__dirname, "..", loc);
}
fs.writeFileSync(
relative("browser.js"),
fs.readFileSync(relative("dist/polyfill.min.js"))
);

View File

@ -8,6 +8,9 @@
"babel-preset-env.min.js",
"src"
],
"scripts": {
"prepublishOnly": "cd ../.. && make prepublish-build-preset-env-standalone"
},
"devDependencies": {
"@babel/plugin-proposal-dynamic-import": "^7.5.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",

View File

@ -1,11 +0,0 @@
// This file is executed by lerna before publishing,
// @babel/preset-env-standalone so that it has the
// new version and not the old one.
require("child_process").execSync(
"make prepublish-build-preset-env-standalone",
{
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
}
);

View File

@ -8,6 +8,9 @@
"babel.min.js",
"src"
],
"scripts": {
"prepublishOnly": "cd ../.. && make prepublish-build-standalone"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/helper-plugin-utils": "^7.0.0",

View File

@ -1,7 +0,0 @@
// This file is executed by lerna before publishing @babel/standalone,
// so that it has the new version and not the old one.
require("child_process").execSync("make prepublish-build-standalone", {
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
});