vtex-apps / react-app-template

Our guide repository structure for react apps, that should be used as a template.
59 stars 65 forks source link

Fix: Resolve node incompatibility with `expect` module #70

Closed polishq closed 1 year ago

polishq commented 1 year ago

What problem is this solving?

If a user clones this repository, then deletes react/yarn.lock, a node incompatibility error will be introduced when the user attempts to link or publish their app:

error: react@3.x builder failed to install dependencies through yarn (retries=2)
yarn errors:
expect@29.4.3: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.12"
Found incompatible module. vtex.builder-hub@0.291.2

This PR solves the problem by adding a package resolution hint for "@types/jest": "26.0.15" which prevents the incompatible version of the expect package from being included.

How to test it?

Clone this repo, add a vendor and app name to manifest.json, delete react/yarn.lock, and then link in a workspace.

With the changes from this PR, the above will be successful. Compare to the previous code where the linking will fail.

vtex-io-ci-cd[bot] commented 1 year ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

github-actions[bot] commented 1 year ago
Fails
:no_entry_sign: :bust_in_silhouette: Please assign someone to merge this PR, and optionally include people who should review.
:no_entry_sign: We follow [keepachangelog](https://keepachangelog.com/) standards. Please, change the file `CHANGELOG.md` adding a small summary of your changes under the `[Unreleased]` section. Example: ```diff ## [Unreleased] + ### Fixed + - Issue with image sizing in the SKU Selector. ``` Possible types of changes: - `Added` for new features. - `Changed` for changes in existing functionality. - `Deprecated` for soon-to-be removed features. - `Removed` for now removed features. - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities.

Generated by :no_entry_sign: dangerJS against aa3736e99edfbead28fdc462215f0df1ad860f83

polishq commented 1 year ago

LGTM. Just add a entry to the changelog and it's good to go :)

@danzanzini Since this is a template (there's no vendor or appname in the manifest) we can skip the publish step. And since there are no published versions, I think it makes sense to leave the changelog empty, agree?