Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
elf-mouse committed Aug 16, 2024
2 parents 296dd45 + bb2439e commit e284ecd
Show file tree
Hide file tree
Showing 16 changed files with 4,378 additions and 5,288 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

> [`balm-core@3`](https://github.com/balmjs/balm/tree/master)(v3) supports for `node@10.13.0+`, `postcss@7`, `webpack@4`
## v5.0.0 / 2024-08-16

### Features

upgrade gulp@5

## v4.30.0 / 2024-05-07

### Features
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packages": ["packages/*"],
"version": "4.30.0",
"version": "5.0.1",
"npmClient": "yarn"
}
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,31 @@
"@babel/plugin-proposal-object-rest-spread": "^7.20",
"@babel/preset-env": "^7.24",
"@babel/preset-typescript": "^7.24",
"@babel/register": "^7.23",
"@babel/register": "^7.24",
"@commitlint/cli": "19",
"@commitlint/config-conventional": "19",
"@types/node": "20",
"@typescript-eslint/eslint-plugin": "7",
"@typescript-eslint/parser": "7",
"babel-plugin-istanbul": "6",
"babel-plugin-istanbul": "7",
"chai": "5",
"coveralls": "3",
"cross-env": "7",
"del": "7",
"eslint": "9",
"eslint": "8",
"eslint-config-prettier": "9",
"eslint-plugin-prettier": "5",
"esm": "3",
"gulp": "4",
"gulp": "5",
"gulp-babel": "8",
"gulp-eslint": "6",
"gulp-exclude-gitignore": "1",
"husky": "9",
"lerna": "~8.0",
"lint-staged": "15",
"mocha": "10",
"nyc": "15",
"nyc": "17",
"prettier": "3",
"rimraf": "5",
"rimraf": "6",
"ts-node": "10",
"typescript": "5"
},
Expand Down
47 changes: 24 additions & 23 deletions packages/balm-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
"@rollup/plugin-terser": "^0.4.4",
"ansi-colors": "^4.1.3",
"async": "^3.2.5",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.1.3",
"browser-sync": "^3.0.2",
"connect-history-api-fallback": "^2.0.0",
"css-loader": "^7.1.1",
"css-minimizer-webpack-plugin": "^6.0.0",
"cssnano": "^7.0.1",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"cssnano": "^7.0.5",
"del": "^7.1.0",
"dotenv": "^16.4.5",
"dotenv-expand": "^11.0.6",
"esbuild": "^0.20.0",
"esbuild": "^0.23.0",
"fancy-log": "^2.0.0",
"gulp-eslint": "^6.0.0",
"gulp-if": "^3.0.0",
Expand All @@ -64,59 +64,60 @@
"gulp-size": "^5.0.0",
"gulp-useref": "^5.0.0",
"gulp-zip": "^6.0.0",
"gulp.spritesmith": "^6.13.0",
"html-loader": "^5.0.0",
"gulp.spritesmith": "^6.13.1",
"html-loader": "^5.1.0",
"html-minifier": "^4.0.0",
"html-webpack-plugin": "^5.6.0",
"http-proxy-middleware": "^3.0.0",
"imagemin": "^9.0.0",
"istextorbinary": "^9.5.0",
"less": "^4.2.0",
"mini-css-extract-plugin": "^2.9.0",
"modernizr": "^3.13.0",
"modernizr": "^3.13.1",
"parents": "^1.0.1",
"plugin-error": "^2.0.1",
"postcss": "^8.4.38",
"postcss": "^8.4.41",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^16.1.0",
"postcss-load-config": "^5.1.0",
"postcss-load-config": "^6.0.1",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^9.5.11",
"postcss-preset-env": "^10.0.1",
"pretty-bytes": "^6.1.1",
"readable-stream": "^4.5.2",
"replace-ext": "^2.0.0",
"rollup": "^4.17.2",
"sass": "^1.77.0",
"sass-loader": "^14.2.1",
"semver": "^7.6.0",
"rollup": "^4.20.0",
"sass": "^1.77.8",
"sass-loader": "^16.0.0",
"semver": "^7.6.3",
"ssh2": "^1.15.0",
"strip-ansi": "^7.1.0",
"style-loader": "^4.0.0",
"tailwindcss": "^3.4.3",
"terser": "^5.31.0",
"tailwindcss": "^3.4.10",
"terser": "^5.31.6",
"terser-webpack-plugin": "^5.3.10",
"through2": "^4.0.2",
"through2-concurrent": "^2.0.0",
"tslib": "^2.6.2",
"tslib": "^2.6.3",
"vinyl-sourcemaps-apply": "^0.2.1",
"webpack": "^5.91.0",
"webpack": "^5.93.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-middleware": "^7.2.1",
"webpack-dev-middleware": "^7.3.0",
"webpack-hot-middleware": "^2.26.1",
"webpack-merge": "^5.10.0",
"workbox-build": "^7.1.0"
"webpack-merge": "^6.0.1",
"workbox-build": "^7.1.1"
},
"devDependencies": {
"@types/async": "3",
"@types/browser-sync": "2",
"@types/express": "4",
"@types/fancy-log": "2",
"@types/html-minifier": "4",
"@types/imagemin": "8",
"@types/imagemin": "9",
"@types/parents": "1",
"@types/postcss-flexbugs-fixes": "5",
"@types/readable-stream": "4",
"@types/replace-ext": "2",
"@types/semver": "7",
"@types/through2-concurrent": "2",
"@types/webpack-bundle-analyzer": "4",
"@types/webpack-hot-middleware": "2"
Expand Down
8 changes: 5 additions & 3 deletions packages/balm-core/src/plugins/imagemin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ function gulpImagemin(customPlugins?: Function[]): any {

(async () => {
try {
const data = await imagemin.buffer(file.contents, {
plugins
});
const data = Buffer.from(
await imagemin.buffer(file.contents, {
plugins
})
);
const originalSize = file.contents.length;
const optimizedSize = data.length;
const saved = originalSize - optimizedSize;
Expand Down
1 change: 1 addition & 0 deletions packages/balm-core/src/tasks/foundation/balm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class BalmTask {
this.input,
Object.assign(
{
encoding: false,
allowEmpty: true
},
this.gulpSrcOptions
Expand Down
1 change: 1 addition & 0 deletions packages/balm-core/src/tasks/foundation/balm_style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class BalmStyleTask extends BalmTask {
this.input,
Object.assign(
{
encoding: false,
sourcemaps: shouldUseSourceMap,
allowEmpty: true
},
Expand Down
5 changes: 5 additions & 0 deletions packages/balm-core/src/tasks/private/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class CacheTask extends BalmJS.BalmTask {
this.defaultOutput = BalmJS.config.inFrontend
? BalmJS.config.dest.base
: BalmJS.config.dest.static;

// fix for gulp@5
this.gulpSrcOptions = {
base: BalmJS.config.dest.base
};
}

fn = (): any => {
Expand Down
1 change: 1 addition & 0 deletions packages/balm-core/src/tasks/private/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ImageTask extends BalmJS.BalmTask {
const balmImage = () => {
return gulp
.src(BalmJS.file.absPaths(this.input), {
encoding: false,
since: gulp.lastRun(balmImage)
})
.pipe(
Expand Down
2 changes: 1 addition & 1 deletion packages/balm-core/src/tasks/private/sprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class SpriteTask extends BalmJS.BalmTask {

gulp.task(BalmJS.toNamespace(spriteTaskName) as string, () => {
const spriteData = gulp
.src(spriteConfig.input)
.src(spriteConfig.input, { encoding: false })
.pipe(
BalmJS.plugins.plumber((error: BalmError): void => {
BalmJS.logger.error(`${this.name} task`, error.message);
Expand Down
1 change: 1 addition & 0 deletions packages/balm-core/types/gulp.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Watcher } from './node';

interface GulpOptions {
encoding?: string | boolean;
since?: Date | number | Function;
sourcemaps?: boolean | Function;
cwd?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/balm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"@babel/runtime": "^7.24",
"ansi-colors": "^4.1.3",
"global-directory": "^4.0.1",
"gulp": "4",
"semver": "^7.6.0",
"gulp": "^5.0.0",
"semver": "^7.6.3",
"webpack-hot-middleware": "^2.26.1",
"workbox-sw": "^7.1.0",
"yargs": "^17.7.2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

npm run build
lerna publish --force-publish "*"
lerna publish --dist-tag next --force-publish "*"
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

npm run build
lerna publish
lerna publish --dist-tag next
8 changes: 4 additions & 4 deletions test-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"ftp:test": "../packages/balm/bin/balm.js --config config/ftp.js"
},
"dependencies": {
"axios": "^1.6.0",
"balm-ui": "^8.68.0",
"axios": "^1.7.0",
"balm-ui": "^8.69.0",
"core-js": "3",
"cors": "2",
"cross-env": "7",
Expand Down Expand Up @@ -66,7 +66,7 @@
"css-loader": "^7.1.0",
"html-webpack-plugin": "^5.6.0",
"less": "^4.2.0",
"less-loader": "^12.1.0",
"less-loader": "^12.2.0",
"mp-webpack-plugin": "^1.6.0",
"postcss-px-to-viewport": "^1.1.1",
"postcss-pxtorem": "^6.1.0",
Expand All @@ -77,7 +77,7 @@
"vue-loader-next": "npm:vue-loader@16",
"vue-style-loader": "4",
"vue-template-compiler": "2.7",
"webpack": "^5.91.0",
"webpack": "^5.93.0",
"webpack-node-externals": "^3.0.0"
},
"optionalDependencies": {
Expand Down
Loading

0 comments on commit e284ecd

Please sign in to comment.