diff --git a/gulp.d/lib/gulp-prettier-eslint.js b/gulp.d/lib/gulp-prettier-eslint.js index fe674da0..3d431f5a 100644 --- a/gulp.d/lib/gulp-prettier-eslint.js +++ b/gulp.d/lib/gulp-prettier-eslint.js @@ -3,7 +3,7 @@ const log = require('fancy-log') const PluginError = require('plugin-error') const prettierEslint = require('prettier-eslint') -const { Transform } = require('stream') +const { Transform } = require('node:stream') const map = (transform) => new Transform({ objectMode: true, transform }) module.exports = () => { diff --git a/gulp.d/tasks/build-preview-pages.js b/gulp.d/tasks/build-preview-pages.js index b9afd6be..02589a45 100644 --- a/gulp.d/tasks/build-preview-pages.js +++ b/gulp.d/tasks/build-preview-pages.js @@ -1,14 +1,14 @@ 'use strict' const Asciidoctor = require('@asciidoctor/core')() -const fs = require('fs') +const fs = require('node:fs') const { promises: fsp } = fs const handlebars = require('handlebars') const merge = require('merge-stream') -const ospath = require('path') +const ospath = require('node:path') const path = ospath.posix const requireFromString = require('require-from-string') -const { Transform } = require('stream') +const { Transform } = require('node:stream') const map = (transform = () => {}, flush = undefined) => new Transform({ objectMode: true, transform, flush }) const vfs = require('vinyl-fs') const yaml = require('js-yaml') diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index a58bdff1..073ee4c6 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -4,18 +4,18 @@ const autoprefixer = require('autoprefixer') const browserify = require('browserify') const concat = require('gulp-concat') const cssnano = require('cssnano') -const fs = require('fs') +const fs = require('node:fs') const { promises: fsp } = fs const imagemin = require('gulp-imagemin') const merge = require('merge-stream') -const ospath = require('path') +const ospath = require('node:path') const path = ospath.posix const postcss = require('gulp-postcss') const postcssCalc = require('postcss-calc') const postcssImport = require('postcss-import') const postcssUrl = require('postcss-url') const postcssVar = require('postcss-custom-properties') -const { Transform } = require('stream') +const { Transform } = require('node:stream') const map = (transform) => new Transform({ objectMode: true, transform }) const through = () => map((file, enc, next) => next(null, file)) const uglify = require('gulp-uglify') diff --git a/gulp.d/tasks/pack.js b/gulp.d/tasks/pack.js index 3bd30c0f..5ea38202 100644 --- a/gulp.d/tasks/pack.js +++ b/gulp.d/tasks/pack.js @@ -1,11 +1,11 @@ 'use strict' +const ospath = require('node:path') const vfs = require('vinyl-fs') const zip = require('gulp-vinyl-zip') -const path = require('path') module.exports = (src, dest, bundleName, onFinish) => () => vfs .src('**/*', { base: src, cwd: src, dot: true }) - .pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`))) - .on('finish', () => onFinish && onFinish(path.resolve(dest, `${bundleName}-bundle.zip`))) + .pipe(zip.dest(ospath.join(dest, `${bundleName}-bundle.zip`))) + .on('finish', () => onFinish && onFinish(ospath.resolve(dest, `${bundleName}-bundle.zip`))) diff --git a/gulp.d/tasks/release.js b/gulp.d/tasks/release.js index 43d38ff0..5854a5ed 100644 --- a/gulp.d/tasks/release.js +++ b/gulp.d/tasks/release.js @@ -1,11 +1,11 @@ 'use strict' const File = require('vinyl') -const fs = require('fs') +const fs = require('node:fs') const { promises: fsp } = fs const { Octokit } = require('@octokit/rest') -const path = require('path') -const { pipeline, Transform, Writable } = require('stream') +const ospath = require('node:path') +const { pipeline, Transform, Writable } = require('node:stream') const forEach = (write, final) => new Writable({ objectMode: true, write, final }) const map = (transform, flush = undefined) => new Transform({ objectMode: true, transform, flush }) const vfs = require('vinyl-fs') @@ -84,7 +84,7 @@ module.exports = (dest, bundleName, owner, repo, ref, token, updateBranch) => as const latestTagName = `${variant}-latest` const message = `Release ${tagName}` const bundleFileBasename = `${bundleName}-bundle.zip` - const bundleFile = await versionBundle(path.join(dest, bundleFileBasename), tagName) + const bundleFile = await versionBundle(ospath.join(dest, bundleFileBasename), tagName) let commit = await octokit.git.getRef({ owner, repo, ref }).then((result) => result.data.object.sha) const readmeContent = await fsp .readFile('README.adoc', 'utf-8') diff --git a/gulp.d/tasks/remove.js b/gulp.d/tasks/remove.js index 2ecacf3e..a7368cdb 100644 --- a/gulp.d/tasks/remove.js +++ b/gulp.d/tasks/remove.js @@ -1,7 +1,7 @@ 'use strict' -const fs = require('fs') -const { Transform } = require('stream') +const fs = require('node:fs') +const { Transform } = require('node:stream') const map = (transform) => new Transform({ objectMode: true, transform }) const vfs = require('vinyl-fs') diff --git a/gulp.d/tasks/serve.js b/gulp.d/tasks/serve.js index 4c25005d..377462d0 100644 --- a/gulp.d/tasks/serve.js +++ b/gulp.d/tasks/serve.js @@ -1,7 +1,7 @@ 'use strict' const connect = require('gulp-connect') -const os = require('os') +const os = require('node:os') const ANY_HOST = '0.0.0.0' const URL_RX = /(https?):\/\/(?:[^/: ]+)(:\d+)?/