Skip to content

Latest commit

 

History

History
142 lines (105 loc) · 4.43 KB

File metadata and controls

142 lines (105 loc) · 4.43 KB

Sentry

Contributing

We welcome suggested improvements and bug fixes to the @sentry/* family of packages, in the form of pull requests on GitHub. The guide below will help you get started, but if you have further questions, please feel free to reach out on Discord. To learn about some general setup wizard development principles check out the SDK Development Guide in the Sentry Developer Documentation.

Setting up an Environment

  1. Fork the repository
  2. Clone your fork
  3. Install dependencies with yarn install

Building and running locally

Build the wizard with this command

yarn build

If you want to simply try out the wizard locally, you can use

yarn try #also takes all CLI args you'd pass to the wizard

Running local builds in external projects

If you want to run the locally built wizard in an external project (for example a test project outside of the repo), you can simply run ts-node path/to/sentry-wizard/bin.ts within the project.

Alternatively you can use yarn link:

  1. run yarn build in the wizard repo
  2. run yarn link in the wizard repo
  3. head to your project
  4. install the actual version of the wizard
    npm install @sentry/wizard #or use the package manager of your choice
  5. run yarn link @sentry/wizard to symlink to the local repo
  6. run to run the local repo:
    npx sentry-wizard
    #or
    yarn sentry-wizard

In repos set up with pnpm or more complex cases, you might want to look into yalc to install local versions of the wizard package.

Debugging Sentry's Wizard UI

If you’re debugging against a local or self-hosted Sentry instance (instead of https://sentry.io), point the wizard to that URL using the -u, --url flag:

sentry-wizard --url http://dev.getsentry.net:8000

You can also use the SENTRY_WIZARD_URL environment variable instead of passing -u, --url every time:

SENTRY_WIZARD_URL=http://dev.getsentry.net:8000

Use the base URL of your Sentry instance (the same one you open in the browser), without additional path segments.

Running End-to-End Tests

The Sentry Wizard includes comprehensive end-to-end tests to ensure integrations work correctly.

Running All Tests

To run all end-to-end tests:

yarn test:e2e

Running Specific Tests

To test a specific framework integration:

yarn test:e2e [Flutter | Remix | NextJS | SvelteKit]

Updating the Changelog

For every meaningful change, please add an entry to the CHANGELOG.md file:

  1. Add your entry under the ## Unreleased section
  2. Follow the existing format: - type(scope): Description ([#PR-number](PR-link))
  3. Choose the appropriate type:
    • feat: A new feature
    • fix: A bug fix
    • ref: Code refactoring that neither fixes a bug nor adds a feature
    • chore: Changes to the build process or auxiliary tools
    • docs: Documentation only changes
  4. Include the scope (framework/area affected) in parentheses
  5. Provide a concise description of your change
  6. Add the PR number and link when available (or add it later)

Example:

- feat(nextjs): Add connectivity check to example page with helpful error UI ([#123](https://github.com/getsentry/sentry-wizard/pull/123))

If your change contains breaking changes, add an exclamation mark after the type:

- ref!: Bump main Node.js version to the earliest LTS v18 ([#793](https://github.com/getsentry/sentry-wizard/pull/793))

Publishing a Release

The wizard is released via our usual Craft and getsentry/publish flow:

  1. Make sure the changelog is in a good and complete state. If not, open a PR against master to update it
  2. Determine the next version (we follow semver versioning)
  3. In GitHub, go to "Actions" and start the "Release" action
  4. Enter the version to be released. If you're publishing a stable release, no other input fields are required. If you release from a branch (e.g. for alpha/beta releases), set the branch as the target branch.
  5. Start the publishing run in getsentry/publish