Skip to content
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

fix: attempt to make sharp dependency declaration compatible with yarn #730

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

benmccann
Copy link
Collaborator

closes #659

Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: ccb28bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
imagetools-core Patch
vite-imagetools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.69%. Comparing base (31c14f2) to head (ccb28bf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #730   +/-   ##
=======================================
  Coverage   95.69%   95.69%           
=======================================
  Files          33       33           
  Lines        1278     1278           
  Branches      224      224           
=======================================
  Hits         1223     1223           
  Misses         55       55           
Flag Coverage Δ
imagetools-core 95.69% <ø> (ø)
vite-imagetools 95.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@benmccann benmccann merged commit 57e070e into main Jul 10, 2024
8 checks passed
@benmccann benmccann deleted the sharp-cleanup branch July 10, 2024 16:17
@TimJohns
Copy link

TimJohns commented Jul 14, 2024

@benmccann I can't attest to the original issue #659 as reported, but I can report that this resolves a similar issue I was seeing using npm with vite-imagetools 7.0.2 in my package.json devDependencies, that appears to have been due to sharp being included in devDependencies vs. dependencies (fixed at 57e070e)

Before (vite-imagetools 7.0.2):

> vue-tsc --noEmit && vite build --mode development

failed to load config from /Users/tjohns/Src/epic-roadtrip-planner-webapp/vite.config.ts
error during build:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'sharp' imported from /Users/tjohns/Src/epic-roadtrip-planner-webapp/node_modules/vite-imagetools/dist/index.js
    at packageResolve (node:internal/modules/esm/resolve:853:9)
    at moduleResolve (node:internal/modules/esm/resolve:910:20)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

After (vite-imagetools 7.0.4):

> vue-tsc --noEmit && vite build --mode development

...

✓ built in 8.42s

Thanks for the fix, and I appreciate imagetools and the work you folks are doing here.

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.

Dependency on sharp not declared correctly for yarn’s PnP loader
2 participants