-
Notifications
You must be signed in to change notification settings - Fork 2
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: add concurrently & wait-on command #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great! Will take it for a quick test drive in a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice feature to add. It will clean up a lot of package.json
files.
src/commands/open.js
Outdated
cypress(opts) | ||
} else { | ||
const cypressCommand = cypress({ ...opts, exec: false }) | ||
const waitOnCommand = `npx --no-install wait-on ${waitOn}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works great in apps, but when used through the global install of d2 (i.e. d2 utils cypress
) this doesn't work for the same reasons it doesn't in d2 style
.
I've been working on an alternative style that shouldn't get confused when e.g. d2
is installed globally using Yarn vs. NPM (they have different node_modules
globally, and npx
looks in the NPM one and not Yarn one).
There's also the case of not hoisting dependencies (not talking about de-duping) that are only used in e.g. d2-style
which this "inside out" approach allows to work. Needs more testing and bug fixing but it's in @dhis2/cli-style@alpha
right now: dhis2/cli-style@fd620c5
If it works out, maybe we should move the cli-style/src/utils/run.js
file to e.g. cli-helpers-engine
and use that as the primary process runner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm saying is: use npx
for now, and be aware that there are some gotchas that we want to resolve, and there are experiments for that in dhis2/cli-style
going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. So if I get it right d2 utils cypress open
won't work when using the globally installed cli utility. Never thought about that use-case before 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think npx
is probably OK here for the moment because wait-on
doesn't need to find other dependencies (like eslint
does when resolving plugins from the .eslintrc file). So should be fine for now but worth moving to a better process runner when we have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one minor bug change requested, this looks great!
This should be ok now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
# [2.2.0](v2.1.0...v2.2.0) (2020-05-07) ### Features * add concurrently & wait-on command ([#34](#34)) ([b1d067b](b1d067b))
🎉 This PR is included in version 2.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: The
d2-utils-cypress open
andd2-utils-cypress run
now useconcurrently
andwait-on
by default. If new behavior is undesired, it can be disabled with--appStart ''
.This PR does 3 things
install
command's codetestFiles
config to thecypress.json
when using cucumberconcurrently
andwait-on
when using theopen
andrun
commands