Skip to content

Commit a707c5b

Browse files
refactor: stage 2, upgrade cl packages that have minor feature updates (#567)
* update ejs package * update moment package * update react-responsive package * update react-uid package * update @babel/cli package * update youtube-player package * update react-modal package * update react-currency-format package * update react-canvas-confetti package * update prop-types package * update prettier package * update jest-styled-components package * update eslint-plugin-import package * update eslint-plugin-jsx-a11y package * update eslint-plugin-react package * update eslint-plugin-react-hooks package * snapshots * jest console errors, fix otherAmountValue undefined * add otherAmountValue default prop * fix lint errors, Input.js label, any => string * fix lint errors, errormsg is not an attribute of vanilla input tag * snaps * fix lint errors, MarketingPreferencesDS missing proptypes for children * fix lint errors, MarketingPreferencesDS, add disabled propType * remove unused depcheck, ejs package crept back in * fix: remove unused and failing value prop * Empty commit to trigger build * fix: remove unused husky package that has crept back in * refactor: upgrade packages that have updates even while upgrading --------- Co-authored-by: Andy E Phipps <a.phipps@comicrelief.com>
1 parent 872048d commit a707c5b

10 files changed

Lines changed: 850 additions & 131 deletions

File tree

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@
2121
"url": "https://github.com/comicrelief/component-library.git"
2222
},
2323
"dependencies": {
24-
"@babel/cli": "^7.14.8",
24+
"@babel/cli": "^7.21.5",
2525
"@hookform/resolvers": "^1.3.4",
2626
"axios": "^0.21.1",
2727
"ejs": "^3.1.9",
28-
"jest-styled-components": "^7.0.5",
28+
"jest-styled-components": "^7.1.1",
2929
"lazysizes": "^5.3.2",
3030
"lodash": "^4.17.11",
3131
"moment": "^2.29.4",
32-
"prop-types": "^15.7.2",
32+
"prop-types": "^15.8.1",
3333
"react": "^17.0.2",
34-
"react-canvas-confetti": "^1.3.0",
35-
"react-currency-format": "^1.0.0",
34+
"react-canvas-confetti": "^1.4.0",
35+
"react-currency-format": "^1.1.0",
3636
"react-dom": "^17.0.2",
3737
"react-hook-form": "^6.3.0",
38-
"react-modal": "^3.14.3",
38+
"react-modal": "^3.16.1",
3939
"react-responsive": "^9.0.2",
4040
"react-scripts": "4.0.3",
4141
"react-spinners": "^0.11.0",
4242
"react-styleguidist": "^11.1.7",
4343
"react-test-renderer": "^17.0.2",
44-
"react-uid": "^2.3.2",
45-
"styled-components": "^5.3.1",
46-
"youtube-player": "^5.5.2",
44+
"react-uid": "^2.3.3",
45+
"styled-components": "^5.3.11",
46+
"youtube-player": "^5.6.0",
4747
"yup": "^0.32.9"
4848
},
4949
"resolutions": {
@@ -78,13 +78,13 @@
7878
"cypress": "^8.3.0",
7979
"eslint": "^7.32.0",
8080
"eslint-config-airbnb": "^18.2.0",
81-
"eslint-plugin-import": "^2.24.2",
82-
"eslint-plugin-jsx-a11y": "^6.3.1",
83-
"eslint-plugin-react": "^7.24.0",
84-
"eslint-plugin-react-hooks": "^4.0.5",
81+
"eslint-plugin-import": "^2.27.5",
82+
"eslint-plugin-jsx-a11y": "^6.7.1",
83+
"eslint-plugin-react": "^7.32.2",
84+
"eslint-plugin-react-hooks": "^4.6.0",
8585
"jest": "^26.1.0",
8686
"npm-run-all": "^4.1.5",
87-
"prettier": "^2.3.2",
87+
"prettier": "^2.8.8",
8888
"semantic-release": "^17.4.6"
8989
}
9090
}

