Skip to content

fix: escape ids in import.meta.ROLLUP_FILE_URL_referenceId correctly#5404

Merged
lukastaegert merged 1 commit intorollup:masterfrom
sapphi-red:fix/escape-ids-in-import-meta-correctly
Mar 5, 2024
Merged

fix: escape ids in import.meta.ROLLUP_FILE_URL_referenceId correctly#5404
lukastaegert merged 1 commit intorollup:masterfrom
sapphi-red:fix/escape-ids-in-import-meta-correctly

Conversation

@sapphi-red
Copy link
Contributor

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

import.meta.ROLLUP_FILE_URL_referenceId with a file with single quote generated an invalid code. For example:

""+new URL('javascript'-8dac5379.svg', import.meta.url).href+""

@vercel
Copy link

vercel bot commented Feb 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 29, 2024 11:48am

@codecov
Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (27690dc) to head (9d130af).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5404   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files         236      236           
  Lines        9418     9418           
  Branches     2396     2396           
=======================================
  Hits         9305     9305           
  Misses         48       48           
  Partials       65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks a lot!

@lukastaegert lukastaegert added this pull request to the merge queue Mar 5, 2024
Merged via the queue into rollup:master with commit ce6cb93 Mar 5, 2024
@sapphi-red sapphi-red deleted the fix/escape-ids-in-import-meta-correctly branch March 5, 2024 06:23
@github-actions
Copy link

github-actions bot commented Mar 6, 2024

This PR has been released as part of rollup@4.12.1. You can test it via npm install rollup.

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.

2 participants