You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In working on #3188, @jochem-brouwer and I discovered that if we delete and update package-lock.json in the monorepo root in order to clean up missing or misaligned dependency versions between master and a PR branch, the peer dependencies in package.json marked with optional: true are not automatically installed. This is intended behaviour, based on past discussion from when we switched to vitest because we didn't want to require users of our libraries to have to install large browser binaries necessary for running our browser tests. That said, it's had the unintended consequence of causing headaches when updating package-lock.json because npm i won't install these dependencies automatically which leads to the browser tests failing (and the related CI job).
So, I'm proposing one of two alternatives:
We return the three deps in question (@vitest/browser, webdriverio, and playwright) to the devDependencies so they are always installed unless the user runs npm i --omit=dev. This is certainly the easiest approach since the browser binaries are generally needed for testing and are really part of the development dependency set (though admittedly we don't think about the browser tests much).
We could add a new npm install browser-deps script that manually installs these three dependencies. If we go this route, we need to make sure the CI job for the browser tests runs this script. The tricky bit here is that we would need to remember to run this when we update package-lock.json
I'm not sure if I have a strong preference here but maybe variant 2 is the cleanest (and limits when these extra deps get installed since they would be skipped in the other CI runs)
The text was updated successfully, but these errors were encountered:
In working on #3188, @jochem-brouwer and I discovered that if we delete and update
package-lock.json
in the monorepo root in order to clean up missing or misaligned dependency versions betweenmaster
and a PR branch, the peer dependencies inpackage.json
marked withoptional: true
are not automatically installed. This is intended behaviour, based on past discussion from when we switched tovitest
because we didn't want to require users of our libraries to have to install large browser binaries necessary for running our browser tests. That said, it's had the unintended consequence of causing headaches when updating package-lock.json becausenpm i
won't install these dependencies automatically which leads to the browser tests failing (and the related CI job).So, I'm proposing one of two alternatives:
@vitest/browser
,webdriverio
, andplaywright
) to thedevDependencies
so they are always installed unless the user runsnpm i --omit=dev
. This is certainly the easiest approach since the browser binaries are generally needed for testing and are really part of the development dependency set (though admittedly we don't think about the browser tests much).npm install browser-deps
script that manually installs these three dependencies. If we go this route, we need to make sure the CI job for the browser tests runs this script. The tricky bit here is that we would need to remember to run this when we updatepackage-lock.json
I'm not sure if I have a strong preference here but maybe variant 2 is the cleanest (and limits when these extra deps get installed since they would be skipped in the other CI runs)
The text was updated successfully, but these errors were encountered: