Skip to content

Commit

Permalink
Restore plugin type, as it doesn't cause the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiborza committed Sep 3, 2024
1 parent 900d27e commit 9b3c167
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 66 deletions.
90 changes: 32 additions & 58 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ jobs:
comparison_branch: ${{ (github.event_name == 'pull_request' && github.base_ref) || ''}}

job_lint:
if: false
name: Lint
# Even though the linter only checks source code, not built code, it needs the built code in order check that all
# inter-package dependencies resolve cleanly.
Expand All @@ -268,6 +269,7 @@ jobs:
run: yarn lint:clang

job_check_format:
if: false
name: Check file formatting
needs: [job_get_metadata]
timeout-minutes: 10
Expand Down Expand Up @@ -355,6 +357,7 @@ jobs:
${{ github.workspace }}/packages/aws-serverless/build/aws/dist-serverless/*.zip
job_browser_unit_tests:
if: false
name: Browser Unit Tests
needs: [job_get_metadata, job_build]
timeout-minutes: 10
Expand Down Expand Up @@ -393,6 +396,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

job_bun_unit_tests:
if: false
name: Bun Unit Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_bun == 'true' || github.event_name != 'pull_request'
Expand Down Expand Up @@ -420,6 +424,7 @@ jobs:
yarn test:ci:bun
job_deno_unit_tests:
if: false
name: Deno Unit Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_deno == 'true' || github.event_name != 'pull_request'
Expand Down Expand Up @@ -451,6 +456,7 @@ jobs:
yarn test
job_node_unit_tests:
if: false
name: Node (${{ matrix.node }}) Unit Tests
needs: [job_get_metadata, job_build]
timeout-minutes: 10
Expand Down Expand Up @@ -498,6 +504,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

job_profiling_node_unit_tests:
if: false
name: Node Profiling Unit Tests
needs: [job_get_metadata, job_build]
if: |
Expand Down Expand Up @@ -529,6 +536,7 @@ jobs:
run: yarn lerna run test --scope @sentry/profiling-node

job_browser_playwright_tests:
if: false
name: Playwright ${{ matrix.bundle }}${{ matrix.project && matrix.project != 'chromium' && format(' {0}', matrix.project) || ''}}${{ matrix.shard && format(' ({0}/{1})', matrix.shard, matrix.shards) || ''}} Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
Expand Down Expand Up @@ -611,6 +619,7 @@ jobs:
retention-days: 7

job_browser_loader_tests:
if: false
name: PW ${{ matrix.bundle }} Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
Expand Down Expand Up @@ -663,6 +672,7 @@ jobs:
retention-days: 7

job_check_for_faulty_dts:
if: false
name: Check for faulty .d.ts files
needs: [job_get_metadata, job_build]
runs-on: ubuntu-20.04
Expand All @@ -688,11 +698,12 @@ jobs:
fi
job_node_integration_tests:
if: false
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_node_integration == 'true' || github.event_name != 'pull_request'
#if: needs.job_build.outputs.changed_node_integration == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
timeout-minutes: 15
strategy:
Expand Down Expand Up @@ -733,9 +744,10 @@ jobs:
run: yarn test

job_remix_integration_tests:
if: false
name: Remix v${{ matrix.remix }} (Node ${{ matrix.node }}) Tests
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_remix == 'true' || github.event_name != 'pull_request'
#if: needs.job_build.outputs.changed_remix == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
Expand Down Expand Up @@ -859,63 +871,25 @@ jobs:
- ${{ github.actor == 'dependabot[bot]' }}
test-application:
[
# 'angular-17',
# 'angular-18',
# 'astro-4',
# 'aws-lambda-layer-cjs',
# 'aws-serverless-esm',
# 'node-express',
# 'create-react-app',
# 'create-next-app',
# 'create-remix-app',
# 'create-remix-app-legacy',
# 'create-remix-app-v2',
# 'create-remix-app-v2-legacy',
# 'create-remix-app-express',
# 'create-remix-app-express-legacy',
# 'create-remix-app-express-vite-dev',
# 'default-browser',
# 'node-express-esm-loader',
# 'node-express-esm-preload',
# 'node-express-esm-without-loader',
# 'node-express-cjs-preload',
# 'node-otel-sdk-node',
# 'node-otel-custom-sampler',
# 'ember-classic',
# 'ember-embroider',
# 'nextjs-app-dir',
# 'nextjs-13',
# 'nextjs-14',
# 'nextjs-15',
# 'react-17',
# 'react-19',
# 'react-create-hash-router',
# 'react-router-6-use-routes',
# 'react-router-5',
# 'react-router-6',
# 'solid',
'default-browser',
'solid',
'solidstart',
# 'svelte-5',
# 'sveltekit',
# 'sveltekit-2',
# 'sveltekit-2-svelte-5',
# 'tanstack-router',
# 'generic-ts3.8',
# 'node-fastify',
# 'node-hapi',
# 'node-nestjs-basic',
# 'node-nestjs-distributed-tracing',
# 'nestjs-basic',
# 'nestjs-distributed-tracing',
# 'nestjs-with-submodules',
# 'nestjs-graphql',
# 'node-exports-test-app',
# 'node-koa',
# 'node-connect',
# 'nuxt-3',
# 'vue-3',
# 'webpack-4',
# 'webpack-5'
'generic-ts3.8',
'node-fastify',
'node-hapi',
'node-nestjs-basic',
'node-nestjs-distributed-tracing',
'nestjs-basic',
'nestjs-distributed-tracing',
'nestjs-with-submodules',
'nestjs-graphql',
'node-exports-test-app',
'node-koa',
'node-connect',
'nuxt-3',
'vue-3',
'webpack-4',
'webpack-5'
]
build-command:
- false
Expand Down
10 changes: 5 additions & 5 deletions packages/solidstart/src/vite/sentrySolidStartVite.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// import type { Plugin } from 'vite';
import type { Plugin } from 'vite';
import { makeSourceMapsVitePlugin } from './sourceMaps';
import type { SentrySolidStartPluginOptions } from './types';

/**
* Various Sentry vite plugins to be used for SolidStart.
*/
export const sentrySolidStartVite = (options: SentrySolidStartPluginOptions): any[] => {
const sentryPlugins = [];
export const sentrySolidStartVite = (options: SentrySolidStartPluginOptions): Plugin[] => {
const sentryPlugins: Plugin[] = [];

// if (process.env.NODE_ENV !== 'development') {
if (process.env.NODE_ENV !== 'development') {
if (options.sourceMapsUploadOptions?.enabled ?? true) {
sentryPlugins.push(...makeSourceMapsVitePlugin(options));
}
// }
}

return sentryPlugins;
};
6 changes: 3 additions & 3 deletions packages/solidstart/src/vite/sourceMaps.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { sentryVitePlugin } from '@sentry/vite-plugin';
// import type { Plugin } from 'vite';
import type { Plugin } from 'vite';
import type { SentrySolidStartPluginOptions } from './types';

/**
* A Sentry plugin for SolidStart to enable source maps and use
* @sentry/vite-plugin to automatically upload source maps to Sentry.
* @param {SourceMapsOptions} options
*/
export function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): any[] {
export function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[] {
const { authToken, debug, org, project, sourceMapsUploadOptions } = options;
return [
{
name: 'sentry-solidstart-source-maps',
apply: 'build',
enforce: 'post',
config(config: any) {
config(config) {
const sourceMapsPreviouslyNotEnabled = !config.build?.sourcemap;
if (debug && sourceMapsPreviouslyNotEnabled) {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit 9b3c167

Please sign in to comment.