How to use the npmlog.notice function in npmlog

To help you get started, we’ve selected a few npmlog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lerna / lerna / utils / log-packed / lib / log-packed.js View on Github external
tarball.bundled &&
          tarball.bundled.length && {
            name: "own files:",
            value: tarball.files.length,
          },
        tarball.entryCount && { name: "total files:", value: tarball.entryCount },
      ].filter(x => x),
      {
        include: ["name", "value"],
        showHeaders: false,
      }
    )
  );

  // an empty line
  log.notice("", "");
}
github graalvm / graaljs / deps / npm / lib / profile.js View on Github external
}).then(() => {
    log.notice('profile', 'Enabling two factor authentication for ' + mode)
    return readUserInfo.password()
  }).then((password) => {
    info.tfa.password = password
github graalvm / graaljs / deps / npm / lib / ping.js View on Github external
function ping (args, silent, cb) {
  if (typeof cb !== 'function') {
    cb = silent
    silent = false
  }

  const opts = PingConfig(npmConfig())
  const registry = opts.registry
  log.notice('PING', registry)
  const start = Date.now()
  return fetch('/-/ping?write=true', opts).then(
    res => res.json().catch(() => ({}))
  ).then(details => {
    if (silent) {
    } else {
      const time = Date.now() - start
      log.notice('PONG', `${time / 1000}ms`)
      if (npm.config.get('json')) {
        output(JSON.stringify({
          registry,
          time,
          details
        }, null, 2))
      } else if (Object.keys(details).length) {
        log.notice('PONG', `${JSON.stringify(details, null, 2)}`)
github graalvm / graaljs / deps / npm / lib / pack.js View on Github external
    tarball.bundled.forEach((name) => log.notice('', name))
  }
github davidhealey / waistline / node_modules / npm / lib / install / save.js View on Github external
toSave.forEach(function (pkg) {
      if (pkg.save) tree.package[pkg.save][pkg.name] = pkg.spec
      const movedFrom = []
      for (let saveType of types) {
        if (
          pkg.save !== saveType &&
          tree.package[saveType] &&
          tree.package[saveType][pkg.name]
        ) {
          movedFrom.push(saveType)
          delete tree.package[saveType][pkg.name]
        }
      }
      if (movedFrom.length) {
        log.notice('save', `${pkg.name} is being moved from ${movedFrom.join(' and ')} to ${pkg.save}`)
      }
      if (saveBundle) {
        var ii = bundle.indexOf(pkg.name)
        if (ii === -1) bundle.push(pkg.name)
      }
    })
github orchoban / react.cordova / node_modules / npm / lib / shrinkwrap.js View on Github external
).then(() => {
    log.notice('', `${PKGLOCK} has been renamed to ${SHRINKWRAP}. ${SHRINKWRAP} will be used for future installations.`)
    return readFile(path.resolve(npm.prefix, SHRINKWRAP)).then((d) => {
      return JSON.parse(d)
    })
  }, (err) => {
    if (err.code !== 'ENOENT') {
github lerna / lerna / utils / log-packed / lib / log-packed.js View on Github external
};
        }),
        {
          include: ["size", "path"],
          showHeaders: false,
        }
      )
    );
  }

  if (tarball.bundled && tarball.bundled.length) {
    log.notice("=== Bundled Dependencies ===");
    tarball.bundled.forEach(name => log.notice("", name));
  }

  log.notice("=== Tarball Details ===");
  log.notice(
    "",
    columnify(
      [
        { name: "name:", value: tarball.name },
        { name: "version:", value: tarball.version },
        tarball.filename && { name: "filename:", value: tarball.filename },
        tarball.size && { name: "package size:", value: byteSize(tarball.size) },
        tarball.unpackedSize && { name: "unpacked size:", value: byteSize(tarball.unpackedSize) },
        tarball.shasum && { name: "shasum:", value: tarball.shasum },
        tarball.integrity && { name: "integrity:", value: elideIntegrity(tarball.integrity) },
        tarball.bundled &&
          tarball.bundled.length && {
            name: "bundled deps:",
            value: tarball.bundled.length,
          },
github graalvm / graaljs / deps / npm / lib / pack.js View on Github external
function logContents (tarball) {
  log.notice('')
  log.notice('', `${npm.config.get('unicode') ? '📦 ' : 'package:'} ${tarball.name}@${tarball.version}`)
  log.notice('=== Tarball Contents ===')
  if (tarball.files.length) {
    log.notice('', columnify(tarball.files.map((f) => {
      const bytes = byteSize(f.size)
      return {path: f.path, size: `${bytes.value}${bytes.unit}`}
    }), {
      include: ['size', 'path'],
      showHeaders: false
    }))
  }
  if (tarball.bundled.length) {
    log.notice('=== Bundled Dependencies ===')
    tarball.bundled.forEach((name) => log.notice('', name))
  }
  log.notice('=== Tarball Details ===')
  log.notice('', columnify([
    {name: 'name:', value: tarball.name},
    {name: 'version:', value: tarball.version},
    tarball.filename && {name: 'filename:', value: tarball.filename},
    {name: 'package size:', value: byteSize(tarball.size)},
    {name: 'unpacked size:', value: byteSize(tarball.unpackedSize)},
    {name: 'shasum:', value: tarball.shasum},
    {
      name: 'integrity:',
      value: tarball.integrity.toString().substr(0, 20) + '[...]' + tarball.integrity.toString().substr(80)},
    tarball.bundled.length && {name: 'bundled deps:', value: tarball.bundled.length},
    tarball.bundled.length && {name: 'bundled files:', value: tarball.entryCount - tarball.files.length},
    tarball.bundled.length && {name: 'own files:', value: tarball.files.length},
github lerna / lerna / utils / log-packed / lib / log-packed.js View on Github external
const bytes = byteSize(f.size);
          return {
            path: f.path,
            size: `${bytes.value}${bytes.unit}`,
          };
        }),
        {
          include: ["size", "path"],
          showHeaders: false,
        }
      )
    );
  }

  if (tarball.bundled && tarball.bundled.length) {
    log.notice("=== Bundled Dependencies ===");
    tarball.bundled.forEach(name => log.notice("", name));
  }

  log.notice("=== Tarball Details ===");
  log.notice(
    "",
    columnify(
      [
        { name: "name:", value: tarball.name },
        { name: "version:", value: tarball.version },
        tarball.filename && { name: "filename:", value: tarball.filename },
        tarball.size && { name: "package size:", value: byteSize(tarball.size) },
        tarball.unpackedSize && { name: "unpacked size:", value: byteSize(tarball.unpackedSize) },
        tarball.shasum && { name: "shasum:", value: tarball.shasum },
        tarball.integrity && { name: "integrity:", value: elideIntegrity(tarball.integrity) },
        tarball.bundled &&
github graalvm / graaljs / deps / npm / lib / pack.js View on Github external
log.notice('=== Tarball Contents ===')
  if (tarball.files.length) {
    log.notice('', columnify(tarball.files.map((f) => {
      const bytes = byteSize(f.size)
      return {path: f.path, size: `${bytes.value}${bytes.unit}`}
    }), {
      include: ['size', 'path'],
      showHeaders: false
    }))
  }
  if (tarball.bundled.length) {
    log.notice('=== Bundled Dependencies ===')
    tarball.bundled.forEach((name) => log.notice('', name))
  }
  log.notice('=== Tarball Details ===')
  log.notice('', columnify([
    {name: 'name:', value: tarball.name},
    {name: 'version:', value: tarball.version},
    tarball.filename && {name: 'filename:', value: tarball.filename},
    {name: 'package size:', value: byteSize(tarball.size)},
    {name: 'unpacked size:', value: byteSize(tarball.unpackedSize)},
    {name: 'shasum:', value: tarball.shasum},
    {
      name: 'integrity:',
      value: tarball.integrity.toString().substr(0, 20) + '[...]' + tarball.integrity.toString().substr(80)},
    tarball.bundled.length && {name: 'bundled deps:', value: tarball.bundled.length},
    tarball.bundled.length && {name: 'bundled files:', value: tarball.entryCount - tarball.files.length},
    tarball.bundled.length && {name: 'own files:', value: tarball.files.length},
    {name: 'total files:', value: tarball.entryCount}
  ].filter((x) => x), {
    include: ['name', 'value'],
    showHeaders: false