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

chore: remove build step for adapter node #10041

Merged
merged 20 commits into from
Jun 30, 2023
Merged

Conversation

gtm-nayan
Copy link
Contributor

@gtm-nayan gtm-nayan commented May 26, 2023

todos:

  • check paths work on windows

maybe this addresses #10040, not sure

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

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

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. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@changeset-bot
Copy link

changeset-bot bot commented May 26, 2023

🦋 Changeset detected

Latest commit: 1a6ce3e

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-node Minor

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

@gtm-nayan
Copy link
Contributor Author

gtm-nayan commented May 26, 2023

It doesn't work on windows, what a surprise. But only the sverdle page, whyyyyyyyyyy

Nvm, I'm dum and the server on WSL wasn't killed properly

@gtm-nayan
Copy link
Contributor Author

#10040 could be solved by either reading the files directly from outDir/output/server

Are there any downsides to that?

Alternatively copying them to a folder adjacent to outDir/output/server so that the relative paths stay in the correct location.

But both of those require the adpater to know that the files are in outDir/output/server

@Conduitry
Copy link
Member

Ah, I see you've removed undici in your latest commit. I was going to ask 'Why does the adapter need that directly? Doesn't it get it via @sveltejs/kit/node/polyfills?'

I think this is an exciting change. When we were running into the memory leak issue in undici, I remember there was confusion arising from how only bumping the version in Kit wasn't enough to get the fix out to people, because adapter-node was bundling it. That's reason enough alone to stop bundling this, I think.

I see that adapter-cloudflare and adapter-netlify also have build steps. I'm not entirely sure that adapter-cloudflare's is doing, but it looks like adapter-netlify's build step is also bundling @sveltejs/kit/node/polyfills, so it would be great to also stop bundling that (in another PR).

@gtm-nayan
Copy link
Contributor Author

Also updated it to copy files to an adjacent directory, relative paths in sourcemaps should resolve correctly that way. Which should perhaps fix #10040 , @danieldiekmeier can you link to this PR and check?

Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
@cpriestland
Copy link

Any chance this could get fixed and remerged? It got reverted and still having problems with source maps not working.

@iandoesallthethings
Copy link

Any chance this could get fixed and remerged? It got reverted and still having problems with source maps not working.

Adding to the noise here since I haven't seen any movement! Source maps are still wonky for sveltekit with adapter-node + sentry and it's making them very hard to use.

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.

8 participants