Skip to content

Conversation

marcins
Copy link
Contributor

@marcins marcins commented Sep 12, 2025

Motivation

We want to interate / experiment with changes to source maps, and currently as an external library this is complicated. If we in-source the source map library we are free to make breaking changes that suit our use cases and Atlaspack more directly.

Changes

  • Bring in the Rust crate for parcel_sourcemap
  • Update usages in our Rust code to use our crate
  • Have to bring in upstream parcel_sourcemap for the native CSS Transformer as it expects a parcel_sourcemap as input
  • Create a new @atlaspack/source-map package that is what @parcel/source-map was
  • Update any references and tests to ensure everything works

Checklist

  • Existing or new tests cover this change
  • There is a changeset for this change, or one is not required
  • Added documentation for any new features to the docs/ folder

Copy link

changeset-bot bot commented Sep 12, 2025

🦋 Changeset detected

Latest commit: 17c0457

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

This PR includes changesets to release 113 packages
Name Type
@atlaspack/parcel-to-atlaspack Minor
@atlaspack/transformer-typescript-types Minor
@atlaspack/transformer-typescript-tsc Minor
@atlaspack/eslint-plugin-internal Minor
@atlaspack/optimizer-inline-requires Minor
@atlaspack/integration-tests Minor
@atlaspack/types-internal Minor
@atlaspack/feature-flags Minor
@atlaspack/optimizer-cssnano Minor
@atlaspack/transformer-babel Minor
@atlaspack/eslint-config Minor
@atlaspack/optimizer-terser Minor
@atlaspack/transformer-less Minor
@atlaspack/transformer-sass Minor
@atlaspack/transformer-css Minor
@atlaspack/source-map Minor
@atlaspack/transformer-js Major
@atlaspack/optimizer-css Minor
@atlaspack/optimizer-swc Minor
@atlaspack/packager-css Minor
@atlaspack/packager-js Minor
@atlaspack/utils Minor
@atlaspack/core Minor
@atlaspack/rust Minor
atlaspack Patch
@atlaspack/bundler-default Patch
@atlaspack/codeframe Patch
@atlaspack/fs Patch
@atlaspack/graph Patch
@atlaspack/logger Patch
@atlaspack/plugin Patch
@atlaspack/profiler Patch
@atlaspack/types Patch
@atlaspack/workers Patch
@atlaspack/reporter-bundle-buddy Patch
@atlaspack/resolver-tesseract Patch
@atlaspack/runtime-js Patch
@atlaspack/transformer-postcss Patch
@atlaspack/transformer-xml Patch
@atlaspack/ts-utils Patch
@atlaspack/bundler-experimental Patch
@atlaspack/cache Patch
@atlaspack/cli Patch
@atlaspack/packager-html Patch
@atlaspack/reporter-cli Patch
@atlaspack/reporter-conditional-manifest Patch
@atlaspack/runtime-react-refresh Patch
@atlaspack/transformer-html Patch
@atlaspack/transformer-react-refresh-wrap Patch
@atlaspack/node-resolver-core Patch
@atlaspack/config-repl Patch
@atlaspack/eslint-config-browser Patch
@atlaspack/config-default Major
@atlaspack/package-manager Patch
@atlaspack/test-utils Patch
@atlaspack/link Patch
@atlaspack/bundle-stats Patch
@atlaspack/optimizer-blob-url Patch
@atlaspack/optimizer-data-url Patch
@atlaspack/optimizer-image Major
@atlaspack/optimizer-svgo Patch
@atlaspack/packager-raw-url Patch
@atlaspack/packager-svg Patch
@atlaspack/packager-webextension Patch
@atlaspack/packager-xml Patch
@atlaspack/reporter-build-metrics Patch
@atlaspack/reporter-bundle-analyzer Patch
@atlaspack/reporter-bundle-stats Patch
@atlaspack/reporter-dev-server-sw Patch
@atlaspack/reporter-dev-server Patch
@atlaspack/reporter-json Patch
@atlaspack/reporter-lsp Patch
@atlaspack/reporter-sourcemap-visualiser Patch
@atlaspack/reporter-tracer Patch
@atlaspack/resolver-glob Patch
@atlaspack/runtime-browser-hmr Patch
@atlaspack/runtime-service-worker Patch
@atlaspack/runtime-webextension Patch
@atlaspack/transformer-image Major
@atlaspack/transformer-posthtml Patch
@atlaspack/transformer-webextension Patch
@atlaspack/transformer-webmanifest Patch
@atlaspack/watcher-watchman-js Patch
@atlaspack/validator-eslint Patch
@atlaspack/validator-typescript Patch
@atlaspack/config-webextension Major
@atlaspack/register Patch
@atlaspack/query Patch
@atlaspack/transformer-svg Patch
@atlaspack/bundler-library Patch
@atlaspack/compressor-brotli Patch
@atlaspack/compressor-gzip Patch
@atlaspack/compressor-raw Patch
@atlaspack/namer-default Patch
@atlaspack/optimizer-htmlnano Patch
@atlaspack/packager-raw Patch
@atlaspack/packager-ts Patch
@atlaspack/packager-wasm Patch
@atlaspack/resolver-default Patch
@atlaspack/resolver-repl-runtimes Patch
@atlaspack/transformer-glsl Patch
@atlaspack/transformer-graphql Patch
@atlaspack/transformer-inline-string Patch
@atlaspack/transformer-inline Patch
@atlaspack/transformer-json Patch
@atlaspack/transformer-jsonld Patch
@atlaspack/transformer-mdx Patch
@atlaspack/transformer-pug Patch
@atlaspack/transformer-raw Patch
@atlaspack/transformer-svg-react Patch
@atlaspack/transformer-toml Patch
@atlaspack/transformer-worklet Patch
@atlaspack/transformer-yaml 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

Copy link

ferris-atlaspack-bot bot commented Sep 12, 2025

🦀 Ferris' Rust Changeset Check

I can see you have now included @atlaspack/rust in your changeset. This means your Rust changes will be published.
Now I'm a happy crab 🦀🎉

@@ -73,6 +74,16 @@ impl From<ParcelSourceMap> for SourceMap {
}
}

impl From<ParcelSourceMapExt> for SourceMap {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is only needed by the CSS transformer, I should probably just move this conversion in there directly?

Copy link
Contributor Author

@marcins marcins Sep 12, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@marcins marcins Sep 12, 2025

Choose a reason for hiding this comment

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

This whole folder is a copy of https://github.com/parcel-bundler/source-map/tree/master/parcel_sourcemap

Merging this into the existing atlaspack_sourcemap would be a next step, as that crate is (mostly) a wrapper around this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The files in here are mostly copied from https://github.com/parcel-bundler/source-map/tree/master/src, with a conversion to TS and other minor changes to make things work with TS.

@marcins marcins force-pushed the mszczepanski/insource-source-map branch from d7904d4 to 17c0457 Compare September 15, 2025 21:02
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.

1 participant