Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(nuxt): Remove option to downgrade override nitropack #744

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- feat(nuxt): Add `import-in-the-middle` install step when using pnpm ([#727](https://github.com/getsentry/sentry-wizard/pull/727))
- fix(nuxt): Remove unused parameter in sentry-example-api template ([#734](https://github.com/getsentry/sentry-wizard/pull/734))
- fix(nuxt): Remove option to downgrade override nitropack ([#744](https://github.com/getsentry/sentry-wizard/pull/744))

## 3.36.0

Expand Down
15 changes: 1 addition & 14 deletions e2e-tests/tests/nuxt-3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,12 @@
'Please select your package manager.',
);

const nitropackOverridePrompted =
const nftOverridePrompted =
packageManagerPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `yarn` as the package manager
[KEYS.DOWN, KEYS.ENTER],
// Do you want to install version 2.9.7 of nitropack and add an override to package.json?
'Do you want to add an override for nitropack version ~2.9.7?',
{
timeout: 240_000,
},
));

const nftOverridePrompted =
nitropackOverridePrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `yes` to downgrade nitropack
KEYS.ENTER,
'Do you want to add an override for @vercel/nft version ^0.27.4?',
// 'Do you want to install version',
{
timeout: 240_000,
},
Expand Down Expand Up @@ -107,27 +94,27 @@
function testNuxtProjectSetup(projectDir: string) {
const integration = Integration.nuxt;

test('package.json is updated correctly', () => {

Check warning on line 97 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkPackageJson(projectDir, integration);
});

test('.env-sentry-build-plugin is created and contains the auth token', () => {

Check warning on line 101 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkEnvBuildPlugin(projectDir);
});

test('config files created', () => {

Check warning on line 105 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkFileExists(`${projectDir}/sentry.server.config.ts`);
checkFileExists(`${projectDir}/sentry.client.config.ts`);
});

test('example page exists', () => {

Check warning on line 110 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkFileExists(`${projectDir}/pages/sentry-example-page.vue`);
checkFileExists(`${projectDir}/server/api/sentry-example-api.ts`);
});
}

function testNuxtProjectConfigs(projectDir: string) {
test('nuxt config contains sentry module', () => {

Check warning on line 117 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkFileContents(path.resolve(projectDir, 'nuxt.config.ts'), [
"modules: ['@sentry/nuxt/module'],",
'sentry: {',
Expand All @@ -142,7 +129,7 @@
]);
});

test('sentry.client.config.ts contents', () => {

Check warning on line 132 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkFileContents(path.resolve(projectDir, 'sentry.client.config.ts'), [
'import * as Sentry from "@sentry/nuxt";',
'Sentry.init({',
Expand All @@ -166,7 +153,7 @@
]);
});

test('sentry.server.config.ts contents', () => {

Check warning on line 156 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkFileContents(path.resolve(projectDir, 'sentry.server.config.ts'), [
'import * as Sentry from "@sentry/nuxt";',
'Sentry.init({',
Expand All @@ -182,11 +169,11 @@
}

function testNuxtProjectBuildsAndRuns(projectDir: string) {
test('builds successfully', async () => {

Check warning on line 172 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
await checkIfBuilds(projectDir, 'preview this build');
});

test('runs on prod mode correctly', async () => {

Check warning on line 176 in e2e-tests/tests/nuxt-3.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
await checkIfRunsOnProdMode(projectDir, 'Listening on');
});
}
15 changes: 1 addition & 14 deletions e2e-tests/tests/nuxt-4.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,12 @@
'Please select your package manager.',
);

const nitropackOverridePrompted =
const nftOverridePrompted =
packageManagerPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `yarn` as the package manager
[KEYS.DOWN, KEYS.ENTER],
// Do you want to install version 2.9.7 of nitropack and add an override to package.json?
'Do you want to add an override for nitropack version ~2.9.7?',
{
timeout: 240_000,
},
));

const nftOverridePrompted =
nitropackOverridePrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `yes` to downgrade nitropack
KEYS.ENTER,
'Do you want to add an override for @vercel/nft version ^0.27.4?',
// 'Do you want to install version',
{
timeout: 240_000,
},
Expand Down Expand Up @@ -106,7 +93,7 @@
function testNuxtProjectSetup(projectDir: string) {
const integration = Integration.nuxt;

test('package.json is updated correctly', () => {

Check warning on line 96 in e2e-tests/tests/nuxt-4.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Test has no assertions
checkPackageJson(projectDir, integration);
});

Expand Down
4 changes: 0 additions & 4 deletions src/nuxt/sdk-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ export async function addNuxtOverrides(
const isPNPM = PNPM.detect();

const overrides = [
{
pkgName: 'nitropack',
pkgVersion: '~2.9.7',
},
{
pkgName: '@vercel/nft',
pkgVersion: '^0.27.4',
Expand Down
Loading