Skip to content

Commit

Permalink
fix(deps): update dependencies (non-major) (#1337)
Browse files Browse the repository at this point in the history
* fix(deps): update dependencies (non-major)

* fix: rectify migration errors

- Flat eslint config via CJS.
- Fix lint errors.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sabertazimi <sabertazimi@gmail.com>
  • Loading branch information
renovate[bot] and sabertazimi authored Feb 13, 2025
1 parent eac033d commit efbdbf7
Show file tree
Hide file tree
Showing 14 changed files with 1,171 additions and 1,139 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-bod-app",
"private": true,
"packageManager": "pnpm@10.2.1",
"packageManager": "pnpm@10.3.0",
"description": "Boilerplate CLI App",
"author": "sabertazimi <sabertazimi@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -49,18 +49,18 @@
"@dg-scripts/eslint-config": "workspace:^",
"@dg-scripts/stylelint-config": "workspace:^",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.1",
"@types/node": "^22.13.2",
"@types/semver": "^7.5.8",
"chalk": "^4.1.2",
"chokidar": "^4.0.3",
"ci-info": "^4.1.0",
"concurrently": "^9.1.2",
"consola": "^3.4.0",
"dotenv": "^16.4.7",
"eslint": "^9.20.0",
"eslint": "^9.20.1",
"jest": "^29.7.0",
"lerna": "^8.1.9",
"prettier": "^3.4.2",
"prettier": "^3.5.0",
"semver": "^7.7.1",
"stylelint": "^16.14.1",
"ts-jest": "^29.2.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/bod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"@types/inquirer": "^8.2.10",
"ci-info": "^4.1.0",
"rimraf": "^6.0.1",
"type-fest": "^4.33.0"
"type-fest": "^4.34.1"
}
}
3 changes: 3 additions & 0 deletions packages/cra-template-bod/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const eslintConfigBod = require('eslint-config-bod')

module.exports = [...eslintConfigBod]
3 changes: 0 additions & 3 deletions packages/cra-template-bod/eslint.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cra-template-bod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.14",
"@types/jest-axe": "^3.5.9",
"@types/node": "^22.13.1",
"@types/node": "^22.13.2",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"eslint-config-bod": "workspace:^",
Expand Down
23 changes: 18 additions & 5 deletions packages/cra-template-bod/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import consola from 'consola'

const rootPath = path.join(__dirname, '..')

/**
* Exec util.
* @param {string} cmd command to execute
* @returns {Object} exec result
*/
function exec(cmd: string) {
console.info(` ${chalk.bgGreen.black('[exec]')}: ${cmd}`)
return cp.execSync(cmd, {
Expand All @@ -16,44 +21,52 @@ function exec(cmd: string) {
})
}

/**
* Template build util.
* @returns {void}
*/
function buildTemplate() {
exec('rm -rf template')
exec('mkdir -p template')
exec('cp -fr public template/')
exec('cp -fr src template/')
exec('cp -fr .env template/')
exec('cp -fr eslint.config.mjs template/')
exec('cp -fr eslint.config.js template/')
exec('cp -fr tailwind.config.js template/')
exec('cp -fr tsconfig.json template/')
exec('cp -fr README.md template/')
exec('cp -fr .gitignore template/gitignore')
}

/**
* JSON build util.
* @returns {void}
*/
function buildJson() {
const packageJson = JSON.parse(
fs.readFileSync(path.join(rootPath, 'package.json'), 'utf8'),
)

const ignoreDeps = [
const ignoreDeps = new Set([
'@sabertazimi/react-scripts',
'eslint-config-bod',
'react-scripts',
'react',
'react-dom',
'stylelint-config-bod',
]
])

// Remove ignored dependencies
const appDeps = Object.keys(packageJson.dependencies)
.filter((dep: string) => !ignoreDeps.includes(dep))
.filter((dep: string) => !ignoreDeps.has(dep))
.reduce((deps: { [key: string]: string }, dep: string) => {
deps[dep] = packageJson.dependencies[dep]
return deps
}, {})

// Remove ignored devDependencies
const appDevDeps = Object.keys(packageJson.devDependencies)
.filter((dep: string) => !ignoreDeps.includes(dep))
.filter((dep: string) => !ignoreDeps.has(dep))
.reduce((deps: { [key: string]: string }, dep: string) => {
deps[dep] = packageJson.devDependencies[dep]
return deps
Expand Down
9 changes: 5 additions & 4 deletions packages/cra-template-bod/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
font-family:
source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
6 changes: 3 additions & 3 deletions packages/eslint-config-bod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-testing-library": "^7.1.1",
"globals": "^15.14.0",
"typescript-eslint": "^8.23.0"
"globals": "^15.15.0",
"typescript-eslint": "^8.24.0"
},
"devDependencies": {
"@typescript-eslint/utils": "^8.23.0"
"@typescript-eslint/utils": "^8.24.0"
}
}
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
}
},
"dependencies": {
"@antfu/eslint-config": "^4.1.1",
"@antfu/eslint-config": "^4.2.0",
"@eslint-react/eslint-plugin": "^1.26.2",
"@eslint/eslintrc": "^3.2.0",
"eslint-plugin-format": "^1.0.1",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.18",
"eslint-plugin-react-refresh": "^0.4.19",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-testing-library": "^7.1.1",
"local-pkg": "^1.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.4.7",
"dotenv-expand": "^12.0.1",
"eslint": "^9.20.0",
"eslint": "^9.20.1",
"eslint-config-bod": "workspace:^",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "^6.2.0",
Expand All @@ -67,12 +67,12 @@
"jest-resolve": "^29.7.0",
"jest-watch-typeahead": "^2.2.2",
"mini-css-extract-plugin": "^2.9.2",
"postcss": "^8.5.1",
"postcss": "^8.5.2",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-loader": "^8.1.1",
"postcss-normalize": "^13.0.1",
"postcss-preset-env": "^10.1.3",
"prettier": "^3.4.2",
"postcss-preset-env": "^10.1.4",
"prettier": "^3.5.0",
"prettier-plugin-tailwindcss": "^0.6.11",
"prompts": "^2.4.2",
"react-app-polyfill": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"stylelint-prettier": "^5.0.3"
},
"devDependencies": {
"prettier": "^3.4.2",
"prettier": "^3.5.0",
"stylelint": "^16.14.1"
}
}
12 changes: 6 additions & 6 deletions packages/webpack-template/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dg-scripts/webpack-template",
"version": "5.21.5",
"packageManager": "pnpm@10.2.1",
"packageManager": "pnpm@10.3.0",
"description": "Minimal webpack boilerplate",
"author": "sabertazimi",
"license": "MIT",
Expand Down Expand Up @@ -57,25 +57,25 @@
"@dg-scripts/stylelint-config": "workspace:^",
"@svgr/webpack": "^8.1.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.1",
"@types/node": "^22.13.2",
"babel-loader": "^9.2.1",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.4.7",
"eslint": "^9.20.0",
"eslint": "^9.20.1",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "^6.2.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mini-css-extract-plugin": "^2.9.2",
"postcss": "^8.5.1",
"postcss": "^8.5.2",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^10.1.3",
"prettier": "^3.4.2",
"postcss-preset-env": "^10.1.4",
"prettier": "^3.5.0",
"sass-loader": "^16.0.4",
"style-loader": "^4.0.0",
"stylelint": "^16.14.1",
Expand Down
Loading

0 comments on commit efbdbf7

Please sign in to comment.