Skip to content

Commit

Permalink
[core] Cleanup (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 authored May 9, 2024
1 parent 234f4c9 commit 3257fcc
Show file tree
Hide file tree
Showing 27 changed files with 231 additions and 2,702 deletions.
10 changes: 0 additions & 10 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# Security policy

## Supported versions

The versions of the project that are currently supported with security updates.

| Version | Supported |
| ------: | :----------------- |
| 5.x | :white_check_mark: |
| 4.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a vulnerability

You can report a vulnerability by contacting us via email at [[email protected]](mailto:[email protected]).
55 changes: 1 addition & 54 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
const path = require('path');

const errorCodesPath = path.resolve(__dirname, './docs/public/static/error-codes.json');
const missingError = process.env.MUI_EXTRACT_ERROR_CODES === 'true' ? 'write' : 'annotate';

function resolveAliasPath(relativeToBabelConf) {
const resolvedPath = path.relative(process.cwd(), path.resolve(__dirname, relativeToBabelConf));
return `./${resolvedPath.replace('\\', '/')}`;
}

const productionPlugins = [
['babel-plugin-react-remove-properties', { properties: ['data-mui-test'] }],
];

module.exports = function getBabelConfig(api) {
const useESModules = api.env(['regressions', 'legacy', 'modern', 'stable', 'rollup']);

const defaultAlias = {
'@pigment-css/react': resolveAliasPath('./packages/pigment-css-react/src'),
docs: resolveAliasPath('./docs'),
test: resolveAliasPath('./test'),
'@mui-internal/api-docs-builder': resolveAliasPath(
'./node_modules/@mui/monorepo/packages/api-docs-builder',
),
};

const presets = [
Expand All @@ -44,42 +32,8 @@ module.exports = function getBabelConfig(api) {
'@babel/preset-typescript',
];

const plugins = [
[
'babel-plugin-macros',
{
muiError: {
errorCodesPath,
missingError,
},
},
],
'babel-plugin-optimize-clsx',
// Need the following 3 proposals for all targets in .browserslistrc.
// With our usage the transpiled loose mode is equivalent to spec mode.
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-object-rest-spread', { loose: true }],
[
'@babel/plugin-transform-runtime',
{
useESModules,
// any package needs to declare 7.4.4 as a runtime dependency. default is ^7.0.0
version: '^7.4.4',
},
],
[
'babel-plugin-transform-react-remove-prop-types',
{
mode: 'unsafe-wrap',
},
],
];
const plugins = [];

if (process.env.NODE_ENV === 'production') {
plugins.push(...productionPlugins);
}
if (process.env.NODE_ENV === 'test') {
plugins.push([
'babel-plugin-module-resolver',
Expand Down Expand Up @@ -140,12 +94,6 @@ module.exports = function getBabelConfig(api) {
],
],
},
legacy: {
plugins: [
// IE11 support
'@babel/plugin-transform-object-assign',
],
},
test: {
sourceMaps: 'both',
plugins: [
Expand All @@ -160,7 +108,6 @@ module.exports = function getBabelConfig(api) {
},
benchmark: {
plugins: [
...productionPlugins,
[
'babel-plugin-module-resolver',
{
Expand Down
38 changes: 1 addition & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
"test:coverage": "pnpm build && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
"test:coverage:ci": "pnpm build && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
"test:coverage:html": "pnpm build && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
"test:karma": "pnpm build && cross-env NODE_ENV=test karma start test/karma.conf.js",
"test:karma:profile": "pnpm build && cross-env NODE_ENV=test karma start test/karma.conf.profile.js",
"test:regressions": "cross-env NODE_ENV=production pnpm test:regressions:build && concurrently --success first --kill-others \"pnpm test:regressions:run\" \"pnpm test:regressions:server\"",
"test:regressions:build": "webpack --config test/regressions/webpack.config.js",
"test:regressions:dev": "concurrently \"pnpm test:regressions:build --watch\" \"pnpm test:regressions:server\"",
Expand All @@ -46,40 +44,27 @@
"validate-declarations": "tsx scripts/validateTypescriptDeclarations.mts"
},
"dependencies": {
"@googleapis/sheets": "^5.0.5",
"@slack/bolt": "^3.17.1",
"@pigment-css/react": "workspace:^",
"execa": "^8.0.1",
"google-auth-library": "^9.7.0",
"util": "^0.12.5"
"globby": "^14.0.1"
},
"devDependencies": {
"@argos-ci/core": "^2.0.0",
"@babel/cli": "^7.24.1",
"@babel/core": "^7.24.4",
"@babel/node": "^7.23.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-object-assign": "^7.24.1",
"@babel/plugin-transform-react-constant-elements": "^7.24.1",
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.24.4",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@babel/register": "^7.23.7",
"@mnajdova/enzyme-adapter-react-18": "^0.2.0",
"@mui/internal-docs-utils": "^1.0.4",
"@mui/internal-markdown": "^1.0.1",
"@mui/internal-scripts": "^1.0.3",
"@mui/internal-test-utils": "https://pkg.csb.dev/mui/material-ui/commit/fb183624/@mui/internal-test-utils",
"@mui/monorepo": "github:mui/material-ui#73c88b6c3f71287a4a1f0b1b5d7d37ab268dca49",
"@mui/utils": "5.15.14",
"@next/eslint-plugin-next": "^14.1.4",
"@octokit/rest": "^20.1.0",
"@playwright/test": "1.43.0",
"@types/enzyme": "^3.10.18",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.0",
"@types/mocha": "^10.0.6",
Expand All @@ -88,16 +73,10 @@
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-optimize-clsx": "^2.6.2",
"babel-plugin-react-remove-properties": "^0.3.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"chalk": "^5.3.0",
"compression-webpack-plugin": "^11.1.0",
"concurrently": "^8.2.2",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
"danger": "^11.3.1",
Expand All @@ -118,41 +97,26 @@
"eslint-plugin-react-hooks": "^4.6.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"globby": "^14.0.1",
"karma": "^6.4.3",
"karma-browserstack-launcher": "~1.6.0",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-firefox-launcher": "^2.1.3",
"karma-mocha": "^2.0.1",
"karma-sourcemap-loader": "^0.4.0",
"karma-webpack": "5.0.0",
"lerna": "^8.1.2",
"lodash": "^4.17.21",
"markdownlint-cli2": "^0.13.0",
"mocha": "^10.4.0",
"nx": "^18.2.3",
"nyc": "^15.1.0",
"piscina": "^4.4.0",
"postcss-styled-syntax": "^0.6.4",
"prettier": "^3.2.5",
"pretty-quick": "^4.0.0",
"process": "^0.11.10",
"raw-loader": "4.0.2",
"react-docgen": "^5.4.3",
"remark": "^13.0.0",
"rimraf": "^5.0.5",
"serve": "^14.2.1",
"stylelint": "^16.3.1",
"stylelint-config-standard": "^36.0.0",
"terser-webpack-plugin": "^5.3.10",
"tsup": "^8.0.2",
"tsx": "^4.7.2",
"typescript": "^5.4.4",
"unist-util-visit": "^2.0.3",
"webpack": "^5.91.0",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"yargs": "^17.7.2"
},
"packageManager": "[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion packages/pigment-css-unplugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"@types/babel__core": "^7.20.5",
"@types/chai": "^4.3.14",
"@types/mocha": "^10.0.6",
"chai": "^4.4.1"
"chai": "^4.4.1",
"webpack": "^5.91.0"
},
"sideEffects": false,
"publishConfig": {
Expand Down
Loading

0 comments on commit 3257fcc

Please sign in to comment.