From 5e3cd43aa3a2f7ab49d708d428aa4076a82d2ac7 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Wed, 25 Aug 2021 16:04:30 -0700 Subject: [PATCH] build: replace lerna with npm workspaces --- .github/workflows/main.yml | 1 + lerna.json | 3 --- package.json | 12 ++++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 lerna.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe284ad15..fdb14109d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,7 @@ jobs: - uses: dcodeIO/setup-node-nvm@master with: node-version: ${{matrix.node}} + - run: npm install -g npm - run: npm install - run: npm test - uses: codecov/codecov-action@v1 diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 053f72e27..000000000 --- a/lerna.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "independent" -} diff --git a/package.json b/package.json index 403d19ae8..ab82f76ea 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "c8": "^7.0.0", "camelcase": "^6.0.0", "execa": "^5.0.0", - "lerna": "^4.0.0", "mdast-util-assert": "^4.0.0", "mdast-util-gfm": "^1.0.0", "micromark-extension-gfm": "^1.0.0", @@ -30,11 +29,16 @@ "unist-util-remove-position": "^4.0.0", "xo": "^0.44.0" }, + "workspaces": [ + "packages/remark-parse", + "packages/remark-stringify", + "packages/remark", + "packages/remark-cli" + ], "scripts": { - "postinstall": "lerna bootstrap --no-ci", - "build": "lerna run build && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage", + "build": "npm run build --workspaces && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage", "format": "./packages/remark-cli/cli.js . -qfo && prettier . -w --loglevel warn && xo --fix", - "test-api": "lerna run test && node --conditions development test/index.js", + "test-api": "npm run test --workspaces && node --conditions development test/index.js", "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api", "test": "npm run build && npm run format && npm run test-coverage" },