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] Enable rush list to accept --to and --from params #1687

Closed
1 of 2 tasks
sdalonzo opened this issue Jan 15, 2020 · 3 comments
Closed
1 of 2 tasks

[rush] Enable rush list to accept --to and --from params #1687

sdalonzo opened this issue Jan 15, 2020 · 3 comments
Assignees
Labels
effort: medium Needs a somewhat experienced developer enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!

Comments

@sdalonzo
Copy link

sdalonzo commented Jan 15, 2020

Is this a feature or a bug?

  • Feature
  • Bug

Please describe the actual behavior.

My needs would be satisfied by @wbern's proposal here: #1202

We are looking to create a dev/watch workflow based partially around a build:watch bulk task, but we need to be able to scope the run to specific projects in our monorepo.

In the meantime, the ability to apply --to and --from flags to the rush list command would enable us to spawn watch processes for the required projects from a Node script. JSON output would be a bonus.

If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.

n/a

What is the expected behavior?

rush list output can be filtered by --to and --from, and possibly output JSON

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

Not a bug

@sdalonzo
Copy link
Author

@octogonz ☝️ as discussed on Gitter.

@octogonz octogonz added effort: medium Needs a somewhat experienced developer enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start! labels Jan 16, 2020
@octogonz
Copy link
Collaborator

octogonz commented Jan 28, 2020

Have you considered using the rush-lib API to solve this problem?

For example, try running these NodeJS commands in the rushstack repo folder:

const rushLib = require("@microsoft/rush-lib");
const RushConfiguration = rushLib.RushConfiguration;
const config = RushConfiguration.loadFromDefaultLocation();
const exampleProject = config.projects[0];

// Prints "@microsoft/api-documenter"
console.log(exampleProject.packageName);

// Prints "[ 'api-documenter-test', 'doc-plugin-rush-stack', 'generate-api-docs' ]"
console.log(exampleProject.downstreamDependencyProjects);

const dependencyName = exampleProject.downstreamDependencyProjects[0];

// Prints "api-documenter-test"
console.log(dependencyName);
const dependencyProject = config.projectsByName.get(dependencyName);

// Prints normalized package.json contents
console.log(JSON.stringify(dependencyProject.packageJson));

If this API is awkward to use for the problem that you're solving, we could make it better.

@Claudiazhaoya Claudiazhaoya self-assigned this Mar 30, 2020
@sdalonzo
Copy link
Author

sdalonzo commented Apr 7, 2020

@octogonz rush-lib did end up serving this purpose well.

@sdalonzo sdalonzo closed this as completed Apr 7, 2020
@iclanton iclanton moved this to Closed in Bug Triage Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium Needs a somewhat experienced developer enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!
Projects
Archived in project
Development

No branches or pull requests

3 participants