Skip to content

Commit

Permalink
qualify stdlib requires; save path as ospath const
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Nov 18, 2023
1 parent faa15fb commit c226fee
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gulp.d/lib/gulp-prettier-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
6 changes: 3 additions & 3 deletions gulp.d/tasks/build-preview-pages.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
6 changes: 3 additions & 3 deletions gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions gulp.d/tasks/pack.js
Original file line number Diff line number Diff line change
@@ -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`)))
8 changes: 4 additions & 4 deletions gulp.d/tasks/release.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions gulp.d/tasks/remove.js
Original file line number Diff line number Diff line change
@@ -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')

Expand Down
2 changes: 1 addition & 1 deletion gulp.d/tasks/serve.js
Original file line number Diff line number Diff line change
@@ -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+)?/
Expand Down

0 comments on commit c226fee

Please sign in to comment.