Description
Followup to #275
In order to ensure that Yarn 2 is in a good state to be released, we first need to have tests ensuring our compatibility with the ecosystem that relies on us. To this end, we will need to write end-to-end tests for the following framework / libraries. Anyone is welcome to help for any number of those tools (note that some are known working - but we want to automate this check to prevent regressions):
Frameworks:
- Angular CLI
- Create-React-App
https://github.com/yarnpkg/berry/blob/master/.github/workflows/e2e-cra-workflow.yml - Gatsby
https://github.com/yarnpkg/berry/blob/master/.github/workflows/e2e-gatsby-workflow.yml - Next.js
- Nuxt.js
- Vue CLI
Tools:
- ESLint
- Gulp
- Husky
- Jest
- Mocha
- Parcel 2
- Prettier
- Rollup
- TypeScript
- Webpack 5
Methodology:
Anyone willing to lend us a hand can prepare a bash script that automatically installs one of those tools and check its behaviour somehow. Open a new issue to share it, and link it to this very issue. For example, here's a basic script that would test that Gatsby can build (we probably should expand it a bit):
# The `| cat` aims to workaround this request:
# https://github.com/gatsbyjs/gatsby/blob/99fb7b44810d658805211073ddfc18e508b57c87/packages/gatsby-cli/src/init-starter.js#L40
yarn dlx gatsby new my-gatsby | cat
cd my-gatsby
yarn build
Once done, copy one of the preexisting e2e workflows (in .github/workflows), put your testcase there, then open an PR!
If something doesn't work:
It's quite likely that some things don't work, for a reason or another. If that happens:
-
First try to see whether it's caused by a package not depending on another. Yarn will tell you if it thinks it's the case.
-
If Yarn doesn't tell you anything but you get a "module not found" error or similar, use the
PNP_DEBUG_LEVEL=1
(or2
for all the calls, whether they succeed or not) environment variable to get more insight as to what's failing in the resolution. -
If an error tells you that your own package is trying to require a package without listing it, and if you're sure that no, you're definitely not requiring this package, then something is probably passing an unresolved plugin name to something else (typically this could be a Webpack loader, or a Babel plugin).
In any of those cases, please open a PR in the relevant repository and link it here so that we can track them. Also ping me so that I can get the discussion by mail (I likely won't answer unless needed, but it's useful to get a better idea of how fast we progress).