mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-22 14:04:44 +00:00
Add auth support (#21)
* 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
This commit is contained in:
parent
0675b87d74
commit
78148dae50
391 changed files with 79848 additions and 43 deletions
77
node_modules/deprecation/README.md
generated
vendored
Normal file
77
node_modules/deprecation/README.md
generated
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
# deprecation
|
||||
|
||||
> Log a deprecation message with stack
|
||||
|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Deprecation } from "https://cdn.pika.dev/deprecation/v2";
|
||||
</script>
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Node
|
||||
</th><td>
|
||||
|
||||
Install with `npm install deprecation`
|
||||
|
||||
```js
|
||||
const { Deprecation } = require("deprecation");
|
||||
// or: import { Deprecation } from "deprecation";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
```js
|
||||
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](https://www.npmjs.com/package/once) module.
|
||||
|
||||
```js
|
||||
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
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[ISC](LICENSE)
|
Loading…
Add table
Add a link
Reference in a new issue