chore: simplify packages dependencies (#1243)

This commit is contained in:
Matti Nannt
2023-10-17 11:56:01 +02:00
committed by GitHub
parent 2c1abf8782
commit 46be7529fd
18 changed files with 234 additions and 691 deletions

View File

@@ -13,7 +13,7 @@
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.0.18",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -38,7 +38,7 @@
"lottie-web": "^5.12.2",
"mdast-util-to-string": "^4.0.0",
"mdx-annotations": "^0.1.3",
"next": "13.4.19",
"next": "13.5.5",
"next-plausible": "^3.11.1",
"next-seo": "^6.1.0",
"next-sitemap": "^4.2.3",

View File

@@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
storybook-static

View File

@@ -2,14 +2,14 @@
"name": "storybook",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "storybook dev -p 6006",
"build": "tsup",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"clean": "rimraf .turbo node_modules dist"
"clean": "rimraf .turbo node_modules dist storybook-static"
},
"dependencies": {
"@formbricks/ui": "workspace:*",
@@ -27,10 +27,10 @@
"@storybook/react": "^7.5.0-alpha.5",
"@storybook/react-vite": "^7.5.0-alpha.5",
"@storybook/testing-library": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@vitejs/plugin-react": "^4.1.0",
"esbuild": "^0.19.4",
"esbuild": "^0.19.5",
"tsup": "^7.2.0",
"vite": "^4.4.11"
}

View File

@@ -1,13 +0,0 @@
import { defineConfig } from "tsup";
const isProduction = process.env.NODE_ENV === "production";
export default defineConfig({
clean: true,
dts: true,
splitting: true,
format: ["cjs", "esm"],
entry: ["src/main.tsx"],
minify: isProduction,
sourcemap: true,
});

View File

@@ -26,7 +26,7 @@
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@react-email/components": "^0.0.7",
"@sentry/nextjs": "^7.74.0",
"@sentry/nextjs": "^7.73.0",
"@t3-oss/env-nextjs": "^0.7.1",
"bcryptjs": "^2.4.3",
"encoding": "^0.1.13",

View File

@@ -32,7 +32,7 @@
"@changesets/cli": "^2.26.2",
"eslint-config-formbricks": "workspace:*",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.1",
"rimraf": "^5.0.5",
"tsx": "^3.13.0",
"turbo": "latest"

View File

@@ -4,7 +4,7 @@ import { NextApiRequest, NextApiResponse } from "next";
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
// https://github.com/stripe/stripe-node#configuration
apiVersion: "2023-08-16",
apiVersion: "2023-10-16",
});
const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {

View File

@@ -6,7 +6,7 @@ import type { Readable } from "stream";
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
// https://github.com/stripe/stripe-node#configuration
apiVersion: "2023-08-16",
apiVersion: "2023-10-16",
});
const webhookSecret: string = process.env.STRIPE_WEBHOOK_SECRET!;

View File

@@ -16,6 +16,6 @@
},
"dependencies": {
"@formbricks/database": "workspace:*",
"stripe": "^13.11.0"
"stripe": "^14.0.0"
}
}

View File

@@ -12,8 +12,8 @@
"lint:report": "eslint . --format json --output-file ../../lint-results/app-store.json"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.428.0",
"@aws-sdk/s3-request-presigner": "^3.428.0",
"@aws-sdk/client-s3": "^3.429.0",
"@aws-sdk/s3-request-presigner": "^3.429.0",
"@formbricks/database": "*",
"@formbricks/types": "*",
"@paralleldrive/cuid2": "^2.2.2",

View File

@@ -47,10 +47,13 @@ type TransformPersonInput = {
};
export const transformPrismaPerson = (person: TransformPersonInput): TPerson => {
const attributes = person.attributes.reduce((acc, attr) => {
acc[attr.attributeClass.name] = attr.value;
return acc;
}, {} as Record<string, string | number>);
const attributes = person.attributes.reduce(
(acc, attr) => {
acc[attr.attributeClass.name] = attr.value;
return acc;
},
{} as Record<string, string | number>
);
return {
id: person.id,

View File

@@ -619,8 +619,7 @@ export async function createSurvey(environmentId: string, surveyBody: TSurveyInp
return transformedSurvey;
}
export async function duplicateSurvey(environmentId:string,surveyId:string){
export async function duplicateSurvey(environmentId: string, surveyId: string) {
const existingSurvey = await getSurvey(surveyId);
if (!existingSurvey) {
@@ -673,6 +672,6 @@ export async function duplicateSurvey(environmentId:string,surveyId:string){
revalidateTag(getSurveysCacheTag(environmentId));
revalidateTag(getSurveyCacheTag(surveyId));
return newSurvey;
}
}

View File

@@ -12,9 +12,7 @@
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.umd.js"
},
"./package.json": "./package.json",
"./dist/index.d.ts": "./dist/index.d.ts"
}
},
"scripts": {
"dev": "vite build --watch",

View File

@@ -57,9 +57,9 @@ const FileInput: React.FC<FileInputProps> = ({
{isUploaded && fileUrl ? (
<>
<div className="absolute inset-0 mr-4 mt-2 flex items-start justify-end gap-4">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-slate-300 hover:bg-slate-200/50 text-slate-800 hover:text-slate-900 bg-opacity-50">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-slate-300 bg-opacity-50 text-slate-800 hover:bg-slate-200/50 hover:text-slate-900">
<label htmlFor="modifyFile">
<PhotoIcon className="h-5 text-slate-700 hover:text-slate-900 cursor-pointer" />
<PhotoIcon className="h-5 cursor-pointer text-slate-700 hover:text-slate-900" />
<input
type="file"
@@ -80,8 +80,11 @@ const FileInput: React.FC<FileInputProps> = ({
/>
</label>
</div>
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-slate-300 hover:bg-slate-200/50 bg-opacity-50">
<TrashIcon className="h-5 text-slate-700 hover:text-slate-900" onClick={() => onFileUpload(undefined)} />
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-slate-300 bg-opacity-50 hover:bg-slate-200/50">
<TrashIcon
className="h-5 text-slate-700 hover:text-slate-900"
onClick={() => onFileUpload(undefined)}
/>
</div>
</div>

View File

@@ -80,8 +80,8 @@ const TagsCombobox: React.FC<ITagsComboboxProps> = ({
onKeyDown={(e) => {
if (e.key === "Enter" && searchValue !== "") {
if (
!tagsToSearch?.find((tag) =>
tag?.label?.toLowerCase().includes(searchValue?.toLowerCase())
!tagsToSearch?.find(
(tag) => tag?.label?.toLowerCase().includes(searchValue?.toLowerCase())
)
) {
createTag?.(searchValue);

View File

@@ -41,12 +41,9 @@
"cmdk": "^0.2.0",
"lexical": "^0.12.2",
"lucide-react": "^0.287.0",
"next": "13.5.5",
"next-auth": "^4.23.2",
"react-colorful": "^5.6.1",
"react-confetti": "^6.1.0",
"react-day-picker": "^8.9.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-radio-group": "^3.0.3",
"react-use": "^17.4.0",

842
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff