mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 18:14:37 +08:00
Update @typescript-eslint/plugin to 5.20.0
Our current @typescript-eslint version does not support TypeScript 4.6. The update fixes that. .eslintrc.js changes taken from https://crrev.com/c/3583292. DISABLE_THIRD_PARTY_CHECK="Update contains a breaking change. Requires updated config" Bug: None Change-Id: Id1d9f4f073f068ec95af6632a6d061adbee63cca Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3592593 Reviewed-by: Mathias Bynens <mathias@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
12a20cc008
commit
7a5852438e
+8
-11
@@ -17,21 +17,18 @@ let customRandom = (alphabet, defaultSize, getRandom) => {
|
||||
}
|
||||
let customAlphabet = (alphabet, size = 21) =>
|
||||
customRandom(alphabet, size, random)
|
||||
let nanoid = (size = 21) => {
|
||||
let id = ''
|
||||
let bytes = crypto.getRandomValues(new Uint8Array(size))
|
||||
while (size--) {
|
||||
let byte = bytes[size] & 63
|
||||
let nanoid = (size = 21) =>
|
||||
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
||||
byte &= 63
|
||||
if (byte < 36) {
|
||||
id += byte.toString(36)
|
||||
} else if (byte < 62) {
|
||||
id += (byte - 26).toString(36).toUpperCase()
|
||||
} else if (byte < 63) {
|
||||
id += '_'
|
||||
} else {
|
||||
} else if (byte > 62) {
|
||||
id += '-'
|
||||
} else {
|
||||
id += '_'
|
||||
}
|
||||
}
|
||||
return id
|
||||
}
|
||||
return id
|
||||
}, '')
|
||||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
|
||||
|
||||
+8
-11
@@ -17,21 +17,18 @@ let customRandom = (alphabet, defaultSize, getRandom) => {
|
||||
}
|
||||
let customAlphabet = (alphabet, size = 21) =>
|
||||
customRandom(alphabet, size, random)
|
||||
let nanoid = (size = 21) => {
|
||||
let id = ''
|
||||
let bytes = crypto.getRandomValues(new Uint8Array(size))
|
||||
while (size--) {
|
||||
let byte = bytes[size] & 63
|
||||
let nanoid = (size = 21) =>
|
||||
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
||||
byte &= 63
|
||||
if (byte < 36) {
|
||||
id += byte.toString(36)
|
||||
} else if (byte < 62) {
|
||||
id += (byte - 26).toString(36).toUpperCase()
|
||||
} else if (byte < 63) {
|
||||
id += '_'
|
||||
} else {
|
||||
} else if (byte > 62) {
|
||||
id += '-'
|
||||
} else {
|
||||
id += '_'
|
||||
}
|
||||
}
|
||||
return id
|
||||
}
|
||||
return id
|
||||
}, '')
|
||||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
export let nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e};
|
||||
export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),"");
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "nanoid",
|
||||
"version": "3.3.1",
|
||||
"description": "A tiny (130 bytes), secure URL-friendly unique string ID generator",
|
||||
"version": "3.3.3",
|
||||
"description": "A tiny (116 bytes), secure URL-friendly unique string ID generator",
|
||||
"keywords": [
|
||||
"uuid",
|
||||
"random",
|
||||
@@ -29,12 +29,13 @@
|
||||
"module": "index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"browser": "./index.browser.js",
|
||||
"require": "./index.cjs",
|
||||
"import": "./index.js",
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.d.ts": "./index.d.ts",
|
||||
"./package.json": "./package.json",
|
||||
"./async/package.json": "./async/package.json",
|
||||
"./async": {
|
||||
@@ -54,7 +55,6 @@
|
||||
"require": "./url-alphabet/index.cjs",
|
||||
"import": "./url-alphabet/index.js",
|
||||
"default": "./url-alphabet/index.js"
|
||||
},
|
||||
"./index.d.ts": "./index.d.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user