Skip to content

Commit

Permalink
Remove node: protocol to support Node.js 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed May 14, 2024
1 parent 67aa402 commit 4588ddc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion check-npm-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let { execSync } = require('node:child_process')
let { execSync } = require('child_process')
let pico = require('picocolors')

try {
Expand Down
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

let { readFileSync } = require('node:fs')
let { join } = require('node:path')
let { readFileSync } = require('fs')
let { join } = require('path')

require('./check-npm-version')
let updateDb = require('./')
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default [
{
rules: {
'n/global-require': 'off',
'n/prefer-node-protocol': 'off',
'node-import/prefer-node-protocol': 'off'
}
},
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let { existsSync, readFileSync, writeFileSync } = require('node:fs')
let { execSync } = require('node:child_process')
let { join } = require('node:path')
let { existsSync, readFileSync, writeFileSync } = require('fs')
let { execSync } = require('child_process')
let { join } = require('path')
let escalade = require('escalade/sync')
let pico = require('picocolors')

Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { EOL } = require('node:os')
const { EOL } = require('os')

const getFirstRegexpMatchOrDefault = (text, regexp, defaultValue) => {
regexp.lastIndex = 0 // https://stackoverflow.com/a/11477448/4536543
Expand Down

0 comments on commit 4588ddc

Please sign in to comment.