PHP 8.2.30
Preview: debug.js Size: 1.25 KB
//opt/alt/alt-nodejs18/root/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/debug.js

// certain assertions we should do only when testing arborist itself, because
// they are too expensive or aggressive and would break user programs if we
// miss a situation where they are actually valid.
//
// call like this:
//
// /* istanbul ignore next - debug check */
// debug(() => {
//   if (someExpensiveCheck)
//     throw new Error('expensive check should have returned false')
// })

// run in debug mode if explicitly requested, running arborist tests,
// or working in the arborist project directory.

const debug = process.env.ARBORIST_DEBUG !== '0' && (
  process.env.ARBORIST_DEBUG === '1' ||
  /\barborist\b/.test(process.env.NODE_DEBUG || '') ||
  process.env.npm_package_name === '@npmcli/arborist' &&
  ['test', 'snap'].includes(process.env.npm_lifecycle_event) ||
  process.cwd() === require('node:path').resolve(__dirname, '..')
)

module.exports = debug ? fn => fn() : () => {}
const red = process.stderr.isTTY ? msg => `\x1B[31m${msg}\x1B[39m` : m => m
module.exports.log = (...msg) => module.exports(() => {
  const { format } = require('node:util')
  const prefix = `\n${process.pid} ${red(format(msg.shift()))} `
  msg = (prefix + format(...msg).trim().split('\n').join(prefix)).trim()
  /* eslint-disable-next-line no-console */
  console.error(msg)
})

Directory Contents

Dirs: 1 × Files: 38

Name Size Perms Modified Actions
arborist DIR
- drwxr-xr-x 2026-03-19 07:09:44
Edit Download
4.89 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
11.95 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
3.42 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
13.94 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.21 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.29 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.25 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
691 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
5.00 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
9.57 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
6.63 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.07 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.26 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
273 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
3.25 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
3.06 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
42.97 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.32 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
225 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
3.12 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
2.50 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
2.57 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
19.75 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
5.10 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
28.84 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
2.59 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
136 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
638 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
501 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
36.89 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
2.19 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.35 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
874 B lrw-r--r-- 2026-03-09 09:08:37
Edit Download
2.92 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
4.04 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
1.45 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
5.82 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download
10.56 KB lrw-r--r-- 2026-03-09 09:08:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).