developit / microbundle

📦 Zero-configuration bundler for tiny modules.
https://npm.im/microbundle
MIT License
8.07k stars 363 forks source link

fix: Incorrect UMD sourcemaps #1043

Open rschristian opened 1 year ago

rschristian commented 1 year ago

Fixes #1041

magic-string is of course used by a ton of Rollup plugins, so this doesn't actually add anything to the dep tree.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 1b40474d369a8c8ea0995ae3d78ec5a66fae1ddc

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

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | microbundle | 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

github-actions[bot] commented 1 year ago

Size Change: 0 B

Total Size: 65.3 kB

ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `test/fixtures/alias-external/dist/alias-external.esm.mjs` | 85 B | | `test/fixtures/alias-external/dist/alias-external.js` | 80 B | | `test/fixtures/alias-external/dist/alias-external.umd.js` | 140 B | | `test/fixtures/alias/dist/alias-mapping.esm.mjs` | 62 B | | `test/fixtures/alias/dist/alias-mapping.js` | 62 B | | `test/fixtures/alias/dist/alias-mapping.umd.js` | 118 B | | `test/fixtures/async-iife-ts/dist/async-iife-ts.esm.mjs` | 114 B | | `test/fixtures/async-iife-ts/dist/async-iife-ts.js` | 111 B | | `test/fixtures/async-iife-ts/dist/async-iife-ts.umd.js` | 161 B | | `test/fixtures/async-iife-ts/dist/index.d.ts` | 20 B | | `test/fixtures/async-ts/dist/async-ts.esm.mjs` | 159 B | | `test/fixtures/async-ts/dist/async-ts.js` | 149 B | | `test/fixtures/async-ts/dist/async-ts.umd.js` | 247 B | | `test/fixtures/async-ts/dist/index.d.ts` | 75 B | | `test/fixtures/basic-babelrc/dist/basic-babelrc.esm.mjs` | 160 B | | `test/fixtures/basic-babelrc/dist/basic-babelrc.js` | 157 B | | `test/fixtures/basic-babelrc/dist/basic-babelrc.umd.js` | 198 B | | `test/fixtures/basic-compress-false/dist/basic-compress-false.esm.mjs` | 302 B | | `test/fixtures/basic-compress-false/dist/basic-compress-false.js` | 300 B | | `test/fixtures/basic-compress-false/dist/basic-compress-false.umd.js` | 422 B | | `test/fixtures/basic-css/dist/basic-css.css` | 106 B | | `test/fixtures/basic-css/dist/basic-css.esm.mjs` | 143 B | | `test/fixtures/basic-css/dist/basic-css.js` | 139 B | | `test/fixtures/basic-css/dist/basic-css.umd.js` | 227 B | | `test/fixtures/basic-dashed-external/dist/basic-dashed-external.esm.mjs` | 256 B | | `test/fixtures/basic-dashed-external/dist/basic-dashed-external.js` | 312 B | | `test/fixtures/basic-dashed-external/dist/basic-dashed-external.umd.js` | 395 B | | `test/fixtures/basic-flow/dist/basic-lib-flow.esm.mjs` | 104 B | | `test/fixtures/basic-flow/dist/basic-lib-flow.js` | 100 B | | `test/fixtures/basic-flow/dist/basic-lib-flow.umd.js` | 206 B | | `test/fixtures/basic-json/dist/basic-json.esm.mjs` | 128 B | | `test/fixtures/basic-json/dist/basic-json.js` | 125 B | | `test/fixtures/basic-json/dist/basic-json.umd.js` | 217 B | | `test/fixtures/basic-multi-source-css/dist/a.css` | 97 B | | `test/fixtures/basic-multi-source-css/dist/a.esm.mjs` | 135 B | | `test/fixtures/basic-multi-source-css/dist/a.js` | 130 B | | `test/fixtures/basic-multi-source-css/dist/a.umd.js` | 226 B | | `test/fixtures/basic-multi-source-css/dist/b.css` | 96 B | | `test/fixtures/basic-multi-source-css/dist/b.esm.mjs` | 135 B | | `test/fixtures/basic-multi-source-css/dist/b.js` | 131 B | | `test/fixtures/basic-multi-source-css/dist/b.umd.js` | 227 B | | `test/fixtures/basic-multi-source/dist/a.esm.mjs` | 78 B | | `test/fixtures/basic-multi-source/dist/a.js` | 73 B | | `test/fixtures/basic-multi-source/dist/a.umd.js` | 133 B | | `test/fixtures/basic-multi-source/dist/b.esm.mjs` | 78 B | | `test/fixtures/basic-multi-source/dist/b.js` | 73 B | | `test/fixtures/basic-multi-source/dist/b.umd.js` | 133 B | | `test/fixtures/basic-no-compress/dist/basic-no-compress.esm.mjs` | 300 B | | `test/fixtures/basic-no-compress/dist/basic-no-compress.js` | 298 B | | `test/fixtures/basic-no-compress/dist/basic-no-compress.umd.js` | 422 B | | `test/fixtures/basic-no-pkg-main/dist/basic-no-pkg-main.js` | 315 B | | `test/fixtures/basic-node-internals/dist/basic-node-internals.js` | 232 B | | `test/fixtures/basic-ts/dist/basic-lib-ts.esm.mjs` | 156 B | | `test/fixtures/basic-ts/dist/basic-lib-ts.js` | 153 B | | `test/fixtures/basic-ts/dist/basic-lib-ts.umd.js` | 235 B | | `test/fixtures/basic-ts/dist/car.d.ts` | 117 B | | `test/fixtures/basic-ts/dist/index.d.ts` | 83 B | | `test/fixtures/basic-tsx/dist/basic-lib-tsx.esm.mjs` | 254 B | | `test/fixtures/basic-tsx/dist/basic-lib-tsx.js` | 246 B | | `test/fixtures/basic-tsx/dist/basic-lib-tsx.umd.js` | 331 B | | `test/fixtures/basic-tsx/dist/index.d.ts` | 69 B | | `test/fixtures/basic-with-cwd/basic/dist/basic.esm.mjs` | 224 B | | `test/fixtures/basic-with-cwd/basic/dist/basic.js` | 221 B | | `test/fixtures/basic-with-cwd/basic/dist/basic.umd.js` | 301 B | | `test/fixtures/basic/dist/basic-lib.esm.mjs` | 227 B | | `test/fixtures/basic/dist/basic-lib.js` | 224 B | | `test/fixtures/basic/dist/basic-lib.umd.js` | 307 B | | `test/fixtures/class-decorators-ts/dist/class-decorators-ts.esm.mjs` | 388 B | | `test/fixtures/class-decorators-ts/dist/class-decorators-ts.js` | 386 B | | `test/fixtures/class-decorators-ts/dist/class-decorators-ts.umd.js` | 451 B | | `test/fixtures/class-decorators-ts/dist/index.d.ts` | 123 B | | `test/fixtures/class-properties/dist/class-properties.esm.mjs` | 140 B | | `test/fixtures/class-properties/dist/class-properties.js` | 135 B | | `test/fixtures/class-properties/dist/class-properties.umd.js` | 235 B | | `test/fixtures/css-modules--false/dist/css-modules--false.css` | 114 B | | `test/fixtures/css-modules--false/dist/css-modules--false.esm.mjs` | 52 B | | `test/fixtures/css-modules--false/dist/css-modules--false.js` | 49 B | | `test/fixtures/css-modules--false/dist/css-modules--false.umd.js` | 156 B | | `test/fixtures/css-modules--null/dist/css-modules--null.css` | 118 B | | `test/fixtures/css-modules--null/dist/css-modules--null.esm.mjs` | 112 B | | `test/fixtures/css-modules--null/dist/css-modules--null.js` | 110 B | | `test/fixtures/css-modules--null/dist/css-modules--null.umd.js` | 200 B | | `test/fixtures/css-modules--string/dist/css-modules--string.css` | 144 B | | `test/fixtures/css-modules--string/dist/css-modules--string.esm.mjs` | 168 B | | `test/fixtures/css-modules--string/dist/css-modules--string.js` | 166 B | | `test/fixtures/css-modules--string/dist/css-modules--string.umd.js` | 263 B | | `test/fixtures/css-modules--true/dist/css-modules--true.css` | 115 B | | `test/fixtures/css-modules--true/dist/css-modules--true.esm.mjs` | 141 B | | `test/fixtures/css-modules--true/dist/css-modules--true.js` | 139 B | | `test/fixtures/css-modules--true/dist/css-modules--true.umd.js` | 230 B | | `test/fixtures/custom-babelrc/dist/custom-babelrc.esm.mjs` | 259 B | | `test/fixtures/custom-babelrc/dist/custom-babelrc.js` | 252 B | | `test/fixtures/custom-babelrc/dist/custom-babelrc.umd.js` | 343 B | | `test/fixtures/custom-outputs-alt/dist/custom-outputs-alt.cjsmain.js` | 233 B | | `test/fixtures/custom-outputs-alt/dist/custom-outputs-alt.esmodule.mjs` | 158 B | | `test/fixtures/custom-outputs-alt/dist/custom-outputs-alt.jsnextmain.mjs` | 236 B | | `test/fixtures/custom-outputs-alt/dist/custom-outputs-alt.unpkg.js` | 316 B | | `test/fixtures/custom-outputs/dist/custom-outputs.exportsx.mjs` | 153 B | | `test/fixtures/custom-outputs/dist/custom-outputs.js` | 226 B | | `test/fixtures/custom-outputs/dist/custom-outputs.modulex.mjs` | 232 B | | `test/fixtures/custom-outputs/dist/custom-outputs.umdx.js` | 309 B | | `test/fixtures/custom-source-with-cwd/custom-source/dist/custom-src.esm.mjs` | 227 B | | `test/fixtures/custom-source-with-cwd/custom-source/dist/custom-src.js` | 224 B | | `test/fixtures/custom-source-with-cwd/custom-source/dist/custom-src.umd.js` | 306 B | | `test/fixtures/custom-source/dist/custom-source.esm.mjs` | 227 B | | `test/fixtures/custom-source/dist/custom-source.js` | 224 B | | `test/fixtures/custom-source/dist/custom-source.umd.js` | 307 B | | `test/fixtures/default-named/dist/default-named.esm.mjs` | 116 B | | `test/fixtures/default-named/dist/default-named.js` | 97 B | | `test/fixtures/default-named/dist/default-named.umd.js` | 201 B | | `test/fixtures/define-expression/dist/define-expression.esm.mjs` | 56 B | | `test/fixtures/define/dist/define.esm.mjs` | 55 B | | `test/fixtures/define/dist/define.js` | 55 B | | `test/fixtures/define/dist/define.umd.js` | 108 B | | `test/fixtures/esnext-ts/dist/esnext-ts.esm.mjs` | 1.05 kB | | `test/fixtures/esnext-ts/dist/esnext-ts.js` | 1.04 kB | | `test/fixtures/esnext-ts/dist/esnext-ts.umd.js` | 1.11 kB | | `test/fixtures/esnext-ts/dist/index.d.ts` | 68 B | | `test/fixtures/inline-source-map/dist/inline-source-map.esm.mjs` | 740 B | | `test/fixtures/inline-source-map/dist/inline-source-map.js` | 739 B | | `test/fixtures/inline-source-map/dist/inline-source-map.umd.js` | 827 B | | `test/fixtures/jsx/dist/jsx.esm.mjs` | 267 B | | `test/fixtures/jsx/dist/jsx.js` | 264 B | | `test/fixtures/jsx/dist/jsx.umd.js` | 341 B | | `test/fixtures/macro/dist/macro-lib.esm.mjs` | 88 B | | `test/fixtures/macro/dist/macro-lib.js` | 84 B | | `test/fixtures/macro/dist/macro-lib.umd.js` | 187 B | | `test/fixtures/mangle-json-file/dist/mangle-json-file.esm.mjs` | 148 B | | `test/fixtures/mangle-json-file/dist/mangle-json-file.js` | 143 B | | `test/fixtures/mangle-json-file/dist/mangle-json-file.umd.js` | 235 B | | `test/fixtures/minify-config-boolean/dist/minify-config-boolean.esm.mjs` | 161 B | | `test/fixtures/minify-config-boolean/dist/minify-config-boolean.js` | 152 B | | `test/fixtures/minify-config-boolean/dist/minify-config-boolean.umd.js` | 254 B | | `test/fixtures/minify-config/dist/minify-config.esm.mjs` | 143 B | | `test/fixtures/minify-config/dist/minify-config.js` | 137 B | | `test/fixtures/minify-config/dist/minify-config.umd.js` | 226 B | | `test/fixtures/minify-path-config/dist/minify-path-config.esm.mjs` | 151 B | | `test/fixtures/minify-path-config/dist/minify-path-config.js` | 145 B | | `test/fixtures/minify-path-config/dist/minify-path-config.umd.js` | 237 B | | `test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/dist/minify-path-parent-dir.esm.mjs` | 153 B | | `test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/dist/minify-path-parent-dir.js` | 149 B | | `test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/dist/minify-path-parent-dir.umd.js` | 242 B | | `test/fixtures/modern-generators/dist/modern-generators.esm.mjs` | 282 B | | `test/fixtures/modern-generators/dist/modern-generators.js` | 279 B | | `test/fixtures/modern-generators/dist/modern-generators.modern.mjs` | 159 B | | `test/fixtures/modern-generators/dist/modern-generators.umd.js` | 358 B | | `test/fixtures/modern/dist/modern-lib.modern.mjs` | 152 B | | `test/fixtures/name-custom-amd/dist/name-custom-amd.esm.mjs` | 230 B | | `test/fixtures/name-custom-amd/dist/name-custom-amd.js` | 226 B | | `test/fixtures/name-custom-amd/dist/name-custom-amd.umd.js` | 312 B | | `test/fixtures/name-custom-cli/dist/name-custom.esm.mjs` | 227 B | | `test/fixtures/name-custom-cli/dist/name-custom.js` | 224 B | | `test/fixtures/name-custom-cli/dist/name-custom.umd.js` | 311 B | | `test/fixtures/no-pkg-name/dist/no-pkg-name.esm.mjs` | 229 B | | `test/fixtures/no-pkg-name/dist/no-pkg-name.js` | 225 B | | `test/fixtures/no-pkg-name/dist/no-pkg-name.umd.js` | 311 B | | `test/fixtures/no-pkg/dist/no-pkg.esm.mjs` | 225 B | | `test/fixtures/no-pkg/dist/no-pkg.js` | 222 B | | `test/fixtures/no-pkg/dist/no-pkg.umd.js` | 303 B | | `test/fixtures/optional-chaining-ts/dist/index.d.ts` | 107 B | | `test/fixtures/optional-chaining-ts/dist/optional-chaining-ts.esm.mjs` | 154 B | | `test/fixtures/optional-chaining-ts/dist/optional-chaining-ts.js` | 148 B | | `test/fixtures/optional-chaining-ts/dist/optional-chaining-ts.umd.js` | 247 B | | `test/fixtures/parameters-rest-closure/dist/parameters-rest-closure.esm.mjs` | 202 B | | `test/fixtures/parameters-rest-closure/dist/parameters-rest-closure.js` | 191 B | | `test/fixtures/parameters-rest-closure/dist/parameters-rest-closure.umd.js` | 283 B | | `test/fixtures/pretty/dist/pretty.esm.mjs` | 6.39 kB | | `test/fixtures/pretty/dist/pretty.js` | 6.37 kB | | `test/fixtures/pretty/dist/pretty.umd.js` | 6.5 kB | | `test/fixtures/publish-config/dist/bar.js` | 87 B | | `test/fixtures/publish-config/dist/foo.d.ts` | 60 B | | `test/fixtures/pure/dist/pure.esm.mjs` | 108 B | | `test/fixtures/pure/dist/pure.js` | 98 B | | `test/fixtures/pure/dist/pure.umd.js` | 197 B | | `test/fixtures/raw/dist/raw.esm.mjs` | 1.43 kB | | `test/fixtures/raw/dist/raw.js` | 1.42 kB | | `test/fixtures/raw/dist/raw.umd.js` | 1.53 kB | | `test/fixtures/shebang/dist/shebang.esm.mjs` | 125 B | | `test/fixtures/shebang/dist/shebang.js` | 118 B | | `test/fixtures/shebang/dist/shebang.umd.js` | 216 B | | `test/fixtures/terser-annotations/dist/terser-annotations.esm.mjs` | 179 B | | `test/fixtures/terser-annotations/dist/terser-annotations.js` | 171 B | | `test/fixtures/terser-annotations/dist/terser-annotations.umd.js` | 258 B | | `test/fixtures/ts-custom-declaration/dist/index.esm.mjs` | 100 B | | `test/fixtures/ts-custom-declaration/dist/index.js` | 89 B | | `test/fixtures/ts-custom-declaration/dist/index.umd.js` | 206 B | | `test/fixtures/ts-declaration/dist/index.esm.mjs` | 100 B | | `test/fixtures/ts-declaration/dist/index.js` | 89 B | | `test/fixtures/ts-declaration/dist/index.umd.js` | 202 B | | `test/fixtures/ts-jsx/dist/index.d.ts` | 52 B | | `test/fixtures/ts-jsx/dist/ts-jsx.esm.mjs` | 164 B | | `test/fixtures/ts-jsx/dist/ts-jsx.js` | 159 B | | `test/fixtures/ts-jsx/dist/ts-jsx.umd.js` | 252 B | | `test/fixtures/ts-mixed-exports/dist/car.d.ts` | 117 B | | `test/fixtures/ts-mixed-exports/dist/index.d.ts` | 89 B | | `test/fixtures/ts-mixed-exports/dist/ts-mixed-exports.esm.mjs` | 168 B | | `test/fixtures/ts-mixed-exports/dist/ts-mixed-exports.js` | 159 B | | `test/fixtures/ts-mixed-exports/dist/ts-mixed-exports.umd.js` | 261 B | | `test/fixtures/ts-module/dist/foo.d.ts` | 60 B | | `test/fixtures/ts-module/dist/index.d.ts` | 63 B | | `test/fixtures/ts-module/dist/ts-module.esm.mjs` | 108 B | | `test/fixtures/ts-module/dist/ts-module.js` | 97 B | | `test/fixtures/ts-module/dist/ts-module.umd.js` | 197 B | | `test/fixtures/visualizer/dist/visualizer.esm.mjs` | 119 B | | `test/fixtures/visualizer/dist/visualizer.js` | 177 B | | `test/fixtures/visualizer/dist/visualizer.umd.js` | 260 B | | `test/fixtures/worker-loader/dist/worker-35b22e56.js` | 125 B | | `test/fixtures/worker-loader/dist/worker-7e1b9921.js` | 107 B | | `test/fixtures/worker-loader/dist/worker-loader.esm.mjs` | 180 B | | `test/fixtures/worker-loader/dist/worker-loader.modern.mjs` | 174 B |

compressed-size-action