Skip to content

fix(deps): update dependency @monaco-editor/react to ^4.7.0 #11527

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-code-editor/package.json
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
"clean": "rimraf dist"
},
"dependencies": {
"@monaco-editor/react": "^4.6.0",
"@monaco-editor/react": "^4.7.0",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
26 changes: 12 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -2760,27 +2760,25 @@ __metadata:
languageName: node
linkType: hard

"@monaco-editor/loader@npm:^1.4.0":
version: 1.4.0
resolution: "@monaco-editor/loader@npm:1.4.0"
"@monaco-editor/loader@npm:^1.5.0":
version: 1.5.0
resolution: "@monaco-editor/loader@npm:1.5.0"
dependencies:
state-local: "npm:^1.0.6"
peerDependencies:
monaco-editor: ">= 0.21.0 < 1"
checksum: 10c0/68938350adf2f42363a801d87f5d00c87d397d4cba7041141af10a9216bd35c85209b4723a26d56cb32e68eef61471deda2a450f8892891118fbdce7fa1d987d
checksum: 10c0/d8e1fd75fea113b4d91405784ed4db757df450c6e57a85e87728281e819a73a3ef9fe0cbb1dc1509456f1e895ad9c11e4748f80b68900cb6cf600170e14ce6ed
languageName: node
linkType: hard

"@monaco-editor/react@npm:^4.6.0":
version: 4.6.0
resolution: "@monaco-editor/react@npm:4.6.0"
"@monaco-editor/react@npm:^4.7.0":
version: 4.7.0
resolution: "@monaco-editor/react@npm:4.7.0"
dependencies:
"@monaco-editor/loader": "npm:^1.4.0"
"@monaco-editor/loader": "npm:^1.5.0"
peerDependencies:
monaco-editor: ">= 0.25.0 < 1"
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 10c0/231e9a9b66a530db326f6732de0ebffcce6b79dcfaf4948923d78b9a3d5e2a04b7a06e1f85bbbca45a5ae15c107a124e4c5c46cabadc20a498fb5f2d05f7f379
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
checksum: 10c0/a4e91c6eda1a71f5fd23871bd801de435490ccbc43934d23cba65cefe2be7e9d02c9a57c4ef80fc9fe99e4d4deea51e5db19cb4e0ecf3f51818dda0eb9cdbf12
languageName: node
linkType: hard

@@ -3722,7 +3720,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@patternfly/react-code-editor@workspace:packages/react-code-editor"
dependencies:
"@monaco-editor/react": "npm:^4.6.0"
"@monaco-editor/react": "npm:^4.7.0"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"

Unchanged files with check annotations Beta

if (Array.isArray(hasPatterns)) {
for (let i = 0; i < defaultPatternScale.length; i++) {
if (!(i < hasPatterns.length && hasPatterns[i])) {
defaultPatternScale[i] = null;

Check warning on line 349 in packages/react-charts/src/victory/components/ChartUtils/chart-patterns.tsx

GitHub Actions / Lint

Mutating component props or hook arguments is not allowed. Consider using a local variable instead
}
}
} else if (hasPatterns === false) {
const [scrollElement, setScrollElement] = React.useState(null);
const toggleVisible = () => {

Check warning on line 36 in packages/react-core/src/components/BackToTop/BackToTop.tsx

GitHub Actions / Lint

The 'toggleVisible' function makes the dependencies of useEffect Hook (at line 74) change on every render. Move it inside the useEffect callback. Alternatively, wrap the definition of 'toggleVisible' in its own useCallback() Hook
if (scrollElement) {
const scrolled = scrollElement.scrollY ? scrollElement.scrollY : scrollElement.scrollTop;
if (!isAlwaysVisible) {
} else if (!dateProp) {
setFocusedDate(today);
}
}, [dateProp]);

Check warning on line 184 in packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx

GitHub Actions / Lint

React Hook useEffect has a missing dependency: 'focusedDate'. Either include it or remove the dependency array
useEffect(() => {
// Calendar month should not be focused on page load
if ((shouldFocus || isDateFocused) && focusedDateValidated && focusRef.current) {
focusRef.current.focus();
}
}, [focusedDate, isDateFocused, focusedDateValidated, focusRef]);

Check warning on line 191 in packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx

GitHub Actions / Lint

React Hook useEffect has a missing dependency: 'shouldFocus'. Either include it or remove the dependency array
const onMonthClick = (ev: React.MouseEvent, newDate: Date) => {
setFocusedDate(newDate);
label={mod}
isChecked={modifiers[mod]}
onChange={(_event, checked) => {
modifiers[mod] = checked;

Check warning on line 18 in packages/react-core/src/components/Card/examples/CardWithModifiers.tsx

GitHub Actions / Lint

This mutates a variable that React considers immutable
setModifiers({ ...modifiers });
}}
/>
const [selectOpen, setSelectOpen] = React.useState(false);
const [pristine, setPristine] = React.useState(true);
const [textInputFocused, setTextInputFocused] = React.useState(false);
const widthChars = React.useMemo(() => Math.max(dateFormat(new Date()).length, placeholder.length), [dateFormat]);

Check warning on line 134 in packages/react-core/src/components/DatePicker/DatePicker.tsx

GitHub Actions / Lint

React Hook React.useMemo has a missing dependency: 'placeholder.length'. Either include it or remove the dependency array
const style = { [cssFormControlWidthChars.name]: widthChars, ...styleProps };
const buttonRef = React.useRef<HTMLButtonElement>(undefined);
const datePickerWrapperRef = React.useRef<HTMLDivElement>(undefined);
React.useEffect(() => {
setValue(valueProp);
setValueDate(dateParse(valueProp));
}, [valueProp]);

Check warning on line 145 in packages/react-core/src/components/DatePicker/DatePicker.tsx

GitHub Actions / Lint

React Hook React.useEffect has a missing dependency: 'dateParse'. Either include it or remove the dependency array. If 'dateParse' changes too often, find the parent component that defines it and wrap that definition in useCallback
React.useEffect(() => {
if (isValidDate(valueDate)) {
applyValidators(valueDate);
}
}, [validators]);

Check warning on line 151 in packages/react-core/src/components/DatePicker/DatePicker.tsx

GitHub Actions / Lint

React Hook React.useEffect has missing dependencies: 'applyValidators' and 'valueDate'. Either include them or remove the dependency array
React.useEffect(() => {
setPristine(!value);
if (value === '' && !pristine && !textInputFocused) {
dateIsRequired ? setErrorText(emptyDateText) : setErrorText('');
}
}, [value]);

Check warning on line 162 in packages/react-core/src/components/DatePicker/DatePicker.tsx

GitHub Actions / Lint

React Hook React.useEffect has missing dependencies: 'applyValidators', 'dateIsRequired', 'dateParse', 'emptyDateText', 'errorText', 'pristine', and 'textInputFocused'. Either include them or remove the dependency array. If 'dateParse' changes too often, find the parent component that defines it and wrap that definition in useCallback
const applyValidators = (date: Date) => {
setErrorText(validators.map((validator) => validator(date)).join('\n') || '');
},
isCalendarOpen: popoverOpen
}),
[setPopoverOpen, popoverOpen, selectOpen]

Check warning on line 228 in packages/react-core/src/components/DatePicker/DatePicker.tsx

GitHub Actions / Lint

React Hook useImperativeHandle has an unnecessary dependency: 'selectOpen'. Either exclude it or remove the dependency array
);
const createFocusSelectorString = (modifierClass: string) =>