Skip to content

feat: Delete old transports #4967

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 10 commits into from
Apr 26, 2022
Merged

feat: Delete old transports #4967

merged 10 commits into from
Apr 26, 2022

Conversation

AbhiPrasad
Copy link
Member

Following up on work in #4943

Delete old transports as we've switched entirely to new v7 transports.

Resolves https://getsentry.atlassian.net/browse/WEB-776

@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-delete-old-transports branch from 3436687 to 3051cad Compare April 25, 2022 12:51
@AbhiPrasad AbhiPrasad requested review from a team, lforst and Lms24 and removed request for a team April 25, 2022 12:51
@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.53 KB (-8.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 57.99 KB (-10.26% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.29 KB (-8.34% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.16 KB (-10.03% 🔽)
@sentry/browser - Webpack (gzipped + minified) 21.77 KB (-6.3% 🔽)
@sentry/browser - Webpack (minified) 74.12 KB (-9.3% 🔽)
@sentry/react - Webpack (gzipped + minified) 21.81 KB (-6.31% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 46.22 KB (-3.83% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.3 KB (-6.81% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.81 KB (-6.83% 🔽)

@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-delete-old-transports branch 2 times, most recently from bafbcfb to 817a118 Compare April 25, 2022 14:02
@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-delete-old-transports branch from 817a118 to 4e64c8d Compare April 25, 2022 14:46
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone Apr 25, 2022
Copy link
Member

@lforst lforst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

// assert on what the class provides and what it leaves to the concrete class to implement
class SimpleTransport extends BaseTransport {}

// TODO(v7): Re-enable these tests with client reports
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we delete this we might forget to re add tests. Can we add a note somewhere (maybe in the BrowserClient tests) to add those client report tests back in?

/**
* Creates a Transport that uses the Fetch API to send events to Sentry.
*/
export function makeNewFetchTransport(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add a TODO here to rename this function? Same for xhr.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can rename

// - Move this file one folder upwards
// - Delete "transports" folder
// OR
// - Split this file up and leave it in the transports folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this todo now.

Lms24 and others added 8 commits April 26, 2022 11:54
rename the dist directories in all build dirs to cjs. Hence, also the tarballs' structure changes which is why this PR also introduces a breaking change.

Additional change: cleanup `yarn clean` commands by removing no longer existing directories
This updates `jest`, `ts-jest`, and `jest-environment-node` to the latest versions, in order to facilitate code transformations during `ts-jest`'s on-the-fly compilation that will become necessary once we move to ES6. (More detail on this to come in the PR which actually introduces said transformation, but TL;DR the way we use and extend `global` is fine if it's a `var` (which it is in ES5 Land) but less fine if it's a `const` (which it becomes under ES6), and we need to fix that for tests to run.)

It also updates `jsdom`. Together these updates meant that a larger number of packages needed to be downgraded in order for tests to run in node 8 and 10. This therefore also reworks the test script a bit to account for those changes. Finally, this removes the test environment from our main jest config, as its value has become the default in latest version of jest.
As part of the new build process, a fair amount of new rollup-related code is going to be added. To keep things from getting too unwieldy, this splits the existing code up into modules. It also makes two other small changes, one for consistency and one to differentiate the current rollup code (which is for building bundles) from the future rollup code (which will be for building npm packages):

- All plugins are now generated through factory functions (`makeXXXPlugin`).
- Both the `makeConfigVariants` function and the individual `rollup.config.js` files have been renamed to make it clear they're for creating bundles.

For now all of the resulting modules live in a `rollup` folder at the top level of the repo. In the long run, these would be good candidates to go into an `@sentry-internal/dev-utils` package.
Delete old transports as we've switched entirely to new v7 transports.
@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-delete-old-transports branch from 5ad27a4 to dac51b7 Compare April 26, 2022 16:03
@AbhiPrasad AbhiPrasad merged commit d53180e into 7.x Apr 26, 2022
@AbhiPrasad AbhiPrasad deleted the v7-abhi-delete-old-transports branch April 26, 2022 16:41
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
Delete old transports as we've switched entirely to new v7 transports.
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
Delete old transports as we've switched entirely to new v7 transports.
AbhiPrasad added a commit that referenced this pull request May 30, 2022
Delete old transports as we've switched entirely to new v7 transports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants