diff --git a/.circleci/config.yml b/.circleci/config.yml index af632f410ae9af..34f39986fb7331 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -238,7 +238,7 @@ jobs: command: xvfb-run yarn test:regressions - run: name: Upload screenshots to Argos CI - command: yarn argos + command: yarn test:argos workflows: version: 2 pipeline: diff --git a/lerna.json b/lerna.json index 6cd5c8e18d5433..06cff9cd698d98 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,4 @@ { - "packages": ["packages/*", "docs", "framer"], "npmClient": "yarn", "useWorkspaces": true, "version": "independent" diff --git a/package.json b/package.json index 40464143e655d5..63222013dd4b1d 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,11 @@ "scripts": { "proptypes": "cross-env BABEL_ENV=test babel-node --extensions \".tsx,.ts,.js\" ./scripts/generateProptypes.ts", "deduplicate": "node scripts/deduplicate.js", - "argos": "node ./scripts/pushArgos.js", "benchmark:browser": "yarn workspace benchmark browser", + "build:release": "lerna run --parallel --scope \"@material-ui/*\" build", "build:codesandbox": "lerna run --parallel --scope \"@material-ui/*\" build", + "release": "yarn build:release && lerna publish --no-changelog --dist-tag next --contents build", + "publish:dry-run": "lerna publish --no-changelog --dist-tag next --contents build --no-git-tag-version --no-push --registry=\"http://localhost:4873/\"", "docs:api": "rimraf ./docs/pages/api-docs && yarn docs:api:build", "docs:api:build": "cross-env BABEL_ENV=test __NEXT_EXPORT_TRAILING_SLASH=true babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/buildApi.ts ./docs/pages/api-docs ./packages/material-ui-unstyled/src ./packages/material-ui/src ./packages/material-ui-lab/src", "docs:build": "yarn workspace docs build", @@ -49,6 +51,7 @@ "test:umd": "node packages/material-ui/test/umd/run.js", "test:unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'scripts/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'", "test:watch": "yarn test:unit --watch", + "test:argos": "node ./scripts/pushArgos.js", "typescript": "lerna run --no-bail --parallel typescript" }, "devDependencies": { diff --git a/packages/material-ui-codemod/README.md b/packages/material-ui-codemod/README.md index e6c2c02bb6f0fe..6185fa264c8904 100644 --- a/packages/material-ui-codemod/README.md +++ b/packages/material-ui-codemod/README.md @@ -32,7 +32,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v5.0.0/box-sx-prop.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v5.0.0/box-sx-prop.js ``` #### `moved-lab-modules` @@ -52,7 +52,7 @@ or ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v5.0.0/moved-lab-modules.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v5.0.0/moved-lab-modules.js ``` #### `textfield-variant-prop` @@ -70,7 +70,7 @@ The diff should look like this: This codemod is non-idempotent (`variant="standard"` would be added on a subsequent run, where `variant="outlined"` was removed), so should only be run once against any particular codebase. ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v5.0.0/textfield-variant-prop.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v5.0.0/textfield-variant-prop.js ``` ### v4.0.0 @@ -86,7 +86,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v4.0.0/theme-spacing-api.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v4.0.0/theme-spacing-api.js ``` This codemod tries to perform a basic expression simplification which can be improved for expressions that use more than one operation. @@ -111,7 +111,7 @@ Converts all `@material-ui/core` imports more than 1 level deep to the optimal f ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v4.0.0/optimal-imports.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v4.0.0/optimal-imports.js ``` Head to https://material-ui.com/guides/minimizing-bundle-size/ to understand when it's useful. @@ -127,7 +127,7 @@ Converts all `@material-ui/core` submodule imports to the root module: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v4.0.0/top-level-imports.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v4.0.0/top-level-imports.js ``` Head to https://material-ui.com/guides/minimizing-bundle-size/ to understand when it's useful. @@ -146,7 +146,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v1.0.0/import-path.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v1.0.0/import-path.js ``` **Notice**: if you are migrating from pre-v1.0, and your imports use `material-ui`, you will need to manually find and replace all references to `material-ui` in your code to `@material-ui/core`. E.g.: @@ -171,7 +171,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v1.0.0/color-imports.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v1.0.0/color-imports.js ``` **additional options** @@ -193,7 +193,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v1.0.0/svg-icon-imports.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v1.0.0/svg-icon-imports.js ``` ### v0.15.0 @@ -215,7 +215,7 @@ The diff should look like this: ``` ```sh -find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/lib/v0.15.0/import-path.js +find src -name '*.js' -print | xargs npx jscodeshift -t node_modules/@material-ui/codemod/v0.15.0/import-path.js ``` ### Recast Options diff --git a/packages/material-ui-codemod/package.json b/packages/material-ui-codemod/package.json index 67f903f63d94a5..508305755788d6 100644 --- a/packages/material-ui-codemod/package.json +++ b/packages/material-ui-codemod/package.json @@ -13,8 +13,8 @@ ], "scripts": { "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/material-ui-codemod/**/*.test.js'", - "prebuild": "rimraf lib", - "build": "node ../../scripts/build node --out-dir ./lib", + "prebuild": "rimraf build", + "build": "node ../../scripts/build node --out-dir ./build && cp README.md build && cp package.json build", "release": "yarn build && npm publish --tag next" }, "repository": { diff --git a/packages/material-ui-lab/package.json b/packages/material-ui-lab/package.json index bc5285c75ee964..64ba49ad9a13af 100644 --- a/packages/material-ui-lab/package.json +++ b/packages/material-ui-lab/package.json @@ -64,8 +64,8 @@ }, "dependencies": { "@babel/runtime": "^7.4.4", - "@material-ui/system": "^5.0.0-alpha.17", - "@material-ui/utils": "^5.0.0-alpha.17", + "@material-ui/system": "5.0.0-alpha.17", + "@material-ui/utils": "5.0.0-alpha.17", "clsx": "^1.0.4", "prop-types": "^15.7.2", "react-is": "^16.8.0 || ^17.0.0", diff --git a/packages/material-ui-styles/package.json b/packages/material-ui-styles/package.json index 69e7f8df466ff5..356e04675d0714 100644 --- a/packages/material-ui-styles/package.json +++ b/packages/material-ui-styles/package.json @@ -51,7 +51,7 @@ "@babel/runtime": "^7.4.4", "@emotion/hash": "^0.8.0", "@material-ui/types": "^5.1.0", - "@material-ui/utils": "^5.0.0-alpha.17", + "@material-ui/utils": "5.0.0-alpha.17", "clsx": "^1.0.4", "csstype": "^3.0.2", "hoist-non-react-statics": "^3.3.2", diff --git a/packages/material-ui-system/package.json b/packages/material-ui-system/package.json index 95c4c043b8788a..417e30732b4e18 100644 --- a/packages/material-ui-system/package.json +++ b/packages/material-ui-system/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@babel/runtime": "^7.4.4", - "@material-ui/utils": "^5.0.0-alpha.17", + "@material-ui/utils": "5.0.0-alpha.17", "prop-types": "^15.7.2", "csstype": "^3.0.2" }, diff --git a/packages/material-ui-unstyled/package.json b/packages/material-ui-unstyled/package.json index d88c8da9ff7be4..ae2faeedcd9a49 100644 --- a/packages/material-ui-unstyled/package.json +++ b/packages/material-ui-unstyled/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@babel/runtime": "^7.4.4", - "@material-ui/utils": "^5.0.0-alpha.17", + "@material-ui/utils": "5.0.0-alpha.17", "clsx": "^1.0.4", "prop-types": "^15.7.2", "react-is": "^16.8.0 || ^17.0.0" diff --git a/packages/material-ui/package.json b/packages/material-ui/package.json index 8c3f22e9029a0d..c7fee84f02222e 100644 --- a/packages/material-ui/package.json +++ b/packages/material-ui/package.json @@ -60,12 +60,12 @@ }, "dependencies": { "@babel/runtime": "^7.4.4", - "@material-ui/styled-engine": "^5.0.0-alpha.16", - "@material-ui/styles": "^5.0.0-alpha.15", - "@material-ui/system": "^5.0.0-alpha.17", + "@material-ui/styled-engine": "5.0.0-alpha.16", + "@material-ui/styles": "5.0.0-alpha.15", + "@material-ui/system": "5.0.0-alpha.17", "@material-ui/types": "^5.1.0", - "@material-ui/unstyled": "^5.0.0-alpha.17", - "@material-ui/utils": "^5.0.0-alpha.17", + "@material-ui/unstyled": "5.0.0-alpha.17", + "@material-ui/utils": "5.0.0-alpha.17", "@popperjs/core": "^2.4.4", "@types/react-transition-group": "^4.2.0", "clsx": "^1.0.4",