This PR tries to avoid going back to using NODE_OPTIONS=--openssl-legacy-provider. J.G. already fixed most of the issues in his PR for StoryBook, but this failed on merging to master to publish correctly, because the semantic-release action uses npm rather than yarn.
There are a couple of issues here:
our custom action for semantic-release uses npm rather than yarn and the resolutions field doesn't work in npm - this PR adds overrides which is the npm equivalent to instruct npm on what peer dependency to use.
react-dom is the dependency causing the issue and the root issue is due @dhis2/cli-app-scripts which we can look at separately
even after overrides, we kept getting EINVALIDTAGNAME which turned out to be caused by a transient dependency, react-tooltip which is declaring a peer dependency in a way that npm doesn't like. This was a depdenecy of react-docgen-props-table that's not used anymore so I removed it.
storybook needs typescript - yarn figures it out, but it needs to be installed for npm.
some difference in the GitHub action environment for action-semantic-release, causes the yarn.lock file to be updated after the version bump, this causes an issue when trying to do yarn install --frozen-lockfile. yarn.lock should not be updated anyhow by the action, so I removed them from the git plugin for semantic-release.
Both resolutions and overrides are workarounds, we should eventually get rid of the underlying dependencies issue. I will investigate this further separately.
Using the action-semantic-release is unnecessary (especially as we're not publihsng this repo to AppHub) and we should use semantic-release directly (which could allow us to use yarn there too and avoid the differences.
fixes LIBS-655
This PR tries to avoid going back to using
NODE_OPTIONS=--openssl-legacy-provider
. J.G. already fixed most of the issues in his PR for StoryBook, but this failed on merging to master to publish correctly, because the semantic-release action uses npm rather than yarn.There are a couple of issues here:
npm
rather thanyarn
and theresolutions
field doesn't work in npm - this PR addsoverrides
which is the npm equivalent to instruct npm on what peer dependency to use.@dhis2/cli-app-scripts
which we can look at separatelyoverrides
, we kept gettingEINVALIDTAGNAME
which turned out to be caused by a transient dependency,react-tooltip
which is declaring a peer dependency in a way that npm doesn't like. This was a depdenecy ofreact-docgen-props-table
that's not used anymore so I removed it.storybook
needstypescript
- yarn figures it out, but it needs to be installed for npm.yarn.lock
file to be updated after the version bump, this causes an issue when trying to doyarn install --frozen-lockfile
.yarn.lock
should not be updated anyhow by the action, so I removed them from the git plugin for semantic-release.Notes:
resolutions
andoverrides
are workarounds, we should eventually get rid of the underlying dependencies issue. I will investigate this further separately.yarn
there too and avoid the differences.