-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
chore: create monorepo e2e spec #1079
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@himself65 Can you help this? |
Thank you for the help. Basically, I am trying to do these steps:
^^ and then verify it loads the home page without errors It should install waku at /tmp/monorepo/node_modules which has then causes some different behavior with vite paths in the past because it is outside the /tmp/monorepo/packages/waku-project root dir. When I run the above commands and it installs 0.21.9, it is working. If I instead
|
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 this structure is not working as expected with pnpm monorepo?
pnpm will resolve all deps in the root node_modules, which I think the current e2e cannot really test the prod case?
@himself65 Can we do something like the standalone setup? It uses |
Im trying to do that |
I was trying to do that in #920 |
627aed0
to
7412111
Compare
I got the e2e test to work by passing a package path to set the cwd for the commands. https://github.com/dai-shi/waku/pull/1079/files#diff-810f0b71160f0ddae45c40c1b3b4534a9a48171823eebf14d7d67ba557f6f4ad I like how #1101 has the ability to test a few different package managers. We can close this PR and track there instead if it is better. I see even though e2e tests are working, something is broken in the regular test suite checking imports. I copied the standard create-waku template to the monorepo example. I think some of the monorepo errors we have seen in the past were related to fs router. |
I fixed the tests with |
@himself65 seems busy, so making this pr incorporate #1101 sounds good. |
Great. I did that. All seems to be passing. |
execSync( | ||
`node ${join(standaloneDir, './node_modules/waku/dist/cli.js')} build`, | ||
{ cwd: standaloneDir }, | ||
{ cwd: join(standaloneDir, packageDir) }, |
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.
Make it consistent with L186. Either use join
for both, or use string concatenation for both. L209 too.
This needs more work to figure out how to install dependencies in the test monorepo and link in the waku package in a way that closely matches the way it works with published npm packages.