-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow yarn 4 berry to work with cypress webpack preprocessor (#2…
…9901) * fix: make sure string_decoder is shipped with wbip * fix: remove pnp-webpack-plugin as it isnt needed with webpack 5 * chore: update enhanced-resolve to 5.17.0 in the yarn-lock and remove the need for you 5.15 patch as the issue we were patching was fixed in 5.16 * build binary [run ci] * resolve to process lib installed by cypress and not the users home directory * add changelog entry [run ci] * build binaries [run ci] * add binary system test skip system test install for yarn 4 as it is an exception case [run ci] adapt dep installer to handle yarn 4.1.1 [run ci] rebase this out [run ci] try this [run ci] temp [run ci] * update circle cache [run ci] * fix conditional for yarn install [run ci] * Update system-tests/projects/yarn-v4.1.1-pnp-dep-resolution/README.md Co-authored-by: Ryan Manuel <ryanm@cypress.io> * update from yarn 4.1.1 to 4.3.1 * update docker image name --------- Co-authored-by: Ryan Manuel <ryanm@cypress.io>
- Loading branch information
1 parent
a092202
commit 1521399
Showing
16 changed files
with
145 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Bump this version to force CI to re-create the cache from scratch. | ||
|
||
07-16-24 | ||
07-24-24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yarn/* | ||
.pnp.cjs | ||
.pnp.loader.mjs |
6 changes: 6 additions & 0 deletions
6
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# What are we testing? | ||
|
||
Project has a support file that uses `cypress-axe`, which uses `axe-core`, both of which are installed by PnP and don't live in `node_modules`, but are preprocessed by `cypress` via `webpack` in `./packages/server/node_modules/@cypress/webpack-batteries-included-preprocessor` (`./npm/webpack-batteries-included-preprocessor` packaged with Cypress server) relative to the monorepo root. That `webpack` binary needs to resolve its build dependencies from within the cypress binary, including built-ins to `process`, but needs to resolve the dependencies bundled in the specs/support file from the `pnp` cache. | ||
|
||
Since dependencies cannot be installed normally as we do with regular system tests via yarn v1, we need to run this as a binary system test. | ||
See `yarn-pnp-preprocessor-system-test` inside `./circleci/workflows.yml`. |
8 changes: 8 additions & 0 deletions
8
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/cypress.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
e2e: { | ||
setupNodeEvents (on, config) { | ||
// implement node event listeners here | ||
}, | ||
fixturesFolder: false, | ||
}, | ||
} |
5 changes: 5 additions & 0 deletions
5
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/cypress/e2e/spec.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('template spec', () => { | ||
it('passes', () => { | ||
expect(true).to.equal(true) | ||
}) | ||
}) |
1 change: 1 addition & 0 deletions
1
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/cypress/support/e2e.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import 'cypress-axe' |
8 changes: 8 additions & 0 deletions
8
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "cypress-pnp-webpack-preprocessor-test", | ||
"devDependencies": { | ||
"axe-core": "4.9.1", | ||
"cypress-axe": "1.5.0" | ||
}, | ||
"packageManager": "yarn@4.3.1" | ||
} |
32 changes: 32 additions & 0 deletions
32
system-tests/projects/yarn-v4.3.1-pnp-dep-resolution/yarn.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This file is generated by running "yarn install" inside your project. | ||
# Manual changes might be lost - proceed with caution! | ||
|
||
__metadata: | ||
version: 8 | ||
cacheKey: 10c0 | ||
|
||
"axe-core@npm:4.9.1": | ||
version: 4.9.1 | ||
resolution: "axe-core@npm:4.9.1" | ||
checksum: 10c0/ac9e5a0c6fa115a43ebffc32a1d2189e1ca6431b5a78e88cdcf94a72a25c5964185682edd94fe6bdb1cb4266c0d06301b022866e0e50dcdf6e3cefe556470110 | ||
languageName: node | ||
linkType: hard | ||
|
||
"cypress-axe@npm:1.5.0": | ||
version: 1.5.0 | ||
resolution: "cypress-axe@npm:1.5.0" | ||
peerDependencies: | ||
axe-core: ^3 || ^4 | ||
cypress: ^10 || ^11 || ^12 || ^13 | ||
checksum: 10c0/bc9aab239fbed99bc64801b1f83c4835047264a4f34f801649e41579014cc1bddbd1379efaf3c4a9e6ff42f359bb7fc028df039d6fba637852370d77be0af5ec | ||
languageName: node | ||
linkType: hard | ||
|
||
"cypress-pnp-webpack-preprocessor-test@workspace:.": | ||
version: 0.0.0-use.local | ||
resolution: "cypress-pnp-webpack-preprocessor-test@workspace:." | ||
dependencies: | ||
axe-core: "npm:4.9.1" | ||
cypress-axe: "npm:1.5.0" | ||
languageName: unknown | ||
linkType: soft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1521399
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1521399
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1521399
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1521399
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
win32 x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1521399
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally: