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**)
64 lines
2.4 KiB
TypeScript
64 lines
2.4 KiB
TypeScript
// This file configures the initialization of Sentry on the client.
|
|
// The config you add here will be used whenever a users loads a page in their browser.
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
|
|
import { getEnvironmentStr } from "@/lib/utils";
|
|
import * as Sentry from "@sentry/nextjs";
|
|
|
|
if (process.env.NODE_ENV === "production") {
|
|
Sentry.init({
|
|
dsn: "https://fe4e4aa4a283391808a5da396da20159@o4505260022104064.ingest.us.sentry.io/4507946746380288",
|
|
|
|
environment: getEnvironmentStr(),
|
|
|
|
// Add optional integrations for additional features
|
|
integrations: [
|
|
Sentry.replayIntegration(),
|
|
Sentry.httpClientIntegration(),
|
|
Sentry.replayCanvasIntegration(),
|
|
Sentry.reportingObserverIntegration(),
|
|
Sentry.browserProfilingIntegration(),
|
|
// Sentry.feedbackIntegration({
|
|
// // Additional SDK configuration goes in here, for example:
|
|
// colorScheme: "system",
|
|
// }),
|
|
],
|
|
|
|
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
|
tracesSampleRate: 1,
|
|
|
|
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
|
|
tracePropagationTargets: [
|
|
"localhost",
|
|
"localhost:8006",
|
|
/^https:\/\/dev\-builder\.agpt\.co\/api/,
|
|
/^https:\/\/.*\.agpt\.co\/api/,
|
|
],
|
|
|
|
// Define how likely Replay events are sampled.
|
|
// This sets the sample rate to be 10%. You may want this to be 100% while
|
|
// in development and sample at a lower rate in production
|
|
replaysSessionSampleRate: 0.1,
|
|
|
|
// Define how likely Replay events are sampled when an error occurs.
|
|
replaysOnErrorSampleRate: 1.0,
|
|
|
|
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
debug: false,
|
|
|
|
// Set profilesSampleRate to 1.0 to profile every transaction.
|
|
// Since profilesSampleRate is relative to tracesSampleRate,
|
|
// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
|
|
// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
|
|
// result in 25% of transactions being profiled (0.5*0.5=0.25)
|
|
profilesSampleRate: 1.0,
|
|
_experiments: {
|
|
// Enable logs to be sent to Sentry.
|
|
enableLogs: true,
|
|
},
|
|
});
|
|
}
|
|
|
|
// Export the required hook for navigation instrumentation
|
|
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
|