diff --git a/.craft.yml b/.craft.yml index c21726412f60..889fc57c73f9 100644 --- a/.craft.yml +++ b/.craft.yml @@ -11,6 +11,8 @@ targets: - nodejs10.x - nodejs12.x - nodejs14.x + - nodejs16.x + - nodejs18.x license: MIT - name: gcs includeNames: /.*\.js.*$/ @@ -22,7 +24,6 @@ targets: - name: github includeNames: /^sentry-.*$/ - name: npm - excludeNames: /^sentry-sveltekit-.*$/ - name: registry sdks: 'npm:@sentry/browser': diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index ded035469e99..c70bdbf89d0c 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,6 @@ # build: Add `@typescript-eslint/consistent-type-imports` rule (#6662) 2aa4e94b036675245290596884959e06dcced044 + +# chore: Rename `integration-tests` -> `browser-integration-tests` (#7455) +ef6b3c7877d5fc8031c08bb28b0ffafaeb01f501 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 981133613300..f5d0364b7cda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,7 @@ jobs: browser_integration: - *shared - *browser - - 'packages/integration-tests/**' + - 'packages/browser-integration-tests/**' ember: - *shared - *browser @@ -144,7 +144,8 @@ jobs: has_gitflow_label: ${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' Gitflow ') }} force_skip_cache: - ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ')) }} + ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && + contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ')) }} job_install_deps: name: Install Dependencies @@ -274,7 +275,9 @@ jobs: needs: [job_get_metadata, job_build] timeout-minutes: 15 runs-on: ubuntu-20.04 - if: github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true' || needs.job_get_metadata.outputs.is_release == 'true' + if: + github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true' || + needs.job_get_metadata.outputs.is_release == 'true' steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v3 @@ -540,7 +543,7 @@ jobs: PW_BUNDLE: ${{ matrix.bundle }} PW_TRACING_ONLY: ${{ matrix.tracing_only }} run: | - cd packages/integration-tests + cd packages/browser-integration-tests yarn test:ci job_browser_integration_tests: diff --git a/.github/workflows/flaky-test-detector.yml b/.github/workflows/flaky-test-detector.yml new file mode 100644 index 000000000000..bb414b553abd --- /dev/null +++ b/.github/workflows/flaky-test-detector.yml @@ -0,0 +1,81 @@ +name: 'Detect flaky tests' +on: + workflow_dispatch: + pull_request: + paths: + - 'packages/browser-integration-tests/suites/**' + +env: + HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }} + + NX_CACHE_RESTORE_KEYS: | + nx-Linux-${{ github.ref }}-${{ github.event.inputs.commit || github.sha }} + nx-Linux-${{ github.ref }} + nx-Linux + +# Cancel in progress workflows on pull_requests. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + flaky-detector: + runs-on: ubuntu-20.04 + timeout-minutes: 60 + name: 'Check tests for flakiness' + steps: + - name: Check out current branch + uses: actions/checkout@v3 + - name: Set up Node + uses: volta-cli/action@v4 + + - name: Install dependencies + run: yarn install --ignore-engines --frozen-lockfile + + - name: NX cache + uses: actions/cache/restore@v3 + with: + path: .nxcache + key: nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }} + restore-keys: ${{ env.NX_CACHE_RESTORE_KEYS }} + + - name: Build packages + run: yarn build + + - name: Get npm cache directory + id: npm-cache-dir + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Get Playwright version + id: playwright-version + run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT + - uses: actions/cache@v3 + name: Check if Playwright browser is cached + id: playwright-cache + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}} + - name: Install Playwright browser if not cached + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: npx playwright install --with-deps + env: + PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}} + - name: Install OS dependencies of Playwright if cache hit + if: steps.playwright-cache.outputs.cache-hit == 'true' + run: npx playwright install-deps + + - name: Determine changed tests + uses: getsentry/paths-filter@v2.11.1 + id: changed + with: + list-files: json + filters: | + browser_integration: packages/browser-integration-tests/suites/** + + - name: Detect flaky tests + run: yarn test:detect-flaky + working-directory: packages/browser-integration-tests + env: + CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }} + # Run 100 times when detecting changed test(s), else run all tests 5x + TEST_RUN_COUNT: ${{ steps.changed.outputs.browser_integration == 'true' && 100 || 5 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a101e7a76f..c52c74de5be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,43 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.44.0 + +This release introduces the first alpha version of `@sentry/sveltekit`, our newest JavaScript SDK for Sveltekit. Check out the [README](./packages/sveltekit/README.md) for usage instructions and what to expect from this alpha release. + +- feat(replay): Add `request_body_size` & `response_body_size` to fetch/xhr (#7407) +- feat(replay): Add additional properties for UI clicks (#7395) +- feat(replay): Reduce time limit before pausing a recording (#7356) +- feat(replay): Upgrade `rrweb` and `rrweb-player` (#7508) +- feat(replay): Use new afterSend hook to improve error linking (#7390) +- feat(serverless): Publish lambda layer for Node 16/18 (#7483) +- feat(sveltekit): Add wrapper for client load function (#7447) +- feat(sveltekit): Add wrapper for server load function (#7416) +- feat(sveltekit): Add server-side `handleError` wrapper (#7411) +- feat(sveltekit): Introduce client-side `handleError` wrapper (#7406) +- feat(sveltekit): Add SvelteKit client and server `init` functions (#7408) +- feat(sveltekit): Inject `Sentry.init` calls into server and client bundles (#7391) +- feat(tracing): Expose `BrowserTracing` in non-tracing bundles (#7479) +- fix(core): Permanent idle timeout cancel finishes the transaction with the last finished child +- fix(integrations): Handle lower-case prefix windows paths in `RewriteFrames` (#7506) +- fix(next): Guard against missing serverSideProps (#7517) +- fix(nextjs): Fix broken server component wrapping because of interrupted promise chain (#7456) +- fix(nextjs): Fix runtime error for static pages (#7476) +- fix(profiling): Catch sendProfile rejection (#7446) +- fix(replay): Never capture file input changes (#7485) +- fix(serverless): Explicitly export node package exports (#7457) +- fix(vue): Do not depend on `window.location` for SSR environments (#7518) + + +**Replay `rrweb` changes:** + +`@sentry-internal/rrweb` was updated from 1.105.0 to 1.106.0: + +- feat: Ensure password inputs are always masked ([#78](https://github.com/getsentry/rrweb/pull/78)) +- fix: Ensure text masking for updated attributes works ([#83](https://github.com/getsentry/rrweb/pull/83)) +- fix: Ensure unmaskTextSelector is used for masked attributes ([#81](https://github.com/getsentry/rrweb/pull/81)) +- fix: Mask