Skip to content

Commit 58dd1de

Browse files
committed
revert other changes
1 parent eb32771 commit 58dd1de

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

packages/react-router/src/vite/makeEnableSourceMapsPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function makeEnableSourceMapsPlugin(options: SentryReactRouterBuildOption
1515
...viteConfig,
1616
build: {
1717
...viteConfig.build,
18-
sourcemap: _getUpdatedSourceMapSettings(viteConfig, options),
18+
sourcemap: getUpdatedSourceMapSettings(viteConfig, options),
1919
},
2020
};
2121
},
@@ -37,7 +37,7 @@ export function makeEnableSourceMapsPlugin(options: SentryReactRouterBuildOption
3737
*
3838
* --> only exported for testing
3939
*/
40-
export function _getUpdatedSourceMapSettings(
40+
export function getUpdatedSourceMapSettings(
4141
viteConfig: UserConfig,
4242
sentryPluginOptions?: SentryReactRouterBuildOptions,
4343
): boolean | 'inline' | 'hidden' {

packages/react-router/test/vite/sourceMaps.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
22
import { beforeEach, describe, expect, it, vi } from 'vitest';
3-
import { _getUpdatedSourceMapSettings, makeEnableSourceMapsPlugin } from '../../src/vite/makeEnableSourceMapsPlugin';
3+
import { getUpdatedSourceMapSettings, makeEnableSourceMapsPlugin } from '../../src/vite/makeEnableSourceMapsPlugin';
44

55
const mockedSentryVitePlugin = {
66
name: 'sentry-vite-debug-id-upload-plugin',
@@ -33,7 +33,7 @@ describe('makeEnableSourceMapsPlugin()', () => {
3333
});
3434
});
3535

36-
describe('_getUpdatedSourceMapSettings', () => {
36+
describe('getUpdatedSourceMapSettings', () => {
3737
beforeEach(() => {
3838
vi.clearAllMocks();
3939
vi.spyOn(console, 'warn').mockImplementation(() => {});
@@ -42,7 +42,7 @@ describe('_getUpdatedSourceMapSettings', () => {
4242

4343
describe('when sourcemap is false', () => {
4444
it('should keep sourcemap as false and show warning', () => {
45-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: false } });
45+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: false } });
4646

4747
expect(result).toBe(false);
4848
// eslint-disable-next-line no-console
@@ -58,7 +58,7 @@ describe('_getUpdatedSourceMapSettings', () => {
5858
['inline', 'inline'],
5959
[true, true],
6060
] as ('inline' | 'hidden' | boolean)[][])('should keep sourcemap as %s when set to %s', (input, expected) => {
61-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: input } }, { debug: true });
61+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: input } }, { debug: true });
6262

6363
expect(result).toBe(expected);
6464
// eslint-disable-next-line no-console
@@ -72,7 +72,7 @@ describe('_getUpdatedSourceMapSettings', () => {
7272
it.each([[undefined], ['invalid'], ['something'], [null]])(
7373
'should set sourcemap to hidden when value is %s',
7474
input => {
75-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: input as any } });
75+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: input as any } });
7676

7777
expect(result).toBe('hidden');
7878
// eslint-disable-next-line no-console
@@ -85,7 +85,7 @@ describe('_getUpdatedSourceMapSettings', () => {
8585
);
8686

8787
it('should set sourcemap to hidden when build config is empty', () => {
88-
const result = _getUpdatedSourceMapSettings({});
88+
const result = getUpdatedSourceMapSettings({});
8989

9090
expect(result).toBe('hidden');
9191
// eslint-disable-next-line no-console

packages/solidstart/src/vite/sourceMaps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function makeEnableSourceMapsVitePlugin(options: SentrySolidStartPluginOp
7070
...viteConfig,
7171
build: {
7272
...viteConfig.build,
73-
sourcemap: _getUpdatedSourceMapSettings(viteConfig, options),
73+
sourcemap: getUpdatedSourceMapSettings(viteConfig, options),
7474
},
7575
};
7676
},
@@ -93,7 +93,7 @@ export function makeEnableSourceMapsVitePlugin(options: SentrySolidStartPluginOp
9393
*
9494
* --> only exported for testing
9595
*/
96-
export function _getUpdatedSourceMapSettings(
96+
export function getUpdatedSourceMapSettings(
9797
viteConfig: UserConfig,
9898
sentryPluginOptions?: SentrySolidStartPluginOptions,
9999
): boolean | 'inline' | 'hidden' {

packages/solidstart/test/vite/sourceMaps.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
22
import { beforeEach, describe, expect, it, vi } from 'vitest';
33
import {
4-
_getUpdatedSourceMapSettings,
4+
getUpdatedSourceMapSettings,
55
makeAddSentryVitePlugin,
66
makeEnableSourceMapsVitePlugin,
77
} from '../../src/vite/sourceMaps';
@@ -171,7 +171,7 @@ describe('makeAddSentryVitePlugin()', () => {
171171
});
172172
});
173173

174-
describe('_getUpdatedSourceMapSettings', () => {
174+
describe('getUpdatedSourceMapSettings', () => {
175175
beforeEach(() => {
176176
vi.clearAllMocks();
177177
vi.spyOn(console, 'warn').mockImplementation(() => {});
@@ -180,7 +180,7 @@ describe('_getUpdatedSourceMapSettings', () => {
180180

181181
describe('when sourcemap is false', () => {
182182
it('should keep sourcemap as false and show warning', () => {
183-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: false } });
183+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: false } });
184184

185185
expect(result).toBe(false);
186186
// eslint-disable-next-line no-console
@@ -196,7 +196,7 @@ describe('_getUpdatedSourceMapSettings', () => {
196196
['inline', 'inline'],
197197
[true, true],
198198
] as ('inline' | 'hidden' | boolean)[][])('should keep sourcemap as %s when set to %s', (input, expected) => {
199-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: input } }, { debug: true });
199+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: input } }, { debug: true });
200200

201201
expect(result).toBe(expected);
202202
// eslint-disable-next-line no-console
@@ -210,7 +210,7 @@ describe('_getUpdatedSourceMapSettings', () => {
210210
it.each([[undefined], ['invalid'], ['something'], [null]])(
211211
'should set sourcemap to hidden when value is %s',
212212
input => {
213-
const result = _getUpdatedSourceMapSettings({ build: { sourcemap: input as any } });
213+
const result = getUpdatedSourceMapSettings({ build: { sourcemap: input as any } });
214214

215215
expect(result).toBe('hidden');
216216
// eslint-disable-next-line no-console
@@ -223,7 +223,7 @@ describe('_getUpdatedSourceMapSettings', () => {
223223
);
224224

225225
it('should set sourcemap to hidden when build config is empty', () => {
226-
const result = _getUpdatedSourceMapSettings({});
226+
const result = getUpdatedSourceMapSettings({});
227227

228228
expect(result).toBe('hidden');
229229
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)