Skip to content

Commit c226fee

Browse files
committed
qualify stdlib requires; save path as ospath const
1 parent faa15fb commit c226fee

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

gulp.d/lib/gulp-prettier-eslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const log = require('fancy-log')
44
const PluginError = require('plugin-error')
55
const prettierEslint = require('prettier-eslint')
6-
const { Transform } = require('stream')
6+
const { Transform } = require('node:stream')
77
const map = (transform) => new Transform({ objectMode: true, transform })
88

99
module.exports = () => {

gulp.d/tasks/build-preview-pages.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict'
22

33
const Asciidoctor = require('@asciidoctor/core')()
4-
const fs = require('fs')
4+
const fs = require('node:fs')
55
const { promises: fsp } = fs
66
const handlebars = require('handlebars')
77
const merge = require('merge-stream')
8-
const ospath = require('path')
8+
const ospath = require('node:path')
99
const path = ospath.posix
1010
const requireFromString = require('require-from-string')
11-
const { Transform } = require('stream')
11+
const { Transform } = require('node:stream')
1212
const map = (transform = () => {}, flush = undefined) => new Transform({ objectMode: true, transform, flush })
1313
const vfs = require('vinyl-fs')
1414
const yaml = require('js-yaml')

gulp.d/tasks/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ const autoprefixer = require('autoprefixer')
44
const browserify = require('browserify')
55
const concat = require('gulp-concat')
66
const cssnano = require('cssnano')
7-
const fs = require('fs')
7+
const fs = require('node:fs')
88
const { promises: fsp } = fs
99
const imagemin = require('gulp-imagemin')
1010
const merge = require('merge-stream')
11-
const ospath = require('path')
11+
const ospath = require('node:path')
1212
const path = ospath.posix
1313
const postcss = require('gulp-postcss')
1414
const postcssCalc = require('postcss-calc')
1515
const postcssImport = require('postcss-import')
1616
const postcssUrl = require('postcss-url')
1717
const postcssVar = require('postcss-custom-properties')
18-
const { Transform } = require('stream')
18+
const { Transform } = require('node:stream')
1919
const map = (transform) => new Transform({ objectMode: true, transform })
2020
const through = () => map((file, enc, next) => next(null, file))
2121
const uglify = require('gulp-uglify')

gulp.d/tasks/pack.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict'
22

3+
const ospath = require('node:path')
34
const vfs = require('vinyl-fs')
45
const zip = require('gulp-vinyl-zip')
5-
const path = require('path')
66

77
module.exports = (src, dest, bundleName, onFinish) => () =>
88
vfs
99
.src('**/*', { base: src, cwd: src, dot: true })
10-
.pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`)))
11-
.on('finish', () => onFinish && onFinish(path.resolve(dest, `${bundleName}-bundle.zip`)))
10+
.pipe(zip.dest(ospath.join(dest, `${bundleName}-bundle.zip`)))
11+
.on('finish', () => onFinish && onFinish(ospath.resolve(dest, `${bundleName}-bundle.zip`)))

gulp.d/tasks/release.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict'
22

33
const File = require('vinyl')
4-
const fs = require('fs')
4+
const fs = require('node:fs')
55
const { promises: fsp } = fs
66
const { Octokit } = require('@octokit/rest')
7-
const path = require('path')
8-
const { pipeline, Transform, Writable } = require('stream')
7+
const ospath = require('node:path')
8+
const { pipeline, Transform, Writable } = require('node:stream')
99
const forEach = (write, final) => new Writable({ objectMode: true, write, final })
1010
const map = (transform, flush = undefined) => new Transform({ objectMode: true, transform, flush })
1111
const vfs = require('vinyl-fs')
@@ -84,7 +84,7 @@ module.exports = (dest, bundleName, owner, repo, ref, token, updateBranch) => as
8484
const latestTagName = `${variant}-latest`
8585
const message = `Release ${tagName}`
8686
const bundleFileBasename = `${bundleName}-bundle.zip`
87-
const bundleFile = await versionBundle(path.join(dest, bundleFileBasename), tagName)
87+
const bundleFile = await versionBundle(ospath.join(dest, bundleFileBasename), tagName)
8888
let commit = await octokit.git.getRef({ owner, repo, ref }).then((result) => result.data.object.sha)
8989
const readmeContent = await fsp
9090
.readFile('README.adoc', 'utf-8')

gulp.d/tasks/remove.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
const fs = require('fs')
4-
const { Transform } = require('stream')
3+
const fs = require('node:fs')
4+
const { Transform } = require('node:stream')
55
const map = (transform) => new Transform({ objectMode: true, transform })
66
const vfs = require('vinyl-fs')
77

gulp.d/tasks/serve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const connect = require('gulp-connect')
4-
const os = require('os')
4+
const os = require('node:os')
55

66
const ANY_HOST = '0.0.0.0'
77
const URL_RX = /(https?):\/\/(?:[^/: ]+)(:\d+)?/

0 commit comments

Comments
 (0)