Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into use-re-exported-u…
Browse files Browse the repository at this point in the history
…tils-in-docs
  • Loading branch information
LukasTy committed Jul 31, 2024
2 parents 23bbb3d + 42e02ea commit 4de4b8e
Show file tree
Hide file tree
Showing 878 changed files with 31,262 additions and 3,474 deletions.
50 changes: 29 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ commands:
description: 'Set to true if you intend to any browser (for example with playwright).'

steps:
- run:
name: Resolve React version
command: |
node scripts/useReactVersion.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- when:
condition: << parameters.browsers >>
steps:
Expand Down Expand Up @@ -97,16 +90,14 @@ commands:
pnpm --version
- run:
name: Install js dependencies
command: pnpm install

- run:
name: Resolve React version
command: |
echo "React version $REACT_VERSION"
if [ $REACT_VERSION == "stable" ];
then
echo "pnpm install"
pnpm install
else
echo "pnpm install --no-frozen-lockfile"
pnpm install --no-frozen-lockfile
fi
pnpm use-react-version
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- when:
condition: << parameters.browsers >>
Expand Down Expand Up @@ -134,7 +125,8 @@ jobs:
- run:
name: '`pnpm dedupe` was run?'
command: |
if [[ $(git diff --name-status next | grep pnpm-lock) == "" ]];
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
Expand All @@ -145,9 +137,6 @@ jobs:
steps:
- checkout
- install_js
- run:
name: Tests charts
command: pnpm test:charts:unit # Run special test for charts due to ESM compatibility issue
- run:
name: Tests fake browser
command: pnpm test:coverage
Expand Down Expand Up @@ -185,7 +174,14 @@ jobs:
- install_js
- run:
name: '`pnpm prettier` changes committed?'
command: pnpm prettier --check
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
pnpm prettier --check
else
pnpm prettier:check
fi
- run:
name: Generate PropTypes
command: pnpm proptypes
Expand Down Expand Up @@ -213,6 +209,18 @@ jobs:
command: |
pnpm docs:link-check
git add -A && git diff --exit-code --staged
- run:
name: '`pnpm @mui/x-charts-vendor build` was run?'
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
pnpm --filter @mui/x-charts-vendor build
git add -A && git diff --exit-code --staged
fi
test_browser:
<<: *default-job
docker:
Expand Down
2 changes: 2 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"packages/x-date-pickers",
"packages/x-date-pickers-pro",
"packages/x-charts",
"packages/x-charts-vendor",
"packages/x-tree-view",
"packages/x-internals"
],
Expand All @@ -23,6 +24,7 @@
"@mui/x-date-pickers": "packages/x-date-pickers/build",
"@mui/x-date-pickers-pro": "packages/x-date-pickers-pro/build",
"@mui/x-charts": "packages/x-charts/build",
"@mui/x-charts-vendor": "packages/x-charts-vendor",
"@mui/x-charts-pro": "packages/x-charts-pro/build",
"@mui/x-tree-view": "packages/x-tree-view/build",
"@mui/x-tree-view-pro": "packages/x-tree-view-pro/build",
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ netlify/functions
/docs/pages/playground/
/lerna.json
/packages/x-codemod/src/**/*.spec.js
/packages/x-charts-vendor
build
/coverage
CHANGELOG.md
dist
node_modules
Expand Down
12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report 🐛
description: Create a bug report for MUI X.
labels: ['status: waiting for maintainer']
labels: ['status: waiting for maintainer', 'bug 🐛']
body:
- type: markdown
attributes:
Expand All @@ -20,6 +20,16 @@ body:
options:
- label: I have tested the latest version
required: true
- type: dropdown
attributes:
label: Affected products
description: Which products are affected by this issue? If you're not sure, leave this blank.
multiple: true
options:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
- type: textarea
attributes:
label: Steps to reproduce
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request 💄
description: Suggest a new idea for MUI X.
labels: ['status: waiting for maintainer']
labels: ['status: waiting for maintainer', 'new feature']
body:
- type: markdown
attributes:
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/3.pro-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ body:
options:
- label: I have tested the latest version
required: true
- type: dropdown
attributes:
label: Affected products
description: Which products are affected by this issue? If you're not sure, leave this blank.
multiple: true
options:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
- type: textarea
attributes:
label: The problem in depth
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/4.premium-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ body:
options:
- label: I have tested the latest version
required: true
- type: dropdown
attributes:
label: Affected products
description: Which products are affected by this issue? If you're not sure, leave this blank.
multiple: true
options:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
- type: textarea
attributes:
label: The problem in depth
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/5.priority-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ body:
options:
- label: I have tested the latest version
required: true
- type: dropdown
attributes:
label: Affected products
description: Which products are affected by this issue? If you're not sure, leave this blank.
multiple: true
options:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
- type: textarea
attributes:
label: The problem in depth
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: typescript
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -29,4 +29,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@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
54 changes: 54 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Benchmarks

on:
push:
branches:
- 'master'
- 'next'
paths:
- 'packages/x-charts*/**'
pull_request:
types:
- labeled
- opened
- synchronize
- reopened
branches:
- 'master'
- 'next'

jobs:
benchmarks:
name: Benchmarks Charts
runs-on: ubuntu-latest
# L1: Run the benchmarks for pushes to the master or next branch and if the changes are in the charts package based on on.push.paths
# L2: Run the benchmarks if we add the label 'component: charts' to the pull request
# L3: Run the benchmarks for pull requests with the label 'component: charts'
# Yaml syntax looks a little weird, but it is correct.
if: >-
${{
(github.event_name == 'push') ||
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'component: charts') ||
(github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'component: charts'))
}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Use Node.js 20.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- run: pnpm install --frozen-lockfile
# Ensure we are running on the prod version of our libs
# Only charts and license are needed for the benchmarks
- run: pnpm --filter @mui/x-license build
- run: pnpm --filter @mui/x-charts build
- run: pnpm --filter @mui/x-charts-pro build
- name: Run benchmarks
uses: CodSpeedHQ/action@a58b84c0b61569a9cbb7cfb378cc849d65cf1ce5
with:
run: pnpm --filter @mui-x-internal/performance-charts test:performance
token: ${{ secrets.CODSPEED_TOKEN }}
55 changes: 19 additions & 36 deletions .github/workflows/issue-cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cleanup issue comment
name: Issue cleanup

on:
issues:
Expand All @@ -10,43 +10,26 @@ permissions: {}
jobs:
issue_cleanup:
runs-on: ubuntu-latest
name: Clean issue body and add support label
permissions:
issues: write
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Clean issue body
id: cleanup
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
})
const lines = issue.data.body.split('\n')
const _ = extractInputSection(lines, 'Latest version')
const searchKeywords = extractInputSection(lines, 'Search keywords')
const orderID = extractInputSection(lines, 'Order ID or Support key')
lines.push('')
lines.push('**Search keywords**: ' + searchKeywords)
if (orderID !== '' && orderID !== '_No response_') {
lines.push('**Order ID**: ' + orderID)
}
const body = lines.join('\n')
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
})
function extractInputSection(lines, title) {
const index = lines.findIndex(line => line.startsWith('###') && line.includes(title))
if (index === -1) {
return ''
}
return lines.splice(index, 4)[2].trim()
}
const script = require('./scripts/githubActions/issueBodyCleanup.js')
await script({core, github, context})
- name: Add support label
if: steps.cleanup.outputs.ORDER_ID != ''
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const script = require('./scripts/githubActions/orderIdValidation.js')
await script({core, github, context})
env:
ORDER_API_TOKEN: ${{ secrets.SHOP_AUTH_TOKEN }}
ORDER_ID: ${{ steps.cleanup.outputs.ORDER_ID }}
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
persist-credentials: false

- name: Run analysis
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -44,6 +44,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ performance-snapshot.json
.github/styles/Google
.github/styles/MUI
.github/styles/.vale-config
test-results
3 changes: 0 additions & 3 deletions .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ module.exports = {
// Mocha seems to ignore .next anyway (maybe because dotfiles?).
// We're leaving this to make sure.
'docs/.next/**',
// x-charts requires 'tsx/cjs' which conflict with the babel date-fns override for picker tests
'packages/x-charts/**',
'packages/x-charts-pro/**',
],
recursive: true,
timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs.
Expand Down
Loading

0 comments on commit 4de4b8e

Please sign in to comment.