mirror of
https://github.com/actions/setup-node.git
synced 2024-11-14 07:31:08 +07:00
78148dae50
* Updates * Update * Update * Update * Update * Yarn sometimes prefers npmrc, so use same token * Description * Update readme * Feedback * Add type * new toolkit and scoped registries * npmrc in RUNNER_TEMP * Dont always auth * Try exporting blank token * Get auth working for now pending runner changes * Fix string interpolation for auth token. * Don't export both userconfigs * Update authutil.js * Add single quotes for authString * Fix the registry string. * Use userconfig and append trailing slash * Keep in root of repo * Try just adding auth token * Remove auth token * Try changes again * Add tests * Npm and GPR samples * Add types |
||
---|---|---|
.. | ||
dist-node | ||
dist-src | ||
dist-types | ||
dist-web | ||
LICENSE | ||
package.json | ||
README.md |
deprecation
Log a deprecation message with stack
Usage
Browsers |
Load
|
---|---|
Node |
Install with
|
function foo() {
bar();
}
function bar() {
baz();
}
function baz() {
console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()"));
}
foo();
// { Deprecation: [my-lib] foo() is deprecated, use bar()
// at baz (/path/to/file.js:12:15)
// at bar (/path/to/file.js:8:3)
// at foo (/path/to/file.js:4:3)
To log a deprecation message only once, you can use the once module.
const Deprecation = require("deprecation");
const once = require("once");
const deprecateFoo = once(console.warn);
function foo() {
deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()"));
}
foo();
foo(); // logs nothing