bumps deps, moves monaco-editor to dev deps

pull/50/head
Steve Ruiz 2021-07-13 21:26:16 +01:00
rodzic 9afbf24de6
commit 277654edff
4 zmienionych plików z 720 dodań i 706 usunięć

Wyświetl plik

@ -55,9 +55,8 @@
"idb-keyval": "^5.0.6",
"immer": "^9.0.5",
"ismobilejs": "^1.1.1",
"monaco-editor": "^0.25.2",
"next": "^11.0.1",
"next-auth": "^3.27.0",
"next-auth": "^3.27.3",
"next-pwa": "^5.2.23",
"perfect-freehand": "^0.4.91",
"react": "^17.0.2",
@ -66,8 +65,7 @@
"react-feather": "^2.0.9",
"react-markdown": "^6.0.2",
"react-use-gesture": "^9.1.3",
"sucrase": "^3.19.0",
"uuid": "^8.3.2"
"sucrase": "^3.19.0"
},
"devDependencies": {
"@babel/core": "^7.14.6",
@ -87,6 +85,7 @@
"jest-esm-transformer": "^1.0.0",
"jest-watch-typeahead": "^0.6.1",
"lint-staged": "^10.0.10",
"monaco-editor": "^0.25.2",
"prettier": "^2.3.1",
"typescript": "^4.1.3"
},

Wyświetl plik

@ -1,6 +1,6 @@
import { GetServerSideProps } from 'next'
import { getSession } from 'next-auth/client'
import { v4 as uuid } from 'uuid'
import { uniqueId } from 'utils'
export default function CreateNewRoom(): JSX.Element {
return <div>You should not see this one</div>
@ -14,7 +14,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
context.res.statusCode = 307
}
context.res.setHeader('Location', `/room/${uuid()}`)
context.res.setHeader('Location', `/room/${uniqueId()}`)
context.res.statusCode = 307
return {

Wyświetl plik

@ -1,6 +1,5 @@
import React from 'react'
import { Bounds, Edge, Corner, BezierCurveSegment, DashStyle } from 'types'
import { v4 as uuid } from 'uuid'
import vec from './vec'
import _isMobile from 'ismobilejs'
import { intersectPolygonBounds } from './intersections'
@ -1591,7 +1590,13 @@ export function getFromCache<V, I extends object>(
* Get a unique string id.
*/
export function uniqueId(): string {
return uuid()
const array = new Uint32Array(8)
window.crypto.getRandomValues(array)
let str = ''
for (let i = 0; i < array.length; i++) {
str += (i < 2 || i > 5 ? '' : '-') + array[i].toString(16).slice(-4)
}
return str
}
/**

1406
yarn.lock

Plik diff jest za duży Load Diff