Skip to content

Commit

Permalink
Merge branch 'next' into autocomplete-limit-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Aug 20, 2024
2 parents 3456b2c + 3208bfe commit 22bcbbe
Show file tree
Hide file tree
Showing 1,019 changed files with 37,622 additions and 17,314 deletions.
12 changes: 6 additions & 6 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ node 14
# `npx browserslist --mobile-to-desktop "> 0.5%, last 2 versions, Firefox ESR, not dead, safari >= 15.4, iOS >= 15.4"` when the last major is released.
# Explicit safari versions are here based on the agreed terms in: https://github.com/mui/material-ui/issues/40958#issuecomment-1953215043
#
# After you update the version, you might need to run `npx update-browserslist-db@latest` to update caniuse-lite to gather latest browser versions.
# After you update the version, you might need to run `npx update-browserslist-db@latest` to update caniuse-lite to gather latest browser versions.
# Otherwise, running `pnpm build` might fail due to unknown browser versions.
#
# On update, sync references where "#stable-snapshot" is mentioned in the codebase.
Expand Down Expand Up @@ -75,20 +75,20 @@ samsung 22
# snapshot of `npx browserslist "maintained node versions"`
# On update check all #stable-snapshot markers
[node]
node 12.0
node 14.0

# same as `node`
[coverage]
node 12.0
node 14.0

# same as `node`
[development]
node 12.0
node 14.0

# same as `node`
[test]
node 12.0
node 14.0

# same as `node`
[benchmark]
node 12.0
node 14.0
34 changes: 20 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
aws-cli: circleci/aws-cli@4.1.3
aws-cli: circleci/aws-cli@4.2.3
aws-s3: circleci/aws-s3@4.0

parameters:
Expand Down Expand Up @@ -299,6 +299,12 @@ jobs:
command: |
pnpm docs:link-check
git add -A && git diff --exit-code --staged
- run:
name: Update the templates shared themes
command: pnpm template:update-theme
- run:
name: '`pnpm template:update-theme` changes committed?'
command: git add -A && git diff --exit-code --staged
test_types:
<<: *default-job
resource_class: 'medium+'
Expand Down Expand Up @@ -392,7 +398,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -422,7 +428,7 @@ jobs:
test_e2e:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -436,7 +442,7 @@ jobs:
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -451,7 +457,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -478,7 +484,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -532,7 +538,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -556,7 +562,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -580,7 +586,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -604,7 +610,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -628,7 +634,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -652,7 +658,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -680,7 +686,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -781,7 +787,7 @@ jobs:
test_benchmark:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
2 changes: 2 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"packages/mui-lab",
"packages/mui-material-nextjs",
"packages/mui-material",
"packages/mui-material-pigment-css",
"packages/mui-private-theming",
"packages/mui-styled-engine-sc",
"packages/mui-styled-engine",
Expand All @@ -38,6 +39,7 @@
"@mui/lab": "packages/mui-lab/build",
"@mui/material-nextjs": "packages/mui-material-nextjs/build",
"@mui/material": "packages/mui-material/build",
"@mui/material-pigment-css": "packages/mui-material-pigment-css/build",
"@mui/private-theming": "packages/mui-private-theming/build",
"@mui/styled-engine": "packages/mui-styled-engine/build",
"@mui/styled-engine-sc": "packages/mui-styled-engine-sc/build",
Expand Down
65 changes: 41 additions & 24 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ const forbidCreateStylesMessage =

const ENABLE_REACT_COMPILER_PLUGIN = false;

const NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES = [
{
name: '@mui/material',
message: OneLevelImportMessage,
},
{
name: '@mui/lab',
message: OneLevelImportMessage,
},
];

const NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED = [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
];

module.exports = {
root: true, // So parent files don't get applied
env: {
Expand Down Expand Up @@ -67,20 +93,7 @@ module.exports = {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
],
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
'no-continue': 'off',
Expand Down Expand Up @@ -171,6 +184,7 @@ module.exports = {
// This rule is great for raising people awareness of what a key is and how it works.
'react/no-array-index-key': 'off',
'react/no-danger': 'error',
'react/no-unknown-property': ['error', { ignore: ['sx'] }],
'react/no-direct-mutation-state': 'error',
// Not always relevant
'react/require-default-props': 'off',
Expand Down Expand Up @@ -417,23 +431,26 @@ module.exports = {
'no-bitwise': 'off',
},
},
{
files: ['docs/**/*{.ts,.tsx,.js}'],
rules: {
'no-restricted-imports': [
'error',
{
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
},
},
{
files: ['packages/*/src/**/*{.ts,.tsx,.js}'],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@mui/material',
message: OneLevelImportMessage,
},
{
name: '@mui/lab',
message: OneLevelImportMessage,
},
],
paths: NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES,
},
],
// TODO: Consider setting back to `ignoreExternal: true` when the expected behavior is fixed:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
pull_request:
paths-ignore:
# should sync with ci-check.yml as a workaround to bypass github checks
- 'docs/**'
- 'examples/**'

permissions: {}
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@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
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@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/analyze@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
23 changes: 23 additions & 0 deletions .github/workflows/publish-canaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish canary packages to npm

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Use Node.js 18.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- run: pnpm install
- run: pnpm canary:release --ignore @mui/icons-material --yes --skip-last-commit-comparison
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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 @@ -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@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enable-pre-post-scripts = true
manage-package-manager-versions = true
Loading

0 comments on commit 22bcbbe

Please sign in to comment.