Skip to content

Commit

Permalink
Merge branch 'mui:master' into fix/logo-pointer-cursor-hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Asin-Junior-Honore authored Oct 8, 2024
2 parents 071cbf4 + e1f01cf commit 678d1d2
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cherry-pick-next-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs cherry-pick') && github.event.pull_request.merged == true }}
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Cherry pick and create the new PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
# fetch all tags which are required for `pnpm release:changelog`
fetch-depth: 0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
2 changes: 1 addition & 1 deletion .github/workflows/publish-canaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Set up pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
persist-credentials: false

Expand All @@ -43,6 +43,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
continue-on-error: true # GitHub Action flag needed until https://github.com/errata-ai/vale-action/issues/89 is fixed
with:
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"react-dom": "^18.3.1",
"react-is": "^18.3.1",
"react-jss": "^10.10.0",
"react-redux": "^8.1.3",
"react-redux": "^9.1.2",
"redux": "^4.2.1",
"serve-handler": "^6.1.5",
"styled-components": "^6.1.13",
Expand Down
12 changes: 6 additions & 6 deletions docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const nextRolesData = [
{
title: 'Engineering',
roles: [
{
title: 'React Engineer — Docs-infra',
description:
'You will drive the development and maintenance of the documentation platform that powers all MUI products.',
url: '/careers/react-engineer-docs-infra/',
},
// {
// title: 'React Engineer — Docs-infra',
// description:
// 'You will drive the development and maintenance of the documentation platform that powers all MUI products.',
// url: '/careers/react-engineer-docs-infra/',
// },
{
title: 'React Tech Lead — Core',
description:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"@playwright/test": "1.47.2",
"@types/babel__core": "^7.20.5",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.9",
"@types/lodash": "^4.17.10",
"@types/mocha": "^10.0.8",
"@types/node": "^20.16.10",
"@types/react": "^18.3.6",
Expand All @@ -157,7 +157,7 @@
"eslint-import-resolver-webpack": "^0.13.9",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-material-ui": "workspace:^",
"eslint-plugin-mocha": "^10.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/babel__core": "^7.20.5",
"@types/chai": "^4.3.20",
"@types/doctrine": "^0.0.9",
"@types/lodash": "^4.17.9",
"@types/lodash": "^4.17.10",
"@types/node": "^20.16.10",
"@types/react": "^18.3.6",
"@types/uuid": "^9.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-system/src/Grid/createGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default function createGrid(
>
{React.Children.map(children, (child) => {
if (
React.isValidElement(child) &&
React.isValidElement<{ container?: unknown }>(child) &&
isMuiElement(child, ['Grid']) &&
container &&
child.props.container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import * as React from 'react';
describe('getReactElementRef', () => {
it('should return undefined when not used correctly', () => {
// @ts-expect-error
expect(getReactElementRef(false)).to.equal(undefined);
expect(getReactElementRef(false)).to.equal(null);
// @ts-expect-error
expect(getReactElementRef()).to.equal(undefined);
expect(getReactElementRef()).to.equal(null);
// @ts-expect-error
expect(getReactElementRef(1)).to.equal(undefined);
expect(getReactElementRef(1)).to.equal(null);

const children = [<div key="1" />, <div key="2" />];
// @ts-expect-error
expect(getReactElementRef(children)).to.equal(undefined);
expect(getReactElementRef(children)).to.equal(null);
});

it('should return the ref of a React element', () => {
Expand Down
10 changes: 4 additions & 6 deletions packages/mui-utils/src/getReactElementRef/getReactElementRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import * as React from 'react';
* It will throw runtime error if the element is not a valid React element.
*
* @param element React.ReactElement
* @returns React.Ref<any> | null | undefined
* @returns React.Ref<any> | null
*/
export default function getReactElementRef(
element: React.ReactElement,
): React.Ref<any> | null | undefined {
export default function getReactElementRef(element: React.ReactElement): React.Ref<any> | null {
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions
if (parseInt(React.version, 10) >= 19) {
return element.props?.ref;
return (element?.props as any)?.ref || null;
}
// @ts-expect-error element.ref is not included in the ReactElement type
// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189
return element?.ref;
return element?.ref || null;
}
Loading

0 comments on commit 678d1d2

Please sign in to comment.