Skip to content

fix(adapter-node): merge sourcemaps#10069

Merged
dummdidumm merged 7 commits intoadapter-node-externalizefrom
adapter-node-sourcemaps
Jun 26, 2023
Merged

fix(adapter-node): merge sourcemaps#10069
dummdidumm merged 7 commits intoadapter-node-externalizefrom
adapter-node-sourcemaps

Conversation

@gtm-nayan
Copy link
Copy Markdown
Contributor

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

This targets the branch for #10041.

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
Copy Markdown

changeset-bot bot commented May 31, 2023

🦋 Changeset detected

Latest commit: 3dc5acd

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 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

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
if (!should_process_sourcemaps(id)) return;
if (!existsSync(`${id}.map`)) return;
const [code, map] = await Promise.all([
readFile(id, 'utf-8'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this using readFile when other places use readFileSync? Is this really an observable performance difference?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is reading two files in parallel, so I think readFile would be more performant here, so if we want to standardize I think I'd rather use readFile than readFileSync

@dummdidumm dummdidumm merged commit 984e602 into adapter-node-externalize Jun 26, 2023
@dummdidumm dummdidumm deleted the adapter-node-sourcemaps branch June 26, 2023 11:48
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.

3 participants