-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Satisfy new yarn peer behavior #6767
Changes from all commits
85d85a7
6b5b3d7
5b67279
7afd7a1
c6024ae
d6d1b0d
c71e2f0
1541898
4001dcd
665f306
cc0412f
5ab222a
1b20dbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"check-types": "tsc && tsc-strict", | ||
"install-16": "yarn add react@^16.8.0 react-dom@^16.8.0 @testing-library/react@^12 @testing-library/react-hooks@^8 @testing-library/dom@^8 && node scripts/oldReactSupport.mjs", | ||
"install-17": "yarn add react@^17 react-dom@^17 @testing-library/react@^12 @testing-library/react-hooks@^8 @testing-library/dom@^8 && node scripts/oldReactSupport.mjs", | ||
"install-19": "node ./scripts/install-react-19.mjs && yarn add react@next react-dom@next", | ||
"install-16": "node scripts/react-16-install-prep.mjs && yarn add react@^16.8.0 react-dom@^16.8.0 @testing-library/react@^12 @testing-library/react-hooks@^8 @testing-library/dom@^8 react-test-renderer@^16.9.0 && node scripts/oldReactSupport.mjs", | ||
"install-17": "node scripts/react-17-install-prep.mjs && yarn add react@^17 react-dom@^17 @testing-library/react@^12 @testing-library/react-hooks@^8 @testing-library/dom@^8 react-test-renderer@^16.9.0 && node scripts/oldReactSupport.mjs", | ||
"install-19": "node scripts/react-19-install-prep.mjs && yarn add react@next react-dom@next", | ||
"start": "cross-env NODE_ENV=storybook storybook dev -p 9003 --ci -c '.storybook'", | ||
"build:storybook": "storybook build -c .storybook -o dist/$(git rev-parse HEAD)/storybook", | ||
"build:storybook-16": "storybook build -c .storybook -o dist/$(git rev-parse HEAD)/storybook-16", | ||
|
@@ -112,10 +112,11 @@ | |
"@storybook/react": "^7.6.19", | ||
"@storybook/test-runner": "^0.16.0", | ||
"@storybook/testing-library": "^0.2.2", | ||
"@swc/core": "^1.3.36", | ||
"@swc/jest": "^0.2.36", | ||
"@testing-library/dom": "^10.1.0", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^15.0.0", | ||
"@testing-library/react": "^15.0.7", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@types/react": "npm:[email protected]", | ||
"@types/react-dom": "npm:[email protected]", | ||
|
@@ -142,9 +143,9 @@ | |
"css-parse": "^2.0.0", | ||
"delta-e": "^0.0.8", | ||
"diff": "^5.1.0", | ||
"eslint": "^8.38.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jest": "^27.2.1", | ||
"eslint-plugin-jest": "^28.6.0", | ||
"eslint-plugin-jsdoc": "^40.3.0", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-monorepo": "^0.3.2", | ||
|
@@ -156,6 +157,7 @@ | |
"framer-motion": "^11.3.0-alpha.0", | ||
"fs-extra": "^10.0.0", | ||
"full-icu": "^1.3.0", | ||
"glob": "^8.0.3", | ||
"glob-promise": "^6.0.5", | ||
"identity-obj-proxy": "^3.0.0", | ||
"ignore-styles": "^5.0.1", | ||
|
@@ -184,7 +186,7 @@ | |
"react-axe": "^3.0.2", | ||
"react-dom": "^18.2.0", | ||
"react-frame-component": "^5.0.0", | ||
"react-test-renderer": "^16.9.0", | ||
"react-test-renderer": "^18.3.1", | ||
"recast": "^0.23", | ||
"recursive-readdir": "^2.2.2", | ||
"regenerator-runtime": "0.13.3", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are all versions which can't be easily changed through the yarn cli like we do with react, react-dom at the root level, but it's just helping to tie down certain versions so we don't have duplicates installed and they are all versions which work with the react version we've installed |
||
import fs from 'node:fs'; | ||
|
||
try { | ||
let content = fs.readFileSync('./package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.resolutions['react'] = '^16.8.0'; | ||
pkg.resolutions['react-dom'] = '^16.8.0'; | ||
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/@react-aria/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.peerDependencies['@testing-library/react'] = '^12'; | ||
fs.writeFileSync('./packages/@react-aria/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/@react-spectrum/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.peerDependencies['@testing-library/react'] = '^12'; | ||
fs.writeFileSync('./packages/@react-spectrum/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/dev/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.dependencies['@testing-library/react'] = '^12'; | ||
pkg.dependencies['@testing-library/react-hooks'] = '^8'; | ||
fs.writeFileSync('./packages/dev/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
import fs from 'node:fs'; | ||
|
||
try { | ||
let content = fs.readFileSync('./package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.resolutions['react'] = '^17.0.2'; | ||
pkg.resolutions['react-dom'] = '^17.0.2'; | ||
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/@react-aria/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.peerDependencies['@testing-library/react'] = '^12'; | ||
fs.writeFileSync('./packages/@react-aria/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/@react-spectrum/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.peerDependencies['@testing-library/react'] = '^12'; | ||
fs.writeFileSync('./packages/@react-spectrum/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} | ||
|
||
try { | ||
let content = fs.readFileSync('./packages/dev/test-utils/package.json', 'utf8'); | ||
let pkg = JSON.parse(content); | ||
pkg.dependencies['@testing-library/react'] = '^12'; | ||
fs.writeFileSync('./packages/dev/test-utils/package.json', JSON.stringify(pkg, null, 2)); | ||
} catch (e) { | ||
console.error('Error:', e); | ||
} |
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.
why only react-dom and not react?
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.
react is already in the peerDeps, so something else will supply it
nothing is 'technically' supplying react-dom, which the test-utils-internal are requesting, so had to add react-dom here just for dev work