Commit Graph

10 Commits

Author SHA1 Message Date
Natalie Weizenbaum
0595ac3e71
Fix an import-resolution bug (#488)
When a stylesheet is imported, the parsed stylesheet object is cached
based on its canonical URL. However, the stylesheet.span.sourceUrl was
based on the text of the import that was used to load that stylesheet.
The idea was to make the source URL in stack traces look nicer, but it
meant that relative URLs could be resolved based on the old importer's
URL before being sent to the new importer, which caused bugs.

Now stylesheet.span.sourceUrl is always the canonical URL of the
stylesheet, and thus safe to cache. We then use the import cache to
convert the canonical URL to a human-friendly URL at the point at
which we generate stack traces.

This also deprecates support for relative canonical URLs. The
semantics of these URLs were always unclear, and with the new change
in import internals the old behavior doesn't make much sense. It's
preserved for backwards-compatibility, but deprecated.
2018-10-11 15:06:26 -07:00
Natalie Weizenbaum
c5071ef843 Stop using a deprecated API 2018-06-15 13:59:28 -07:00
Natalie Weizenbaum
d4655f22bd
Fix an Importer-calling bug (#338)
We were resolving URLs relative to the canonical URL rather than the
original URL, which broke importers for which those were different,
like the package importer.

Closes #334
2018-05-30 17:47:37 -04:00
Natalie Weizenbaum
4c6494c288 Add a Logger class to control how output is emitted 2018-03-11 21:05:34 -07:00
Natalie Weizenbaum
163e99bff2 Be explicit about string quotes in new SassString() 2018-02-02 16:47:54 -08:00
Natalie Weizenbaum
123fe55017 Add SassString index helpers
We aren't using these in our own functions because, for
backwards-compatibility, these functions don't throw errors for
invalid indices.
2018-01-14 16:04:46 -08:00
Natalie Weizenbaum
b1b9eca66a
Add tests for SassNumber.valueInRange() (#212) 2018-01-14 15:18:16 -08:00
Natalie Weizenbaum
9d207b13ec
SassNumber.assertIndexFor() -> Value.sassIndexToListIndex() (#211) 2018-01-14 13:38:43 -08:00
Natalie Weizenbaum
ce1cc18c0e Add tests for Value subclasses
Now that these are an exposed part of the API, they need to be tested.
2018-01-13 00:34:54 -08:00
Natalie Weizenbaum
a003e5c31f Expose a Dart API for importers
Closes #172
2017-10-12 21:54:58 -07:00