Skip to content

Commit

Permalink
deps: replaced uuid-random with Crypro.randomUUID.
Browse files Browse the repository at this point in the history
  • Loading branch information
dehmer committed Jun 23, 2024
1 parent d9bcecb commit d06f942
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/main/legacy/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { existsSync, promises as fs } from 'fs'
import path from 'path'
import * as R from 'ramda'
import proj4 from 'proj4'
import uuid from 'uuid-random'
import uuid from '../../shared/uuid'
import { reproject } from 'reproject'
import * as paths from '../paths'

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/DropdownMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import { Tooltip } from 'react-tooltip'
import * as mdi from '@mdi/js'
import Icon from '@mdi/react'
import uuid from 'uuid-random'
import uuid from '../../shared/uuid'
import './DropdownMenu.css'

export const DropdownMenu = props => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/KBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as R from 'ramda'
import React from 'react'
import Icon from '@mdi/react'
import * as mdi from '@mdi/js'
import uuid from 'uuid-random'
import uuid from '../../shared/uuid'
import {
KBarProvider as Provider,
KBarPortal as Portal,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/properties/Checkbox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react'
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import './Checkbox.css'

export default ({ label, id = uuid(), disabled, ...rest }) =>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/properties/Radio.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react'
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import './Radio.css'

const Radio = ({ label, id = uuid(), ...rest }) =>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/properties/Range.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react'
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import FlexColumn from './FlexColumn'

export default props => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/properties/TextField.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react'
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import './TextField.css'

const TextField = React.forwardRef(({ id = uuid(), label, disabled, ...rest }, ref) =>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ids.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as R from 'ramda'
import uuid from 'uuid-random'
import uuid from '../shared/uuid'

export const isUUID = uuid.test

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/model/CommandRegistry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from 'uuid-random'
import uuid from '../../shared/uuid'
import globalCommands from './commands/GlobalCommands'
import undoCommands from './commands/UndoCommands'
import clipboardCommands from './commands/ClipboardCommands'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ol/interaction/clone-interaction.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import { Translate } from 'ol/interaction'
import { MAC } from 'ol/has'
import { writeGeometryObject } from '../../store/FeatureStore'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ol/interaction/draw-interaction.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as R from 'ramda'
import Draw from 'ol/interaction/Draw'
import uuid from 'uuid-random'
import uuid from '../../../shared/uuid'
import * as MILSTD from '../../symbology/2525c'
import { writeFeatureObject } from '../../store/FeatureStore'
import * as TS from '../ts'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ol/interaction/measure/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import LineString from 'ol/geom/LineString'
import { Vector as VectorSource } from 'ol/source'
import { Vector as VectorLayer } from 'ol/layer'
import Circle from 'ol/geom/Circle'
import uuid from 'uuid-random'
import uuid from '../../../../shared/uuid'
import GeometryType from './GeometryType'
import { baseStyle, stylefunctionForGeometryType } from './style'
import { getLastSegmentCoordinates } from './tools'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/ProjectStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import util from 'util'
import { DateTime } from 'luxon'
import uuid from 'uuid-random'
import uuid from '../../shared/uuid'
import * as R from 'ramda'
import Emitter from '../../shared/emitter'

Expand Down
2 changes: 2 additions & 0 deletions src/shared/uuid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { randomUUID } from 'crypto'
export default randomUUID

0 comments on commit d06f942

Please sign in to comment.