This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+7
View File
@@ -1,3 +1,10 @@
2.0.0 / 2018-10-26
==================
* Drop support for Node.js 0.6
* Replace internal `eval` usage with `Function` constructor
* Use instance methods on `process` to check for listeners
1.1.2 / 2018-01-11
==================
Generated Vendored
+1 -1
View File
@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2014-2017 Douglas Christopher Wilson
Copyright (c) 2014-2018 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
+8 -8
View File
@@ -267,14 +267,14 @@ deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
[MIT](LICENSE)
[npm-version-image]: https://img.shields.io/npm/v/depd.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
[npm-url]: https://npmjs.org/package/depd
[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/nodejs-depd/master?label=windows
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg
[coveralls-image]: https://badgen.net/coveralls/c/github/dougwilson/nodejs-depd/master
[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
[node-image]: https://img.shields.io/node/v/depd.svg
[node-image]: https://badgen.net/npm/node/depd
[node-url]: https://nodejs.org/en/download/
[npm-downloads-image]: https://badgen.net/npm/dm/depd
[npm-url]: https://npmjs.org/package/depd
[npm-version-image]: https://badgen.net/npm/v/depd
[travis-image]: https://badgen.net/travis/dougwilson/nodejs-depd/master?label=linux
[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
Generated Vendored
+29 -13
View File
@@ -1,6 +1,6 @@
/*!
* depd
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* Copyright(c) 2014-2018 Douglas Christopher Wilson
* MIT Licensed
*/
@@ -8,8 +8,6 @@
* Module dependencies.
*/
var callSiteToString = require('./lib/compat').callSiteToString
var eventListenerCount = require('./lib/compat').eventListenerCount
var relative = require('path').relative
/**
@@ -92,7 +90,7 @@ function createStackString (stack) {
}
for (var i = 0; i < stack.length; i++) {
str += '\n at ' + callSiteToString(stack[i])
str += '\n at ' + stack[i].toString()
}
return str
@@ -128,12 +126,31 @@ function depd (namespace) {
return deprecate
}
/**
* Determine if event emitter has listeners of a given type.
*
* The way to do this check is done three different ways in Node.js >= 0.8
* so this consolidates them into a minimal set using instance methods.
*
* @param {EventEmitter} emitter
* @param {string} type
* @returns {boolean}
* @private
*/
function eehaslisteners (emitter, type) {
var count = typeof emitter.listenerCount !== 'function'
? emitter.listeners(type).length
: emitter.listenerCount(type)
return count > 0
}
/**
* Determine if namespace is ignored.
*/
function isignored (namespace) {
/* istanbul ignore next: tested in a child processs */
if (process.noDeprecation) {
// --no-deprecation support
return true
@@ -150,7 +167,6 @@ function isignored (namespace) {
*/
function istraced (namespace) {
/* istanbul ignore next: tested in a child processs */
if (process.traceDeprecation) {
// --trace-deprecation support
return true
@@ -167,7 +183,7 @@ function istraced (namespace) {
*/
function log (message, site) {
var haslisteners = eventListenerCount(process, 'deprecation') !== 0
var haslisteners = eehaslisteners(process, 'deprecation')
// abort early if no destination
if (!haslisteners && this._ignored) {
@@ -310,7 +326,7 @@ function formatPlain (msg, caller, stack) {
// add stack trace
if (this._traced) {
for (var i = 0; i < stack.length; i++) {
formatted += '\n at ' + callSiteToString(stack[i])
formatted += '\n at ' + stack[i].toString()
}
return formatted
@@ -335,7 +351,7 @@ function formatColor (msg, caller, stack) {
// add stack trace
if (this._traced) {
for (var i = 0; i < stack.length; i++) {
formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
formatted += '\n \x1b[36mat ' + stack[i].toString() + '\x1b[39m' // cyan
}
return formatted
@@ -400,18 +416,18 @@ function wrapfunction (fn, message) {
}
var args = createArgumentsString(fn.length)
var deprecate = this // eslint-disable-line no-unused-vars
var stack = getStack()
var site = callSiteLocation(stack[1])
site.name = fn.name
// eslint-disable-next-line no-eval
var deprecatedfn = eval('(function (' + args + ') {\n' +
// eslint-disable-next-line no-new-func
var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',
'"use strict"\n' +
'return function (' + args + ') {' +
'log.call(deprecate, message, site)\n' +
'return fn.apply(this, arguments)\n' +
'})')
'}')(fn, log, this, message, site)
return deprecatedfn
}
+24 -21
View File
@@ -1,35 +1,34 @@
{
"_args": [
[
"depd@1.1.2",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
"depd@2.0.0",
"/home/node/nuxt"
]
],
"_from": "depd@1.1.2",
"_id": "depd@1.1.2",
"_from": "depd@2.0.0",
"_id": "depd@2.0.0",
"_inBundle": false,
"_integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
"_integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
"_location": "/depd",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "depd@1.1.2",
"raw": "depd@2.0.0",
"name": "depd",
"escapedName": "depd",
"rawSpec": "1.1.2",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "1.1.2"
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"/body-parser",
"/express",
"/http-errors",
"/send"
],
"_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"_spec": "1.1.2",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"_resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"_spec": "2.0.0",
"_where": "/home/node/nuxt",
"author": {
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
@@ -42,16 +41,20 @@
"devDependencies": {
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "3.19.0",
"eslint-config-standard": "7.1.0",
"eslint": "5.7.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-markdown": "1.0.0-beta.7",
"eslint-plugin-promise": "3.6.0",
"eslint-plugin-standard": "3.0.1",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-standard": "4.0.0",
"istanbul": "0.4.5",
"mocha": "~1.21.5"
"mocha": "5.2.0",
"safe-buffer": "5.1.2",
"uid-safe": "2.1.5"
},
"engines": {
"node": ">= 0.6"
"node": ">= 0.8"
},
"files": [
"lib/",
@@ -75,8 +78,8 @@
"bench": "node benchmark/index.js",
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --bail test/",
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
"test-ci": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter spec test/ && istanbul report lcovonly text-summary",
"test-cov": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter dot test/ && istanbul report lcov text-summary"
},
"version": "1.1.2"
"version": "2.0.0"
}