Commit Graph

235 Commits

Author SHA1 Message Date
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
georgpukk
4d78316cb7
Fix a check that prevents compiling .css files to themselves (#968)
Co-Authored-By: Natalie Weizenbaum <nweiz@google.com>
2020-03-11 14:48:00 -07:00
Natalie Weizenbaum
f8c74d1315 Add a regression test for #550 2020-02-24 19:03:23 -08:00
Natalie Weizenbaum
c5daba6439
Don't load cli_pkg/testing on Node (#959)
This transitively loads dart:mirrors, which has stopped working as of
Dart 2.8.0-dev.9.0.

See dart-lang/sdk#40698
2020-02-19 22:42:33 -08:00
Natalie Weizenbaum
a95c5b8ccb Do variable index adjustments when accessing variables, not nodes
Doing this for variable *nodes* was breaking in extremely specific
circumstances:

* A null node is passed into setVariable() and, if source maps are
  enabled, recorded in _variableNodes.

* Later on, getVariableNode() is called for that variable. Because
  that variable's node is null, it calls
  _getVariableNodeFromGlobalModule() even though the variable is
  actually defined.

* _getVariableNodeFromGlobalModule() sets _lastVariableIndex to 0 on
  the assumption that the variable is undefined, which turns out to be
  incorrect in this specific case.

The next commit will fix the issue where a null node can be passed
into setVariable() when source maps are enabled, but it makes more
sense to assign the variable index to 0 in the variable access anyway,
since it happens first and isn't skipped when source maps are
disabled.
2020-02-07 00:51:46 -08:00
Natalie Weizenbaum
5450c1c07b
Use cli_pkg to build and release executables (#924) 2020-01-24 13:05:04 -08: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
7ddd7563ca Add a test case to verify that the pubspec version is bumped 2020-01-15 17:35:32 -08:00
Natalie Weizenbaum
27c32d0582 Fix an error test 2020-01-14 16:54:23 -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