Skip to content

Commit d73daeb

Browse files
authored
Merge pull request #13249 from getsentry/prepare-release/8.24.0
2 parents 62271a1 + 7c7e2e2 commit d73daeb

File tree

35 files changed

+410
-319
lines changed

35 files changed

+410
-319
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Install Playwright dependencies"
2+
description: "Installs Playwright dependencies and caches them."
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Get Playwright version
8+
id: playwright-version
9+
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
10+
shell: bash
11+
12+
- name: Cache playwright binaries
13+
uses: actions/cache@v4
14+
id: playwright-cache
15+
with:
16+
path: |
17+
~/.cache/ms-playwright
18+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
19+
20+
- name: Install Playwright dependencies (uncached)
21+
run: npx playwright install chromium webkit firefox --with-deps
22+
if: steps.playwright-cache.outputs.cache-hit != 'true'
23+
shell: bash
24+
25+
- name: Install Playwright system dependencies only (cached)
26+
run: npx playwright install-deps chromium webkit firefox
27+
if: steps.playwright-cache.outputs.cache-hit == 'true'
28+
shell: bash

.github/workflows/build.yml

Lines changed: 84 additions & 177 deletions
Large diffs are not rendered by default.

.github/workflows/flaky-test-detector.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,8 @@ jobs:
4949
- name: Build packages
5050
run: yarn build
5151

52-
- name: Get npm cache directory
53-
id: npm-cache-dir
54-
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
55-
- name: Get Playwright version
56-
id: playwright-version
57-
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
58-
- uses: actions/cache@v4
59-
name: Check if Playwright browser is cached
60-
id: playwright-cache
61-
with:
62-
path: ${{ steps.npm-cache-dir.outputs.dir }}
63-
key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
64-
- name: Install Playwright browser if not cached
65-
if: steps.playwright-cache.outputs.cache-hit != 'true'
66-
run: npx playwright install --with-deps
67-
env:
68-
PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}}
69-
- name: Install OS dependencies of Playwright if cache hit
70-
if: steps.playwright-cache.outputs.cache-hit == 'true'
71-
run: npx playwright install-deps
52+
- name: Install Playwright
53+
uses: ./.github/actions/install-playwright
7254

7355
- name: Determine changed tests
7456
uses: dorny/[email protected]

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1212

13+
## 8.24.0
14+
15+
- feat(nestjs): Filter RPC exceptions (#13227)
16+
- fix: Guard getReader function for other fetch implementations (#13246)
17+
- fix(feedback): Ensure feedback can be lazy loaded in CDN bundles (#13241)
18+
1319
## 8.23.0
1420

1521
### Important Changes
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
Sentry.init({
4+
dsn: 'https://[email protected]/1337',
5+
integrations: [],
6+
});
7+
8+
window.Sentry = {
9+
...Sentry,
10+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
window._testLazyLoadIntegration = async function run() {
2+
const integration = await window.Sentry.lazyLoadIntegration('feedbackIntegration');
3+
4+
window.Sentry.getClient()?.addIntegration(integration());
5+
6+
window._integrationLoaded = true;
7+
};
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { expect } from '@playwright/test';
2+
import { SDK_VERSION } from '@sentry/browser';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
6+
sentryTest('it allows to lazy load the feedback integration', async ({ getLocalTestUrl, page }) => {
7+
const bundle = process.env.PW_BUNDLE || '';
8+
const url = await getLocalTestUrl({ testDir: __dirname });
9+
10+
await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback.min.js`, route => {
11+
return route.fulfill({
12+
status: 200,
13+
contentType: 'application/javascript;',
14+
body: "window.Sentry.feedbackIntegration = () => ({ name: 'Feedback', attachTo: () => {} })",
15+
});
16+
});
17+
18+
await page.goto(url);
19+
20+
await page.waitForFunction('window.Sentry?.getClient()');
21+
22+
const integrationOutput1 = await page.evaluate('window.Sentry.feedbackIntegration?._isShim');
23+
24+
// Multiple cases are possible here:
25+
// 1. Bundle without feedback, should have _isShim property
26+
if (bundle.startsWith('bundle') && !bundle.includes('feedback')) {
27+
expect(integrationOutput1).toBe(true);
28+
} else {
29+
// 2. Either bundle with feedback, or ESM, should not have _isShim property
30+
expect(integrationOutput1).toBe(undefined);
31+
}
32+
33+
await page.evaluate('window._testLazyLoadIntegration()');
34+
await page.waitForFunction('window._integrationLoaded');
35+
36+
const integrationOutput2 = await page.evaluate('window.Sentry.feedbackIntegration?._isShim');
37+
expect(integrationOutput2).toBe(undefined);
38+
});

dev-packages/e2e-tests/Dockerfile.publish-packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ARG NODE_VERSION=18.18.0
33
FROM node:${NODE_VERSION}
44

55
WORKDIR /sentry-javascript/dev-packages/e2e-tests
6-
CMD [ "yarn", "ts-node", "publish-packages.ts" ]
6+
CMD [ "yarn", "ts-node", "publish-packages.ts", "--transpile-only" ]

dev-packages/e2e-tests/publish-packages.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@ const packageTarballPaths = glob.sync('packages/*/sentry-*.tgz', {
1313
// Publish built packages to the fake registry
1414
packageTarballPaths.forEach(tarballPath => {
1515
// `--userconfig` flag needs to be before `publish`
16-
childProcess.execSync(`npm --userconfig ${__dirname}/test-registry.npmrc publish ${tarballPath}`, {
17-
cwd: repositoryRoot, // Can't use __dirname here because npm would try to publish `@sentry-internal/e2e-tests`
18-
encoding: 'utf8',
19-
stdio: 'inherit',
20-
});
16+
childProcess.exec(
17+
`npm --userconfig ${__dirname}/test-registry.npmrc publish ${tarballPath}`,
18+
{
19+
cwd: repositoryRoot, // Can't use __dirname here because npm would try to publish `@sentry-internal/e2e-tests`
20+
encoding: 'utf8',
21+
},
22+
(err, stdout, stderr) => {
23+
// eslint-disable-next-line no-console
24+
console.log(stdout);
25+
// eslint-disable-next-line no-console
26+
console.log(stderr);
27+
if (err) {
28+
// eslint-disable-next-line no-console
29+
console.error(err);
30+
process.exit(1);
31+
}
32+
},
33+
);
2134
});

dev-packages/e2e-tests/test-applications/aws-serverless-esm/start-event-proxy.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ import { startEventProxyServer } from '@sentry-internal/test-utils';
33
startEventProxyServer({
44
port: 3031,
55
proxyServerName: 'aws-serverless-esm',
6-
forwardToSentry: false,
76
});

0 commit comments

Comments
 (0)