Natalie Weizenbaum
d29acb0974
Don't try to force custom URL schemes to file paths in the Node API ( #1434 )
...
When an error occurred in a stylesheet loaded by a custom importer
with a custom URL scheme, the Node error wrapper tried to convert that
URL into a path and ended up crashing.
Closes #1138
2021-08-11 21:03:14 +00:00
Natalie Weizenbaum
3cb332724f
Update pkg/sass_api version
...
This also updates the CHANGELOG version-checking logic to be resilient
against pre-release versions in the CHANGELOG.
2021-08-09 16:54:57 -07:00
Natalie Weizenbaum
4fd0472f2e
Fix a crash in the Node importer
...
When a path was returned at the same time as a file's contents, it was
interpreted as a URL without first being translated to one. This
crashed for absolute Windows paths.
Closes #1410
2021-08-09 16:47:45 -07:00
Natalie Weizenbaum
7900dda573
Add a sass_api package and publishing infrastructure
2021-07-30 18:23:14 -07:00
Natalie Weizenbaum
1565b9ceed
Rename includedUrls to loadedUrls
...
This is more explicit, and matches the name in the embedded protocol.
2021-07-14 14:29:22 -07:00
Natalie Weizenbaum
558ca0aa72
Expose CompileResult publicly, along with methods that return it
...
This also exposes CompileResult.includedUrls.
Closes #1355
Partially addresses sass/embedded-protocol#62
2021-07-13 18:08:23 -07:00
Natalie Weizenbaum
43b69e60a0
Change CompileResult.includedFiles to CompileResult.includedUrls
...
Rather than constructing this explicitly to match Node Sass's API, we
construct it with canonical URLs and convert it into the format
expected by the Node Sass API (a mix of paths and URLs) in the
compatibility layer.
2021-07-13 18:08:18 -07:00
Natalie Weizenbaum
83343d7046
Fix a race condition in meta.load-css() ( #1376 )
...
We weren't properly awaiting a call to CssStylesheet.accept(), which
meant that it could try to continue doing work asynchronously in the
wrong context.
Closes #1318
2021-06-23 17:12:18 -07:00
Natalie Weizenbaum
629881212c
Fix root-relative @import URLs as passed to importers ( #1371 )
...
Closes #1137
2021-06-22 17:22:29 -07:00
Natalie Weizenbaum
0f68d7a511
Fix quiet deps when loaded through an @import of a file without @use ( #1362 )
...
Closes #1360
2021-06-15 13:37:48 -07:00
Natalie Weizenbaum
7e371666f4
Add quietDeps and verbose to the JS API ( #1353 )
...
To support this, we now run Node-Sass-style relative loads outside of
the Node importer. This allows the evaluator to check whether a
relative load succeeded and use that to determine whether the
stylesheet counts as a dependency.
See sass/sass#3065
2021-06-14 17:41:56 -07:00
aimuz
8557ce0b04
Update compressed_test.dart ( #1350 )
...
Delete duplicate test cases
2021-06-11 11:43:44 -07:00
Jennifer Thakar
af816d0941
Fix bug in --update with built-in modules ( #1338 )
...
Fixes #1335 .
2021-06-02 14:52:17 -07:00
Natalie Weizenbaum
16f181660c
Only omit 5 deprecation warnings per feature by default ( #1327 )
...
Closes #1323
2021-05-21 22:45:58 -07:00
Natalie Weizenbaum
d660bf12ef
Add an option to the CLI and Dart Sass to silence warnings from deps
...
Closes #672
2021-05-21 22:45:58 -07:00
Natalie Weizenbaum
47920ad032
Merge branch 'master' into slash-separator
2021-05-17 14:13:03 -07:00
Natalie Weizenbaum
136bd285b3
Add AsyncImporter.fromImport
for Dart importers
2021-05-13 18:06:43 -07:00
Natalie Weizenbaum
8a344e343f
Add this.fromImport
for JS importers
...
See sass/sass#3055
See webpack-contrib/sass-loader#905
2021-05-13 17:40:31 -07:00
Natalie Weizenbaum
5a0242a090
Code review
2021-05-13 16:43:15 -07:00
Natalie Weizenbaum
be1a414f07
Deprecate /-as-division and add replacements
...
Partially addresses #663
2021-05-12 13:21:28 -07:00
Christophe Coevoet
fbd9cfd8a2
Fix a bunch of typos in comments ( #1257 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-04-15 14:01:07 -07:00
awjin
af0f25cb0e
Fix broken tests
2021-04-14 17:15:09 -07:00
Natalie Weizenbaum
e85d9a7afc
Fix automated migrator errors
...
This gets the project analyzer-clean, but the tests are still failing.
2021-04-14 17:15:08 -07:00
Natalie Weizenbaum
81d952dc7d
Automated null-safety migration
2021-04-14 17:15:08 -07:00
Jennifer Thakar
dfbdae0d71
Prepare for null-safety migration
2021-04-14 17:15:08 -07:00
Jennifer Thakar
247cb3d816
Update dependencies to null-safe versions
...
This also replaces package_resolver with package_config, since
package_resolver is archived and is incompatible with null-safe Dart
packages.
2021-04-12 17:31:09 -07:00
Awjin Ahn
ad4a1692a8
Adds RenderOptions to the context of custom functions. ( #1236 )
2021-02-18 13:48:47 -08:00
Natalie Weizenbaum
cf42fbbb34
Wait a tick in a failing test even if polling is disabled
...
As far as I can tell, the root cause of this failure is just the
Node.js watcher failing to emit an event entirely, so there's not much
more we can do to work around it.
2021-01-08 17:23:50 -08:00
Sam Rawlins
006e6aa62f
Remove unnecessary imports ( #1177 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2020-12-30 14:57:50 -08:00
Natalie Weizenbaum
bae2968757
Deprecate incorrect HSL units
...
Partially addresses #1174
2020-12-29 13:26:54 -08:00
Natalie Weizenbaum
d532f015f6
Improve error reporting for incompatible units
...
The new messages more consistently include argument names and actual
values. Errors about mixed unitless and unitful numbers are now more
consistent.
2020-12-28 17:58:55 -08:00
Natalie Weizenbaum
bf623752fb
Avoid always downcasing file paths on Windows ( #1172 )
...
Closes #1169
2020-12-23 18:07:20 -08:00
Sam Rawlins
5aeef4ce81
Remove unused dart:async imports ( #1160 )
2020-12-09 14:20:51 -08:00
Jennifer Thakar
4f1f5c9de8
Fix for importers that return null in load
( #1139 )
2020-11-10 09:44:37 -08:00
Natalie Weizenbaum
f798aae0af
Reformat ( #1133 )
2020-11-03 16:03:08 -08:00
Natalie Weizenbaum
093ff58673
Merge branch 'master' into feature.hwb
2020-10-28 16:22:18 -07:00
Natalie Weizenbaum
a9a3946fb4
Use node_interop rather than manually declaring Node APIs ( #1127 )
2020-10-28 15:00:05 -07:00
Natalie Weizenbaum
b0f213c22f
Merge remote-tracking branch 'origin/master' into feature.hwb
2020-10-09 17:29:47 -07:00
Natalie Weizenbaum
1918674295
Support HWB colors in SassColor ( #1085 )
...
See sass/sass#2835
2020-09-17 16:18:12 -07:00
Natalie Weizenbaum
028b2f6a01
Add a map.deep-merge() function ( #1077 ) ( #1080 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 16:25:49 -07:00
Natalie Weizenbaum
015a76cf0b
Revert "Add a map.deep-merge() function ( #1077 ) ( #1080 )"
...
This reverts commit 315e86b442
.
Once again, this was supposed to go on feature.nested-maps.
2020-09-15 16:24:53 -07:00
Natalie Weizenbaum
315e86b442
Add a map.deep-merge() function ( #1077 ) ( #1080 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 16:23:01 -07:00
Natalie Weizenbaum
9503b57ac5
Revert "Add a map.deep-merge() function ( #1077 )"
...
This reverts commit bc7216a441
.
This was intended to land on a feature branch, not on master.
2020-09-15 15:17:55 -07:00
Natalie Weizenbaum
bc7216a441
Add a map.deep-merge() function ( #1077 )
...
This also adds a Value.tryMap() function, which was useful for
implementing this and may be more generally useful to users as well.
See sass/sass#2836
See sass/sass-spec#1560
2020-09-15 13:03:38 -07:00
Jennifer Thakar
830bb3aab2
Move Node tests on Windows to Travis ( #1063 )
...
* Move Node tests on Windows to Travis
Appveyor is flaky and can't be restarted by all team members, so moving
everything to Travis is preferable if we can get it to work.
* Actually use latest stable Node
This should also workaround the issue with lts/* not working on
Windows.
* Use npm.cmd instead of raw npm on Windows
* Use p.prettyUri() for Node API tests
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2020-09-08 09:23:46 -07:00
Natalie Weizenbaum
1dff9a7ce4
Don't crash when writing Infinity in JS mode ( #1069 )
...
Closes #1031
2020-09-04 12:25:42 -07:00
Jennifer Thakar
7d6dae02a4
Always use absolute URLs in stdout source maps ( #1021 )
...
Fixes #1020 .
2020-06-04 17:03:06 -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