Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sfirrin committed Aug 9, 2024
1 parent 2e1b005 commit 5458927
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions init.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
'use strict'

let path;
let Module;
let path
let Module
try {
path = require('node:path')
Module = require('node:module')
} catch (e) {
// If using a Node version pre-14, the `node:` protocol is not available
// with require() so we fall back to not using it
path = require('path');
Module = require('module');
path = require('path')
Module = require('module')
}

const semver = require('semver')
Expand Down
6 changes: 3 additions & 3 deletions packages/dd-trace/src/require-package-json.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use strict'

let path;
let fs;
let path
let fs
try {
path = require('node:path')
fs = require('node:fs')
} catch (e) {
// If using a Node version pre-14, the `node:` protocol is not available
// with require() so we fall back to not using it
path = require('path');
path = require('path')
fs = require('fs')
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const npmArgv = (() => {
}
})()

let path;
let path
try {
path = require('node:path')
} catch (e) {
// If using a Node version pre-14, the `node:` protocol is not available
// with require() so we fall back to not using it
path = require('path');
path = require('path')
}
const requirePackageJson = require('../packages/dd-trace/src/require-package-json.js')

Expand Down

0 comments on commit 5458927

Please sign in to comment.