Skip to content

make resolution failures more appealing - #5551

Merged
Rich-Harris merged 2 commits into
masterfrom
gh-5543
Jul 15, 2022
Merged

Rich-Harris merged 2 commits into
masterfrom
gh-5543

Conversation

@Rich-Harris

@Rich-Harris Rich-Harris commented Jul 15, 2022 •

Copy link
Copy Markdown
Member

closes #5543.

before:

image

after:

image

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot

changeset-bot Bot commented Jul 15, 2022 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c92bfb9

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

This PR includes changesets to release 2 packages
Name Type
@sveltejs/adapter-vercel Patch
@sveltejs/adapter-auto 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

@Rich-Harris Rich-Harris changed the title make resolution failures more appealing - closes #5543 make resolution failures more appealing Jul 15, 2022
@Rich-Harris
Rich-Harris merged commit bbb8a8e into master Jul 15, 2022
@Rich-Harris
Rich-Harris deleted the gh-5543 branch July 15, 2022 18:54
elliott-with-the-longest-name-on-github pushed a commit that referenced this pull request Nov 18, 2026
…es (#17802)

Fixes #17801

Packages such as Resend dynamically import optional peers for features
an application may never use. NFT conservatively traces those imports,
so adapter-vercel currently reports a missing optional peer on every
build even when its absence is intentional.

The adapter now consults the nearest importing package's manifest before
reporting a recognized resolution failure. It suppresses the warning
only when the dependency is declared as a peer with
`peerDependenciesMeta[name].optional === true` and the package is absent
from Node's resolution search paths. Scoped and unscoped subpath imports
are covered. Installed peers with broken entry points, subpaths, or
dangling symlinks still warn. Metadata is cached per function bundle,
and lookup does not cross `node_modules` into another package's
declarations.

NFT tracing remains intact. Its introduction in
#4969 enabled native dependencies
and correct linked-package layouts, which installed optional features
still need. Ignoring optional imports during tracing would risk omitting
those features from deployments; this change affects warning
classification instead. The readable warning grouping from
#5551 and unknown-format fallback
from #7312 remain unchanged, as do
parse-error handling and the filesystem protections from
#16972.

The shared function-bundle path covers ESM/CJS dependencies and all
generated Vercel function types. Regression coverage distinguishes
absent optional peers from required dependencies and broken
installations, and protects bundling and execution when an optional
feature is unused.

- [Pinned Resend
reproduction](https://www.sveltelab.dev/#code=N4IgzgTgxiBcoBMCWECmUAuB7CBPOoAhgA7EB0AFhgMYA2BIAZkrag1FgHYardhwgAPAEIEWTLmKoABFToA%2BADqdBc2tNqFOAcwC8ikLwNLOijKtSEEJs2cHVUGQtKgVCEMI-0gArhkYAtAAcBtIA9DYYdg5O0pyEDt4AbkioAO7EOFEgLlw83N5pSAgYFLoIqClQqAFFJRQANNJInEgYSIS0AWBQnai6AIyhEcq25jHO8YkGPAAeGN29rKEc3LwY3j19w5FmAKRgSai0PADWbZSWCHuj5mEUV5GCAEZYCLjSCIRO3UcnqOcFsQ0LQsFYAl8nN4KFgjhBjLc7MgktIwBhcKxvMgwMRNLhYLk1nxjAc-mcLq93ntBGFkU8wpTcCYaWoTCAAL7shogEjkBBkDD8eBMFhsYWrfKCgRhMLSADKqBkVAwxDAsBlh2OPDIFSStPEYDCgLC6KkYAAxLydQKwMoZdJGDhmpxHRBqN8kFxpIRXn5pKVUJ5nTwIIxCNVbZwKlBNGhpNpQc9OtJgLcpoHiOGZABBUgpxEYe0tENh6rSACiEAgTuA7ILRbWoaz0gAMuJOmAU3XTFFC7Li6gm2WAAqEbSoAAi32ctfr-cbpZko-HcqcPC7c%2BDg8X0mHmn8OGoG573e7ylQs0yEAwXYA3MoOVyQNW-IGGMg0JgcPhhQBqTPjmQngQHCNoMMwrDsHk6xCiASDUFeN7ANIABKga8Ag0jsg61ZHgA5GgnhRnh96mJwF6IQ6PicJgnqcBoYIIAAFAAlPmParGi0iERh0i6HE6SoehUZMQRqAAPoXgkuKoHhLGkWYaAYD4ED0chLRtB0tBIAAXqgCAEgAQlgWCsFoTE8VGZCoO6LBgGx7Kkd2j7cv%2BY6oEBZJiqAEHeSAEowQIgg9BASDEDemg6N4goIj2rBIZ805YXx0gACTAlgqqsaRNIhWFGA2CoFADPIaFEZhGntJ0un6QSwCrqFOhMZChBkJVWk1QgLHsiyJUPpyrl4lgfieVqfm%2BVBRJSrAQh5eFGhaHoMy2iAkTxSmLgUCwCBoPR2H8el1ZZfJyi5VAoXhYVwAAAK7RUECbdtu2sc5nJvU%2BgqrMw2hkAAVmAXDgaKk2SrBqY9gYF75AgK0EgYqW8iaPRcN9BgNIi-lYAhooQAA8uFdGw%2BxYwGGioWYAYBIYBAPioLcXIYy0MY%2BBUlPSAA2qT0Bo9IBgpNqX1ID9MUgAAusor1PpmUCnO5f0A5wQOQeK0F8AI4O2CA6ZswYgIBAMADsQQAAxDCA6MQyAcJgHROsgMbZAO2bFua8CSBJN8dNwP6NOoC72Sml7cMgNQbw%2BMs5sY3NIt1QWBi6nb-MyAnkcQ9kzw%2BNtidtDIGdZ6nJMgMClSpGk2frsXKTpAY9P%2B-HqBSFGvBQKkRMa72BiWQgdsAGxkAAzEEZBm7XGO6hODcYc3rds%2B3mvXZq-z-WEVgkCGARwtUtB2wbjtkAALGjccgAvXnL4Cdv9wPjtH2nBin2Ny9JwEuI%2BNoLS-GNO-X87x%2BLzwdsACsZBAG737rfQugdo69z3uAguHcrY5ztkPK%2BIQQD0wlv1J8ScyCC2FkKHywMVZTVgvBSiq9wqDhwljaQeEH5L0NBQ9em9jgkWUGQrIG1-4AjaMlRguFaH0J4OfNoYQk5sNaAhThyEKjMHIgAYRRkLPhAi8LiIUuRS8nDZGEHDjeWRLRUCKJdELJi7dX7v04GqDm3DARmO9F8ShEACRMMHKxLCLFxacHZCdRWb0gA)

<!--
svelte-triage-bot:feedback-baseline:3a1d8b7b61f6e88735c3916740f576e6fd07e5c1
-->

Co-authored-by: svelte-triage-bot <[email protected]>

This branch was successfully deployed

2 active deployments
Preview – kit-svelte-dev — c92bfb90 Deployed Jul 15, 2022 by vercel[bot]
Preview – kit — c92bfb90 Deployed Jul 15, 2022 by vercel[bot]
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.

vercel adapter 1.0.0-next.62 build errors with Cannot find module..

2 participants