Natalie Weizenbaum
d13a38ed19
Cache relative import results as well as absolute ones
...
This dramatically improves the performance of a sample app using the
Carbon design system, and should generally improve apps that have a
lot of repeated @imports of library files. It's possible we can back
this out if it's not pulling its weight once we no longer support
@import.
2021-10-20 16:36:52 -07:00
Natalie Weizenbaum
6069708a83
Cache hash codes for Sass strings and numbers
...
These values are often stored in maps, so caching their hash codes
seems to be net valuable.
2021-10-20 16:36:52 -07:00
Natalie Weizenbaum
0ce65fc796
Replace Susy with Carbon as a benchmark target
...
Neither of these support Node v16 yet, but Susy is unmaintained and
will never support it while Carbon will likely add support in the near
future.
2021-10-20 16:36:29 -07:00
Christophe Coevoet
6253da740b
Fix the parsing of scientific notation in keyframe selectors ( #1510 )
2021-10-20 13:15:10 -07:00
Natalie Weizenbaum
3916ff6a0c
Add support for the alertAscii flag ( #1524 )
...
See sass/sass#3056
2021-10-14 22:45:35 +00:00
Natalie Weizenbaum
1fbda21d98
Merge remote-tracking branch 'origin/main' into cli-pkg
2021-10-13 13:05:30 -07:00
Natalie Weizenbaum
aa81b12612
Automatically handle absolute URLs for FileImporters ( #1527 )
...
See sass/sass#3181
2021-10-13 02:39:39 +00:00
Natalie Weizenbaum
1e70242959
More gracefully handle unexpected errors in JS interop
2021-10-12 17:15:30 -07:00
Natalie Weizenbaum
2d56fe02df
Allow PRs to be linked to sass/sass PRs
2021-10-06 16:37:56 -07:00
Natalie Weizenbaum
4379462b42
Replace FileImporterResult with a plain URL
2021-10-06 12:13:21 -07:00
Christophe Coevoet
d667843a4d
Fix the parsing of supports function in static imports ( #1514 )
2021-10-06 10:18:55 -07:00
Christophe Coevoet
6641459fa2
Improve the error message for invalid default namespaces ( #1513 )
2021-10-06 10:16:35 -07:00
Jennifer Thakar
4f67c4dd30
Fix RecursiveAstVisitor ( #1525 )
...
`visitCalculationExpression` is now properly implemented.
This also adds concrete test classes that extend `RecursiveAstVisitor`
and `RecursiveStatementVisitor` to ensure similar issues are avoided in
the future whenever new AST nodes are added.
2021-10-05 18:36:45 -07:00
Natalie Weizenbaum
c9e2f96f88
Add support for the new importer API ( #1522 )
2021-10-05 23:53:57 +00:00
Natalie Weizenbaum
4b0f008760
Add support for the new JS logger API ( #1515 )
...
See sass/sass#2979
2021-10-05 20:57:44 +00:00
Natalie Weizenbaum
fb180ff9f5
Update to the latest linter package and fix lints
2021-10-05 13:21:19 -07:00
Christophe Coevoet
8bade1d071
Fix typos in doc ( #1480 )
2021-10-04 11:16:19 -07:00
Natalie Weizenbaum
31689a3637
Add basic compile functions for the new JS API ( #1503 )
2021-10-02 00:35:10 +00:00
Natalie Weizenbaum
ba38c09c68
Cordon the Node Sass API off into a legacy directory ( #1501 )
2021-09-23 01:48:06 +00:00
Natalie Weizenbaum
8d5d586e7c
Fix interpolation lookahead for calculations ( #1500 )
...
Closes #1499
2021-09-22 07:12:16 +00:00
Natalie Weizenbaum
825fa5c7df
Add back support for min/max calculations ( #1485 )
...
See sass/sass#3142
See sass/sass#3150
2021-09-20 23:58:47 +00:00
Natalie Weizenbaum
52ef3c6ef1
Preserve parentheses around var() functions in calculations ( #1489 )
...
See sass/sass#3153
See sass/sass#3154
2021-09-16 21:58:19 +00:00
Natalie Weizenbaum
30cc9dcbfb
Allow extra whitespace in min, max, and calculations ( #1483 )
...
Closes sass/dart-sass#1444
2021-09-14 23:03:06 +00:00
Natalie Weizenbaum
7de7ab405d
Fix a parenthesizing bug in calculations ( #1482 )
...
See sass/sass#3147
See sass/sass#3148
2021-09-14 22:42:28 +00:00
Natalie Weizenbaum
5e4bc45574
Allow the + operator for calculations and strings ( #1481 )
...
See sass/sass#3142
See sass/sass#3146
2021-09-14 22:25:08 +00:00
Natalie Weizenbaum
fe46cbba1e
Improve unification of :host and :host-context ( #1471 )
...
See sass/sass#3134
2021-09-14 21:53:01 +00:00
Natalie Weizenbaum
cbdcd58676
Emergency fix: Temporarily drop support for min/max calculations ( #1477 )
...
See sass/sass#3142
See sass/sass-spec#1702
2021-09-14 08:45:05 +00:00
Natalie Weizenbaum
bb0867270c
Add support for first-class calc() ( #1452 )
...
See sass/sass#818
2021-09-13 23:16:40 +00:00
Natalie Weizenbaum
33dab9ff7e
Fix the leftover-configuration check for @forward ... with
( #1472 )
...
This check was previously checking whether *any* variables were left
in this configuration, which could include variables that were adopted
from outer configurations. This threw invalid errors when that outer
configuration would have been satisfied by another variable (or
forward) later in the file.
Closes sass/sass#1460
2021-09-09 23:51:26 +00:00
Jennifer Thakar
1672178f64
Fix @at-root
bug for common case of built-in use ( #1469 )
...
`@at-root` should now work properly in a nested import as long as the
only `@use` or `@forward` rules present are for built-in modules.
This is a partial but not complete fix for #1347 . It's a bit hacky to
special case built-in modules here, but since they represent the only
real legitimate case for using this combination of features, it lets us
fix the bug for this case and avoid the bordering-on-infeasible work of
fixing this for user-defined modules.
2021-09-09 16:00:05 -07:00
Jennifer Thakar
f06937e2df
Fix analysis errors ( #1470 )
2021-09-09 22:35:12 +00:00
Konstantin Scheglov
3112f80d49
Ignore HintCode.UNNECESSARY_TYPE_CHECK_TRUE ( #1457 )
2021-09-07 12:21:01 -07:00
Adam Hooper
ad886d97d6
Expose charset
option in Node API [ closes #567 ] ( #1446 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-09-02 00:48:11 +00:00
Natalie Weizenbaum
1615bb17d0
Add SassApiColor to the "Value" dartdoc category ( #1455 )
2021-08-31 00:14:14 +00:00
Natalie Weizenbaum
57ea9f1a90
Expose getters indicating which color fields a color has calculated ( #1453 )
...
These getters are only available through the sass_api package. This
will allow the Sass embedded compiler to more explicitly send the
color information it has on hand.
2021-08-28 07:37:39 +00:00
Jennifer Thakar
d419df7d9c
Add shared interfaces for various AST nodes ( #1445 )
...
Fixes #1401 and #1414 .
Adds `Dependency`, `SassDeclaration`, and `SassReference` interfaces,
which expose some getters that multiple AST nodes have in common with a
single type.
These also add getters for common subspans (URL, name, and namespace) to
the interfaces.
2021-08-23 16:33:36 -07:00
Natalie Weizenbaum
67db39c352
Add a SassArgumentList.keywordsWithoutMarking getter ( #1427 )
...
This is necessary to properly forward argument list keywords to the
embedded compiler.
See sass/embedded-protocol#27
2021-08-16 23:59:03 +00:00
Natalie Weizenbaum
390deed540
Merge pull request #1438 from sass/extend-bugs
...
Fix a couple bugs with @extend
2021-08-16 22:01:32 +00:00
Natalie Weizenbaum
2a03907e95
Emit escape sequences for private-use characters in expanded mode ( #1430 )
2021-08-16 21:52:35 +00:00
Natalie Weizenbaum
707db69de8
Fix a couple bugs with @extend
...
We weren't properly merging multiple @extend rules that were added to
an upstream module at the same time, so some of them weren't being
marked as satisfied.
Closes #1393
2021-08-11 18:41:50 -07:00
Natalie Weizenbaum
000173c132
Reformat
2021-08-11 16:14:17 -07:00
Natalie Weizenbaum
e0e132e0fe
Allow numbers with leading .
in plain-CSS min/max ( #1432 )
...
Closes #1394
2021-08-11 22:27:58 +00:00
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
3eca26584d
Fix a single-backslash attribute selector ( #1428 )
...
Closes #1423
2021-08-11 01:52:17 +00:00
Natalie Weizenbaum
5f4994e487
Fix backslash-escapes in url()s ( #1429 )
...
Closes #1399
2021-08-11 00:02:23 +00:00
Natalie Weizenbaum
54d16c0ac4
Allow if
to be used as an unquoted string ( #1431 )
...
Closes #1405
2021-08-10 23:34:36 +00:00
Natalie Weizenbaum
2beec3696c
Strip CRLFs from error comments ( #1433 )
...
Closes #1392
2021-08-10 22:59:35 +00: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
632a041e1e
Move expression logic from RecursiveStatementVisitor to RecursiveAstVisitor
2021-07-30 18:23:14 -07:00
Natalie Weizenbaum
b64200e906
Prepare the API for being exposed in a new package
2021-07-30 18:23:13 -07:00
Natalie Weizenbaum
2758ca114a
Lazily determine whether a mixin contains a @content block
...
This avoids saddling the caller of `MixinRule()` with the
responsibility of correctly determining whether a content block
exists.
2021-07-30 18:00:59 -07:00
Natalie Weizenbaum
9f3133a179
Fix dartdoc errors
...
Also fix a couple places where our external API wasn't quite right.
2021-07-30 15:14:17 -07:00
Natalie Weizenbaum
a28c656049
Add dartdoc categories to Sass APIs
2021-07-30 14:29:51 -07:00
Natalie Weizenbaum
10ac0944e0
Resynchronize
2021-07-23 13:41:46 -07:00
Natalie Weizenbaum
5d65c11403
Code review changes
2021-07-23 13:37:49 -07:00
Natalie Weizenbaum
cbd1f6e4cd
Merge remote-tracking branch 'origin/main' into compile-to-result
2021-07-23 13:35:50 -07:00
Rafer45
426277e3ed
Cast value correctly in putIfAbsentAsync
( #1404 )
...
* Cast value correctly in `putIfAbsentAsync`
Fixes https://github.com/sass/dart-sass/issues/1403
* Update pubspec.yaml
* Update CHANGELOG.md
Co-authored-by: Jennifer Thakar <jathak@google.com>
2021-07-19 14:13:06 -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
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
0e42a09fdb
Remove CompileResult.sourceFiles
...
This was never used.
2021-07-13 17:02:50 -07:00
Jennifer Thakar
3942ac4104
Fix bug in RecursiveAstVisitor ( #1389 )
...
It looks like the body of `visitParenthesizedExpression` was accidentally removed when the type parameter was removed from this class.
2021-07-07 11:41:12 -07:00
Natalie Weizenbaum
a10d7c677d
Use @internal to cordon off internal-only Value APIs ( #1379 )
...
Lays the groundwork for #236
Note that we need to add a bunch of explicit @nodoc annotations to
work around dart-lang/dartdoc#2418 and dart-lang/dartdoc#2419 .
2021-06-24 17:32:57 -07:00
Natalie Weizenbaum
268f22e147
Make required span parameters positional ( #1380 )
...
Required non-boolean parameters should pretty much always be
positional. These were still named from back when spans were nullable
in Sass.
2021-06-24 17:32:36 -07:00
Natalie Weizenbaum
655fcfc950
Properly support selector lists for selector.extend() ( #1378 )
...
Closes #1301
2021-06-24 14:50:16 -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
713b7cc31e
Properly register pseudos' child selectors in ExtensionStore ( #1374 )
...
Closes #1297
2021-06-23 16:43:08 -07:00
Natalie Weizenbaum
19bd45e738
Error for Unicode ranges that have too many ?
s after digits ( #1373 )
...
Closes #1280
2021-06-22 17:24:22 -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
5a9dd9161b
Fix a variable-assignment bug ( #1372 )
...
Closes #1250
2021-06-22 15:10:32 -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
Jennifer Thakar
a077094f24
Fix toString for namespaced variable ( #1358 )
2021-06-14 14:19:53 -07:00
Jennifer Thakar
f1d36a1860
Another implicit dependency fix ( #1352 )
2021-06-11 16:54:41 -07:00
Jennifer Thakar
754501145c
Fix a bug with implicit dependencies ( #1348 )
...
Encountered this while migrating internal code to math.div
2021-06-08 13:06:34 -07:00
Jennifer Thakar
af816d0941
Fix bug in --update with built-in modules ( #1338 )
...
Fixes #1335 .
2021-06-02 14:52:17 -07:00
Christophe Coevoet
0db34159e5
Fix the allowed children for the for at-rule in declarations ( #1340 )
2021-06-02 14:22:34 -07:00
Natalie Weizenbaum
fd1bfd293b
Fix the URL for the @-moz-document deprecation message ( #1339 )
...
Closes #1336
2021-06-01 18:07:46 -07:00
Rafer45
b098adb289
Improve wording of comment ( #1331 )
...
Avoid a triple negative ("aren't unless non-null")
2021-05-24 14:19:38 -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
7f982a1b3a
Only emit each warning once per source location ( #1322 )
2021-05-21 16:23:53 -07:00
Jennifer Thakar
efe680e74b
Make :is() behave like :matches() ( #1315 )
2021-05-20 14:13:10 -07:00
Natalie Weizenbaum
f33b934fe4
Fix some edge cases when serializing edge-case numbers ( #1312 )
...
Also pin static analysis to Dart 2.12 to work around dart-lang/sdk#45488 .
2021-05-19 17:29:16 -07:00
Natalie Weizenbaum
47920ad032
Merge branch 'master' into slash-separator
2021-05-17 14:13:03 -07:00
Natalie Weizenbaum
818d0d1e44
Fix context.options.context
2021-05-13 19:19:08 -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
114b460d7c
Merge remote-tracking branch 'origin/master' into slash-separator
2021-05-13 16:43:52 -07:00
Natalie Weizenbaum
5a0242a090
Code review
2021-05-13 16:43:15 -07:00
Natalie Weizenbaum
68c4d6556e
Make number arguments to built-in functions slash-free
...
See sass/sass#3050
2021-05-12 13:21:31 -07:00
Natalie Weizenbaum
be1a414f07
Deprecate /-as-division and add replacements
...
Partially addresses #663
2021-05-12 13:21:28 -07:00
Jennifer Thakar
5d4950db36
Fix bug with null values in configuration ( #1305 )
...
Fixes #1281 .
2021-05-12 09:09:35 -07:00
Natalie Weizenbaum
742023a877
Always track variables' source spans
...
This is necessary for generating useful error messages for
/-as-division.
2021-05-11 13:24:20 -07:00
Christophe Coevoet
be2d3e848a
Fix argument names in str-slice errors ( #1303 )
2021-05-05 17:02:14 -07:00
Natalie Weizenbaum
574e76326e
Fix a couple doc comment typos ( #1302 )
2021-04-30 16:46:06 -07:00
Awjin Ahn
30ede40732
Fix extending selectors across multiple modules. ( #1298 )
...
* Fix extending selectors across multiple modules.
Allows more than one module to extend the same upstream selector that,
in turn, extends a selector from its upstream module.
Properly skips creating an extra extension that was being counted as
unresolved when evaluating @extends.
See https://github.com/sass/sass-spec/pull/1635
Fixes https://github.com/sass/dart-sass/issues/1295
2021-04-28 14:19:12 -07:00
Natalie Weizenbaum
45c1333276
Properly reset variables in the loop in _peekIndentation() ( #1288 )
...
Closes #1287
2021-04-19 12:41:57 -07:00
Henry Catalini Smith
11d09cffd7
Add -w shorthand for --watch CLI flag ( #1276 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-04-15 14:23:05 -07:00
Christophe Coevoet
39f19bef98
Fix the name of the blackness argument ( #1264 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-04-15 14:22:43 -07:00
Awjin Ahn
2ab4f8061c
Fix deprecation warning typo. ( #1247 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-04-15 14:22:02 -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
Christophe Coevoet
7106bac9e2
Fix typos in the doc of SimpleSelector ( #1251 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-04-15 13:55:30 -07:00
Natalie Weizenbaum
c2e02a50da
Use ?[] instead of .andGet()
2021-04-14 19:11:10 -07:00
Natalie Weizenbaum
5535458edb
Fix broken specs
2021-04-14 17:15:09 -07:00
awjin
af0f25cb0e
Fix broken tests
2021-04-14 17:15:09 -07:00
Natalie Weizenbaum
102d3cedc2
Make the IO interface align with the VM API
2021-04-14 17:15:09 -07:00
Natalie Weizenbaum
654744f5f4
Fix bogus null assertions
2021-04-14 17:15:09 -07:00
Natalie Weizenbaum
de013bf8ac
Make spans universally non-nullable
2021-04-14 17:15:09 -07:00
Natalie Weizenbaum
3ead2e2bb5
Split out an Extender class from Extension
...
This gets rid of the weird subset of "one-off" extensions which didn't
have target information available. Now instead, each method explicitly
declares whether it takes/returns extensions (which do have target
info) or extenders (which do not).
2021-04-14 17:15:08 -07:00
Natalie Weizenbaum
8fd3c1ba03
Rename Extender to ExtensionStore
...
"Extender" is also commonly used to refer to the parent selector of an
`@extend` rule, so this helps disambiguate.
2021-04-14 17:15:08 -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
Natalie Weizenbaum
8fdb281e83
Make the first parameter to ImportCache() named, not mandatory
...
It was always valid to pass in `null`, this just makes it more clear.
2021-04-14 17:15:08 -07:00
Natalie Weizenbaum
984e76ef77
Remove type parameters from recursive AST visitors
2021-04-14 17:15:08 -07:00
Natalie Weizenbaum
21e7ec19dc
Split Declaration's constructor into two
...
This doesn't explicitly help null-safety, but it makes the
relationship between `Declaration.value` and `Declaration.children`
more obvious.
2021-04-14 17:15:03 -07:00
Natalie Weizenbaum
ca3c6f5ccc
Refactor how style rules interact with at-root
...
This is more friendly to null-safe code, since we no longer rely on
`_inStyleRule` implying that `_styleRule != null`.
2021-04-12 17:31:11 -07:00
Natalie Weizenbaum
5d0ad6957b
Split IfClause into ElseClause
...
This allows us to be statically explicit about when the expression
does or doesn't exist.
2021-04-12 17:31:11 -07:00
Natalie Weizenbaum
3fa2b1d98a
Fix hints and lints
2021-04-12 17:31:11 -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
Awjin Ahn
4ea9fff2bb
Let last !default value of @forward...with be commaless. ( #1226 )
...
This advances the scanner to the next line even if the !default
identifier is not followed by a comma.
2021-02-04 14:18:19 -08:00
Natalie Weizenbaum
2682992bd4
Split SassNumber into separate subclasses based on units ( #1221 )
...
This allows us to use more efficient implementations in the common
case where numbers don't have complex units.
See #113
2021-02-02 17:37:56 -08:00
Mary
058cf0e4df
Fix fuzzyAssertRange, RangeError takes ints as min/max
2021-01-29 13:34:31 -05:00
Natalie Weizenbaum
934bdd556a
Set RangeError.start and .end for color range checks ( #1215 )
...
This is useful for sass/dart-sass-embedded#32 because it makes the
range checks easier to deconstruct and reconstruct into useful
embedded error messages.
2021-01-27 15:50:02 -08:00
Natalie Weizenbaum
474956d9a8
Merge branch 'master' into node-api-bugs
2021-01-19 18:38:41 -08:00
Christophe Coevoet
f0720f204d
Implement proper handling of units in for loops ( #1200 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-01-19 18:37:41 -08:00
Natalie Weizenbaum
072c5252ca
Wrap fiber.yield() calls in runZoned()
...
This resets the current zone after the fiber returns, where otherwise
it could end up set to a different zone entirely, since Dart's Zone
API is unaware of fibers.
Closes #1204
2021-01-15 16:14:35 -08:00
Natalie Weizenbaum
f93feaf592
Don't try to cast an error to JsError
...
Dart's runtime understanding of what a "JsError" is isn't sufficient
to make sense of everything that might be thrown by, for example, a
custom function with an error.
2021-01-15 16:14:20 -08:00
Natalie Weizenbaum
66cb55c76f
Avoid throw/catch in Number.== ( #1188 )
...
Throwing and catching exceptions is expensive. Testing this on one
user's number-heavy codebase resulted in a 2x speed improvement.
2021-01-11 13:41:37 -08:00
Natalie Weizenbaum
01231e2f4c
Print the values of deprecated numbers passed to color functions ( #1184 )
...
See #1174
2021-01-06 15:17:53 -08:00
Natalie Weizenbaum
f24a2b9ca4
Avoid permissions errors in _realCasePath. ( #1181 )
...
This catches permissions errors and treats them as indicating that the
path component we have so far is canonical. This also improves the
efficiency of case matching by caching results for higher directories.
2021-01-06 12:49:45 -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
f9a9373547
Print the LHS first in incompatible unit errors
...
Closes #766
2020-12-28 18:06:59 -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
7ba7351148
Mark deprecation warnings as such
2020-12-28 14:44:00 -08:00
Natalie Weizenbaum
02c92aa7cd
Add support for clamp() as a special math function ( #1168 )
...
Closes #1146
See sass/sass#2860
2020-12-28 13:42:04 -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
Natalie Weizenbaum
a13f7be81b
Apply the change in #1139 to the asynchronous source file ( #1150 )
2020-11-19 17:44:36 -08:00
Jennifer Thakar
4f1f5c9de8
Fix for importers that return null in load
( #1139 )
2020-11-10 09:44:37 -08:00
Natalie Weizenbaum
c0e6ba1b07
Fix a buggy interaction between @at-root and @keyframes ( #1135 )
2020-11-05 12:55:11 -08:00
Natalie Weizenbaum
939dca8e38
Support generalized @supports conditions ( #1134 )
...
Closes #894
See sass/sass#2780
2020-11-04 16:10: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
290e55c2f1
Trim extends at the compound selector level ( #1124 )
...
This reverts a portion of #460 (15202c4
). It turns out that trimming
compound selector extends allows us to avoid exponential behavior in
certain recursive @extend cases.
See sass/dart-sass#1109
2020-10-28 15:11:22 -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
300197caf9
Don't crash when using Infinity or NaN as a key in a map ( #1073 )
...
Closes #3126
2020-10-27 16:38:47 -07:00
Natalie Weizenbaum
c4f95d4310
Fix the argument name for meta.load-css() ( #1072 )
...
Closes #1054
2020-10-27 15:54:14 -07:00