Skip to content

Commit

Permalink
Rewrite logic to just add overrides and not install deps
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiborza committed Nov 29, 2024
1 parent 970fcb8 commit 0ce75fb
Show file tree
Hide file tree
Showing 22 changed files with 6,355 additions and 145 deletions.
27 changes: 27 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example

# Sentry Config File
.env.sentry-build-plugin
75 changes: 75 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Nuxt Minimal Starter

Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
6 changes: 6 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
<NuxtRouteAnnouncer />
<NuxtWelcome />
</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
This is just a very simple component that throws an example error.
Feel free to delete this file.
-->

<script setup>
import * as Sentry from '@sentry/nuxt';

const throwError = () => {
Sentry.startSpan(
{
name: 'Example Frontend Span',
op: 'test'
},
() => {
throw new Error('Sentry Example Error');
}
)
};
</script>

<template>
<button id="errorBtn" @click="throwError"> Throw Error! </button>
</template>

<style scoped>
button {
padding: 12px;
cursor: pointer;
background-color: rgb(54, 45, 89);
border-radius: 4px;
border: none;
color: white;
font-size: 1em;
margin: 1em;
transition: all 0.25s ease-in-out;
}
button:hover {
background-color: #8c5393;
box-shadow: 4px;
box-shadow: 0px 0px 15px 2px rgba(140, 83, 147, 0.5);
}
button:active {
background-color: #c73852;
}
</style>
17 changes: 17 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
modules: ['@sentry/nuxt/module'],

sentry: {
sourceMapsUploadOptions: {
org: 'sentry-sdks',
project: 'ab-nuxt'
}
},

sourcemap: {
client: 'hidden'
}
})
24 changes: 24 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@sentry/nuxt": "^8.41.0",
"@vercel/nft": "^0.27.4",
"nitropack": "2.9.7",
"nuxt": "^3.14.1592",
"vue": "latest",
"vue-router": "latest"
},
"resolutions": {
"nitropack": "2.9.7",
"@vercel/nft": "^0.27.4"
}
}
Binary file not shown.
1 change: 1 addition & 0 deletions e2e-tests/test-applications/nuxt-foo/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

25 changes: 25 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as Sentry from "@sentry/nuxt";

Sentry.init({
// If set up, you can use your runtime config here
// dsn: useRuntimeConfig().public.sentry.dsn,
dsn: "https://[email protected]/4508284360785920",

// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,

// 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,

// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,

// If you don't want to use Session Replay, just remove the line below:
integrations: [Sentry.replayIntegration()],

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
12 changes: 12 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as Sentry from "@sentry/nuxt";

Sentry.init({
dsn: "https://[email protected]/4508284360785920",

// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
3 changes: 3 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}
4 changes: 4 additions & 0 deletions e2e-tests/test-applications/nuxt-foo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
Loading

0 comments on commit 0ce75fb

Please sign in to comment.