Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependency @lerna/project to v4 #2447

Merged
merged 2 commits into from Feb 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion @commitlint/config-lerna-scopes/fixtures/basic/lerna.json
@@ -1,5 +1,5 @@
{
"lerna": "3.22.1",
"lerna": "4",
"version": "1.0.0",
"packages": ["packages/*"]
}
Expand Up @@ -2,6 +2,6 @@
"name": "basic",
"version": "1.0.0",
"devDependencies": {
"lerna": "^3.0.0"
"lerna": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion @commitlint/config-lerna-scopes/fixtures/empty/lerna.json
@@ -1,5 +1,5 @@
{
"lerna": "3.22.1",
"lerna": "4",
"version": "1.0.0",
"packages": ["packages/*"]
}
Expand Up @@ -2,6 +2,6 @@
"name": "empty",
"version": "1.0.0",
"devDependencies": {
"lerna": "^3.0.0"
"lerna": "^4.0.0"
}
}
@@ -1,5 +1,5 @@
{
"lerna": "2.4.0",
"lerna": "4",
"version": "1.0.0",
"packages": ["packages/*"]
}
Expand Up @@ -2,6 +2,6 @@
"name": "version-mismatch",
"version": "1.0.0",
"devDependencies": {
"lerna": "^2.0.0"
"lerna": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion @commitlint/config-lerna-scopes/fixtures/scoped/lerna.json
@@ -1,5 +1,5 @@
{
"lerna": "3.22.1",
"lerna": "4",
"version": "1.0.0",
"packages": ["@packages/*"]
}
Expand Up @@ -2,6 +2,6 @@
"name": "scoped",
"version": "1.0.0",
"devDependencies": {
"lerna": "^3.0.0"
"lerna": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion @commitlint/config-lerna-scopes/fixtures/yarn/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "yarn",
"version": "1.0.0",
"devDependencies": {
"lerna": "^3.0.0"
"lerna": "^4.0.0"
},
"workspaces": [
"@packages/*"
Expand Down
5 changes: 2 additions & 3 deletions @commitlint/config-lerna-scopes/index.js
Expand Up @@ -43,9 +43,8 @@ function getPackages(context) {
});
}

const Project = importFrom(cwd, '@lerna/project');
const project = new Project(cwd);
return project.getPackages();
const {getPackages} = importFrom(cwd, '@lerna/project');
return getPackages(cwd);
})
.then((packages) => {
return packages
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/config-lerna-scopes/package.json
Expand Up @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/conventional-changelog/commitlint#readme",
"peerDependencies": {
"lerna": "^3.22.1"
"lerna": "^4.0.0"
},
escapedcat marked this conversation as resolved.
Show resolved Hide resolved
"engines": {
"node": ">=v10"
Expand Down
8 changes: 2 additions & 6 deletions @packages/test/src/lerna.ts
@@ -1,5 +1,5 @@
import path from 'path';
import fs from 'fs-extra';
import path from 'path';
import resolvePkg from 'resolve-pkg';
import * as fix from './fix';

Expand All @@ -10,11 +10,7 @@ export async function bootstrap(
directory: string
): Promise<string> {
const cwd = await fix.bootstrap(`fixtures/${fixture}`, directory);
// this used to test lerna v2 and v3
// the v2 option is removed here, lerna version tests as well
// all the code to test differnt version is still in place
// cause i'm not sure how to remove this properly
const lerna = 'lerna-v3';
const lerna = 'lerna';
await fs.mkdirp(path.join(cwd, 'node_modules', '@lerna'));
await fs.symlink(
resolvePkg('@lerna/project')!,
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"lerna": "3",
"lerna": "4",
"npmClient": "yarn",
"useWorkspaces": true,
"version": "12.0.1"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -85,7 +85,7 @@
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@lerna/project": "3.21.0",
"@lerna/project": "4.0.0",
"@types/jest": "26.0.20",
"@types/node": "12.20.4",
"@typescript-eslint/eslint-plugin": "^4.1.0",
Expand All @@ -97,8 +97,7 @@
"eslint-plugin-jest": "^24.0.0",
"husky": "^5.1.1",
"jest": "26.6.3",
"lerna": "^3.22.1",
"lerna-v3": "npm:lerna@3",
"lerna": "^4.0.0",
"lint-staged": "10.5.4",
"prettier": "^2.0.5",
"ts-jest": "26.5.2",
Expand Down