src/components/Atoms/Input/Input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const InputField = styled.input`${({ theme, error, prefixLength }) => css`
2323
border-color: ${error ? theme.color('red') : theme.color('grey_medium')};
2424
box-shadow: none;
2525
appearance: none;
26-
color: ${theme.color('black')};
26+
color: ${theme.color('black')};
2727
border-radius: ${spacing('sm')};
2828
font-size: inherit;
2929
z-index: 2;
@@ -119,7 +119,7 @@ Input.propTypes = {
119119
id: PropTypes.string.isRequired,
120120
/** text, email, number, date, search, tel, url, password */
121121
type: PropTypes.string.isRequired,
122-
labelProps: PropTypes.objectOf(PropTypes.any),
122+
labelProps: PropTypes.objectOf(PropTypes.string),
123123
// className is needed so that styled(`Input`) will work
124124
// (as `rest` is not spread on the outermost component)
125125
className: PropTypes.string,

src/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ const KEY_CODE_ESCAPE = 27;
2222
* This component deals with the visual aspect of a text input with typeahead-style functionality
2323
*
2424
* API querying and state management (aside from that related to keyboard usage/accessibility) are
25-
* handled by the parent component (via the value, options, onChange and onSelect props)
25+
* handled by the parent component (options, onChange and onSelect props)
2626
*
2727
* See the Typeahead and SchoolLookup molecules for the full implementation
2828
*/
2929
const TextInputWithDropdown = React.forwardRef(
3030
(
3131
{
32-
value,
3332
options,
3433
onChange,
3534
onSelect,
@@ -76,7 +75,6 @@ const TextInputWithDropdown = React.forwardRef(
7675
};
7776

7877
const inputProps = {
79-
value,
8078
onChange,
8179
id,
8280
name,
@@ -178,7 +176,6 @@ const Options = ({
178176
};
179177

180178
TextInputWithDropdown.propTypes = {
181-
value: PropTypes.string.isRequired,
182179
options: PropTypes.arrayOf(PropTypes.string).isRequired,
183180
onChange: PropTypes.func.isRequired,
184181
onSelect: PropTypes.func.isRequired,

src/components/Organisms/Donate/Form/Form.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,13 @@ Signup.propTypes = {
313313
PopUpText: PropTypes.string.isRequired,
314314
chooseAmountText: PropTypes.string.isRequired,
315315
submitButtonColor: PropTypes.string.isRequired,
316-
otherAmountValue: PropTypes.number.isRequired
316+
otherAmountValue: PropTypes.number
317317
};
318318

319319
Signup.defaultProps = {
320320
noMoneyBuys: false,
321-
data: {}
321+
data: {},
322+
otherAmountValue: null
322323
};
323324

324325
export default Signup;

src/components/Organisms/Donate/GivingSelector/GivingSelector.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const GivingSelector = ({
2626
value="Single"
2727
type="radio"
2828
label=""
29-
errormsg=""
3029
checked={givingType === 'single'}
3130
onClick={() => handleGivingTypeChange('single', givingType)}
3231
/>
@@ -40,7 +39,6 @@ const GivingSelector = ({
4039
value="Monthly"
4140
type="radio"
4241
label=""
43-
errormsg=""
4442
checked={givingType === 'monthly'}
4543
onClick={() => handleGivingTypeChange('monthly', givingType)}
4644
/>

src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
543543
aria-label="Single"
544544
checked={true}
545545
className="give-once"
546-
errormsg=""
547546
id="give-once--mship-4"
548547
label=""
549548
onClick={[Function]}
@@ -560,7 +559,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
560559
aria-label="Monthly"
561560
checked={false}
562561
className="give-monthly"
563-
errormsg=""
564562
id="give-monthly--mship-4"
565563
label=""
566564
onClick={[Function]}
@@ -1286,7 +1284,6 @@ exports[`Monthly donation renders correctly 1`] = `
12861284
aria-label="Single"
12871285
checked={true}
12881286
className="give-once"
1289-
errormsg=""
12901287
id="give-once--mship-1"
12911288
label=""
12921289
onClick={[Function]}
@@ -1303,7 +1300,6 @@ exports[`Monthly donation renders correctly 1`] = `
13031300
aria-label="Monthly"
13041301
checked={false}
13051302
className="give-monthly"
1306-
errormsg=""
13071303
id="give-monthly--mship-1"
13081304
label=""
13091305
onClick={[Function]}

src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ exports[`renders correctly 1`] = `
397397
Subscribe
398398
</span>
399399
<div
400-
className="ButtonWithStates__LoaderContainer-sc-7gb81g-1"
400+
className=""
401401
/>
402402
</button>
403403
</div>

src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ exports[`renders correctly 1`] = `
563563
className="c2"
564564
>
565565
<div
566-
className="Footerstyle__SocialIconWrapper-sc-167xaf5-7"
566+
className=""
567567
>
568568
<ul
569569
className="c3"

src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,16 @@ MarketingPreferencesDS.defaultProps = {
263263
formContext: null
264264
};
265265

266+
MaybeDisabled.propTypes = {
267+
children: PropTypes.node,
268+
disabled: PropTypes.bool
269+
};
270+
271+
MaybeDisabled.defaultProps = {
272+
children: null,
273+
disabled: false
274+
};
275+
266276
export {
267277
MarketingPreferencesDS, setInitialValues, buildValidationSchema
268278
};

0 commit comments

Comments
 (0)