Skip to content

Commit

Permalink
Update yarn to v3, patch Storybook test-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
hansottowirtz committed Dec 31, 2022
1 parent 8850a55 commit 97a31c1
Show file tree
Hide file tree
Showing 7 changed files with 14,395 additions and 9,651 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ node_modules
/build
/storybook-static
*.tgz

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/dist/cjs/setup-page.js b/dist/cjs/setup-page.js
index 146013ce23b35dba71fcb1dee5a8d21e157871d9..85ba9a17970633220184f4ed679530a0fd891472 100644
--- a/dist/cjs/setup-page.js
+++ b/dist/cjs/setup-page.js
@@ -88,7 +88,8 @@ const setupPage = async page => {
}

function safeStringify(obj, replacer, spaces, cycleReplacer) {
- return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
+ return "Some error";
+ // return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
}

function composeMessage(args) {
diff --git a/dist/esm/setup-page.js b/dist/esm/setup-page.js
index b4d9f31190ad885717faa32fac701549acade411..0e69a4754e9b7058345995ab51f1e3b382edf2dc 100644
--- a/dist/esm/setup-page.js
+++ b/dist/esm/setup-page.js
@@ -81,7 +81,8 @@ export const setupPage = async page => {
}

function safeStringify(obj, replacer, spaces, cycleReplacer) {
- return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
+ return "Some error";
+ // return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
}

function composeMessage(args) {
823 changes: 823 additions & 0 deletions .yarn/releases/yarn-3.3.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.3.1.cjs
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"build-storybook": "storybook build",
"test": "npm run test-storybook",
"test-storybook": "test-storybook",
"test-debug": "cross-env DEBUG=true PWDEBUG=1 npm run test-storybook",
"prepublishOnly": "npm run build"
},
"files": [
Expand All @@ -41,12 +42,17 @@
"@types/react-dom": "^18.0.9",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"cross-env": "^7.0.3",
"eslint": "^8.29.0",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"storybook": "^7.0.0-alpha.57",
"tsup": "^6.5.0",
"typescript": "~4.9.3",
"vite": "^4.0.3"
},
"packageManager": "[email protected]",
"resolutions": {
"@storybook/test-runner@^0.10.0-next.4": "patch:@storybook/test-runner@npm%3A0.10.0-next.4#./.yarn/patches/@storybook-test-runner-npm-0.10.0-next.4-ec2685f2d3.patch"
}
}
20 changes: 20 additions & 0 deletions test-runner-jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const { getJestConfig } = require('@storybook/test-runner');

module.exports = {
// The default configuration comes from @storybook/test-runner
...getJestConfig(),
/** Add your own overrides below
* @see https://jestjs.io/docs/configuration
*/
testEnvironmentOptions: {
'jest-playwright': {
browser: 'chromium',
launchOptions: process.env.DEBUG ? {
headless: false,
devtools: true,
} : {}
}
}
};
23,157 changes: 13,506 additions & 9,651 deletions yarn.lock

Large diffs are not rendered by default.

1 comment on commit 97a31c1

@vercel
Copy link

@vercel vercel bot commented on 97a31c1 Dec 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.