From 63cbb3ff6a803546d3c2db0d162830845546b0e1 Mon Sep 17 00:00:00 2001
From: Katie Byers
Date: Wed, 20 Oct 2021 11:36:07 -0700
Subject: [PATCH] chore(various): Tiny fixes (#141)
A combination of typo fixes, wordsmithing, and auto-formatting. It also drops the Travis badge, as we've moved off of Travis long since.
---
README.md | 14 ++++++--------
lib/Helper/SentryCli.ts | 2 ++
lib/Steps/Integrations/BaseIntegration.ts | 7 +++++--
lib/Steps/Integrations/NextJs.ts | 2 +-
scripts/NextJs/configs/next.config.js | 4 ++--
5 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index 5838c9b7..768ed305 100644
--- a/README.md
+++ b/README.md
@@ -7,20 +7,17 @@
Helping you to set up your project with Sentry
-[![Travis](https://img.shields.io/travis/getsentry/sentry-wizard.svg?maxAge=2592000)](https://travis-ci.org/getsentry/sentry-wizard)
[![npm version](https://img.shields.io/npm/v/@sentry/wizard.svg)](https://www.npmjs.com/package/@sentry/wizard)
[![npm dm](https://img.shields.io/npm/dm/@sentry/wizard.svg)](https://www.npmjs.com/package/@sentry/wizard)
[![npm dt](https://img.shields.io/npm/dt/@sentry/wizard.svg)](https://www.npmjs.com/package/@sentry/wizard)
-[![Discord Chat](https://img.shields.io/discord/621778831602221064.svg)](https://discord.gg/Ww9hbqr)
+[![Discord Chat](https://img.shields.io/discord/621778831602221064.svg)](https://discord.gg/Ww9hbqr)
[![deps](https://david-dm.org/getsentry/sentry-wizard/status.svg)](https://david-dm.org/getsentry/sentry-wizard?view=list)
[![deps dev](https://david-dm.org/getsentry/sentry-wizard/dev-status.svg)](https://david-dm.org/getsentry/sentry-wizard?type=dev&view=list)
[![deps peer](https://david-dm.org/getsentry/sentry-wizard/peer-status.svg)](https://david-dm.org/getsentry/sentry-wizard?type=peer&view=list)
-
![Wizard in action](https://github.com/getsentry/sentry-wizard/raw/master/assets/wizard.mov.gif)
-
# Usage
There are multiple ways to run the Wizard.
@@ -49,6 +46,7 @@ npx @sentry/wizard
```
# Options
+
```
Options:
--help Show help [boolean]
@@ -73,7 +71,7 @@ Options:
## Resources
-* [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
-* [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
-* [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry)
-* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
+- [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
+- [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
+- [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry)
+- [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
diff --git a/lib/Helper/SentryCli.ts b/lib/Helper/SentryCli.ts
index 30e2875b..63908163 100644
--- a/lib/Helper/SentryCli.ts
+++ b/lib/Helper/SentryCli.ts
@@ -37,6 +37,7 @@ export class SentryCli {
return props;
}
+ /** Create the contents of a `sentry.properties` file */
public dumpProperties(props: SentryCliProps): string {
const rv = [];
for (let key in props) {
@@ -45,6 +46,7 @@ export class SentryCli {
const value = props[key];
key = key.replace(/\//g, '.');
if (value === undefined || value === null) {
+ // comment that property out since it has no value
rv.push(`#${key}=`);
} else {
rv.push(`${key}=${value}`);
diff --git a/lib/Steps/Integrations/BaseIntegration.ts b/lib/Steps/Integrations/BaseIntegration.ts
index e18edd81..141ebe28 100755
--- a/lib/Steps/Integrations/BaseIntegration.ts
+++ b/lib/Steps/Integrations/BaseIntegration.ts
@@ -21,7 +21,7 @@ export abstract class BaseIntegration extends BaseStep {
/**
* This can be used for example for platform:boolean to determine
* if we should configure iOS/Android.
- * Basically this will be merged into answers so it can be check by a later step.
+ * Basically this will be merged into answers so it can be checked by a later step.
*/
public async shouldConfigure(_answers: Answers): Promise {
if (this._shouldConfigure) {
@@ -34,7 +34,10 @@ export abstract class BaseIntegration extends BaseStep {
public async shouldEmit(_answers: Answers): Promise {
return (
_.keys(
- _.pickBy(await this.shouldConfigure(_answers), (active: boolean) => active),
+ _.pickBy(
+ await this.shouldConfigure(_answers),
+ (active: boolean) => active,
+ ),
).length > 0
);
}
diff --git a/lib/Steps/Integrations/NextJs.ts b/lib/Steps/Integrations/NextJs.ts
index 39ac7705..92635b10 100644
--- a/lib/Steps/Integrations/NextJs.ts
+++ b/lib/Steps/Integrations/NextJs.ts
@@ -62,7 +62,7 @@ export class NextJs extends BaseIntegration {
this._createNextConfig(configDirectory, dsn);
} else {
debug(
- `Couldn't find ${configDirectory}, probably because you run from src`,
+ `Couldn't find ${configDirectory}, probably because you ran this from inside of \`/lib\` rather than \`/dist\``,
);
nl();
}
diff --git a/scripts/NextJs/configs/next.config.js b/scripts/NextJs/configs/next.config.js
index e2e56c71..6b43f132 100644
--- a/scripts/NextJs/configs/next.config.js
+++ b/scripts/NextJs/configs/next.config.js
@@ -9,7 +9,7 @@ const moduleExports = {
// Your existing module.exports
};
-const SentryWebpackPluginOptions = {
+const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
@@ -23,4 +23,4 @@ const SentryWebpackPluginOptions = {
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
-module.exports = withSentryConfig(moduleExports, SentryWebpackPluginOptions);
+module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);