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: Remove unneeded entry from an identity source map #115

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

kota65535
Copy link
Contributor

@kota65535 kota65535 commented Jun 19, 2023

Thank you for releasing v5.0.0-rc.1!
I'm trying it in my projects to confirm #101 is now resolved, but found a little bug.

As I stated here, we create an identity source map to ensure the 1st and the 2nd instrumented codes have the same number of lines. More precisely, the identity source map and the source map obtained by this.getCombinedSourcemap() must have the same number of entries, otherwise the final source map will have incorrect line numbers.

This PR removes the unneeded file entry from an identity source map.

    inputSourceMap: {
      version: 3,
      mappings: "AA2BI,mBAGM,cAHN;;;;;;;;;...",
      names: ["useEffect", "useState", ...],
      sources: ["/mnt/src/pages/index.tsx"],
      file: "/mnt/src/pages/index.tsx"          // <- NOT NEEDED!
    },

@kota65535 kota65535 changed the title Remove file entry from source map fix: Remove unneeded entry from an identity source map Jun 19, 2023
@iFaxity
Copy link
Owner

iFaxity commented Jun 19, 2023

Hello @kota65535,

I see, yes I see, good find. I will accept the PR and queue it out for a new release on the the "next" tag.

@iFaxity iFaxity merged commit 118ecd5 into iFaxity:next Jun 19, 2023
@github-actions
Copy link
Contributor

🎉 This PR is included in version 5.0.0-rc.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants