chore: use node prefix for all builtin modules

pull/356/head
Romain 5 months ago
parent 2c669bda99
commit 3590b15cfb

@ -1,7 +1,7 @@
const fs = require('node:fs')
const util = require('node:util')
const tty = require('node:tty')
const debug = require('debug')
const fs = require('fs')
const util = require('util')
const tty = require('tty')
/*
Thumbsup uses the <debug> package for logging.

@ -1,9 +1,9 @@
/* eslint-disable quote-props */
const messages = require('./messages')
const path = require('path')
const yargs = require('yargs')
const os = require('os')
const path = require('node:path')
const os = require('node:os')
const _ = require('lodash')
const yargs = require('yargs')
const messages = require('./messages')
const OPTIONS = {

@ -1,8 +1,8 @@
const os = require('node:os')
const _ = require('lodash')
const debug = require('debug')('thumbsup:debug')
const es = require('event-stream')
const exiftool = require('./stream.js')
const os = require('os')
/*
Fans out the list of files to multiple exiftool processes (default = CPU count)

@ -1,4 +1,4 @@
const childProcess = require('child_process')
const childProcess = require('node:child_process')
const trace = require('debug')('thumbsup:trace')
const debug = require('debug')('thumbsup:debug')
const error = require('debug')('thumbsup:error')

@ -1,12 +1,12 @@
const EventEmitter = require('node:events')
const path = require('node:path')
const _ = require('lodash')
const Database = require('better-sqlite3')
const fs = require('fs-extra')
const moment = require('moment')
const delta = require('./delta')
const EventEmitter = require('events')
const exiftool = require('../exiftool/parallel')
const fs = require('fs-extra')
const globber = require('./glob')
const moment = require('moment')
const path = require('path')
const EXIF_DATE_FORMAT = 'YYYY:MM:DD HH:mm:ssZ'

@ -1,5 +1,5 @@
const path = require('node:path')
const _ = require('lodash')
const path = require('path')
const micromatch = require('micromatch')
class GlobPattern {

@ -5,8 +5,8 @@ based on the --albums-from array of patterns provided
--------------------------------------------------------------------------------
*/
const path = require('node:path')
const _ = require('lodash')
const path = require('path')
const albumPattern = require('./album-pattern')
class AlbumMapper {

@ -5,8 +5,8 @@ Can be based on anything, e.g. directory name, date, metadata keywords...
e.g. `Holidays/London/IMG_00001.jpg` -> `Holidays/London`
--------------------------------------------------------------------------------
*/
const path = require('node:path')
const moment = require('moment')
const path = require('path')
const TOKEN_REGEX = /%[a-z]+/g
const DATE_REGEX = /{[^}]+}/g

@ -1,5 +1,5 @@
const path = require('node:path')
const _ = require('lodash')
const path = require('path')
const Album = require('../model/album')
exports.createAlbums = function (collection, mapper, opts, picasaReader) {

@ -4,9 +4,9 @@ Provides Picasa metadata based on <picasa.ini> files in the input folder
--------------------------------------------------------------------------------
*/
const fs = require('node:fs')
const path = require('node:path')
const ini = require('ini')
const fs = require('fs')
const path = require('path')
class Picasa {
constructor () {

@ -6,8 +6,8 @@ A single photo/video could exist in multiple albums
--------------------------------------------------------------------------------
*/
const path = require('node:path')
const _ = require('lodash')
const path = require('path')
const slugify = require('slugify')
const url = require('./url')

@ -5,8 +5,8 @@ Also includes how it maps to the different output files
--------------------------------------------------------------------------------
*/
const path = require('node:path')
const _ = require('lodash')
const path = require('path')
const moment = require('moment')
const output = require('./output')
const url = require('./url')

@ -5,9 +5,9 @@ This is based on parsing "provider data" such as Exiftool or Picasa
--------------------------------------------------------------------------------
*/
const path = require('node:path')
const _ = require('lodash')
const moment = require('moment')
const path = require('path')
// mime type for videos
const MIME_VIDEO_REGEX = /^video\/.*$/

@ -1,4 +1,4 @@
const path = require('path')
const path = require('node:path')
const urljoin = require('url-join')
const url = require('./url')

@ -1,5 +1,5 @@
const path = require('path')
const process = require('process')
const path = require('node:path')
const process = require('node:process')
exports.fromPath = function (filepath) {
// already a URL (typically provided as a CLI argument, e.g. link prefix)

@ -1,7 +1,7 @@
const path = require('node:path')
const childProcess = require('node:child_process')
const async = require('async')
const childProcess = require('child_process')
const Observable = require('zen-observable')
const path = require('path')
const trace = require('debug')('thumbsup:trace')
const debug = require('debug')('thumbsup:debug')
const error = require('debug')('thumbsup:error')

@ -1,8 +1,8 @@
const fs = require('node:fs')
const path = require('node:path')
const _ = require('lodash')
const fs = require('fs')
const debug = require('debug')('thumbsup:debug')
const Observable = require('zen-observable')
const path = require('path')
const readdir = require('fs-readdir-recursive')
exports.run = function (fileCollection, outputRoot, dryRun) {

@ -5,7 +5,7 @@ Caches the results in <thumbsup.db> for faster re-runs
--------------------------------------------------------------------------------
*/
const path = require('path')
const path = require('node:path')
const hierarchy = require('../input/hierarchy.js')
const Index = require('../components/index/index')
const info = require('debug')('thumbsup:info')

@ -1,9 +1,9 @@
const path = require('node:path')
const fs = require('fs-extra')
const debug = require('debug')('thumbsup:debug')
const error = require('debug')('thumbsup:error')
const fs = require('fs-extra')
const info = require('debug')('thumbsup:info')
const ListrWorkQueue = require('../components/listr-work-queue/index')
const path = require('path')
const actions = require('./actions')
exports.run = function (files, problems, opts, parentTask) {

@ -1,5 +1,5 @@
const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')
class SEO {
constructor (output, seoLocation, rootAlbum) {

@ -1,4 +1,4 @@
const path = require('path')
const path = require('node:path')
module.exports = (target, options) => {
// if already an absolute URL, do nothing

@ -1,9 +1,9 @@
const path = require('node:path')
const async = require('async')
const debug = require('debug')('thumbsup:debug')
const fs = require('fs-extra')
const handlebars = require('handlebars')
const less = require('less')
const path = require('path')
class Theme {
constructor (themeDir, destDir, opts) {

@ -1,5 +1,5 @@
const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')
const async = require('async')
const resolvePkg = require('resolve-pkg')
const Theme = require('./theme')

@ -1,5 +1,5 @@
const path = require('path')
const process = require('process')
const path = require('node:path')
const process = require('node:process')
const should = require('should/as-function')
const sinon = require('sinon')
const options = require('../../src/cli/options.js')

@ -1,4 +1,4 @@
const path = require('path')
const path = require('node:path')
const should = require('should/as-function')
const fixtures = require('../../fixtures')
const exiftool = require('../../../src/components/exiftool/parallel')

@ -1,4 +1,4 @@
const childProcess = require('child_process')
const childProcess = require('node:child_process')
const debug = require('debug')
const mockSpawn = require('mock-spawn')
const should = require('should/as-function')

@ -1,9 +1,9 @@
const fs = require('fs')
const glob = require('../../../src/components/index/glob')
const { sep } = require('path')
const os = require('os')
const fs = require('node:fs')
const { sep } = require('node:path')
const os = require('node:os')
const should = require('should/as-function')
const tmp = require('tmp')
const glob = require('../../../src/components/index/glob')
describe('Index: glob', function () {
this.slow(500)

@ -1,4 +1,4 @@
const path = require('path')
const path = require('node:path')
const should = require('should/as-function')
const Index = require('../../../src/components/index/index')
const fixtures = require('../../fixtures')

@ -1,7 +1,7 @@
const path = require('node:path')
const _ = require('lodash')
const fs = require('fs-extra')
const moment = require('moment')
const path = require('path')
const tmp = require('tmp')
const File = require('../src/model/file')
const Metadata = require('../src/model/metadata')

@ -1,5 +1,5 @@
const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')
const should = require('should/as-function')
const tmp = require('tmp')
const AlbumMapper = require('../../src/input/album-mapper.js')

@ -1,4 +1,4 @@
const path = require('path')
const path = require('node:path')
const should = require('should/as-function')
const sinon = require('sinon')
const hierarchy = require('../../src/input/hierarchy.js')

@ -1,4 +1,4 @@
const fs = require('fs')
const fs = require('node:fs')
const sinon = require('sinon')
const should = require('should/as-function')
const Picasa = require('../../src/input/picasa.js')

@ -1,7 +1,7 @@
const fs = require('fs')
const fs = require('node:fs')
const path = require('node:path')
const debug = require('debug')
const glob = require('glob')
const path = require('path')
const YAML = require('yaml')
const should = require('should/as-function')
const fixtures = require('../fixtures')

@ -1,5 +1,5 @@
const util = require('node:util')
const debug = require('debug')
const util = require('util')
debug.recorded = []

@ -1,4 +1,4 @@
const fs = require('fs')
const fs = require('node:fs')
const sinon = require('sinon')
const debug = require('debug')
const should = require('should/as-function')

@ -1,5 +1,5 @@
const path = require('node:path')
const fs = require('fs-extra')
const path = require('path')
const should = require('should/as-function')
const fixtures = require('../fixtures')
const Theme = require('../../src/website/theme')

Loading…
Cancel
Save