Skip to content

meta: Update CHANGELOG for 7.98.0 #10341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 25, 2024
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
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,32 @@ jobs:
cd packages/utils
yarn test:package

job_check_for_faulty_dts:
name: Check for faulty .d.ts files
needs: [job_get_metadata, job_build]
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Check for dts files that reference stuff in the temporary build folder
run: |
if grep -r --include "*.d.ts" --exclude-dir ".nxcache" 'import("@sentry(-internal)?/[^/]*/build' .; then
echo "Found illegal TypeScript import statement."
exit 1
fi


job_node_integration_tests:
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

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

## 7.98.0

This release primarily fixes some type declaration errors:

- feat(core): Export `IntegrationIndex` type (#10337)
- fix(nextjs): Fix Http integration type declaration (#10338)
- fix(node): Fix type definitions (#10339)

## 7.97.0

Note: The 7.96.0 release was incomplete. This release is partially encompassing changes from `7.96.0`.
Expand Down
14 changes: 7 additions & 7 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"private": true,
"scripts": {
"clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp",
"install-browsers": "playwright install --with-deps",
"install-browsers": "npx playwright install --with-deps",
"lint": "eslint . --format stylish",
"fix": "eslint . --format stylish --fix",
"type-check": "tsc",
"postinstall": "yarn install-browsers",
"pretest": "yarn clean && yarn type-check",
"test": "playwright test ./suites --project='chromium'",
"test:all": "playwright test ./suites",
"test": "yarn test:all --project='chromium'",
"test:all": "npx playwright test -c playwright.browser.config.ts",
"test:bundle:es5": "PW_BUNDLE=bundle_es5 yarn test",
"test:bundle:es5:min": "PW_BUNDLE=bundle_es5_min yarn test",
"test:bundle:es6": "PW_BUNDLE=bundle_es6 yarn test",
Expand All @@ -30,29 +31,28 @@
"test:bundle:tracing:replay:es6:min": "PW_BUNDLE=bundle_tracing_replay_es6_min yarn test",
"test:cjs": "PW_BUNDLE=cjs yarn test",
"test:esm": "PW_BUNDLE=esm yarn test",
"test:loader": "playwright test ./loader-suites --project='chromium'",
"test:loader": "npx playwright test -c playwright.loader.config.ts --project='chromium'",
"test:loader:base": "PW_BUNDLE=loader_base yarn test:loader",
"test:loader:eager": "PW_BUNDLE=loader_eager yarn test:loader",
"test:loader:tracing": "PW_BUNDLE=loader_tracing yarn test:loader",
"test:loader:replay": "PW_BUNDLE=loader_replay yarn test:loader",
"test:loader:full": "PW_BUNDLE=loader_tracing_replay yarn test:loader",
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
"test:ci": "playwright test ./suites --reporter='line'",
"test:ci": "yarn test:all --reporter='line'",
"test:update-snapshots": "yarn test:all --update-snapshots",
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts",
"validate:es5": "es-check es5 'fixtures/loader.js'"
},
"dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.31.1",
"@playwright/test": "^1.40.1",
"@sentry-internal/rrweb": "2.9.0",
"@sentry/browser": "7.97.0",
"@sentry/tracing": "7.97.0",
"axios": "1.6.0",
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import CorePlaywrightConfig from './playwright.config';

const config: PlaywrightTestConfig = {
...CorePlaywrightConfig,
testDir: './suites',
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const config: PlaywrightTestConfig = {
// Use 3 workers on CI, else use defaults (based on available CPU cores)
// Note that 3 is a random number selected to work well with our CI setup
workers: process.env.CI ? 3 : undefined,
testMatch: /test.ts/,

projects: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import CorePlaywrightConfig from './playwright.config';

const config: PlaywrightTestConfig = {
...CorePlaywrightConfig,
testDir: './loader-suites',
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ${changedPaths.join('\n')}
try {
await new Promise<void>((resolve, reject) => {
const cp = childProcess.spawn(
`yarn playwright test ${
`npx playwright test ${
testPaths.length ? testPaths.join(' ') : './suites'
} --reporter='line' --repeat-each ${runCount}`,
{ shell: true, cwd },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,58 @@ import type { Event } from '@sentry/types';
import { sentryTest } from '../../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';

sentryTest(
'captures Breadcrumb for clicks & debounces them for a second',
async ({ getLocalTestUrl, page, browserName }) => {
sentryTest.skip(browserName === 'chromium', 'This consistently flakes on chrome.');

const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', route => {
return route.fulfill({
status: 200,
body: JSON.stringify({
userNames: ['John', 'Jane'],
}),
headers: {
'Content-Type': 'application/json',
},
});
});

const promise = getFirstSentryEnvelopeRequest<Event>(page);

await page.goto(url);

await page.click('#button1');
// not debounced because other target
await page.click('#button2');
// This should be debounced
await page.click('#button2');

// Wait a second for the debounce to finish
await page.waitForTimeout(1000);
await page.click('#button2');

const [eventData] = await Promise.all([promise, page.evaluate('Sentry.captureException("test exception")')]);

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData.breadcrumbs).toEqual([
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button1[type="button"]',
},
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button2[type="button"]',
},
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button2[type="button"]',
sentryTest('captures Breadcrumb for clicks & debounces them for a second', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', route => {
return route.fulfill({
status: 200,
body: JSON.stringify({
userNames: ['John', 'Jane'],
}),
headers: {
'Content-Type': 'application/json',
},
]);
},
);
});
});

const promise = getFirstSentryEnvelopeRequest<Event>(page);

await page.goto(url);

await page.locator('#button1').click();

// not debounced because other target
await page.locator('#button2').click();
// This should be debounced
await page.locator('#button2').click();

// Wait a second for the debounce to finish
await page.waitForTimeout(1000);
await page.locator('#button2').click();

const [eventData] = await Promise.all([promise, page.evaluate('Sentry.captureException("test exception")')]);

expect(eventData.exception?.values).toHaveLength(1);

expect(eventData.breadcrumbs).toEqual([
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button1[type="button"]',
},
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button2[type="button"]',
},
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > button#button2[type="button"]',
},
]);
});

sentryTest(
'uses the annotated component name in the breadcrumb messages and adds it to the data object',
Expand All @@ -81,7 +77,7 @@ sentryTest(
const promise = getFirstSentryEnvelopeRequest<Event>(page);

await page.goto(url);
await page.click('#annotated-button');
await page.locator('#annotated-button').click();
await page.evaluate('Sentry.captureException("test exception")');

const eventData = await promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ sentryTest('captures Breadcrumb for events on inputs & debounced them', async ({

await page.goto(url);

await page.click('#input1');
// Not debounced because other event type
await page.type('#input1', 'John', { delay: 1 });
await page.locator('#input1').pressSequentially('John', { delay: 1 });

// This should be debounced
await page.type('#input1', 'Abby', { delay: 1 });
await page.locator('#input1').pressSequentially('Abby', { delay: 1 });

// not debounced because other target
await page.type('#input2', 'Anne', { delay: 1 });
await page.locator('#input2').pressSequentially('Anne', { delay: 1 });

// Wait a second for the debounce to finish
await page.waitForTimeout(1000);
await page.type('#input2', 'John', { delay: 1 });
await page.locator('#input2').pressSequentially('John', { delay: 1 });

await page.evaluate('Sentry.captureException("test exception")');

Expand All @@ -42,11 +43,6 @@ sentryTest('captures Breadcrumb for events on inputs & debounced them', async ({
expect(eventData.exception?.values).toHaveLength(1);

expect(eventData.breadcrumbs).toEqual([
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > input#input1[type="text"]',
},
{
timestamp: expect.any(Number),
category: 'ui.input',
Expand Down Expand Up @@ -86,20 +82,13 @@ sentryTest(

await page.goto(url);

await page.click('#annotated-input');
await page.type('#annotated-input', 'John', { delay: 1 });
await page.locator('#annotated-input').pressSequentially('John', { delay: 1 });

await page.evaluate('Sentry.captureException("test exception")');
const eventData = await promise;
expect(eventData.exception?.values).toHaveLength(1);

expect(eventData.breadcrumbs).toEqual([
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > AnnotatedInput',
data: { 'ui.component_name': 'AnnotatedInput' },
},
{
timestamp: expect.any(Number),
category: 'ui.input',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sentryTest(

const eventReqPromise = waitForErrorRequestOnUrl(page, url);

const clickPromise = page.click('#inline-error-btn');
const clickPromise = page.locator('#inline-error-btn').click();

const [req] = await Promise.all([eventReqPromise, clickPromise]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sentryTest('should not add source context lines to errors from script files', as

const eventReqPromise = waitForErrorRequestOnUrl(page, url);

const clickPromise = page.click('#script-error-btn');
const clickPromise = page.locator('#script-error-btn').click();

const [req] = await Promise.all([eventReqPromise, clickPromise]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sentryTest(

const eventReqPromise = waitForErrorRequestOnUrl(page, url);

const clickPromise = page.click('#inline-error-btn');
const clickPromise = page.locator('#inline-error-btn').click();

const [req] = await Promise.all([eventReqPromise, clickPromise]);

Expand Down
Loading