cypress-io / cypress-example-recipes

Various recipes for testing common scenarios with Cypress
https://on.cypress.io/examples
3.42k stars 1.34k forks source link

fix: Update parcel version to support node 16.14.2 in monorepo CI #787

Closed tbiethman closed 2 years ago

tbiethman commented 2 years ago

The examples/blogs__class-decorator project utilizes parcel to serve its example app, as CRA does not include support for class decorators at this time. The used version of parcel-bundler includes a dependency on deasync that ships precompiled libs for certain node versions; if a node version isn't supported, it attempts to compile on the fly, causing an error. We see this in the monorepo's build system after updating to use node 16.14.2: https://app.circleci.com/pipelines/github/cypress-io/cypress/40624/workflows/87b1d9fb-01fd-48a9-a1dd-bff0beb3f68e/jobs/1675181?invite=true#step-104-82

So in the spirit of keeping this example around, I updated the version of parcel being used here to ensure this error is avoided. It was major version bump and there there a couple tweaks to how the project needed to be configured, but I tried to limit that as much as possible. The changeset is huge due to some lock file changes 😅 See inline comments for specifics.