Skip to content

Commit

Permalink
Remove unneeded packages
Browse files Browse the repository at this point in the history
`i` was probably installed by accident and UUID is
available in NodeJS itself already
  • Loading branch information
rrooij committed Jul 11, 2023
1 parent 0e0734f commit 977e65f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 42 deletions.
43 changes: 7 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"http-proxy-middleware": "^2.0.6",
"i": "^0.3.7",
"morgan": "~1.9.1",
"npm": "^9.8.0",
"swagger-ui-express": "^4.5.0",
"uuid": "^9.0.0"
"swagger-ui-express": "^4.5.0"
},
"devDependencies": {
"@types/cookie-parser": "^1.4.3",
Expand Down
5 changes: 2 additions & 3 deletions src/api/core/ChangeRequestDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import * as IndexClient from './IndexClient'

import dbSchema from '../../change_request_schema.json'
import { doc } from "@terminusdb/terminusdb-client/dist/typescript/lib/woql"
//import {v4 as uuidv4} from 'uuid';
const { v4: uuidv4 } = require('uuid');

const crypto = require('crypto')
const endpoint = process.env.SERVER_ENDPOINT || ""
const key = process.env.USER_KEY || ""
const CROrg = process.env.CR_TEARM_NAME || ""
Expand Down Expand Up @@ -126,7 +125,7 @@ class ChangeRequestDB {
original_branch: originalBranch,
creator: creator,
// we autogenerate the branchName
tracking_branch : uuidv4(),
tracking_branch : crypto.randomUUID(),
origin_commit_id : lastStartBranchCommitID,
creator_email: this.request.body.author || creator,
creation_time: timestamp,
Expand Down

0 comments on commit 977e65f

Please sign in to comment.