build(dev-deps, deps): upgrade major versions for FE deps (#29963)

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
Đỗ Trọng Hải
2024-09-07 00:44:22 +07:00
committed by GitHub
parent 4d1db9e32c
commit aa50eb3b03
12 changed files with 648 additions and 1049 deletions

View File

@@ -20,23 +20,23 @@
*/
/* eslint-disable no-console */
const fg = require('fast-glob');
const fs = require('fs-extra');
const { sync } = require('fast-glob');
const { copy } = require('fs-extra');
const pkgGlob = process.argv[2] || '*';
const packages = fg.sync([`{packages,plugins}/${pkgGlob}`], {
const packages = sync([`{packages,plugins}/${pkgGlob}`], {
onlyDirectories: true,
});
console.log('Copying asset files from package {src} to {lib,esm}...');
packages.forEach(pkg => {
const assets = fg.sync([`${pkg}/src/**/*.{png,gif,jpg,css,geojson}`]);
const assets = sync([`${pkg}/src/**/*.{png,gif,jpg,css,geojson}`]);
assets.forEach(filePath => {
['lib', 'esm']
.map(dir => filePath.replace(`${pkg}/src`, `${pkg}/${dir}`))
.forEach(newFilePath => {
fs.copy(filePath, newFilePath, err => {
copy(filePath, newFilePath, err => {
if (err) {
console.error(err);
}