Skip to content

Update and align Sharp version across src/ and root; drop m1lly ESM shim #65

Description

@jdub233

The src/package.json (the deployed lambda) pins sharp: ^0.31.3 (December 2022), while root devDependencies is on ^0.33.1. Tests run against a different Sharp than production. Sharp 0.33 is ESM-native, which makes the createCommonJS/require shim at the top of src/getOrCreateObject/resizeAndSave.js (and the mlly dependency that supports it) unnecessary.

Goals

  • Bump src/package.json sharp to ^0.33.x
  • Remove the mlly import and createCommonJS block in resizeAndSave.js
  • Replace with a direct import sharp from 'sharp'
  • Drop mlly from src/package.json dependencies if no longer referenced
  • Verify sam build -u resolves the Linux native binary correctly (Sharp 0.33 changed its native-binary distribution to optional deps)
  • npm test passes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions