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

Reproducer for lerna issue 2060 #2

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ Please fork this repository (https://github.com/lerna/repro) and apply any chang
Please include any additional instructions in the PR description, such as commands to run etc, and then reference the PR you have created in a bug report on the main repository:

https://github.com/lerna/lerna


## Repo details

This is a reproducer for https://github.com/lerna/lerna/issues/2060

To reproduce:
1. `npm i`
1. `npx lerna publish --canary`

Notice that lerna only wants to publish `app => 1.0.1-alpha.2`, which will have a dependency on `[email protected]`.
This will result in a broken version of `app` being published as it depends on the unpublished change to library in commit `0639f4a`.
6 changes: 4 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"packages": ["packages/*"],
"version": "0.0.0"
"packages": [
"packages/*"
],
"version": "1.0.0"
}
27 changes: 26 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^5.0.0"
}
Expand Down
4 changes: 4 additions & 0 deletions packages/app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const {helloWorld} = require('library');

console.log('A message from the library:');
helloWorld();
12 changes: 12 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
3 changes: 3 additions & 0 deletions packages/library/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports.helloWorld = function() {
console.log('hello world');
};
12 changes: 12 additions & 0 deletions packages/library/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "library",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}