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

feat: have if-present apply to recursive runs #2520

Merged
merged 3 commits into from
May 1, 2020

Conversation

jonathanmorley
Copy link
Contributor

@jonathanmorley jonathanmorley commented May 1, 2020

I think these changes are correct.

I'm not sure whether the IF_PRESENT related functions / consts / help text should move along with the typing.

Comment on lines 266 to 273
await execa('pnpm', [
'install',
'-r',
'--registry',
REGISTRY,
'--store-dir',
path.resolve(DEFAULT_OPTS.storeDir),
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed

Comment on lines 315 to 322
await run.handler({
...DEFAULT_OPTS,
...await readProjects(process.cwd(), [{ namePattern: '*' }]),
dir: process.cwd(),
ifPresent: true,
recursive: true,
workspaceDir: process.cwd(),
}, ['this-command-does-not-exist'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could probably run this in the previous test case as well. That way, one case will test both scenarios.

@@ -217,6 +227,15 @@ test('`pnpm recursive run` fails when run with a filter that includes all packag
version: '1.0.0',
},
])

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add here a comment

t.comment('recursive run does not fail when if-present is true')

@zkochan
Copy link
Member

zkochan commented May 1, 2020

Thanks.

There are also some linting errors. Run pnpm run lint to see them.

And add some changesets. Run pnpx changeset in the root and the wizard will walk you through. We use changesets for automatic version bumps.

@zkochan zkochan merged commit 7300eba into pnpm:master May 1, 2020
zkochan pushed a commit that referenced this pull request May 2, 2020
@zkochan
Copy link
Member

zkochan commented May 2, 2020

🚢 4.14.2

@zkochan zkochan added this to the v4.14 milestone May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants