mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-06 22:03:59 -05:00
## 🧢 Overview This PR migrates the AutoGPT Platform frontend from [yarn 1](https://classic.yarnpkg.com/lang/en/) to [pnpm](https://pnpm.io/) using **corepack** for automatic package manager management. **yarn1** is not longer maintained and a bit old, moving to **pnpm** we get: - ⚡ Significantly faster install times, - 💾 Better disk space efficiency, - 🛠️ Better community support and maintenance, - 💆🏽♂️ Config swap very easy ## 🏗️ Changes ### Package Management Migration - updated [corepack](https://github.com/nodejs/corepack) to use [pnpm](https://pnpm.io/) - Deleted `yarn.lock` and generated new `pnpm-lock.yaml` - Updated `.gitignore` ### Documentation Updates - `frontend/README.md`: - added comprehensive tech stack overview with links - updated all commands to use pnpm - added corepack setup instructions - and included migration disclaimer for yarn users - `backend/README.md`: - Updated installation instructions to use pnpm with corepack - `AGENTS.md`: - Updated testing commands from yarn to pnpm ### CI/CD & Infrastructure - **GitHub Workflows** : - updated all jobs to use pnpm with corepack enable - cleaned FE Playwright test workflow to avoid Sentry noise - **Dockerfile**: - updated to use pnpm with corepack, changed lock file reference, and updated cache mount path ### 📋 Checklist #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: **Test Plan:** > assuming you are on the `frontend` folder - [x] Clean installation works: `rm -rf node_modules && corepack enable && pnpm install` - [x] Development server starts correctly: `pnpm dev` - [x] Build process works: `pnpm build` - [x] Linting and formatting work: `pnpm lint` and `pnpm format` - [x] Type checking works: `pnpm type-check` - [x] Tests run successfully: `pnpm test` - [x] Storybook starts correctly: `pnpm storybook` - [x] Docker build succeeds with new pnpm configuration - [x] GitHub Actions workflow passes with pnpm commands #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**)
83 lines
2.6 KiB
JavaScript
83 lines
2.6 KiB
JavaScript
import { withSentryConfig } from "@sentry/nextjs";
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
images: {
|
|
domains: [
|
|
"images.unsplash.com",
|
|
"ddz4ak4pa3d19.cloudfront.net",
|
|
"upload.wikimedia.org",
|
|
"storage.googleapis.com",
|
|
|
|
"ideogram.ai", // for generated images
|
|
"picsum.photos", // for placeholder images
|
|
"dummyimage.com", // for placeholder images
|
|
"placekitten.com", // for placeholder images
|
|
],
|
|
},
|
|
output: "standalone",
|
|
// TODO: Re-enable TypeScript checks once current issues are resolved
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
transpilePackages: ["geist"],
|
|
};
|
|
|
|
const isDevelopmentBuild = process.env.NODE_ENV !== "production";
|
|
|
|
export default isDevelopmentBuild
|
|
? nextConfig
|
|
: withSentryConfig(nextConfig, {
|
|
// For all available options, see:
|
|
// https://github.com/getsentry/sentry-webpack-plugin#options
|
|
|
|
org: "significant-gravitas",
|
|
project: "builder",
|
|
|
|
// Only print logs for uploading source maps in CI
|
|
silent: !process.env.CI,
|
|
|
|
// For all available options, see:
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
|
|
|
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
|
widenClientFileUpload: true,
|
|
|
|
// Automatically annotate React components to show their full name in breadcrumbs and session replay
|
|
reactComponentAnnotation: {
|
|
enabled: true,
|
|
},
|
|
|
|
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
|
|
// This can increase your server load as well as your hosting bill.
|
|
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
|
|
// side errors will fail.
|
|
tunnelRoute: "/store",
|
|
|
|
// Hides source maps from generated client bundles
|
|
hideSourceMaps: true,
|
|
|
|
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
|
disableLogger: true,
|
|
|
|
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
|
|
// See the following for more information:
|
|
// https://docs.sentry.io/product/crons/
|
|
// https://vercel.com/docs/cron-jobs
|
|
automaticVercelMonitors: true,
|
|
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/:path*",
|
|
headers: [
|
|
{
|
|
key: "Document-Policy",
|
|
value: "js-profiling",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
});
|