Skip to content

Commit

Permalink
Merge branch 'master' into fix/useId/birthday
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Nov 25, 2021
2 parents e0d76aa + 586d9ba commit a5b774f
Show file tree
Hide file tree
Showing 58 changed files with 1,169 additions and 402 deletions.
81 changes: 81 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2.1
orbs:
aws-s3: circleci/aws-s3@3.0.0

parameters:
browserstack-force:
Expand Down Expand Up @@ -31,6 +33,7 @@ defaults: &defaults
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >>
REACT_DIST_TAG: << parameters.react-dist-tag >>
TEST_GATE: << parameters.test-gate >>
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
docker:
- image: circleci/node:12
Expand Down Expand Up @@ -621,6 +624,81 @@ jobs:
- run:
name: Test fixture
command: yarn start
test_bundle_size_monitor:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: prepare danger on PRs
command: yarn danger ci
environment:
DANGER_COMMAND: prepareBundleSizeReport
- run:
name: build @mui packages
command: yarn lerna run --ignore @mui/icons-material --parallel --scope "@mui/*" build
- run:
name: create @mui/material canary distributable
command: |
cd packages/mui-material/build
npm version 0.0.0-canary.${CIRCLE_SHA1} --no-git-tag-version
npm pack
mv mui-material-0.0.0-canary.${CIRCLE_SHA1}.tgz ../../../mui-material.tgz
- when:
# don't run on PRs
condition:
not:
matches:
pattern: "^pull/\\d+"
value: << pipeline.git.branch >>
steps:
# Upload distributables to S3
- aws-s3/copy:
arguments: --acl public-read
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-material-ui/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
- store_artifacts:
path: mui-material.tgz
destination: mui-material.tgz
- run:
name: create a size snapshot
command: yarn size:snapshot
- store_artifacts:
name: persist size snapshot as pipeline artifact
path: size-snapshot.json
destination: size-snapshot.json
- when:
# don't run on PRs
condition:
not:
matches:
pattern: "^pull/\\d+"
value: << pipeline.git.branch >>
steps:
# persist size snapshot on S3
- aws-s3/copy:
arguments: --acl public-read --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-material-ui/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
# symlink size-snapshot to latest
- aws-s3/copy:
arguments: --acl public-read --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-material-ui/artifacts/$CIRCLE_BRANCH/latest/
- run:
name: run danger on PRs
command: yarn danger ci
environment:
DANGER_COMMAND: 'reportBundleSize'
workflows:
version: 2
pipeline:
Expand Down Expand Up @@ -649,6 +727,9 @@ workflows:
- test_e2e:
requires:
- checkout
- test_bundle_size_monitor:
requires:
- checkout
bundling:
when:
equal: [bundling, << pipeline.parameters.workflow >>]
Expand Down
105 changes: 105 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,110 @@
### [Versions](https://mui.com/versions/)

## 5.2.1

<!-- generated comparing v5.2.0..master -->

_Nov 25, 2021_

A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:

This is an early release to fix `export 'useId' (imported as 'React') was not found in 'react'` when bundling code depending on MUI Core.

- &#8203;<!-- 10 -->[AppBar][docs] Add a fully responsive demo to docs (#29829) @karakib2k18
- &#8203;<!-- 9 -->[core] Fix PR run detection in test_bundle_size_monitor (#29879) @eps1lon
- &#8203;<!-- 8 -->[core] Move bundle size monitoring to CircleCI (#29876) @eps1lon
- &#8203;<!-- 7 -->[docs] Add keys to Responsive AppBar demo (#29884) @mbrookes
- &#8203;<!-- 6 -->[docs] MUI's 2021 Developer survey (#29765) @newguy-123
- &#8203;<!-- 5 -->[docs] Smoother image loading UX (#29858) @oliviertassinari
- &#8203;<!-- 4 -->[Select] Fix select display value with React Nodes (#29836) @kegi
- &#8203;<!-- 3 -->[system] Add `experimental_sx` utility (#29833) @mnajdova
- &#8203;<!-- 2 -->[test] Ignore "detected multiple renderers" warning for now (#29854) @eps1lon
- &#8203;<!-- 1 -->[useMediaQuery][utils] Remove usage of React 18 APIs (#29870) @eps1lon

All contributors of this release in alphabetical order: @eps1lon, @karakib2k18, @kegi, @mbrookes, @mnajdova, @newguy-123, @oliviertassinari

## 5.2.0

<!-- generated comparing v5.1.1..master -->

_Nov 23, 2021_

A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:

- 🧪 Created another unstyled component: [TabsUnstyled](https://mui.com/components/tabs/#unstyled) (#29597) @mnajdova.
- 🎉 Updated the Material Icons set with the latest changes from Google (#29328) @michaldudak / (#29818) @chao813.
This update adds 200 new icons and tweaks the appearance of many more.
With it, we're getting close to having 2000 icons in our set.
- 🐛 Fixed bugs and improved the infrastructure and documentation 📚.

### `@mui/material@5.2.0`

- [IconButton] Remove on hover effect when `disableRipple` is set (#29298) @adamfitzgibbon
- [i18n] Add the amharic language (#29153) @NatiG100
- [material] Fix types for `variants.style` to accept callbacks (#29610) @mnajdova
- [Popper] Simplify prop types (#29680) @michaldudak
- [Select] Include aria-selected=false when option not selected (#29695) @michaldudak
- [useMediaQuery] Fix crash in Safari < 14 and IE 11 (#29776) @eps1lon
- [useMediaQuery] Ensure no tearing in React 18 (#28491) @eps1lon

### `@mui/codemod@5.2.0`

- [codemod] Fix `jss-to-styled` to support multiple withStyles (#29824) @siriwatknp

### `@mui/icons-material@5.2.0`

- [icons] Sync new Google Material Icons (#29818) @chao813
- [icons] Sync recent Material Icons from Google (#29328) @michaldudak

### `@mui/system@5.2.0`

- [Box] Fix `sx` prop runtime issue when used as function (#29830) @mnajdova
- [system] Fix `sx` throw error when value is `null` or `undefined` (#29756) @siriwatknp
- [system] Fix minor CssVars issues (#29747) @siriwatknp

### `@mui/styled-engine@5.2.0`

- [styled-engine] Fix props inference in styled-engine (#29739) @Janpot

### `@mui/base@5.0.0-alpha.56`

- [FormControlUnstyled] `focused` is always false unless explicitly set to `true` @mwilkins91
- [TabsUnstyled] Introduce new component (#29597) @mnajdova

### `@mui/lab@5.0.0-alpha.56`

- [DatePicker][timepicker] Add missing component declarations (#29517) @longzheng
- [Masonry] exports from root package (#29754) @abhinav-22-tech
- [pickers] Widen accepted `luxon` version range (#29761) @eps1lon

### Docs

- [blog] MUI X v5 blog post (#29590) @DanailH
- [blog] Polish the Benny Joo joins MUI post (#29697) @oliviertassinari
- [CHANGELOG] Explain why we do breaking changes @oliviertassinari
- [core] Update latest issue template for codesandbox CI (#29783) @eps1lon
- [core] Ensure `@mui/core` is an alias for `@mui/base` (#29762) @eps1lon
- [docs] Fix broken Next and Previous links (#29711) @scallaway
- [docs] Add a note that ToggleButton exclusive does not enforce selection (#29812) @mmacu
- [docs] Update the list of supported locales (#29831) @michaldudak
- [docs] Update tooltip doc to better define touch action (#29717) @gnowland
- [website] Standardize the background color from the MUI team photos (#29738) @danilo-leal
- [website] Add Bharat to the About Us Page (#29714) @bharatkashyap
- [website] Add about page entry for jan (#29701) @Janpot
- [website] Adding Prakhar to the about page (#29737) @danilo-leal

### Core

- [test] Allow debugging with Chrome and VSCode inspector (#29777) @eps1lon
- [test] Use renderer clock instead of custom useFakeTimers call (#29778) @eps1lon
- [test] Only mock Date in regression tests (#29763) @eps1lon
- [test] Disable nightly integration tests on `next` branch (#29748) @eps1lon
- [test] Allow configuring clock directly from `createRenderer` (#29684) @eps1lon
- [test] Accept backslashes as path separators in test CLI (#29694) @michaldudak
- [utils] Use built-in hook when available for useId (#26489) @eps1lon

All contributors of this release in alphabetical order: @abhinav-22-tech, @adamfitzgibbon, @bharatkashyap, @chao813, @DanailH, @danilo-leal, @eps1lon, @gnowland, @Janpot, @longzheng, @michaldudak, @mmacu, @mnajdova, @mwilkins91, @NatiG100, @oliviertassinari, @scallaway, @siriwatknp

## 5.1.1

<!-- generated comparing v5.1.0..master -->
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ are evaluated in another step.

Typechecks the repository. The log of the failed build should list all issues.

##### ci/circleci: test_bundle_size_monitor

This task is mostly responsible for monitoring the bundle size. It will only report
the size if the change exceeds a certain threshold. If it fails there's usually
something wrong with the way the packages or docs were built.

##### argos

Evaluates the screenshots taken in `test/regressions/tests` and fails if it detects
Expand All @@ -180,12 +186,6 @@ might be intended. Clicking on _Details_ will show you the differences.
Renders a preview of the docs with your changes if it succeeds. Otherwise `yarn docs:build`
or `yarn docs:export` usually fail locally as well.

##### mui-org.material-ui (Azure Pipelines)

This task is mostly responsible for monitoring the bundle size. It will only report
the size if the change exceeds a certain threshold. If it fails there's usually
something wrong with the way the packages or docs were built.

#### codecov/project

Monitors coverage of the tests. A reduction in coverage isn't necessarily bad but
Expand Down
118 changes: 0 additions & 118 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,125 +22,7 @@ pr:
pool:
vmImage: 'ubuntu-latest'

variables:
DOCS_NEXT_CACHE_FOLDER: $(Build.SourcesDirectory)/docs/.next/cache
# azure-pipelines don't support variables per trigger
# We assume that the only scheduled job we have is for react@next
${{ if eq( variables['Build.Reason'], 'Schedule' ) }}:
# npm dist tag for `react` (https://docs.npmjs.com/cli/dist-tag)
REACT_DIST_TAG: 'next'
# Path for artifacts uploaded to S3 that can be used as a permalink
S3_ARTIFACTS_PATH_PERMA: 'artifacts/$(Build.SourceBranchName)-react-$(REACT_DIST_TAG)/$(Build.SourceVersion)/'
${{ if ne( variables['Build.Reason'], 'Schedule' ) }}:
REACT_DIST_TAG: 'stable'
# Preserve this path structure since it is locked in various tooling
S3_ARTIFACTS_PATH_PERMA: 'artifacts/$(Build.SourceBranchName)/$(Build.SourceVersion)/'

jobs:
- job: sizeSnapshot
displayName: 'Bundle size monitoring'
condition: eq(variables['command'], 'sizeSnapshot')
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'

- script: |
node scripts/use-react-dist-tag.js $(REACT_DIST_TAG)
yarn install
displayName: 'install dependencies'
env:
# Don't use playwright in this job
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- script: |
yarn danger ci
displayName: 'prepare danger on PRs'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
env:
AZURE_BUILD_ID: $(Build.BuildId)
DANGER_COMMAND: 'prepareBundleSizeReport'
DANGER_GITHUB_API_TOKEN: $(GITHUB_API_TOKEN)
- script: |
yarn lerna run --ignore @mui/icons-material --parallel --scope "@mui/*" build
displayName: 'build @mui packages'
- script: |
cd packages/mui-material/build
npm version 0.0.0-canary.$(Build.SourceVersion) --no-git-tag-version
npm pack
mv mui-material-0.0.0-canary.$(Build.SourceVersion).tgz ../../../mui-material.tgz
displayName: 'create @mui/material canary distributable'
- task: S3Upload@1
inputs:
regionName: 'eu-central-1'
bucketName: 'mui-org-material-ui'
globExpressions: '*.tgz'
targetFolder: $(S3_ARTIFACTS_PATH_PERMA)
filesAcl: 'public-read'
displayName: 'Upload distributables to S3'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID_SIZE_SNAPSHOT)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY_SIZE_SNAPSHOT)

- task: PublishPipelineArtifact@1
inputs:
artifactName: 'canaries'
targetPath: 'mui-material.tgz'

- script: |
yarn size:snapshot
displayName: 'create a size snapshot'
- task: PublishPipelineArtifact@1
displayName: 'persist size snapshot as pipeline artifact'
inputs:
artifactName: 'size-snapshot'
targetPath: 'size-snapshot.json'

- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
displayName: 'persist size snapshot on S3'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
awsCredentials: 's3 artifacts v2'
regionName: 'eu-central-1'
bucketName: 'mui-org-material-ui'
sourceFolder: '$(System.DefaultWorkingDirectory)'
globExpressions: 'size-snapshot.json'
targetFolder: $(S3_ARTIFACTS_PATH_PERMA)
filesAcl: 'public-read'
contentType: application/json
logRequest: true
logResponse: true

- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
displayName: 'symlink size-snapshot to latest'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne(variables['Build.Reason'], 'Schedule'))
inputs:
awsCredentials: 's3 artifacts v2'
regionName: 'eu-central-1'
bucketName: 'mui-org-material-ui'
sourceFolder: '$(System.DefaultWorkingDirectory)'
globExpressions: 'size-snapshot.json'
targetFolder: 'artifacts/$(Build.SourceBranchName)/latest/'
filesAcl: 'public-read'
contentType: application/json
logRequest: true
logResponse: true

- script: |
yarn danger ci
displayName: 'run danger on PRs'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
env:
AZURE_BUILD_ID: $(Build.BuildId)
DANGER_COMMAND: 'reportBundleSize'
DANGER_GITHUB_API_TOKEN: $(GITHUB_API_TOKEN)
- job: benchmark
displayName: 'Performance monitoring'
condition: eq(variables['command'], 'benchmark')
Expand Down
8 changes: 4 additions & 4 deletions benchmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "benchmark",
"version": "5.0.0",
"version": "5.0.1",
"private": true,
"scripts": {
"browser": "yarn webpack --config browser/webpack.config.js && node browser/scripts/benchmark.js",
Expand All @@ -14,9 +14,9 @@
"@chakra-ui/system": "^1.8.2",
"@emotion/react": "^11.6.0",
"@emotion/styled": "^11.6.0",
"@mui/material": "^5.1.1",
"@mui/styles": "^5.1.1",
"@mui/system": "^5.1.1",
"@mui/material": "^5.2.1",
"@mui/styles": "^5.2.1",
"@mui/system": "^5.2.1",
"@styled-system/css": "^5.1.5",
"benchmark": "^2.1.4",
"playwright": "^1.16.3",
Expand Down
Loading

0 comments on commit a5b774f

Please sign in to comment.