mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
chore: Replace UUID package with standard module (#10351)
* fix: Missing replacements * More
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
)
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user