Skip to content

generator-only package #446

Open
Open

Description

@hildjj

I just made a relatively-aggressive fork here that removes the consumer code as well as the reliance on what-wg-url. I have kept all of the license, contributors, etc. in place. All of my changes are deletions and minor fixups to make the tests work.

The goal is to have something small to bundle with peggy's upcoming support for source-map generation.

I apologize for not discussing it here first. I would be happy to either keep the new repo in sync with whatever changes are made here, or defork and hand over the keys to npm if this project is interested in publishing something that uses the name.

Please let me know if it concerns you or you'd like me to take some other action.

Activity

  1. cspotcode commented on Aug 30, 2021

    @cspotcode

    I also needed to make a fork to add a sync WASM API and publish a consumer-only package. Would you like to combine our efforts? We could move the project to a shared, neutral location if you would like.

    http://npm.im/@cspotcode/source-map
    http://npm.im/@cspotcode/source-map-consumer
    https://github.com/cspotcode/source-map

  2. hildjj commented on Sep 23, 2022

    @hildjj
    ContributorAuthor

    Sorry, I missed your note when it came by the first time, @cspotcode. I'm happy to collaborate. I'll send a note to the email in your package to discuss.

  3. cspotcode commented on Sep 23, 2022

    @cspotcode

    No worries, that's how it goes with open-source. It was actually a year and a month ago, haha.

    I got your email but I prefer to keep all my OSS communications in the open; avoids the need to repeat things. Mind if we keep discussion here or in a new issue? Either works for me.

  4. hildjj commented on Sep 24, 2022

    @hildjj
    ContributorAuthor

    Here is fine. I think the first step is to write a little doc that describes the different sub-libraries, how they would fit together, how we would transition to that system, and what changes would need to be made to existing users of the system.

  5. cspotcode commented on Sep 24, 2022

    @cspotcode

    In the year since my post above, I actually ended up removing my source-map dependency in favor of another library. It seemed like other components of the ecosystem were doing the same, I wanted to reduce maintenance burden by going for something that seemed to be independently maintained. And for my purposes, I only needed a consumer, not a generator.

    https://github.com/cspotcode/node-source-map-support/blame/69baeb8ccbf9f2a342c8575f21ac81f5d711eb81/package.json#L21-L23

    So maybe another thing to figure out in that doc: is it worth maintaining this library? Since the ownership transfer from mozilla is still uncertain.

    I'm generally in favor of less churn, and maintaining long-standing tools. But at the same time, I don't want to create unnecessary work.

  6. hildjj commented on Sep 24, 2022

    @hildjj
    ContributorAuthor

    I haven't looked deeply into node's native source-map consumer yet. I wonder if it should be mentiond as well? https://nodejs.org/api/module.html#class-modulesourcemap

  7. cspotcode commented on Sep 24, 2022

    @cspotcode

    I think the native one has bad performance compared to third-party options. A while back there was a node stack trace bug that generated a bunch of conversation, and as part of that, I linked to a benchmark: nodejs/node#42417 (comment)

  8. hildjj commented on Sep 24, 2022

    @hildjj
    ContributorAuthor

    Is the perf still that bad after nodejs/node#41541 landed?

  9. cspotcode commented on Sep 24, 2022

    @cspotcode

    I'm not sure, the benchmarks could be re-run against a new node version.

  10. cspotcode commented on Sep 24, 2022

    @cspotcode

    New results don't look better: https://github.com/cspotcode/source-map-performance-demo#example-output

    Maybe you can double-check my results. Running the benchmark is git clone ; yarn or npm install and then yarn start to build and run the benchmark.

  11. hildjj commented on Sep 25, 2022

    @hildjj
    ContributorAuthor

    I see similar results here.

    Results for 10000 stack traces.

    node compiler options stack_traces_correct elapsed_ms
    18.9.1 esbuild --enable-source-maps ❌ 220405
    18.9.1 esbuild -r @cspotcode/source-map-support/register ✅ 264
    18.9.1 esbuild -r source-map-support/register ❌ 342
    18.9.1 esbuild 100
    18.9.1 tsc --enable-source-maps ❌ 944
    18.9.1 tsc -r @cspotcode/source-map-support/register ✅ 256
    18.9.1 tsc -r source-map-support/register ❌ 266
    18.9.1 tsc 119
  12. hildjj commented on Sep 26, 2022

    @hildjj
    ContributorAuthor

    I started a doc here: https://github.com/hildjj/source-map-architecture

    Please open issues there and send PRs.

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

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions