Skip to content

Commit 40a561b

Browse files
committed
Require Node.js 18
1 parent 18f2ded commit 40a561b

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

index.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
import {Buffer} from 'node:buffer';
2-
import transformStream from 'easy-transform-stream';
3-
import PluginError from 'plugin-error';
2+
import {gulpPlugin} from 'gulp-plugin-extras';
43

54
const BOM = Buffer.from('\uFEFF');
65

76
export default function gulpBom() {
8-
return transformStream({objectMode: true}, async file => {
9-
if (file.isNull()) {
10-
return file;
11-
}
12-
13-
if (file.isStream()) {
14-
throw new PluginError('gulp-bom', 'Streaming not supported');
15-
}
16-
7+
return gulpPlugin('gulp-bom', file => {
178
file.contents = Buffer.concat([BOM, file.contents]);
18-
199
return file;
2010
});
2111
}

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "module",
1414
"exports": "./index.js",
1515
"engines": {
16-
"node": ">=14.16"
16+
"node": ">=18"
1717
},
1818
"scripts": {
1919
"test": "xo && ava"
@@ -33,15 +33,14 @@
3333
"prepend"
3434
],
3535
"dependencies": {
36-
"easy-transform-stream": "^1.0.0",
37-
"plugin-error": "^1.0.1"
36+
"gulp-plugin-extras": "^0.1.0"
3837
},
3938
"devDependencies": {
40-
"ava": "^3.15.0",
39+
"ava": "^5.3.1",
4140
"gulp": "^4.0.2",
42-
"p-event": "^5.0.1",
43-
"vinyl": "^2.2.1",
44-
"xo": "^0.47.0"
41+
"p-event": "^6.0.0",
42+
"vinyl": "^3.0.0",
43+
"xo": "^0.56.0"
4544
},
4645
"peerDependencies": {
4746
"gulp": ">=4"

0 commit comments

Comments
 (0)