Update Puppeteer to v13.1.1

This CL contains the result of running `scripts/deps/manage_node_deps.py`
after changing the version of Puppeteer to v13.1.1.

Bug: none
Change-Id: I13154143f1247dc836079f25676775227385c0fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3397928
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
This commit is contained in:
Alex Rudenko
2022-01-18 13:32:16 +00:00
committed by Devtools-frontend LUCI CQ
parent 2b067c417b
commit b6331edcbd
65 changed files with 873 additions and 495 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
<img src="https://ai.github.io/nanoid/logo.svg" align="right"
alt="Nano ID logo by Anton Lovchikov" width="180" height="94">
**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md)
**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md)
A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
@@ -17,7 +17,7 @@ A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).
So ID size was reduced from 36 to 21 symbols.
* **Portable.** Nano ID was ported
to [19 programming languages](#other-programming-languages).
to [20 programming languages](#other-programming-languages).
```js
import { nanoid } from 'nanoid'
+5 -6
View File
@@ -1,21 +1,20 @@
let random = bytes =>
Promise.resolve(crypto.getRandomValues(new Uint8Array(bytes)))
let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes))
let customAlphabet = (alphabet, size) => {
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
let step = -~((1.6 * mask * size) / alphabet.length)
return () => {
return async () => {
let id = ''
while (true) {
let bytes = crypto.getRandomValues(new Uint8Array(step))
let i = step
while (i--) {
id += alphabet[bytes[i] & mask] || ''
if (id.length === size) return Promise.resolve(id)
if (id.length === size) return id
}
}
}
}
let nanoid = (size = 21) => {
let nanoid = async (size = 21) => {
let id = ''
let bytes = crypto.getRandomValues(new Uint8Array(size))
while (size--) {
@@ -30,6 +29,6 @@ let nanoid = (size = 21) => {
id += '-'
}
}
return Promise.resolve(id)
return id
}
module.exports = { nanoid, customAlphabet, random }
+5 -6
View File
@@ -1,21 +1,20 @@
let random = bytes =>
Promise.resolve(crypto.getRandomValues(new Uint8Array(bytes)))
let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes))
let customAlphabet = (alphabet, size) => {
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
let step = -~((1.6 * mask * size) / alphabet.length)
return () => {
return async () => {
let id = ''
while (true) {
let bytes = crypto.getRandomValues(new Uint8Array(step))
let i = step
while (i--) {
id += alphabet[bytes[i] & mask] || ''
if (id.length === size) return Promise.resolve(id)
if (id.length === size) return id
}
}
}
}
let nanoid = (size = 21) => {
let nanoid = async (size = 21) => {
let id = ''
let bytes = crypto.getRandomValues(new Uint8Array(size))
while (size--) {
@@ -30,6 +29,6 @@ let nanoid = (size = 21) => {
id += '-'
}
}
return Promise.resolve(id)
return id
}
export { nanoid, customAlphabet, random }
+55 -2
View File
@@ -1,5 +1,58 @@
#!/usr/bin/env node
let { nanoid } = require('..')
let { nanoid, customAlphabet } = require('..')
process.stdout.write(nanoid() + '\n')
function print(msg) {
process.stdout.write(msg + '\n')
}
function error(msg) {
process.stderr.write(msg + '\n')
process.exit(1)
}
if (process.argv.includes('--help') || process.argv.includes('-h')) {
print(`
Usage
$ nanoid [options]
Options
-s, --size Generated ID size
-a, --alphabet Alphabet to use
-h, --help Show this help
Examples
$ nano --s 15
S9sBF77U6sDB8Yg
$ nano --size 10 --alphabet abc
bcabababca`)
process.exit()
}
let alphabet, size
for (let i = 2; i < process.argv.length; i++) {
let arg = process.argv[i]
if (arg === '--size' || arg === '-s') {
size = Number(process.argv[i + 1])
i += 1
if (Number.isNaN(size) || size <= 0) {
error('Size must be positive integer')
}
} else if (arg === '--alphabet' || arg === '-a') {
alphabet = process.argv[i + 1]
i += 1
} else {
error('Unknown argument ' + arg)
}
}
if (alphabet) {
if (typeof size === 'undefined') {
error('You must also specify size option, when using custom alphabet')
}
let customNanoid = customAlphabet(alphabet, size)
print(customNanoid())
} else {
print(nanoid(size))
}
+2 -2
View File
@@ -14,7 +14,7 @@ let fillPool = bytes => {
poolOffset += bytes
}
let random = bytes => {
fillPool(bytes)
fillPool((bytes -= 0))
return pool.subarray(poolOffset - bytes, poolOffset)
}
let customRandom = (alphabet, size, getRandom) => {
@@ -34,7 +34,7 @@ let customRandom = (alphabet, size, getRandom) => {
}
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
let nanoid = (size = 21) => {
fillPool(size)
fillPool((size -= 0))
let id = ''
for (let i = poolOffset - size; i < poolOffset; i++) {
id += urlAlphabet[pool[i] & 63]
+2 -2
View File
@@ -14,7 +14,7 @@ let fillPool = bytes => {
poolOffset += bytes
}
let random = bytes => {
fillPool(bytes)
fillPool((bytes -= 0))
return pool.subarray(poolOffset - bytes, poolOffset)
}
let customRandom = (alphabet, size, getRandom) => {
@@ -34,7 +34,7 @@ let customRandom = (alphabet, size, getRandom) => {
}
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
let nanoid = (size = 21) => {
fillPool(size)
fillPool((size -= 0))
let id = ''
for (let i = poolOffset - size; i < poolOffset; i++) {
id += urlAlphabet[pool[i] & 63]
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "nanoid",
"version": "3.1.30",
"version": "3.2.0",
"description": "A tiny (130 bytes), secure URL-friendly unique string ID generator",
"keywords": [
"uuid",