PR-733704: update dependencies to latest, bump to v1.4.1

- Bump version 1.4.0 → 1.4.1
- Upgrade Babel 7 → 8 (@babel/core, preset-env, preset-react,
  preset-typescript, register)
- Add ts-node devDependency (webpack-cli needs it to load
  webpack.config.ts now that @babel/register v8 removed .hook)
- Replace __dirname with path.resolve() in webpack.config.ts and
  webpack.cy.config.ts (ESM-safe, no __dirname needed)
- Add npm overrides: force @babel/core ^8 for ts-jest (peerOptional
  conflict) and js-yaml ^4.2.0 to fix GHSA-h67p-54hq-rp68 DoS vuln
- Add babel hook in .storybook/main.js to strip bugfixes option that
  Storybook injects into @babel/preset-env (removed in Babel 8)
- Patch Storybook addons 10.4.3 → 10.4.6, @types/node v25→v26,
  globals v16→v17, sass minor, ts-loader patch, typescript-eslint patch
- 0 npm audit vulnerabilities
This commit is contained in:
2026-06-21 05:40:41 +00:00
parent 364409dbed
commit 6c3dd344e6
5 changed files with 5132 additions and 1662 deletions

View File

@@ -77,5 +77,30 @@ module.exports = {
docs: {
autodocs: 'tag',
defaultName: 'Docs',
},
// Babel 8 removed the `bugfixes` option from @babel/preset-env (it's now always on).
// Storybook injects bugfixes:true in its internal overrides AFTER babelDefault, so we
// strip it here in the `babel` hook which runs after all presets have composed the config.
async babel(config) {
const stripBugfixes = preset => {
if (!Array.isArray(preset)) return preset;
const [name, options] = preset;
if (typeof name === 'string' && name.includes('@babel/preset-env') && options?.bugfixes !== undefined) {
const { bugfixes: _removed, ...rest } = options;
return [name, rest];
}
return preset;
};
if (config.presets) {
config.presets = config.presets.map(stripBugfixes);
}
if (config.overrides) {
config.overrides = config.overrides.map(override => {
if (!override.presets) return override;
return { ...override, presets: override.presets.map(stripBugfixes) };
});
}
return config;
},
};

6716
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@aleleba/create-react-component-library",
"version": "1.4.0",
"version": "1.4.1",
"description": "A starter kit for create a React component Library with storybook",
"bin": "./bin/cli.js",
"main": "dist/index.js",
@@ -44,26 +44,26 @@
},
"homepage": "https://github.com/aleleba/create-react-component-library#readme",
"devDependencies": {
"@babel/core": "^7.29.7",
"@babel/preset-env": "^7.29.7",
"@babel/preset-react": "^7.29.7",
"@babel/preset-typescript": "^7.29.7",
"@babel/register": "^7.29.7",
"@babel/core": "^8.0.1",
"@babel/preset-env": "^8.0.2",
"@babel/preset-react": "^8.0.1",
"@babel/preset-typescript": "^8.0.1",
"@babel/register": "^8.0.1",
"@eslint/js": "^9.39.4",
"@mdx-js/react": "^3.1.1",
"@storybook/addon-docs": "^10.4.3",
"@storybook/addon-links": "^10.4.3",
"@storybook/addon-docs": "^10.4.6",
"@storybook/addon-links": "^10.4.6",
"@storybook/addon-styling-webpack": "^3.0.2",
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
"@storybook/cli": "^10.4.3",
"@storybook/cli": "^10.4.6",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react-webpack5": "^10.4.3",
"@storybook/react-webpack5": "^10.4.6",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"@types/node": "^25.9.2",
"@types/node": "^26.0.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/webpack": "^5.28.5",
@@ -75,9 +75,9 @@
"dotenv": "^17.4.2",
"eslint": "^9.39.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-storybook": "^10.4.3",
"eslint-plugin-storybook": "^10.4.6",
"eslint-webpack-plugin": "^6.0.0",
"globals": "^16.5.0",
"globals": "^17.6.0",
"html-webpack-plugin": "^5.6.7",
"identity-obj-proxy": "^3.0.0",
"jest": "^30.4.2",
@@ -87,21 +87,28 @@
"react": "^19.2.7",
"react-dom": "^19.2.7",
"resolve-ts-aliases": "^1.0.1",
"sass": "^1.100.0",
"sass": "^1.101.0",
"sass-loader": "^17.0.0",
"storybook": "^10.4.3",
"storybook": "^10.4.6",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.6.1",
"ts-jest": "^29.4.11",
"ts-loader": "^9.6.0",
"ts-loader": "^9.6.1",
"ts-node": "^10.9.2",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.61.0",
"typescript-eslint": "^8.61.1",
"url-loader": "^4.1.1",
"webpack": "^5.107.2",
"webpack-cli": "^7.0.3",
"webpack-node-externals": "^3.0.0"
},
"overrides": {
"ts-jest": {
"@babel/core": "^8.0.1"
},
"js-yaml": "^4.2.0"
},
"peerDependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0"

View File

@@ -25,7 +25,7 @@ export default {
mode: 'production',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
path: path.resolve('dist'),
library: libraryName,
libraryTarget: 'umd',
globalObject: 'this',

View File

@@ -22,7 +22,7 @@ export default {
},
mode: 'development',
output: {
path: path.resolve(__dirname, 'dist'),
path: path.resolve('dist'),
},
target: 'web',
plugins: [
@@ -37,7 +37,7 @@ export default {
}),
new ESLintPlugin(),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'public', 'index.html'),
template: path.join('public', 'index.html'),
}),
new webpack.ProvidePlugin({
React: 'react',