Skip to content

chore: Replace require.resolve with import.meta.resolve - #1221

Merged
aklinker1 merged 4 commits into
0.20.0-breaking-changesfrom
import-meta-resolve
Nov 28, 2024
Merged

aklinker1 merged 4 commits into
0.20.0-breaking-changesfrom
import-meta-resolve

Conversation

@aklinker1

@aklinker1 aklinker1 commented Nov 28, 2024 •

Copy link
Copy Markdown
Member

Addresses TODO:

// TODO: Use this once we're fully running in ESM, see https://github.com/wxt-dev/wxt/issues/277
// const url = import.meta.resolve('wxt', import.meta.url);
// resolve() returns the "wxt/dist/index.mjs" file, not the package's root
// directory, which we want to return from this function.
// return path.resolve(fileURLToPath(url), '../..');

@codecov

codecov Bot commented Nov 28, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (0.20.0-breaking-changes@cbbd70e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/wxt/src/core/utils/eslint.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##             0.20.0-breaking-changes    #1221   +/-   ##
==========================================================
  Coverage                           ?   81.27%           
==========================================================
  Files                              ?      124           
  Lines                              ?     6517           
  Branches                           ?     1088           
==========================================================
  Hits                               ?     5297           
  Misses                             ?     1203           
  Partials                           ?       17           

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

@aklinker1
aklinker1 marked this pull request as ready for review November 28, 2024 05:59
@aklinker1
aklinker1 merged commit ba2f372 into 0.20.0-breaking-changes Nov 28, 2024
@aklinker1
aklinker1 deleted the import-meta-resolve branch November 28, 2024 06:00
@aklinker1 aklinker1 mentioned this pull request Nov 28, 2024
26 of 28 tasks
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.

1 participant