chore: Replace UUID package with standard module (#10351)

* fix: Missing replacements

* More
This commit is contained in:
Tom Moor
2025-10-12 19:15:53 +02:00
committed by GitHub
parent 0865052bb8
commit 76868a3083
4 changed files with 5 additions and 11 deletions
@@ -1,7 +1,5 @@
"use strict";
const { v4 } = require("uuid");
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable("pins", {
@@ -85,7 +83,7 @@ module.exports = {
`,
{
replacements: {
id: v4(),
id: crypto.randomUUID(),
documentId: document.id,
collectionId: document.collectionId,
teamId: document.teamId,
@@ -1,7 +1,5 @@
"use strict";
const { v4 } = require("uuid");
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.transaction(async (transaction) => {
@@ -80,7 +78,7 @@ module.exports = {
`,
{
replacements: {
id: v4(),
id: crypto.randomUUID(),
teamId: team.id,
createdById: adminUserID,
name: domain,
+2 -3
View File
@@ -1,6 +1,5 @@
import { Node, Schema } from "prosemirror-model";
import { Primitive } from "utility-types";
import { v4 } from "uuid";
import { isList } from "../queries/isList";
export function transformListToMentions(
@@ -34,11 +33,11 @@ function transformListItemToMentions(
node.type.create(
node.attrs,
schema.nodes.mention.create({
id: v4(),
id: crypto.randomUUID(),
type: mentionType,
label: link,
href: link,
modelId: v4(),
modelId: crypto.randomUUID(),
actorId: attrs.actorId,
})
)
+1 -2
View File
@@ -9,7 +9,6 @@ import toggleCheckboxItem from "../commands/toggleCheckboxItem";
import { MarkdownSerializerState } from "../lib/markdown/serializer";
import checkboxRule from "../rules/checkboxes";
import Node from "./Node";
import { v4 } from "uuid";
export default class CheckboxItem extends Node {
get name() {
@@ -35,7 +34,7 @@ export default class CheckboxItem extends Node {
},
],
toDOM: (node) => {
const id = `checkbox-${v4()}`;
const id = `checkbox-${crypto.randomUUID()}`;
const checked = node.attrs.checked.toString();
let input;
if (typeof document !== "undefined") {