Skip to content

Commit

Permalink
implement fix on only Joy UI
Browse files Browse the repository at this point in the history
Co-authored-by: seunexplicit <[email protected]>
  • Loading branch information
gitstart and seunexplicit committed Sep 22, 2023
2 parents c7ebd52 + 375358b commit b927019
Show file tree
Hide file tree
Showing 2,578 changed files with 94,365 additions and 63,914 deletions.
48 changes: 24 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1
orbs:
aws-s3: circleci/[email protected]
aws-cli: circleci/[email protected]
aws-s3: circleci/[email protected]

parameters:
browserstack-force:
Expand Down Expand Up @@ -227,7 +228,7 @@ jobs:
name: 'Write "use client" directive'
command: yarn rsc:build
- run:
name: '`yarn rsc:build` changes detected, "use client" missing from exports'
name: '`yarn rsc:build` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Generate the documentation
Expand Down Expand Up @@ -344,7 +345,7 @@ jobs:
<<: *defaults
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -374,7 +375,7 @@ jobs:
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -393,7 +394,7 @@ jobs:
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -408,7 +409,7 @@ jobs:
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -435,7 +436,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -489,7 +490,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -513,7 +514,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -537,7 +538,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -561,7 +562,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -585,7 +586,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -609,7 +610,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -637,7 +638,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -687,11 +688,12 @@ jobs:
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# Upload distributables to S3
- aws-s3/copy:
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: mui-material.tgz
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
- store_artifacts:
Expand All @@ -715,20 +717,18 @@ jobs:
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# persist size snapshot on S3
- aws-s3/copy:
arguments: --content-type application/json
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: size-snapshot.json
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
# symlink size-snapshot to latest
- aws-s3/copy:
arguments: --content-type application/json
aws-access-key-id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws-region: AWS_REGION_ARTIFACTS
aws-secret-access-key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
from: size-snapshot.json
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/latest/
- run:
Expand All @@ -739,7 +739,7 @@ jobs:
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.36.2-focal
- image: mcr.microsoft.com/playwright:v1.37.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
29 changes: 12 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ module.exports = {
{
patterns: [
'@mui/*/*/*',
// Begin block: Packages with files instead of packages in the top level
// Importing from the top level pulls in CommonJS instead of ES modules
// Allowing /icons as to reduce cold-start of dev builds significantly.
// There's nothing to tree-shake when importing from /icons this way:
// '@mui/icons-material/*/',
'@mui/utils/*',
// End block
// Macros are fine since their import path is transpiled away
'!@mui/utils/macros',
'@mui/utils/macros/*',
Expand Down Expand Up @@ -125,6 +118,7 @@ module.exports = {

'material-ui/docgen-ignore-before-comment': 'error',
'material-ui/rules-of-use-theme-variants': 'error',
'material-ui/no-empty-box': 'error',

'react-hooks/exhaustive-deps': ['error', { additionalHooks: 'useEnhancedEffect' }],
'react-hooks/rules-of-hooks': 'error',
Expand Down Expand Up @@ -217,15 +211,6 @@ module.exports = {
rules: {
// does not work with wildcard imports. Mistakes will throw at runtime anyway
'import/named': 'off',
'no-restricted-imports': [
'error',
{
// Use named import from `test/utils` instead.
// The other files are private.
patterns: ['test/utils/*'],
},
],

'material-ui/disallow-active-element-as-key-event-target': 'error',

// upgraded level from recommended
Expand Down Expand Up @@ -295,6 +280,16 @@ module.exports = {
'no-console': 'off',
},
},
// demos - proptype generation
{
files: ['docs/data/base/components/modal/UseModal.js'],
rules: {
'consistent-return': 'off',
'func-names': 'off',
'no-else-return': 'off',
'prefer-template': 'off',
},
},
{
files: ['docs/data/**/*{.tsx,.js}'],
excludedFiles: [
Expand Down Expand Up @@ -322,7 +317,7 @@ module.exports = {
'error',
{
patterns: [
// Allow deeper imports for TypeScript types. TODO?
// Allow deeper imports for TypeScript types. TODO remove
'@mui/*/*/*/*',
// Macros are fine since they're transpiled into something else
'!@mui/utils/macros/*.macro',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
# fetch all tags which are required for `yarn release:changelog`
fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
cache: 'yarn' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2
uses: github/codeql-action/init@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
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@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2
uses: github/codeql-action/analyze@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
4 changes: 4 additions & 0 deletions .github/workflows/ensure-triage-label.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Ensure triage label is present

on:
label:
types:
- deleted
issues:
types:
- opened

permissions: {}

jobs:
label_issues:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mark-duplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
issues: write
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@25379ae1ea683ac484497214db131ab8f003a52b # v3.5.1
uses: actions-cool/issues-helper@5457ae8d7c1dc20597a753501d30183ed8043c8b # v3.5.2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2
uses: github/codeql-action/upload-sarif@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
recursive: true,
timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
require: [require.resolve('./test/utils/setupBabel'), require.resolve('./test/utils/setupJSDOM')],
require: ['@mui-internal/test-utils/setupBabel', '@mui-internal/test-utils/setupJSDOM'],
'watch-ignore': [
// default
'.git',
Expand Down
Loading

0 comments on commit b927019

Please sign in to comment.