Skip to content

fix(sourcemaps): Handle null mappings properly#2149

Merged
devongovett merged 5 commits into
masterfrom
fix-null-mappings
Jan 7, 2019
Merged

fix(sourcemaps): Handle null mappings properly#2149
devongovett merged 5 commits into
masterfrom
fix-null-mappings

Conversation

@DeMoorJasper

Copy link
Copy Markdown
Member

↪️ Pull Request

This allows null mappings in parcels sourcemaps.
Creating more accurate sourcemaps.
Also adds a couple extra tests for sourcemaps, using the SourceMap class directly, giving a more in depth coverage of SourceMap

Closes #1825

Original PR: #1851

💻 Examples

🚨 Test instructions

Run unit tests

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@DeMoorJasper DeMoorJasper changed the title Fix handling null mappings in sourcemaps fix(sourcemaps): Handle null mappings properly Oct 17, 2018
@DeMoorJasper DeMoorJasper mentioned this pull request Jan 5, 2019
10 tasks
devongovett
devongovett previously approved these changes Jan 5, 2019
const fs = require('@parcel/fs');
const path = require('path');
const mapValidator = require('sourcemap-validator');
const SourceMap = require('../src/SourceMap');

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.

Looks like the tests are failing because of this import. Maybe this test should be inside the parcel-bundler package rather than the integration tests?

@DeMoorJasper DeMoorJasper Jan 6, 2019

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It probably should although maybe it would be a good idea to extract the sourcemap implementation into it's own package, for use in plugins and integration tests?

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.

yeah eventually

@devongovett

Copy link
Copy Markdown
Member

seems like some html minification tests are failing? doesn't seem related though

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.

Sourcemaps: null mappings not working as expected

2 participants