Skip to content

Commit

Permalink
Merge pull request #3105 from OpenNeuroOrg/uuid-update
Browse files Browse the repository at this point in the history
deps(server): Update to uuid@10.0.0
  • Loading branch information
nellh authored Jul 18, 2024
2 parents 45b92c3 + 7193b3e commit 812f5ec
Show file tree
Hide file tree
Showing 7 changed files with 1,577 additions and 367 deletions.
989 changes: 801 additions & 188 deletions .pnp.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/openneuro-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"ts-node": "9.1.1",
"typescript": "5.1.6",
"underscore": "^1.8.3",
"uuid": "^3.0.1",
"uuid": "10.0.0",
"xmldoc": "^1.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-server/src/models/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from "uuid"
import { v4 as uuidv4 } from "uuid"
import mongoose, { Document } from "mongoose"
const { Schema, model } = mongoose

Expand Down Expand Up @@ -29,7 +29,7 @@ export interface MetadataDocument extends Document {
}

const metadataSchema = new Schema({
datasetId: { type: String, default: uuid.v4 }, // OpenNeuro id
datasetId: { type: String, default: uuidv4 }, // OpenNeuro id
datasetName: String,
datasetUrl: String, // @id type
dataProcessed: Boolean, // 'true' | 'false' | 'user input string'
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-server/src/models/reviewer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from "uuid"
import { v4 as uuidv4 } from "uuid"
import mongoose, { Document } from "mongoose"
const { Schema, model } = mongoose

Expand All @@ -10,7 +10,7 @@ export interface ReviewerDocument extends Document {
}

const reviewerSchema = new Schema({
id: { type: String, required: true, default: uuid.v4 },
id: { type: String, required: true, default: uuidv4 },
datasetId: { type: String, required: true },
expiration: {
type: Date,
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-server/src/models/upload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from "uuid"
import { v4 as uuidv4 } from "uuid"
import mongoose, { Document } from "mongoose"
const { Schema, model } = mongoose

Expand All @@ -15,7 +15,7 @@ export interface UploadDocument extends Document {
* newFiles excludes files in existing commits, as those are handled by other resolvers
*/
const uploadSchema = new Schema({
id: { type: String, required: true, default: uuid.v4 },
id: { type: String, required: true, default: uuidv4 },
datasetId: { type: String, required: true },
estimatedSize: Number,
complete: { type: Boolean, default: false, required: true },
Expand Down
4 changes: 2 additions & 2 deletions packages/openneuro-server/src/models/user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuid from "uuid"
import { v4 as uuidv4 } from "uuid"
import mongoose, { Document } from "mongoose"
const { Schema, model } = mongoose

Expand All @@ -17,7 +17,7 @@ export interface UserDocument extends Document {
}

const userSchema = new Schema({
id: { type: String, default: uuid.v4 }, // OpenNeuro id
id: { type: String, default: uuidv4 }, // OpenNeuro id
email: String,
name: String,
provider: String, // Login provider
Expand Down
Loading

0 comments on commit 812f5ec

Please sign in to comment.