fix: source map warning during build (#8148)
* [WEB-5473] fix: source map errors * [WEB-5473] chore: run codemod * fix: build errors in editor --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
9611cd1e73
commit
2e15e4f786
956 changed files with 778 additions and 2267 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { CommentKind } from "ast-types/gen/kinds";
|
||||
import {
|
||||
API,
|
||||
FileInfo,
|
||||
Options,
|
||||
TSTypeReference,
|
||||
JSCodeshift,
|
||||
TSTypeReference,
|
||||
Identifier,
|
||||
BlockStatement,
|
||||
VariableDeclarator,
|
||||
Expression,
|
||||
Pattern,
|
||||
SpreadElement,
|
||||
|
|
@ -14,6 +14,10 @@ import {
|
|||
ASTNode,
|
||||
Node,
|
||||
FunctionDeclaration,
|
||||
TSType,
|
||||
VariableDeclarator,
|
||||
ArrowFunctionExpression,
|
||||
FunctionExpression,
|
||||
} from "jscodeshift";
|
||||
|
||||
const COMPONENT_TYPE_NAMES = new Set([
|
||||
|
|
@ -58,7 +62,7 @@ function isComponentNameIdentifier(identifier: Identifier | null | undefined) {
|
|||
return COMPONENT_NAME_PATTERN.test(identifier.name);
|
||||
}
|
||||
|
||||
function addComments(target: Node, comments: NonNullable<Node["comments"]>) {
|
||||
function addComments(target: Node, comments: CommentKind[]) {
|
||||
if (!comments || comments.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -76,7 +80,7 @@ function copyOuterComments(source: Node, target: Node, j: JSCodeshift) {
|
|||
|
||||
function ensureParamType(
|
||||
param: Pattern,
|
||||
propsType: ASTNode | null | undefined,
|
||||
propsType: TSType | null | undefined,
|
||||
j: JSCodeshift
|
||||
) {
|
||||
if (!j.Pattern.check(param)) {
|
||||
|
|
@ -117,7 +121,7 @@ function toBlockBody(j: JSCodeshift, body: BlockStatement | Expression) {
|
|||
return j.blockStatement([returnStatement]);
|
||||
}
|
||||
|
||||
function isFunction(node: Node, j: JSCodeshift) {
|
||||
function isFunction(node: Node, j: JSCodeshift): node is ArrowFunctionExpression | FunctionExpression {
|
||||
return (
|
||||
j.ArrowFunctionExpression.check(node) || j.FunctionExpression.check(node)
|
||||
);
|
||||
|
|
@ -126,7 +130,7 @@ function isFunction(node: Node, j: JSCodeshift) {
|
|||
function extractArrowFunction(
|
||||
init: Expression | SpreadElement | JSXNamespacedName,
|
||||
j: JSCodeshift
|
||||
) {
|
||||
): ArrowFunctionExpression | FunctionExpression | undefined {
|
||||
if (isFunction(init, j)) {
|
||||
return init;
|
||||
}
|
||||
|
|
@ -210,7 +214,7 @@ function extractForwardRefTypes(
|
|||
return;
|
||||
}
|
||||
|
||||
if (!("typeParameters" in init)) {
|
||||
if (!j.CallExpression.check(init) || !("typeParameters" in init)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -238,12 +242,12 @@ function extractForwardRefTypes(
|
|||
typeParams.length >= 2 && typeParams[1]
|
||||
? typeParams[1]
|
||||
: j.tsTypeReference(
|
||||
j.identifier("Record"),
|
||||
j.tsTypeParameterInstantiation([
|
||||
j.tsStringKeyword(),
|
||||
j.tsUnknownKeyword(),
|
||||
])
|
||||
);
|
||||
j.identifier("Record"),
|
||||
j.tsTypeParameterInstantiation([
|
||||
j.tsStringKeyword(),
|
||||
j.tsUnknownKeyword(),
|
||||
])
|
||||
);
|
||||
|
||||
// Create React.ForwardedRef<ElementType> for the ref parameter
|
||||
const refType = j.tsTypeReference(
|
||||
|
|
@ -254,7 +258,7 @@ function extractForwardRefTypes(
|
|||
return { propsType, refType };
|
||||
}
|
||||
|
||||
function isEmptyObjectType(type: ASTNode, j: JSCodeshift) {
|
||||
function isEmptyObjectType(type: TSType, j: JSCodeshift) {
|
||||
return j.TSTypeLiteral.check(type) && type.members.length === 0;
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +266,7 @@ function convertToFunction(
|
|||
j: JSCodeshift,
|
||||
declaration: VariableDeclarator,
|
||||
init: Expression | SpreadElement | JSXNamespacedName,
|
||||
propsType: ASTNode | null | undefined
|
||||
propsType: TSType | null | undefined
|
||||
) {
|
||||
if (!j.Identifier.check(declaration.id)) {
|
||||
throw new Error("Declaration id must be an identifier");
|
||||
|
|
@ -405,11 +409,11 @@ export default function transform(file: FileInfo, api: API, options: Options) {
|
|||
}
|
||||
|
||||
// Try to get props type from variable type annotation first
|
||||
let propsType: ASTNode | undefined =
|
||||
j.TSTypeReference.check(typeAnnotation) &&
|
||||
isReactComponentType(typeAnnotation, j)
|
||||
? typeAnnotation.typeParameters?.params?.[0]
|
||||
: undefined;
|
||||
let propsType: TSType | undefined = undefined;
|
||||
|
||||
if (j.TSTypeReference.check(typeAnnotation) && isReactComponentType(typeAnnotation, j)) {
|
||||
propsType = typeAnnotation.typeParameters?.params?.[0];
|
||||
}
|
||||
|
||||
// If no props type from variable annotation, try to extract from wrapper's type parameters
|
||||
if (!propsType) {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"function-declaration": "jscodeshift -t ./function-declaration.ts --extensions=tsx --parser=tsx ../../apps/*/app ../../apps/*/ce ../../apps/*/core ../../apps/*/ee ../../apps/*/helpers ../../packages/*/src --ignore-pattern='**/node_modules/**' --ignore-pattern='**/dist/**' --ignore-pattern='**/build/**' --ignore-pattern='**/*.d.ts'"
|
||||
"function-declaration": "jscodeshift -t ./function-declaration.ts --extensions=tsx --parser=tsx ../../apps/*/app ../../apps/*/ce ../../apps/*/core ../../apps/*/ee ../../apps/*/helpers ../../packages/*/src --ignore-pattern='**/node_modules/**' --ignore-pattern='**/dist/**' --ignore-pattern='**/build/**' --ignore-pattern='**/*.d.ts'",
|
||||
"remove-directives": "jscodeshift -t ./remove-directives.ts --extensions=ts,tsx --parser=tsx ../../apps/*/app ../../apps/*/ce ../../apps/*/core ../../apps/*/ee ../../apps/*/helpers ../../apps/*/src ../../packages/*/src --ignore-pattern='**/node_modules/**' --ignore-pattern='**/dist/**' --ignore-pattern='**/build/**' --ignore-pattern='**/*.d.ts'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hypermod/utils": "^0.7.1",
|
||||
"@types/jscodeshift": "^17.3.0",
|
||||
"ast-types": "0.14.2",
|
||||
"jscodeshift": "^17.3.0",
|
||||
"vitest": "^4.0.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
97
packages/codemods/remove-directives.ts
Normal file
97
packages/codemods/remove-directives.ts
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
import { API, FileInfo, Options } from "jscodeshift";
|
||||
import type { CommentKind, DirectiveKind } from "ast-types/gen/kinds";
|
||||
|
||||
export default function transform(file: FileInfo, api: API, options: Options) {
|
||||
const j = api.jscodeshift;
|
||||
const root = j(file.source);
|
||||
|
||||
const directivesToRemove = new Set(["use client", "use server", "use-client", "use-server"]);
|
||||
|
||||
root.find(j.Program).forEach((path) => {
|
||||
// Handle ASTs where directives are stored in 'directives' property (Babel/TS)
|
||||
if (path.node.directives) {
|
||||
const newDirectives: DirectiveKind[] = [];
|
||||
let capturedComments: CommentKind[] = [];
|
||||
|
||||
path.node.directives.forEach((directive) => {
|
||||
if (directive.type === 'Directive' && directive.value.type === 'DirectiveLiteral' && typeof directive.value.value === 'string' && directivesToRemove.has(directive.value.value)) {
|
||||
// Directive is being removed. Capture its comments.
|
||||
if (directive.comments) {
|
||||
capturedComments.push(...directive.comments);
|
||||
}
|
||||
} else {
|
||||
// Keep this directive
|
||||
// If we have captured comments from previous removed directives, attach them here?
|
||||
// Usually comments belong to the next node.
|
||||
if (capturedComments.length > 0) {
|
||||
directive.comments = directive.comments || [];
|
||||
directive.comments.unshift(...capturedComments);
|
||||
capturedComments = [];
|
||||
}
|
||||
newDirectives.push(directive);
|
||||
}
|
||||
});
|
||||
|
||||
path.node.directives = newDirectives;
|
||||
|
||||
// If we still have captured comments (e.g. all directives removed, or last one removed),
|
||||
// attach them to the first body node.
|
||||
if (capturedComments.length > 0) {
|
||||
if (path.node.body.length > 0) {
|
||||
const firstBodyNode = path.node.body[0];
|
||||
if (firstBodyNode) {
|
||||
firstBodyNode.comments = firstBodyNode.comments || [];
|
||||
firstBodyNode.comments.unshift(...capturedComments);
|
||||
}
|
||||
} else {
|
||||
// If empty body, attach to Program?
|
||||
// jscodeshift might not print Program comments easily if they are not attached to children.
|
||||
// But let's try attaching to the Program node itself if possible, or leave them (they might be lost).
|
||||
path.node.comments = path.node.comments || [];
|
||||
path.node.comments.push(...capturedComments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Also handle the case where they might be in body as ExpressionStatements
|
||||
if (path.node.body) {
|
||||
const newBody: any[] = [];
|
||||
let capturedComments: any[] = [];
|
||||
|
||||
path.node.body.forEach((node) => {
|
||||
let shouldRemove = false;
|
||||
if (j.ExpressionStatement.check(node)) {
|
||||
const expression = node.expression;
|
||||
if (j.StringLiteral.check(expression) && directivesToRemove.has(expression.value)) {
|
||||
shouldRemove = true;
|
||||
} else if (j.Literal.check(expression) && typeof expression.value === 'string' && directivesToRemove.has(expression.value)) {
|
||||
shouldRemove = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldRemove) {
|
||||
if (node.comments) {
|
||||
capturedComments.push(...node.comments);
|
||||
}
|
||||
} else {
|
||||
if (capturedComments.length > 0) {
|
||||
node.comments = node.comments || [];
|
||||
node.comments.unshift(...capturedComments);
|
||||
capturedComments = [];
|
||||
}
|
||||
newBody.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
// If comments left at the end (e.g. removed last statement), usually they are trailing comments of the file.
|
||||
// But if we removed the ONLY statement, they become dangling.
|
||||
// We attached to next node, so if we are at the end, there is no next node.
|
||||
// If we removed a directive at the top, and there are more statements, they got attached.
|
||||
|
||||
path.node.body = newBody;
|
||||
}
|
||||
});
|
||||
|
||||
return root.toSource(options);
|
||||
}
|
||||
|
||||
290
packages/codemods/tests/remove-directives.spec.ts
Normal file
290
packages/codemods/tests/remove-directives.spec.ts
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
import { applyTransform } from "@hypermod/utils";
|
||||
import * as transformer from "../remove-directives";
|
||||
|
||||
describe("remove-directives", () => {
|
||||
it("should remove 'use client' directive", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use client";
|
||||
import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove 'use server' directive", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use server";
|
||||
import db from "./db";
|
||||
|
||||
export const getData = async () => {
|
||||
return db.query("SELECT * FROM users");
|
||||
};
|
||||
`,
|
||||
{ parser: "ts" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import db from "./db";
|
||||
|
||||
export const getData = async () => {
|
||||
return db.query("SELECT * FROM users");
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove 'use client' directive with single quotes", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
'use client';
|
||||
import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove multiple directives", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use client";
|
||||
"use strict";
|
||||
import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
""use strict";;
|
||||
import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <div>Hello, world!</div>;
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should ignore directives inside functions", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
"use client";
|
||||
return <div>Hello, world!</div>;
|
||||
};
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import React from "react";
|
||||
|
||||
export const MyComponent = () => {
|
||||
"use client";
|
||||
return <div>Hello, world!</div>;
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should preserve comments", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
// comment before
|
||||
"use client";
|
||||
// comment after
|
||||
import React from "react";
|
||||
`,
|
||||
{ parser: "tsx" }
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"// comment before
|
||||
// comment after
|
||||
import React from "react";"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove 'use-client' directive with hyphen", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use-client";
|
||||
import type { FC } from "react";
|
||||
// types
|
||||
import type { TDeDupeIssue } from "@plane/types";
|
||||
|
||||
type TDuplicateModalRootProps = {
|
||||
workspaceSlug: string;
|
||||
issues: TDeDupeIssue[];
|
||||
handleDuplicateIssueModal: (value: boolean) => void;
|
||||
};
|
||||
|
||||
export function DuplicateModalRoot(props: TDuplicateModalRootProps) {
|
||||
const { workspaceSlug, issues, handleDuplicateIssueModal } = props;
|
||||
return <></>;
|
||||
}
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import type { FC } from "react";
|
||||
// types
|
||||
import type { TDeDupeIssue } from "@plane/types";
|
||||
|
||||
type TDuplicateModalRootProps = {
|
||||
workspaceSlug: string;
|
||||
issues: TDeDupeIssue[];
|
||||
handleDuplicateIssueModal: (value: boolean) => void;
|
||||
};
|
||||
|
||||
export function DuplicateModalRoot(props: TDuplicateModalRootProps) {
|
||||
const { workspaceSlug, issues, handleDuplicateIssueModal } = props;
|
||||
return <></>;
|
||||
}"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove 'use-client' directive with hyphen and single quotes", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
'use-client';
|
||||
import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
// plane imports
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
|
||||
export function MyComponent() {
|
||||
return <div>Hello</div>;
|
||||
}
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
// plane imports
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
|
||||
export function MyComponent() {
|
||||
return <div>Hello</div>;
|
||||
}"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should remove 'use-server' directive with hyphen", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use-server";
|
||||
import db from "./db";
|
||||
|
||||
export const getData = async () => {
|
||||
return db.query("SELECT * FROM users");
|
||||
};
|
||||
`,
|
||||
{ parser: "ts" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import db from "./db";
|
||||
|
||||
export const getData = async () => {
|
||||
return db.query("SELECT * FROM users");
|
||||
};"
|
||||
`);
|
||||
});
|
||||
|
||||
it("should handle 'use-client' in modal component structure", async () => {
|
||||
const result = await applyTransform(
|
||||
transformer,
|
||||
`
|
||||
"use-client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
// plane imports
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
// hooks
|
||||
import useKeypress from "@/hooks/use-keypress";
|
||||
// local imports
|
||||
import { InboxIssueCreateRoot } from "./create-root";
|
||||
|
||||
type TInboxIssueCreateModalRoot = {
|
||||
workspaceSlug: string;
|
||||
projectId: string;
|
||||
modalState: boolean;
|
||||
handleModalClose: () => void;
|
||||
};
|
||||
|
||||
export function InboxIssueCreateModalRoot(props: TInboxIssueCreateModalRoot) {
|
||||
const { workspaceSlug, projectId, modalState, handleModalClose } = props;
|
||||
return <></>;
|
||||
}
|
||||
`,
|
||||
{ parser: "tsx" },
|
||||
);
|
||||
|
||||
expect(result).toMatchInlineSnapshot(`
|
||||
"import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
// plane imports
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
// hooks
|
||||
import useKeypress from "@/hooks/use-keypress";
|
||||
// local imports
|
||||
import { InboxIssueCreateRoot } from "./create-root";
|
||||
|
||||
type TInboxIssueCreateModalRoot = {
|
||||
workspaceSlug: string;
|
||||
projectId: string;
|
||||
modalState: boolean;
|
||||
handleModalClose: () => void;
|
||||
};
|
||||
|
||||
export function InboxIssueCreateModalRoot(props: TInboxIssueCreateModalRoot) {
|
||||
const { workspaceSlug, projectId, modalState, handleModalClose } = props;
|
||||
return <></>;
|
||||
}"
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "tsdown --watch",
|
||||
"build": "tsdown",
|
||||
|
|
@ -25,14 +26,11 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"types": "./dist/index.d.mts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"extends": "@plane/typescript-config/node-library.json",
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: false,
|
||||
exports: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,11 +4,9 @@
|
|||
"description": "Controller and route decorators for Express.js applications",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
@ -32,7 +30,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
"types": "./dist/index.d.mts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: false,
|
||||
exports: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,18 +5,12 @@
|
|||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.cts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./lib": {
|
||||
"import": "./dist/lib.js",
|
||||
"require": "./dist/lib.cjs"
|
||||
},
|
||||
".": "./dist/index.js",
|
||||
"./lib": "./dist/lib.js",
|
||||
"./package.json": "./package.json",
|
||||
"./styles.css": "./dist/styles/index.css",
|
||||
"./styles": "./dist/styles/index.css"
|
||||
|
|
|
|||
|
|
@ -206,11 +206,13 @@ export const LinkItem = (editor: Editor): EditorMenuItem<"link"> =>
|
|||
key: "link",
|
||||
name: "Link",
|
||||
isActive: () => editor?.isActive("link"),
|
||||
|
||||
command: (props) => {
|
||||
if (!props) return;
|
||||
if (props.url) setLinkEditor(editor, props.url, props.text);
|
||||
else unsetLinkEditor(editor);
|
||||
},
|
||||
|
||||
icon: LinkIcon,
|
||||
}) as const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
||||
import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
|
||||
import ts from "highlight.js/lib/languages/typescript";
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
|
|||
default: null,
|
||||
parseHTML: (element) => {
|
||||
const { languageClassPrefix } = this.options;
|
||||
// @ts-expect-error element is a DOM element
|
||||
const classNames = [...(element.firstElementChild?.classList || [])];
|
||||
const languages = classNames
|
||||
.filter((className) => className.startsWith(languageClassPrefix))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import { FloatingOverlay } from "@floating-ui/react";
|
||||
import type { SuggestionProps } from "@tiptap/suggestion";
|
||||
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// plane imports
|
||||
import { TWebhookConnectionQueryParams } from "@plane/types";
|
||||
import type { TWebhookConnectionQueryParams } from "@plane/types";
|
||||
import type { TExtendedFileHandler } from "@/plane-editor/types/config";
|
||||
|
||||
export type TFileHandler = {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,12 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["ES2022", "DOM"],
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/core/*"],
|
||||
"@/styles/*": ["./src/styles/*"],
|
||||
"@/plane-editor/*": ["./src/ce/*"]
|
||||
},
|
||||
"strictNullChecks": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*", "index.d.ts"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts", "src/lib.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
copy: ["src/styles"],
|
||||
exports: {
|
||||
customExports: (exports) => ({
|
||||
|
|
@ -12,6 +12,5 @@ export default defineConfig({
|
|||
"./styles": "./dist/styles/index.css",
|
||||
}),
|
||||
},
|
||||
dts: true,
|
||||
clean: true,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.cts"
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"lib": ["esnext", "dom"]
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
"license": "AGPL-3.0",
|
||||
"description": "I18n shared across multiple apps internally",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
@ -40,6 +41,6 @@
|
|||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"lib": ["esnext", "dom"],
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,11 +4,9 @@
|
|||
"license": "AGPL-3.0",
|
||||
"description": "Logger shared across multiple apps internally",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
@ -34,7 +32,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
"types": "./dist/index.d.mts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,11 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/base.json",
|
||||
"extends": "@plane/typescript-config/node-library.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
exports: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "tsdown --watch",
|
||||
"build": "tsdown",
|
||||
|
|
@ -16,154 +17,43 @@
|
|||
"build-storybook": "storybook build"
|
||||
},
|
||||
"exports": {
|
||||
"./accordion": {
|
||||
"import": "./dist/accordion/index.mjs",
|
||||
"require": "./dist/accordion/index.js"
|
||||
},
|
||||
"./animated-counter": {
|
||||
"import": "./dist/animated-counter/index.mjs",
|
||||
"require": "./dist/animated-counter/index.js"
|
||||
},
|
||||
"./avatar": {
|
||||
"import": "./dist/avatar/index.mjs",
|
||||
"require": "./dist/avatar/index.js"
|
||||
},
|
||||
"./banner": {
|
||||
"import": "./dist/banner/index.mjs",
|
||||
"require": "./dist/banner/index.js"
|
||||
},
|
||||
"./button": {
|
||||
"import": "./dist/button/index.mjs",
|
||||
"require": "./dist/button/index.js"
|
||||
},
|
||||
"./calendar": {
|
||||
"import": "./dist/calendar/index.mjs",
|
||||
"require": "./dist/calendar/index.js"
|
||||
},
|
||||
"./card": {
|
||||
"import": "./dist/card/index.mjs",
|
||||
"require": "./dist/card/index.js"
|
||||
},
|
||||
"./charts/area-chart": {
|
||||
"import": "./dist/charts/area-chart/index.mjs",
|
||||
"require": "./dist/charts/area-chart/index.js"
|
||||
},
|
||||
"./charts/bar-chart": {
|
||||
"import": "./dist/charts/bar-chart/index.mjs",
|
||||
"require": "./dist/charts/bar-chart/index.js"
|
||||
},
|
||||
"./charts/line-chart": {
|
||||
"import": "./dist/charts/line-chart/index.mjs",
|
||||
"require": "./dist/charts/line-chart/index.js"
|
||||
},
|
||||
"./charts/pie-chart": {
|
||||
"import": "./dist/charts/pie-chart/index.mjs",
|
||||
"require": "./dist/charts/pie-chart/index.js"
|
||||
},
|
||||
"./charts/radar-chart": {
|
||||
"import": "./dist/charts/radar-chart/index.mjs",
|
||||
"require": "./dist/charts/radar-chart/index.js"
|
||||
},
|
||||
"./charts/scatter-chart": {
|
||||
"import": "./dist/charts/scatter-chart/index.mjs",
|
||||
"require": "./dist/charts/scatter-chart/index.js"
|
||||
},
|
||||
"./charts/tree-map": {
|
||||
"import": "./dist/charts/tree-map/index.mjs",
|
||||
"require": "./dist/charts/tree-map/index.js"
|
||||
},
|
||||
"./collapsible": {
|
||||
"import": "./dist/collapsible/index.mjs",
|
||||
"require": "./dist/collapsible/index.js"
|
||||
},
|
||||
"./combobox": {
|
||||
"import": "./dist/combobox/index.mjs",
|
||||
"require": "./dist/combobox/index.js"
|
||||
},
|
||||
"./command": {
|
||||
"import": "./dist/command/index.mjs",
|
||||
"require": "./dist/command/index.js"
|
||||
},
|
||||
"./context-menu": {
|
||||
"import": "./dist/context-menu/index.mjs",
|
||||
"require": "./dist/context-menu/index.js"
|
||||
},
|
||||
"./dialog": {
|
||||
"import": "./dist/dialog/index.mjs",
|
||||
"require": "./dist/dialog/index.js"
|
||||
},
|
||||
"./emoji-icon-picker": {
|
||||
"import": "./dist/emoji-icon-picker/index.mjs",
|
||||
"require": "./dist/emoji-icon-picker/index.js"
|
||||
},
|
||||
"./emoji-reaction": {
|
||||
"import": "./dist/emoji-reaction/index.mjs",
|
||||
"require": "./dist/emoji-reaction/index.js"
|
||||
},
|
||||
"./empty-state": {
|
||||
"import": "./dist/empty-state/index.mjs",
|
||||
"require": "./dist/empty-state/index.js"
|
||||
},
|
||||
"./icons": {
|
||||
"import": "./dist/icons/index.mjs",
|
||||
"require": "./dist/icons/index.js"
|
||||
},
|
||||
"./input": {
|
||||
"import": "./dist/input/index.mjs",
|
||||
"require": "./dist/input/index.js"
|
||||
},
|
||||
"./menu": {
|
||||
"import": "./dist/menu/index.mjs",
|
||||
"require": "./dist/menu/index.js"
|
||||
},
|
||||
"./pill": {
|
||||
"import": "./dist/pill/index.mjs",
|
||||
"require": "./dist/pill/index.js"
|
||||
},
|
||||
"./popover": {
|
||||
"import": "./dist/popover/index.mjs",
|
||||
"require": "./dist/popover/index.js"
|
||||
},
|
||||
"./portal": {
|
||||
"import": "./dist/portal/index.mjs",
|
||||
"require": "./dist/portal/index.js"
|
||||
},
|
||||
"./scrollarea": {
|
||||
"import": "./dist/scrollarea/index.mjs",
|
||||
"require": "./dist/scrollarea/index.js"
|
||||
},
|
||||
"./skeleton": {
|
||||
"import": "./dist/skeleton/index.mjs",
|
||||
"require": "./dist/skeleton/index.js"
|
||||
},
|
||||
"./switch": {
|
||||
"import": "./dist/switch/index.mjs",
|
||||
"require": "./dist/switch/index.js"
|
||||
},
|
||||
"./table": {
|
||||
"import": "./dist/table/index.mjs",
|
||||
"require": "./dist/table/index.js"
|
||||
},
|
||||
"./tabs": {
|
||||
"import": "./dist/tabs/index.mjs",
|
||||
"require": "./dist/tabs/index.js"
|
||||
},
|
||||
"./toast": {
|
||||
"import": "./dist/toast/index.mjs",
|
||||
"require": "./dist/toast/index.js"
|
||||
},
|
||||
"./toolbar": {
|
||||
"import": "./dist/toolbar/index.mjs",
|
||||
"require": "./dist/toolbar/index.js"
|
||||
},
|
||||
"./tooltip": {
|
||||
"import": "./dist/tooltip/index.mjs",
|
||||
"require": "./dist/tooltip/index.js"
|
||||
},
|
||||
"./utils": {
|
||||
"import": "./dist/utils/index.mjs",
|
||||
"require": "./dist/utils/index.js"
|
||||
},
|
||||
"./accordion": "./dist/accordion/index.js",
|
||||
"./animated-counter": "./dist/animated-counter/index.js",
|
||||
"./avatar": "./dist/avatar/index.js",
|
||||
"./banner": "./dist/banner/index.js",
|
||||
"./button": "./dist/button/index.js",
|
||||
"./calendar": "./dist/calendar/index.js",
|
||||
"./card": "./dist/card/index.js",
|
||||
"./charts/area-chart": "./dist/charts/area-chart/index.js",
|
||||
"./charts/bar-chart": "./dist/charts/bar-chart/index.js",
|
||||
"./charts/line-chart": "./dist/charts/line-chart/index.js",
|
||||
"./charts/pie-chart": "./dist/charts/pie-chart/index.js",
|
||||
"./charts/radar-chart": "./dist/charts/radar-chart/index.js",
|
||||
"./charts/scatter-chart": "./dist/charts/scatter-chart/index.js",
|
||||
"./charts/tree-map": "./dist/charts/tree-map/index.js",
|
||||
"./collapsible": "./dist/collapsible/index.js",
|
||||
"./combobox": "./dist/combobox/index.js",
|
||||
"./command": "./dist/command/index.js",
|
||||
"./context-menu": "./dist/context-menu/index.js",
|
||||
"./dialog": "./dist/dialog/index.js",
|
||||
"./emoji-icon-picker": "./dist/emoji-icon-picker/index.js",
|
||||
"./emoji-reaction": "./dist/emoji-reaction/index.js",
|
||||
"./empty-state": "./dist/empty-state/index.js",
|
||||
"./icons": "./dist/icons/index.js",
|
||||
"./input": "./dist/input/index.js",
|
||||
"./menu": "./dist/menu/index.js",
|
||||
"./pill": "./dist/pill/index.js",
|
||||
"./popover": "./dist/popover/index.js",
|
||||
"./portal": "./dist/portal/index.js",
|
||||
"./scrollarea": "./dist/scrollarea/index.js",
|
||||
"./skeleton": "./dist/skeleton/index.js",
|
||||
"./switch": "./dist/switch/index.js",
|
||||
"./table": "./dist/table/index.js",
|
||||
"./tabs": "./dist/tabs/index.js",
|
||||
"./toast": "./dist/toast/index.js",
|
||||
"./toolbar": "./dist/toolbar/index.js",
|
||||
"./tooltip": "./dist/tooltip/index.js",
|
||||
"./utils": "./dist/utils/index.js",
|
||||
"./package.json": "./package.json",
|
||||
"./styles/fonts.css": "./dist/styles/fonts/index.css",
|
||||
"./styles/fonts": "./dist/styles/fonts/index.css",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { DayPicker } from "react-day-picker";
|
||||
import { ChevronLeftIcon } from "../icons";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { Area, Legend, ResponsiveContainer, Tooltip, XAxis, YAxis, Line, ComposedChart, CartesianGrid } from "recharts";
|
||||
// plane imports
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
"use client";
|
||||
|
||||
import React, { useCallback, useMemo, useState } from "react";
|
||||
import {
|
||||
BarChart as CoreBarChart,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
"use client";
|
||||
|
||||
import React, { useMemo, useState } from "react";
|
||||
import {
|
||||
CartesianGrid,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { Cell, PieChart as CorePieChart, Label, Legend, Pie, ResponsiveContainer, Tooltip } from "recharts";
|
||||
// plane imports
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
"use client";
|
||||
|
||||
import React, { useMemo, useState } from "react";
|
||||
import {
|
||||
CartesianGrid,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import { forwardRef, memo, useMemo } from "react";
|
||||
import { Dialog as BaseDialog } from "@base-ui-components/react";
|
||||
import { cn } from "../utils/classname";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import useFontFaceObserver from "use-font-face-observer";
|
||||
import { MATERIAL_ICONS_LIST } from "../material-icons";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
// Due to some weird issue with the import order, the import of useFontFaceObserver
|
||||
// should be after the imported here rather than some below helper functions as it is in the original file
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["esnext", "dom"]
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ export default defineConfig({
|
|||
"src/tooltip/index.ts",
|
||||
"src/utils/index.ts",
|
||||
],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
copy: ["src/styles"],
|
||||
exports: {
|
||||
customExports: (exports) => ({
|
||||
...exports,
|
||||
|
|
@ -46,8 +47,5 @@ export default defineConfig({
|
|||
"./styles/react-day-picker": "./dist/styles/react-day-picker.css",
|
||||
}),
|
||||
},
|
||||
copy: ["src/styles"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: false,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
"types": "./dist/index-BliaS-AT.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.cts"
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"lib": ["esnext", "dom"]
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@
|
|||
"version": "1.1.0",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
@ -33,7 +31,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
"types": "./dist/index.d.mts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"extends": "@plane/typescript-config/node-library.json",
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
exports: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"lib": [
|
||||
"es2023",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"moduleDetection": "force",
|
||||
"module": "preserve",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"emitDeclarationOnly": false,
|
||||
"verbatimModuleSyntax": true,
|
||||
"esModuleInterop": true,
|
||||
"incremental": false,
|
||||
"isolatedModules": true,
|
||||
"lib": ["es2022", "DOM", "DOM.Iterable"],
|
||||
"module": "NodeNext",
|
||||
"moduleDetection": "force",
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json"
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["es2023"],
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"module": "Preserve",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "react-jsx"
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["es2023", "DOM", "DOM.Iterable"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
"sideEffects": false,
|
||||
"license": "AGPL-3.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.cts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import { CheckIcon } from "lucide-react";
|
||||
import * as React from "react";
|
||||
// ui
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
"use client";
|
||||
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
||||
import type { FC } from "react";
|
||||
import React from "react";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{
|
||||
"extends": "@plane/typescript-config/react-library.json",
|
||||
"include": ["src"],
|
||||
"exclude": ["dist", "build", "node_modules"],
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true
|
||||
}
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
"tsdown": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.cts"
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
// plane imports
|
||||
import type { TAuthErrorInfo } from "@plane/constants";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
import { format } from "date-fns";
|
||||
import { get, set } from "lodash-es";
|
||||
// plane imports
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"use client";
|
||||
|
||||
// plane imports
|
||||
import { RANDOM_EMOJI_CODES } from "@plane/constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
outDir: "dist",
|
||||
format: ["esm", "cjs"],
|
||||
exports: true,
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
target: "esnext",
|
||||
platform: "neutral",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue