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

feat: Pin JS SDK versions to v8 #712

Merged
merged 2 commits into from
Nov 15, 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
18 changes: 13 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"printWidth": 80,
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all"
}
"printWidth": 80,
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all",
"overrides": [
{
"files": "CHANGELOG.md",
"options": {
"proseWrap": "preserve"
}
}
]
}
Comment on lines +6 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to confirm: Is this on purpose? No objections btw

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I got annoyed by prettier fully re-formatting the changelog when formatting-on-save. This causes there to not be any changes anymore!

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- feat: Pin JS SDK versions to v8 (#712)

## 3.34.4

- chore(deps): Update various dependencies (#701, #700, #224)
Expand All @@ -16,7 +20,7 @@
## 3.34.1

- fix(sveltekit): Ensure Sentry example page renders correct Html ([#688](https://github.com/getsentry/sentry-wizard/pull/688))
- ref: Handle edge cases in formatting step more gracefully ([#687](https://github.com/getsentry/sentry-wizard/pull/686))
- ref: Handle edge cases in formatting step more gracefully ([#687](https://github.com/getsentry/sentry-wizard/pull/686))

## 3.34.0

Expand Down
1 change: 1 addition & 0 deletions src/nextjs/nextjs-wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export async function runNextjsWizardWithTelemetry(
const { packageManager: packageManagerFromInstallStep } =
await installPackage({
packageName: '@sentry/nextjs@^8',
packageNameDisplayLabel: '@sentry/nextjs',
alreadyInstalled: !!packageJson?.dependencies?.['@sentry/nextjs'],
});

Expand Down
3 changes: 2 additions & 1 deletion src/remix/remix-wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ async function runRemixWizardWithTelemetry(
await getOrAskForProjectData(options, 'javascript-remix');

await installPackage({
packageName: '@sentry/remix',
packageName: '@sentry/remix@^8',
packageNameDisplayLabel: '@sentry/remix',
alreadyInstalled: hasPackageInstalled('@sentry/remix', packageJson),
});

Expand Down
2 changes: 1 addition & 1 deletion src/sourcemaps/tools/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const configureRollupPlugin: SourceMapUploadToolConfigurationFunction =

clack.log.step(`Add the following code to your rollup config:`);

// Intentially logging directly to console here so that the code can be copied/pasted directly
// Intentionally logging directly to console here so that the code can be copied/pasted directly
// eslint-disable-next-line no-console
console.log(getCodeSnippet(options));

Expand Down
3 changes: 2 additions & 1 deletion src/sveltekit/sveltekit-wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export async function runSvelteKitWizardWithTelemetry(
Sentry.setTag('sdk-already-installed', sdkAlreadyInstalled);

await installPackage({
packageName: '@sentry/sveltekit',
packageName: '@sentry/sveltekit@^8',
packageNameDisplayLabel: '@sentry/sveltekit',
alreadyInstalled: sdkAlreadyInstalled,
});

Expand Down
10 changes: 7 additions & 3 deletions src/utils/clack-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,21 @@ export async function installPackage({
packageName,
alreadyInstalled,
askBeforeUpdating = true,
packageNameDisplayLabel,
}: {
/** The string that is passed to the package manager CLI as identifier to install (e.g. `@sentry/nextjs`, or `@sentry/nextjs@^8`) */
packageName: string;
alreadyInstalled: boolean;
askBeforeUpdating?: boolean;
/** Overrides what is shown in the installation logs in place of the `packageName` option. Useful if the `packageName` is ugly (e.g. `@sentry/nextjs@^8`) */
packageNameDisplayLabel?: string;
}): Promise<{ packageManager?: PackageManager }> {
return traceStep('install-package', async () => {
if (alreadyInstalled && askBeforeUpdating) {
const shouldUpdatePackage = await abortIfCancelled(
clack.confirm({
message: `The ${chalk.bold.cyan(
packageName,
packageNameDisplayLabel ?? packageName,
)} package is already installed. Do you want to update it to the latest version?`,
}),
);
Expand All @@ -380,7 +384,7 @@ export async function installPackage({

sdkInstallSpinner.start(
`${alreadyInstalled ? 'Updating' : 'Installing'} ${chalk.bold.cyan(
packageName,
packageNameDisplayLabel ?? packageName,
)} with ${chalk.bold(packageManager.label)}.`,
);

Expand Down Expand Up @@ -425,7 +429,7 @@ export async function installPackage({

sdkInstallSpinner.stop(
`${alreadyInstalled ? 'Updated' : 'Installed'} ${chalk.bold.cyan(
packageName,
packageNameDisplayLabel ?? packageName,
)} with ${chalk.bold(packageManager.label)}.`,
);

Expand Down
Loading