Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,36 +136,6 @@ jobs:
node-version: [18, 20, 22, 24]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
- name: Use dependency cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: dependency-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-engines
if: steps.dependency-cache.outputs.cache-hit != 'true'
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dist-artifacts-${{ github.run_id }}
path: packages
- run: yarn test:integration

test-integration-next:
needs: build
name: "Integration Tests Next (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})"
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22, 24]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -188,7 +158,7 @@ jobs:
with:
name: dist-artifacts-${{ github.run_id }}
path: packages
- run: yarn test:integration-next
- run: yarn test:integration

lint:
needs: build
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"packages/dev-utils",
"packages/esbuild-plugin",
"packages/eslint-configs",
"packages/integration-tests",
"packages/playground",
"packages/rollup-plugin",
"packages/tsconfigs",
Expand All @@ -28,9 +27,8 @@
"clean": "nx run-many --target=clean --all",
"clean:all": "nx run-many --target=clean:all --all && yarn",
"test": "nx run-many --target=test --all",
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests,@sentry-internal/integration-tests-next",
"test:integration": "nx run @sentry-internal/integration-tests:test",
"test:integration-next": "nx run @sentry-internal/integration-tests-next:test",
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests-next",
"test:integration": "nx run @sentry-internal/integration-tests-next:test",
"lint": "nx run-many --target=lint --all",
"check:formatting": "oxfmt --check .",
"fix:formatting": "oxfmt ."
Expand Down
1 change: 1 addition & 0 deletions packages/babel-plugin-component-annotate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"devDependencies": {
"@babel/core": "7.18.5",
"@types/babel__core": "^7.20.5",
"@babel/preset-react": "^7.23.3",
"@sentry-internal/eslint-config": "5.2.1",
"@sentry-internal/sentry-bundler-plugin-tsconfig": "5.2.1",
Expand Down
11 changes: 4 additions & 7 deletions packages/babel-plugin-component-annotate/src/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,16 +283,13 @@ function processJSX(context: JSXProcessingContext, jsxNode: Babel.NodePath): voi
// NOTE: I don't know of a case where `openingElement` would have more than one item,
// but it's safer to always iterate
const paths = jsxNode.get("openingElement");
const openingElements = Array.isArray(paths) ? paths : [paths];
const openingElements = (
Array.isArray(paths) ? paths : [paths]
) as Babel.NodePath<Babel.types.JSXOpeningElement>[];

const hasInjectedAttributes = openingElements.reduce(
(prev, openingElement) =>
prev ||
applyAttributes(
context,
openingElement as Babel.NodePath<Babel.types.JSXOpeningElement>,
context.componentName
),
prev || applyAttributes(context, openingElement, context.componentName),
false
);

Expand Down
3 changes: 2 additions & 1 deletion packages/integration-tests-next/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ module.exports = {
".eslintrc.js",
"fixtures/*/out",
"fixtures/*/src",
// We ignore Vite fixtures for now because there are a couple of version mismatches.
// We ignore Vite and Rollup fixtures for now because there are a couple of version mismatches.
"fixtures/vite*/**/*",
"fixtures/rollup*/**/*",
],
parserOptions: {
tsconfigRootDir: __dirname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@babel/preset-react","@sentry/webpack-plugin","webpack","webpack-cli"],"depsVersions":{"webpack":5},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();
"basic.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@babel/preset-react","@sentry/webpack-plugin","babel-loader","webpack","webpack-cli"],"depsVersions":{"webpack":5},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// eslint-disable-next-line no-console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"type": "module",
"dependencies": {
"babel-loader": "^8.0.0",
"webpack": "5.105.4",
"webpack-cli": "6.0.1",
"@babel/preset-react": "7.23.3",
Expand Down
16 changes: 0 additions & 16 deletions packages/integration-tests/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/integration-tests/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions packages/integration-tests/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions packages/integration-tests/fixtures/after-upload-deletion/setup.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading