Commit Graph

46 Commits

Author SHA1 Message Date
Natalie Weizenbaum
a9a3946fb4
Use node_interop rather than manually declaring Node APIs (#1127) 2020-10-28 15:00:05 -07:00
awjin
21a1c58b20 Don't read file if Node importer returns file and contents.
Instead, use `contents` with `file` as the canonical url.

Closes https://github.com/sass/dart-sass/issues/975.
2020-04-24 17:38:30 -07:00
Jennifer Thakar
7160b6426d
Add missing constants to JS API (#990)
Fixes #977.
2020-04-24 16:11:46 -07:00
Natalie Weizenbaum
83ec64a1f2
Work around dart-lang/sdk#41259 (#984) 2020-04-21 16:03:58 -07:00
Natalie Weizenbaum
eeeac1d689
Give JavaScript value objects useful constructor.name values (#936)
Closes #810
2020-01-17 14:46:10 -08:00
Natalie Weizenbaum
ca63b1ba7d
Don't try to resolve relative Node importer URLs for source maps (#923)
* Don't try to resolve relative Node importer URLs for source maps

Closes #922

* Reformat
2020-01-09 13:14:44 -08:00
Jennifer Thakar
bfdf4b35a4
Fix import-only files for Node importers (#919) 2020-01-03 15:41:12 -08:00
Natalie Weizenbaum
20978e0320 Fix new strict inference hints from Dart 2.6 2019-11-06 14:47:24 -08:00
Natalie Weizenbaum
4ccddf8b13
Dash-normalize user-defined functions (#813)
Closes #811
2019-09-03 16:00:07 -07:00
Natalie Weizenbaum
79e9bbd816 Enable strict inference 2019-05-31 15:54:59 +01:00
Natalie Weizenbaum
1340ba7b8a Enable and fix (most) pedantic lints 2019-05-31 15:18:59 +01:00
Natalie Weizenbaum
768da7088c
Resolve imports using custom imports before load paths (#687)
Closes #681
2019-05-20 15:34:57 -07:00
Natalie Weizenbaum
9999835df0
Add a sass.types.Error constructor to the JS API (#627)
Closes #590
2019-04-03 01:07:12 -07:00
Natalie Weizenbaum
e8ac314f56
Support dart-lang/source_span#25 (#566)
This adds a --no-unicode option to disable Unicode span rendering,
decouples repl highlighting from SourceSpan.highlight, and updates
tests to work with the new error highlighting.

It also tightly scopes source spans for statements with children.
Previously, source spans for these nodes extended all the way through
any whitespace that followed the node. This led to messy-looking
multiline span highlights with dart-lang/source_span#25.

Now, StylesheetParser.children doesn't consume trailing whitespace.
Instead, we add a helper method StylesheetParser._withChildren that
parses children, creates the appropriate span, and then consumes the
trailing whitespace.
2019-01-28 20:42:32 -05:00
Natalie Weizenbaum
519bfa3d6b Match Node Sass's this.includePaths behavior for importers
On Windows, paths are separated with a semicolon rather than a colon.

Closes #549
2018-12-17 15:30:17 -08:00
Natalie Weizenbaum
dad8491035
Make types.String.prototype.setValue() de-quote a string (#535)
Closes #513
2018-12-06 15:06:32 -08:00
Natalie Weizenbaum
487e5025ff Reformat with Dart-2-only features 2018-11-15 15:16:24 -08:00
Natalie Weizenbaum
77563be056
Add support for SASS_PATH (#514)
Closes #512
2018-11-05 15:24:14 -08:00
Natalie Weizenbaum
9e18b7e95b
Always include the error location in JS error messages (#511)
Always include the error location in JS error messages

I was trying to match Node Sass's behavior by having Error.formatted
property have more detail than Error.message, but our errors rely on
source snippets for context so this just ended up making them
confusing.
2018-10-31 18:13:04 -07:00
Natalie Weizenbaum
04ada09a82
Get rid of the dart2 test tag (#477)
We're only ever running tests under Dart 2 now, so it's irrelevant
whether they're Dart 2-only.
2018-09-19 15:28:47 -04:00
Natalie Weizenbaum
0f7f9e69a7
Add support for plain CSS imports (#436)
Closes #424
2018-08-10 15:58:15 -07:00
Natalie Weizenbaum
13b8ad6d4d Format 2018-07-23 16:57:21 -07:00
Natalie Weizenbaum
e1750216ee Don't crash when passing includePaths with importer
Closes #412
2018-07-23 16:20:06 -07:00
Natalie Weizenbaum
9bb272dcff
Support Node Sass's sass.types.Color(argb) constructor (#398)
Closes #397
2018-07-03 17:09:54 -07:00
Natalie Weizenbaum
a87300a1e9 Use camel-case for grinder task names
This also causes Grinder to use hyphen-separated names for them on the
CLI, rather than underscore-separated.
2018-06-25 16:40:26 -07:00
Natalie Weizenbaum
c626bf5613 Remove casts that are now unnecessary 2018-06-15 13:59:28 -07:00
Natalie Weizenbaum
b949f9fe72 Use Dart 2 constants 2018-06-15 13:59:28 -07:00
Natalie Weizenbaum
6ad67a6f28 Remove the workaround for dart-lang/sdk#30098
This un-reverts pull request #320 from sass/remove-path-workaround,
which was reverted by commit 0fb5d25ee2.
2018-06-14 16:15:27 -07:00
Natalie Weizenbaum
0fb5d25ee2 Revert "Merge pull request #320 from sass/remove-path-workaround"
This reverts commit 08bfb46f16, reversing
changes made to ad73a91f84.
2018-05-31 14:37:21 -04:00
Natalie Weizenbaum
31c77fb1cc Remove the workaround for dart-lang/sdk#30098 2018-05-28 15:23:47 -04:00
Natalie Weizenbaum
ad73a91f84
Match Node Sass's logic around source map file names (#333)
When sourceMap is a string and outFile is null, Node Sass determines
the source map filename from the input filename.
2018-05-24 19:16:14 -04:00
Natalie Weizenbaum
7c26959156
Node API: generate a source map even when outFile isn't set (#331)
Contrary to documentation, Node Sass generates a source map when
outFile is unset as long as sourceMap is a string.
2018-05-24 18:42:16 -04:00
Natalie Weizenbaum
6a117905ab
Fix a crash when printing warnings through the Node API (#311)
Closes #307
2018-04-25 17:47:29 -07:00
Natalie Weizenbaum
234aa12e08
Add CLI source map support (#309)
Partially addresses #2
2018-04-25 16:12:37 -07:00
Natalie Weizenbaum
7a882bd3be Fix a relative import bug in the JS API
Closes #284
2018-04-21 00:50:23 -07:00
Natalie Weizenbaum
fd19bc85b6
Add a JavaScript API for source map generation (#302)
Partially addresses #2
2018-04-20 17:56:00 -07:00
Natalie Weizenbaum
5cce76b6d4
Use constants from dart2_constants (#282) 2018-04-04 15:49:07 -07:00
Natalie Weizenbaum
6608a46d1e Make errors subtypes of Error 2018-03-23 15:22:10 -07:00
Natalie Weizenbaum
07b02174e0
Represent DynamicImport.url as a String (#250)
This works around dart-lang/sdk#32490. We need to preserve the leading
"./" to match Node Sass's behavior.

Closes #246
2018-03-11 15:46:59 -07:00
Natalie Weizenbaum
f0e181bf2e Don't run tests that require Dart 2 against stable 2018-02-01 18:21:34 -08:00
Natalie Weizenbaum
5a1bfaebbf Add support for the Node Sass custom function API
Closes #10
Closes #12
2018-01-30 11:14:42 -08:00
Natalie Weizenbaum
da2ff6a06d
Fix analysis hints (#215) 2018-01-19 15:26:41 -08:00
Natalie Weizenbaum
aa5fd1d060 Add support for the fibers package to speed up render() 2017-12-02 12:39:28 -08:00
Natalie Weizenbaum
8272724f42 Add support for async importers to the JS render() function (#196)
Closes #9
2017-12-01 14:29:11 -08:00
Natalie Weizenbaum
4e6e04faa5 Add tests for Node importers
These have been validated against node-sass itself, but they aren't
yet run supported by Dart Sass.
2017-11-02 18:12:47 -07:00
Natalie Weizenbaum
530c4244d0 Refactor some Node API testing 2017-10-20 16:56:54 -07:00