Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More dep bumps for 2024 #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cmd.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env node

var fs = require('fs')
var path = require('path')
var npmLinkCheck = require('./index')
const fs = require('fs')
const path = require('path')
const npmLinkCheck = require('./index')

var pathToRoot = process.argv[2] ? process.argv[2] : '.'
var pathToNodeModules = path.join(pathToRoot, 'node_modules')
var list = []
const pathToRoot = process.argv[2] ? process.argv[2] : '.'
const pathToNodeModules = path.join(pathToRoot, 'node_modules')
const list = []

function cb (pkgName, foundPath) {
list.push([
Expand All @@ -18,7 +18,7 @@ function cb (pkgName, foundPath) {
}

function log () {
var header = 'Some npm-link\'ed packaged were found:'
const header = 'Some npm-link\'ed packaged were found:'

console.log(header + '\n' + list.join('\n') + '\n')
process.exitCode = 1
Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs')
var path = require('path')
var glob = require('glob')
const fs = require('fs')
const path = require('path')
const glob = require('glob')

/**
* @param {string} pathToRoot path to root of project
Expand All @@ -13,7 +13,7 @@ module.exports = function npmLinkCheck (pathToRoot, cb) {
}

function globNodeModules (startPath, cb) {
var pathToNodeModules
let pathToNodeModules

// if we have a scope we should check if the modules inside the folder is linked
if (startPath.includes('@')) {
Expand All @@ -32,7 +32,7 @@ function globNodeModules (startPath, cb) {
if (stats.isDirectory()) {
globNodeModules(foundPath, cb)
} else if (stats.isSymbolicLink()) {
var pkgName = path.basename(foundPath)
const pkgName = path.basename(foundPath)
cb(pkgName, foundPath)
}
})
Expand Down
Loading
Loading