GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(gatsby): Add optional `deleteSourcemapsAfterUpload` by julianCast · Pull Request #13610 · getsentry/sentry-javascript

Conversation

@julianCast

@julianCast julianCast commented Sep 6, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Related #13582
This work adds the deleteSourcemapsAfterUpload option to the Gatsby plugin, allowing it to be passed to the Webpack plugin to set the sourceMapFilesToDeleteAfterUpload without exposing the API.

This simplifies our workflow by eliminating the need to apply a Yarn patch to modify the package whenever we want to use filesToDeleteAfterUpload.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
julianCast added 3 commits September 6, 2024 23:04
@julianCast
feat(gatsby): Add optional filesToDeleteAfterUpload
38c89c5
@julianCast
Merge remote-tracking branch 'upstream/develop' into filesToDeleteAft…
4fa0e46
…erUpload-opt
@julianCast
refactor(gatsby): Rename sourceMapFilesToDeleteAfterUpload
874ff92
@julianCast julianCast mentioned this pull request Sep 6, 2024
filesToDeleteAfterUpload : Could not determine source map path (Gatsby) #13582
Closed
3 tasks done
@AbhiPrasad

AbhiPrasad commented Sep 9, 2024

Copy link
Copy Markdown
Contributor

@getsentry/team-web-sdk-frontend what does everything think about exposing the API like this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@s1gr1d

s1gr1d commented Sep 9, 2024

Copy link
Copy Markdown
Member

I would align the API with the other SDKs. The other SDKs have it mostly like this:

      sourceMapsUploadOptions: {
        sourcemaps: {
          assets: ['foo/*.js'],
          ignore: ['bar/*.js'],
          filesToDeleteAfterUpload: ['baz/*.js'],
        },
      },
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lforst

lforst commented Sep 9, 2024

Copy link
Copy Markdown
Contributor

I would align the API with the other SDKs. The other SDKs have it mostly like this:

      sourceMapsUploadOptions: {
        sourcemaps: {
          assets: ['foo/*.js'],
          ignore: ['bar/*.js'],
          filesToDeleteAfterUpload: ['baz/*.js'],
        },
      },

I actually think the way we have structured this is suboptimal. Gave the same feedback here: #13493

sourcemaps as a key inside sourceMapsUploadOptions makes little sense. I would generally try to avoid exposing the API at all when the framework gives a default (like in the case of Gatsby) and then have a simple boolean deleteSourcemapsAfterUpload: true as a top-level option instead.

All other options should be accessible over an experimental_webpackPluginOptions option or something like that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@julianCast

julianCast commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

I would generally try to avoid exposing the API at all when the framework gives a default (like in the case of Gatsby) and then have a simple boolean deleteSourcemapsAfterUpload: true as a top-level option instead.

I could pass deleteSourcemapsAfterUpload as boolean option, that would be consistent with the existent option enableClientWebpackPlugin

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

julianCast added 3 commits September 10, 2024 16:29
@julianCast
fix(gatsby): Avoid exposing API by using custom boolean
31d5185
@julianCast
fix(gatsby): fix lint
beabc31
@julianCast
fix(gatsby): Fix lint readme
ca02128
@julianCast

julianCast commented Sep 11, 2024

Copy link
Copy Markdown
Contributor Author

I've modified this work by using a boolean deleteSourcemapsAfterUpload option to avoid API exposing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@julianCast
Merge branch 'develop' into filesToDeleteAfterUpload-opt
90730cf
lforst
lforst approved these changes Sep 13, 2024
View reviewed changes

@lforst lforst left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
julianCast and others added 2 commits September 16, 2024 10:00
@julianCast
Merge branch 'develop' into filesToDeleteAfterUpload-opt
3286596
Luca Forstner
lint
58fc276
@lforst lforst changed the title feat(gatsby): Add optional filesToDeleteAfterUpload feat(gatsby): Add optional deleteSourcemapsAfterUpload Sep 19, 2024
@lforst
lforst merged commit fc7634e into getsentry:develop Sep 19, 2024
@github-actions github-actions Bot mentioned this pull request Sep 19, 2024
ref: Add external contributor to CHANGELOG.md #13727
Merged
@julianCast
julianCast deleted the filesToDeleteAfterUpload-opt branch September 19, 2024 11:28
AbhiPrasad added a commit that referenced this pull request Sep 19, 2024
@github-actions @lforst @AbhiPrasad
ref: Add external contributor to CHANGELOG.md (#13727)
37c4c42
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #13610

---------

Co-authored-by: lforst <[email protected]>
Co-authored-by: Abhijeet Prasad <[email protected]>
@AbhiPrasad

AbhiPrasad commented Sep 23, 2024

Copy link
Copy Markdown
Contributor

This was released with https://github.com/getsentry/sentry-javascript/releases/tag/8.31.0 - thanks for the PR @julianCast!

julianCast reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@lforst lforst lforst approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@julianCast @AbhiPrasad @s1gr1d @lforst
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.