Dev Experience Performance Improvements (#481)

* only add packages once to their main package and remove them from other packages to avoid version conflicts

* update package versions

* update package versions, clean packages

* remove old vscode settings

* exclude formbricks-com from pnpm dev

* narrow down tsconfig includes, pnpm-lock update

* add pnpm test to github action
This commit is contained in:
Matti Nannt
2023-07-04 20:54:41 +02:00
committed by GitHub
parent 175736bb4b
commit a9f4d4e28b
28 changed files with 967 additions and 2625 deletions

View File

@@ -24,5 +24,11 @@ jobs:
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
- name: Build formbricks-js dependencies
run: pnpm build --filter=js
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test

View File

@@ -4,28 +4,19 @@
"private": true,
"scripts": {
"clean": "rimraf .turbo node_modules .next",
"dev": "next dev -p 3002",
"dev": "next dev -p 3002 --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.0.17",
"eslint-config-formbricks": "workspace:*",
"next": "13.2.4",
"@heroicons/react": "^2.0.18",
"next": "13.4.8",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@types/node": "18.15.11",
"@types/react": "18.0.33",
"@types/react-dom": "18.0.11",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
"rimraf": "^5.0.0",
"tailwindcss": "^3.3.1",
"typescript": "5.0.3"
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -11,7 +11,7 @@
"lint": "next lint"
},
"dependencies": {
"@calcom/embed-react": "^1.1.1",
"@calcom/embed-react": "^1.2.2",
"@docsearch/react": "^3.5.1",
"@formbricks/lib": "workspace:*",
"@formbricks/types": "workspace:*",
@@ -21,35 +21,25 @@
"@mapbox/rehype-prism": "^0.8.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "^13.4.7",
"@paralleldrive/cuid2": "^2.2.0",
"@next/mdx": "^13.4.8",
"@paralleldrive/cuid2": "^2.2.1",
"clsx": "^1.2.1",
"lottie-web": "^5.12.2",
"next": "13.4.7",
"next": "13.4.8",
"next-plausible": "^3.8.0",
"next-sitemap": "^4.1.3",
"next-sitemap": "^4.1.8",
"prism-react-renderer": "^2.0.6",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
"react-icons": "^4.10.1",
"react-responsive-embed": "^2.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.32.1"
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "20.3.2",
"@types/prismjs": "^1.26.0",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
"autoprefixer": "^10.4.14",
"eslint-config-formbricks": "workspace:*",
"postcss": "^8.4.24",
"rimraf": "^5.0.1",
"tailwindcss": "^3.3.2",
"typescript": "5.0.4"
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -1,4 +0,0 @@
{
"typescript.tsdk": "../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}

View File

@@ -67,7 +67,7 @@ export default function AddMemberModal({ open, setOpen, onSubmit }: MemberModalP
render={({ field: { onChange, value } }) => (
<div>
<Label>Role</Label>
<Select value={value} onValueChange={onChange}>
<Select value={value} onValueChange={(v) => onChange(v as MembershipRole)}>
<SelectTrigger className="capitalize">
<SelectValue placeholder={<span className="text-slate-400">Select role</span>} />
</SelectTrigger>

View File

@@ -21,7 +21,6 @@ export default async function ResponsesPage({ params }) {
environmentId={params.environmentId}
surveyId={params.surveyId}
/>
{/* @ts-expect-error Server Component */}
<ResponsesLimitReachedBanner
environmentId={params.environmentId}
surveyId={params.surveyId}

View File

@@ -10,7 +10,7 @@ import {
type RatingQuestion,
} from "@formbricks/types/questions";
import type { QuestionSummary } from "@formbricks/types/responses";
import { TSurvey, TSurveyQuestion } from "@formbricks/types/v1/surveys";
import { TSurveyQuestion } from "@formbricks/types/v1/surveys";
import { Session } from "next-auth";
import CTASummary from "./CTASummary";
import MultipleChoiceSummary from "./MultipleChoiceSummary";
@@ -22,7 +22,6 @@ interface SummaryListProps {
environmentId: string;
surveyId: string;
session: Session;
survey: TSurvey;
}
export default async function SummaryList({ environmentId, surveyId, session }: SummaryListProps) {

View File

@@ -17,16 +17,13 @@ export default async function SummaryPage({ params }) {
return (
<>
<SurveyResultsTabs activeId="summary" environmentId={params.environmentId} surveyId={params.surveyId} />
{/* @ts-expect-error Server Component */}
<ResponsesLimitReachedBanner
environmentId={params.environmentId}
session={session}
surveyId={params.surveyId}
/>
<ContentWrapper>
{/* @ts-expect-error Server Component */}
<SummaryMetadata surveyId={params.surveyId} environmentId={params.environmentId} session={session} />
{/* @ts-expect-error Server Component */}
<SummaryList environmentId={params.environmentId} session={session} surveyId={params.surveyId} />
</ContentWrapper>
</>

View File

@@ -1,9 +1,6 @@
/** @type {import('next').NextConfig} */
const path = require("path");
const Dotenv = require("dotenv-webpack");
const rootPath = path.join(__dirname, "..", "..");
require("@next/env").loadEnvConfig("../../");
const { createId } = require("@paralleldrive/cuid2");
@@ -63,14 +60,6 @@ const nextConfig = {
},
];
},
webpack: (config) => {
config.plugins.push(
new Dotenv({
path: path.resolve(rootPath, ".env"),
})
);
return config;
},
env: {
INSTANCE_ID: createId(),
INTERNAL_SECRET: createId(),

View File

@@ -10,55 +10,45 @@
"lint": "next lint"
},
"dependencies": {
"@formbricks/api": "workspace:*",
"@formbricks/database": "workspace:*",
"@formbricks/ee": "workspace:*",
"@formbricks/errors": "workspace:*",
"@formbricks/js": "workspace:*",
"@formbricks/lib": "workspace:*",
"@formbricks/types": "workspace:*",
"@formbricks/ui": "workspace:*",
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@json2csv/node": "^7.0.1",
"@paralleldrive/cuid2": "^2.2.0",
"@radix-ui/react-collapsible": "^1.0.2",
"@radix-ui/react-dropdown-menu": "^2.0.4",
"@next/env": "^13.4.8",
"@paralleldrive/cuid2": "^2.2.1",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"bcryptjs": "^2.4.3",
"dotenv-webpack": "^8.0.1",
"eslint-config-next": "^13.4.3",
"eslint-config-next": "^13.4.8",
"jsonwebtoken": "^9.0.0",
"lodash": "^4.17.21",
"lucide-react": "^0.221.0",
"next": "13.4.3",
"lucide-react": "^0.258.0",
"next": "13.4.8",
"next-auth": "^4.22.1",
"nodemailer": "^6.9.2",
"posthog-js": "^1.57.3",
"nodemailer": "^6.9.3",
"posthog-js": "^1.68.5",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-hook-form": "^7.45.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^4.8.0",
"swr": "^2.1.5",
"ua-parser-js": "^1.0.35",
"zod": "^3.21.4"
"react-icons": "^4.10.1",
"swr": "^2.2.0",
"ua-parser-js": "^1.0.35"
},
"devDependencies": {
"@formbricks/database": "workspace:*",
"@formbricks/tsconfig": "workspace:*",
"@formbricks/types": "workspace:*",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@types/bcryptjs": "^2.4.2",
"@types/lodash": "^4.14.195",
"@types/markdown-it": "^12.2.3",
"@types/node": "20.2.3",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
"autoprefixer": "^10.4.14",
"eslint-config-formbricks": "workspace:*",
"postcss": "^8.4.23",
"rimraf": "^5.0.1",
"tailwindcss": "^3.3.2",
"typescript": "5.0.4"
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -17,24 +17,22 @@
"db:migrate:deploy": "turbo run db:migrate:deploy",
"db:migrate:vercel": "turbo run db:migrate:vercel",
"db:push": "turbo run db:push",
"dev": "turbo run dev --parallel",
"dev": "turbo run dev --parallel --filter=!formbricks-com",
"start": "turbo run start --parallel",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"generate": "turbo run generate",
"lint": "turbo run lint",
"release": "turbo run build --filter=react^... && changeset publish",
"nuke": "rm -r node_modules; for d in **/node_modules; do echo $d; rm -r $d; done",
"test": "turbo run test"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"prettier": "latest",
"rimraf": "^5.0.0",
"tsx": "^3.12.6",
"@changesets/cli": "^2.26.2",
"rimraf": "^5.0.1",
"tsx": "^3.12.7",
"turbo": "latest"
},
"engines": {
"node": ">=14.0.0"
"node": ">=16.0.0"
},
"packageManager": "pnpm@8.1.1"
}

View File

@@ -22,9 +22,7 @@
"devDependencies": {
"@formbricks/types": "workspace:*",
"@formbricks/tsconfig": "workspace:*",
"eslint": "^8.41.0",
"eslint-config-formbricks": "workspace:*",
"rimraf": "^5.0.1",
"tsup": "^6.7.0"
"tsup": "^7.1.0"
}
}

View File

@@ -23,21 +23,17 @@
"predev": "npm run generate"
},
"dependencies": {
"@prisma/client": "^4.16.1",
"prisma-json-types-generator": "^2.5.0",
"zod": "^3.21.4",
"zod-prisma": "^0.5.4"
"@prisma/client": "^4.16.2"
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@formbricks/types": "workspace:*",
"eslint": "^8.43.0",
"eslint-config-formbricks": "workspace:*",
"prisma": "^4.16.1",
"prisma": "^4.16.2",
"prisma-json-types-generator": "^2.5.0",
"prisma-dbml-generator": "^0.10.0",
"rimraf": "^5.0.1",
"tsup": "^7.1.0",
"tsx": "^3.12.7",
"typescript": "^5.1.3"
"zod": "^3.21.4",
"zod-prisma": "^0.5.4"
}
}

View File

@@ -12,14 +12,11 @@
"devDependencies": {
"@formbricks/tsconfig": "*",
"@formbricks/types": "*",
"eslint": "^8.41.0",
"eslint-config-formbricks": "workspace:*",
"rimraf": "^5.0.1",
"typescript": "^5.0.4"
"eslint-config-formbricks": "workspace:*"
},
"dependencies": {
"@formbricks/database": "workspace:*",
"next": "^13.4.4",
"next": "13.4.8",
"stripe": "^12.6.0"
}
}

View File

@@ -18,9 +18,7 @@
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"eslint": "^8.41.0",
"eslint-config-formbricks": "workspace:*",
"rimraf": "^5.0.1",
"tsup": "^6.7.0"
"tsup": "^7.1.0"
}
}

View File

@@ -7,14 +7,11 @@
"scripts": {
"clean": "rimraf node_modules .turbo"
},
"dependencies": {
"devDependencies": {
"eslint": "^8.41.0",
"eslint-config-next": "^13.4.4",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "7.32.2",
"eslint-config-turbo": "latest"
},
"devDependencies": {
"rimraf": "^5.0.1"
}
}

View File

@@ -54,7 +54,6 @@
"autoprefixer": "^10.4.14",
"babel-jest": "^29.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.42.0",
"eslint-config-formbricks": "workspace:*",
"eslint-config-preact": "^1.3.0",
"isomorphic-fetch": "^3.0.0",
@@ -63,14 +62,10 @@
"jest-fetch-mock": "^3.0.3",
"jest-preset-preact": "^4.0.5",
"microbundle": "^0.15.1",
"postcss": "^8.4.24",
"preact": "10.15.1",
"preact-cli": "^3.4.5",
"preact-render-to-string": "^6.1.0",
"regenerator-runtime": "^0.13.11",
"rimraf": "^5.0.1",
"tailwindcss": "^3.3.2",
"typescript": "^5.1.3"
"regenerator-runtime": "^0.13.11"
},
"jest": {
"transformIgnorePatterns": [

View File

@@ -58,6 +58,6 @@
"references": [
{ "path": "../../../types/tsconfig.json" } // Add this line, adjust the path to the actual location
],
"include": ["src", "../types", "../lib/client"],
"include": ["src", "../types/**/*.ts"],
"exclude": ["node_modules", "dist", "coverage"]
}

View File

@@ -19,12 +19,10 @@
"markdown-it": "^13.0.1",
"posthog-node": "^3.1.1",
"server-only": "^0.0.1",
"tailwind-merge": "^1.12.0"
"tailwind-merge": "^1.13.2"
},
"devDependencies": {
"@formbricks/tsconfig": "*",
"eslint": "^8.41.0",
"eslint-config-formbricks": "workspace:*",
"typescript": "^5.0.4"
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -8,7 +8,6 @@
},
"devDependencies": {
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
"rimraf": "^5.0.1"
"prettier-plugin-tailwindcss": "^0.3.0"
}
}

View File

@@ -2,5 +2,15 @@
"name": "@formbricks/tailwind-config",
"version": "0.0.0",
"private": true,
"main": "index.js"
"main": "index.js",
"scripts": {
"clean": "rimraf node_modules"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2"
}
}

View File

@@ -16,5 +16,5 @@
"skipLibCheck": true,
"strict": true
},
"exclude": ["node_modules"]
"exclude": ["node_modules", "dist"]
}

View File

@@ -3,20 +3,19 @@
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"target": "es5",
"lib": ["DOM", "DOM.iterable", "ESNext"],
"plugins": [{ "name": "next" }],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"declaration": false,
"declarationMap": false,
"incremental": true,
"esModuleInterop": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"noEmit": true,
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"strict": false,
"target": "es5"
},
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts"],
"include": ["src", "next-env.d.ts"],
"exclude": ["node_modules"]
}

View File

@@ -1,5 +1,14 @@
{
"name": "@formbricks/tsconfig",
"version": "1.0.0",
"private": true
"private": true,
"scripts": {
"clean": "rimraf node_modules"
},
"devDependencies": {
"@types/node": "20.3.3",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
"typescript": "5.1.6"
}
}

View File

@@ -3,11 +3,9 @@
"display": "React Library",
"extends": "./base.json",
"compilerOptions": {
"jsx": "react-jsx",
"lib": ["ES2015", "DOM"],
"module": "ESNext",
"target": "ES6",
"jsx": "react-jsx",
"noUnusedLocals": true,
"noUnusedParameters": true
"target": "es6"
}
}

View File

@@ -7,8 +7,7 @@
"clean": "rimraf node_modules .turbo"
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"rimraf": "^5.0.1"
"@formbricks/tsconfig": "workspace:*"
},
"dependencies": {
"zod": "^3.21.4"

View File

@@ -14,15 +14,10 @@
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"concurrently": "^8.1.0",
"eslint": "^8.41.0",
"concurrently": "^8.2.0",
"eslint-config-formbricks": "workspace:*",
"postcss": "^8.4.24",
"react": "^18.2.0",
"rimraf": "^5.0.1",
"typescript": "^5.0.4"
"react": "18.2.0"
},
"dependencies": {
"@formbricks/lib": "workspace:*",
@@ -43,15 +38,15 @@
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.6",
"boring-avatars": "^1.7.0",
"class-variance-authority": "^0.6.0",
"boring-avatars": "^1.10.1",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"cmdk": "^0.2.0",
"lucide-react": "^0.233.0",
"next": "^13.4.4",
"lucide-react": "^0.258.0",
"next": "13.4.8",
"react-colorful": "^5.6.1",
"react-confetti": "^6.1.0",
"react-dom": "^18.2.0",
"react-dom": "18.2.0",
"react-radio-group": "^3.0.3",
"react-use": "^17.4.0"
}

3339
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff