From 8e8f2219410eefe5e1e374ee4da6a075bbe1d118 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Fri, 6 May 2022 15:43:50 +0700 Subject: [PATCH] replace `lerna` with `npm` workspaces --- lerna.json | 6 ------ package.json | 13 +++++-------- scripts/update-version.mjs | 4 ---- 3 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 lerna.json diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 2ae7714d3f29..000000000000 --- a/lerna.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "3.22.4", - "packages": [ - "packages/*" - ] -} diff --git a/package.json b/package.json index 8019c4605d39..e95f0046aef0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { "version": "3.22.4", + "workspaces": [ + "./packages/*" + ], "devDependencies": { "@babel/cli": "^7.17.10", "@babel/core": "^7.17.10", @@ -37,10 +40,6 @@ "@onslip/karma-playwright-launcher": "^0.2.1", "babel-loader": "^8.2.5", "confusing-browser-globals": "^1.0.11", - "core-js": "file:./packages/core-js", - "core-js-builder": "file:./packages/core-js-builder", - "core-js-compat": "file:./packages/core-js-compat", - "core-js-pure": "file:./packages/core-js-pure", "david": "^12.0.0", "es-observable": "git+https://github.com/tc39/proposal-observable.git#d3404f06bc70c7c578a5047dfb3dc813730e3319", "eslint": "^8.14.0", @@ -61,7 +60,6 @@ "karma-phantomjs-launcher": "~1.0.4", "karma-qunit": "^4.1.2", "konan": "^2.1.1", - "lerna": "^4.0.0", "moon-unit": "0.2.2", "node-qunit": "^2.0.0", "npm": "8.8.0", @@ -84,9 +82,8 @@ "url": "https://github.com/zloirock/core-js.git" }, "scripts": { - "init": "run-p generate-indexes bootstrap && run-s clean-and-copy build-compat", + "init": "run-s generate-indexes clean-and-copy build-compat", "clean-and-copy": "zx scripts/clean-and-copy.mjs", - "bootstrap": "lerna bootstrap --no-ci", "build-compat": "run-s build-compat-data build-compat-entries build-compat-modules-by-versions", "build-compat-data": "zx scripts/build-compat-data.mjs", "build-compat-entries": "zx scripts/build-compat-entries.mjs", @@ -148,7 +145,7 @@ "usage-1000": "zx scripts/usage.mjs -l=1000", "usage-10000": "zx scripts/usage.mjs -l=10000", "update-version": "zx scripts/update-version.mjs && zx scripts/bundle.mjs --deno", - "publish": "lerna publish from-package --yes", + "publish": "npm publish --workspaces", "c": "npm run check", "d": "npm run check-dependencies", "l": "npm run lint", diff --git a/scripts/update-version.mjs b/scripts/update-version.mjs index 03affbb28dfe..826bad677380 100644 --- a/scripts/update-version.mjs +++ b/scripts/update-version.mjs @@ -10,7 +10,6 @@ const LICENSE = 'LICENSE'; const README = 'README.md'; const README_COMPAT = 'packages/core-js-compat/README.md'; const README_DENO = 'deno/corejs/README.md'; -const LERNA = 'lerna.json'; const SHARED = 'packages/core-js/internals/shared.js'; const BUILDER_CONFIG = 'packages/core-js-builder/config.js'; const CURRENT_YEAR = now.getFullYear(); @@ -19,9 +18,6 @@ const license = await readFile(LICENSE, 'utf8'); const OLD_YEAR = +license.match(/2014-(\d{4}) D/)[1]; await writeFile(LICENSE, license.replaceAll(OLD_YEAR, CURRENT_YEAR)); -const lerna = await readFile(LERNA, 'utf8'); -await writeFile(LERNA, lerna.replaceAll(PREV_VERSION, NEW_VERSION)); - const readme = await readFile(README, 'utf8'); await writeFile(README, readme.replaceAll(PREV_VERSION, NEW_VERSION).replaceAll(PREV_VERSION_MINOR, NEW_VERSION_MINOR));