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

[Rush] detect the package root traversing bottom-to-root, not root-to-bottom #1671

Open
1 of 2 tasks
Jabher opened this issue Jan 5, 2020 · 3 comments
Open
1 of 2 tasks
Labels
needs more info We can't proceed because we need a better repro or an answer to a question

Comments

@Jabher
Copy link
Contributor

Jabher commented Jan 5, 2020

Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.

Is this a feature or a bug?

  • Feature
  • Bug

Please describe the actual behavior.
Assuming I have a rush project with 2 packages, 1 in . (as long as I'm trying to resolve some pnpm&eslint issues by manual root creation of node_modules), second in ./packages/whatever,

when i type rush add -p %package_name% in ./packages/whatever directory,
dependency is added to package at ..

What is the expected behavior?
I expect rush to detect the package as close as possible and add dependency there, not to the topmost one.

If this is a bug, please provide the tool version, Node.js version, and OS.

  • Tool: Rush
  • Tool Version: 5.17.2
  • Node Version: 12.14.0
    • Is this a LTS version? yes
    • Have you tested on a LTS version? yes
  • OS: Mac OS X

also, PNPM 4.6.0 is used.

@iclanton
Copy link
Member

iclanton commented Jan 6, 2020

I'm trying to understand your repo's layout. Can you provide a simple repro repo?

@iclanton iclanton added the needs more info We can't proceed because we need a better repro or an answer to a question label Jan 6, 2020
@Jabher
Copy link
Contributor Author

Jabher commented Jan 15, 2020

stages to reproduce:

  • clone https://github.com/Jabher/rush-bug-report-ref & run rush update
  • go to directory b/c
  • run rush add -p left-pad
    expected behavior: left-pad is added to b/c/package.json
    actual behavior: left-pad is added to <root>/package.json

@trusktr
Copy link

trusktr commented Jan 21, 2020

Looks like #1702 is a duplicate of this, with some more info there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info We can't proceed because we need a better repro or an answer to a question
Projects
Status: Needs Investigation
Development

No branches or pull requests

3 participants