Skip to content

Commit

Permalink
Merge branch 'master' into philprime/apple-wizard-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philprime authored Feb 10, 2025
2 parents cf03bd0 + 932ba05 commit 7f1c642
Show file tree
Hide file tree
Showing 4 changed files with 541 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- fix(apple): Fix null-handling in apple-wizard with typings ([#775](https://github.com/getsentry/sentry-wizard/pull/775))
- feat(apple): Add extended whitespace support to AppDelegate detection (#785)
- test(apple): Add unit tests for Fastfile injection ([#786](https://github.com/getsentry/sentry-wizard/pull/786))

## 3.40.0

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
</p>

<h1>Sentry Wizard</h1>
<h4>The Sentry Wizard helps you set up your React Native, Flutter, Cordova, Electron or Next.js projects with Sentry.</h4>
<h4>The Sentry Wizard helps you set up your React Native, Flutter, Apple, Android, Cordova, Electron, Next.js, Nuxt, Remix or SvelteKit projects with Sentry.</h4>

[![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)

[![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)
![GitHub Actions](https://github.com/getsentry/sentry-wizard/actions/workflows/build.yml/badge.svg)
[![Codecov](https://codecov.io/gh/getsentry/sentry-wizard/graph/badge.svg?token=fQNlGihNOf)](https://codecov.io/gh/getsentry/sentry-wizard)

![Wizard in action](https://github.com/getsentry/sentry-wizard/raw/master/assets/wizard.mov.gif)

Expand Down
20 changes: 18 additions & 2 deletions src/apple/fastlane.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from 'fs';
import * as path from 'path';
import * as templates from './templates';
import { askForItemSelection } from '../utils/clack-utils';
import * as templates from './templates';
// @ts-ignore - clack is ESM and TS complains about that. It works though
import clack from '@clack/prompts';
import * as clack from '@clack/prompts';

export function fastFile(projectPath: string): string | null {
const fastlanePath = path.join(projectPath, 'fastlane', 'Fastfile');
Expand Down Expand Up @@ -152,3 +152,19 @@ export async function addSentryToFastlane(
fs.writeFileSync(fastFilePath, newFileContent, 'utf8');
return true;
}

/**
* Exported for testing purposes, but should not be used in other modules.
*/
export let exportForTesting: {
findIOSPlatform: typeof findIOSPlatform;
findLanes: typeof findLanes;
addSentryToLane: typeof addSentryToLane;
};
if (process.env.NODE_ENV === 'test') {
exportForTesting = {
findIOSPlatform,
findLanes,
addSentryToLane,
};
}
Loading

0 comments on commit 7f1c642

Please sign in to comment.