-
Notifications
You must be signed in to change notification settings - Fork 296
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
Create npm workspace for E2E tests #10119
Create npm workspace for E2E tests #10119
Conversation
Build files for b04f70b have been deleted. |
Note the one failing E2E test will be fixed in #10111 |
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.
Thanks, @benbowler. Nice work, but we need to move more dependencies. Please, see my comments.
Co-authored-by: Eugene Manuilov <eugene.manuilov@get10up.com>
…olve path to modules.
I found that the scripts workspace scripts appeared to be running with mixed npm versions and found However, one thing to note is that the workspace wants the root package to be upgraded as well so To me it seems that trying to run multiple npm versions is causing more problems than it's worth. Back in my first implementation I sent to review with globally installed npm v7, I had the workspaces and E2E tests working. With #6026 in EB, what do you think about requiring npm v7 globally in the interim, all devs need to do is run |
I'm open to suggestions if you can get the dev dependency method working reliably, allowing install commands and scripts to run reliably at the root and package level. |
One possible way to avoid this is by updating packages in the workspace like this for now: |
Removed @aaemnnosttv I tried npm 9 then 8 but these failed to install packages the following error so I've stuck with npm v7 and this can upgrade along with future node.js updates.
Later npm versions also have different module resolution rules which causes an issue with these now deprecated modules. If we upgrade to later npm versions we will need to resolve this issue so as not to run all install/ci commands with
|
@eugene-manuilov this is now running E2E tests locally and on GH actions, failing checks are existing known instabilities. In terms of the CLA check it appears this joint commit was not verified which is causing the failure: ![]() |
Hey @benbowler, as per the sync earlier I've taken a look to revisit the idea of running a dev-installed version of NPM. I noticed there's a bit of a chicken and egg situation when trying to initially install NPM 7 with workspaces configured in This can be resolved, here's a potential approach with a
Hmm, there should only be a single
This case, however seems to be due to patch-package search results
It's worth noting that other script/command dependencies of the root
I can see it's more complicated than I had imagined, but at the same time it seems that some of the issues you've come across are not related to the local/global NPM question. On balance I'm still likely to agree with the conclusion that simply installing the required version globally is the path of least resistance, but I'm interested to get your thoughts on my findings. |
067e649
to
d1a1de7
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Hey @techanvil, thanks for taking a look at this. Based on your change devs would be instructed to run It appears to me that either route devs will need to change their process slightly, so if this is the case, the least painful in my experience so far is ensure there is only one npm version being used linked to the nvm installed version. It's fairly simple to revert to the default npm by reinstalling node 14 using nvm (although I doubt many devs will have other projects still using node 14 - although until this is merged devs might need to switch back and forward as they review tickets). |
Hey @benbowler, if we took the approach indicated by my change then (assuming NPM 6 is installed globally):
There wouldn't be any expectation that NPM 6 would handle an NPM 7
Indeed, with that all said above, I'll refer back to the last line in my previous comment:
Basically it does look like trying to use a local NPM 7 is going to add more complexity/overhead than simply upgrading the global version, so I'd say let's stick with that. It will become a moot point once we upgrade Node anyway. |
Thanks @techanvil for working through the options here. @eugene-manuilov I've addressed the dependencies left in the root package and left some inline comments. |
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.
Great work, @benbowler. Looks good to me.
Summary
Addresses issue:
Relevant technical choices
puppeteer
andpuppeteer-core
are used in storybook tests currently, we should remove these from the main package.json as part of #10091.I created a script
install-global-npm
to help developers and the GH actions to install npm v7.PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist