Skip to content

Commit

Permalink
Merge pull request #229 from Mezzanine-UI/storybook-version
Browse files Browse the repository at this point in the history
"Build system / Commit rules / Dev packages" upgrade to latest version
  • Loading branch information
travor20814 authored Nov 12, 2024
2 parents 4d67e65 + 55f3049 commit 0d69422
Show file tree
Hide file tree
Showing 7 changed files with 1,257 additions and 1,910 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import _import from 'eslint-plugin-import';
import { fixupPluginRules } from '@eslint/compat';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';

export default [
{
ignores: ['**/node_modules/', '**/dist/', '**/esm/', '**/coverage/'],
},
{
plugins: {
'@typescript-eslint': typescriptEslint,
import: fixupPluginRules(_import),
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: 2020,
sourceType: 'module',

parserOptions: {
project: './tsconfig.*?.json',
},
},
},
];
89 changes: 45 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"packages/system"
],
"engines": {
"node": ">=18.12.0"
"node": ">=20.9.0"
},
"scripts": {
"format": "prettier './**/*.{json,md,mdx,html}' --write",
Expand All @@ -43,71 +43,72 @@
"react:test": "yarn workspace @mezzanine-ui/react test",
"react:test:coverage": "yarn react:test --coverage",
"react:build": "storybook build",
"react:build:all": "storybook build",
"react:storybook": "storybook dev -p 6006",
"prepare": "husky"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@rollup/plugin-typescript": "^11.1.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/addon-storysource": "^8.3.6",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint/compat": "^1.2.2",
"@rollup/plugin-typescript": "^12.1.1",
"@storybook/addon-essentials": "^8.4.2",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-links": "^8.4.2",
"@storybook/addon-storysource": "^8.4.2",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/blocks": "^8.3.6",
"@storybook/manager-api": "^8.3.6",
"@storybook/react": "^8.3.6",
"@storybook/react-webpack5": "^8.3.6",
"@storybook/theming": "^8.3.6",
"@storybook/blocks": "^8.4.2",
"@storybook/manager-api": "^8.4.2",
"@storybook/react": "^8.4.2",
"@storybook/react-webpack5": "^8.4.2",
"@storybook/theming": "^8.4.2",
"@testing-library/dom": "^10.4.0",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/react-refresh": "^0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"babel-loader": "^9.1.3",
"commitizen": "^4.2.5",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"babel-loader": "^9.2.1",
"commitizen": "^4.3.1",
"css-loader": "^7.1.2",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.57.0",
"eslint": "^9.14.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.10.1",
"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"husky": "^9.1.4",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-storybook": "^0.11.0",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"globals": "^15.12.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^8.1.8",
"lint-staged": "^15.2.8",
"postcss": "^8.4.41",
"lerna": "^8.1.9",
"lint-staged": "^15.2.10",
"postcss": "^8.4.49",
"prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rollup": "^4.18.1",
"sass": "^1.77.8",
"sass-loader": "^16.0.0",
"storybook": "^8.3.6",
"rollup": "^4.25.0",
"sass": "^1.80.6",
"sass-loader": "^16.0.3",
"storybook": "^8.4.2",
"storybook-rytass-palette": "^0.0.12",
"style-loader": "^4.0.0",
"stylelint": "^16.8.1",
"stylelint": "^16.10.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-order": "^6.0.4",
"stylelint-scss": "^6.5.0",
"ts-jest": "^29.2.4",
"typescript": "^5.5.4",
"webpack": "^5.95.0"
"stylelint-scss": "^6.9.0",
"ts-jest": "^29.2.5",
"typescript": "^5.6.3",
"webpack": "^5.96.1"
},
"packageManager": "[email protected]"
}
29 changes: 13 additions & 16 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
const path = require('path');
const fse = require('fs-extra');
const glob = require('glob');
const { glob } = require('glob');
const { rollup } = require('rollup');
const ts = require('@rollup/plugin-typescript');

Expand All @@ -27,16 +27,8 @@ const externals = [
'events',
];

function getFilesByGlob(globPath) {
return new Promise((resolve, reject) => {
glob(globPath, (error, files) => {
if (error) {
reject(error);
}

resolve(files);
});
});
async function getFilesByGlob(globPath) {
return await glob(globPath);
}

async function rollupBuild({ output, ...options }) {
Expand All @@ -58,7 +50,10 @@ async function run() {
const scssFiles = await getFilesByGlob(`${packageSrcPath}/**/*.scss`);

scssFiles.forEach((file) => {
const dist = path.resolve(packageDistPath, path.relative(packageSrcPath, file));
const dist = path.resolve(
packageDistPath,
path.relative(packageSrcPath, file),
);
const distDir = dist.split('/').slice(0, -1).join('/');

if (!fse.existsSync(distDir)) {
Expand All @@ -85,10 +80,12 @@ async function run() {
preserveModulesRoot: packageSrcPath,
},
],
plugins: [ts({
cacheDir: tsPluginCachePath,
tsconfig: tsconfigPath,
})],
plugins: [
ts({
cacheDir: tsPluginCachePath,
tsconfig: tsconfigPath,
}),
],
treeshake: {
moduleSideEffects: false,
},
Expand Down
Loading

0 comments on commit 0d69422

Please sign in to comment.