Sam Rawlins
6e670ef6b8
Insert explicit type arguments where types could not be inferred. ( #1813 )
2022-10-24 13:21:59 -07:00
Natalie Weizenbaum
103cb19b41
Consistently use floating-point numbers everywhere ( #1802 )
...
Closes #1794
2022-09-21 14:15:42 -07:00
Natalie Weizenbaum
90b6190027
Add a deprecation warning for strict unary operations ( #1800 )
...
Closes #1721
2022-09-15 13:58:12 -07:00
Jennifer Thakar
db1e1261bd
Fix bug in JS MultiSpan ( #1801 )
...
Fixes #1790 .
2022-09-14 17:08:57 -07:00
Natalie Weizenbaum
5466dd76a2
Give SassScriptException a name parameter ( #1798 )
...
This avoids the need to copy around the same `_exception()` helper all
over the place.
2022-09-13 16:09:56 -07:00
Natalie Weizenbaum
e2f97055db
Merge pull request #1795 from stof/upgrade_dependencies
...
Upgrade dev dependencies to the latest version
2022-09-07 14:35:12 -07:00
Jennifer Thakar
034484260d
Fix span for not operations ( #1797 )
2022-09-07 14:27:35 -07:00
Christophe Coevoet
fb107bd2a0
Migrate deprecation warnings to sass-lang short links ( #1796 )
2022-09-07 11:25:14 -07:00
Christophe Coevoet
8480259d6c
Avoid using private types in public APIs
2022-09-03 01:41:06 +02:00
Christophe Coevoet
a705445f0d
Avoid null check on potentially nullable type parameter
2022-09-03 01:41:06 +02:00
Christophe Coevoet
fec9a2aced
Remove leading underscore on local identifiers
2022-09-03 01:41:06 +02:00
Natalie Weizenbaum
016ab24ebd
Fix a bug with @media
query bubbling ( #1792 )
...
Closes #1791
2022-08-29 15:07:32 -07:00
Natalie Weizenbaum
98f326b507
Convert visitor classes to mixins ( #1784 )
...
Co-authored-by: Jennifer Thakar <jathak@google.com>
2022-08-19 15:17:58 -07:00
Natalie Weizenbaum
76953320aa
Update specificity calculation for selector pseudos ( #1781 )
...
This is very close to invisible to the user and actually making it
visible would require a complex and hard-to-read test, so I'm electing
to avoid testing it.
Closes #2528
2022-08-18 18:31:31 -07:00
Goodwine
c850501621
Allow a module loaded multiple times by the same configuration ( #1739 )
...
* Allow a module loaded multiple times by the same configuration
* use object references as opaque ID
Fixes #1716
2022-08-18 16:49:09 -07:00
Goodwine
3f98441316
Deprecate math.random() when $limit has units ( #1779 )
...
* Deprecate math.random() when $limit has units
* add changelog for random with units deprecation
* add link to sass-site/d/random-with-units
2022-08-17 19:24:51 -07:00
Goodwine
0b8a0f606d
Transform all enum-like classes to dart enums ( #1777 )
...
* Transform all enum-like classes to dart enums
Fixes #1746
* fix new linter warnings upon upgrading to 2.17 regarding "[new MyClass]" to "[MyClass.new]"
2022-08-17 15:00:13 -07:00
Natalie Weizenbaum
a987352219
Improve combinator superselector logic ( #1778 )
...
Closes #791
2022-08-15 18:20:56 -07:00
Natalie Weizenbaum
6fd25ae4a2
Improve error messages for incorrect units in color functions ( #1772 )
...
Closes #1745
2022-08-09 17:45:48 -07:00
Natalie Weizenbaum
42d6fbb3ed
Ensure that selectors like :root always unify to the beginning ( #1759 )
...
Closes #1811
2022-08-02 23:37:08 +00:00
Natalie Weizenbaum
bc8df44f6a
Cut a release ( #1755 )
...
Also include some code review changes that were meant for #1749
2022-07-22 14:30:03 -07:00
Natalie Weizenbaum
d159d83ea8
Fix superselector bugs for pseudo-elements and universal selectors ( #1753 )
...
Closes #790
Closes sass/sass#2728
2022-07-22 13:55:46 -07:00
Natalie Weizenbaum
eeedebcee5
Add partial support for Media Queries Level 4 ( #1749 )
...
See sass/sass#2538
See #1728
2022-07-22 13:34:07 -07:00
Natalie Weizenbaum
0d4c0d0365
Recategorize selectors as "AST" for Dartdoc ( #1752 )
...
This more closely matches the categorization of other AST nodes, which
aren't broken down into fine-grained categories.
This also adds the "Parsing" category to selector classes that have
`parse()` methods.
2022-07-22 13:27:48 -07:00
Natalie Weizenbaum
3e7c9dd702
Expose inImportRule()
as the test-only fakeFromImport()
function ( #1750 )
2022-07-21 17:04:35 -07:00
Natalie Weizenbaum
1bd774485d
Deprecate passing non-deg
units to hwb()
's $hue
argument ( #1747 )
...
This was overlooked in #1175 , because the spec said that `hwb()`
should already be throwing an error if non-`deg` units were passed.
However, Dart Sass didn't implement the spec correctly and these units
were in fact not being checked at all.
See #1174
2022-07-18 17:57:45 -07:00
Natalie Weizenbaum
4b53c163d7
Deprecate bogus combinators ( #1740 )
...
See sass/sass#3340
See sass/dart-sass#1727
2022-07-18 16:16:10 -07:00
Natalie Weizenbaum
fd4c50c3d9
Expose selector APIs through sass_api ( #1741 )
2022-07-15 15:43:48 -07:00
なつき
b99ad4ba14
Add charset option to js-api ( #1732 )
2022-07-06 13:41:51 -07:00
Natalie Weizenbaum
c5e1f0b6ab
Add support for var()
with an empty fallback argument ( #1723 )
...
Closes sass/sass#3245
2022-06-21 15:07:59 -07:00
Natalie Weizenbaum
8705c06b2b
Fix a buggy interaction between meta.load-css and the legacy JS API ( #1722 )
...
Closes #1627
2022-06-17 14:38:41 -07:00
Goodwine
ae6275e5e2
fix serializing loud comment crash when importing the same file twice in a row ( #1713 )
...
* fix serializing loud comment crash when importing the same file twice
2022-06-08 16:48:36 -07:00
Nicholas Behrens
1faf81cee4
Fix #417 preserve the location of trailing loud comments ( #849 )
...
See sass/sass-spec#1485
- Update lib/src/visitor/serialize.dart to stop using old-style int-based for loop.
- Extend FileSpan with a .contains(targetSpan) method
Co-authored-by: Nick Behrens <nbehrens@google.com>
Co-authored-by: Carlos Israel Ortiz García <goodwine@google.com>
Co-Authored-By: Natalie Weizenbaum <nweiz@google.com>
2022-06-02 18:46:12 -07:00
Christophe Coevoet
46c2c9b1a9
Remove unused methods ( #1702 )
...
Those protected methods have been removed from the StatementSearchVisitor
2022-05-25 20:03:24 +00:00
Natalie Weizenbaum
d17f70fd52
Revert "Abort sass if stdin is closed when watching ( #1411 )" ( #1699 )
...
This reverts commit c7ab426cb0
.
See #1665 , #1411
2022-05-20 15:04:21 -07:00
Natalie Weizenbaum
fa0d2fb55a
Add support for arbitrary modifiers after @import ( #1695 )
...
See sass/sass#3285
2022-05-19 16:53:30 -07:00
Jennifer Thakar
b19b3b141d
Fix assertUnit and assertNoUnits ( #1686 )
...
Fixes #1685 .
2022-05-10 15:27:47 -07:00
Christophe Coevoet
1e211d640a
Escape the source map URL before using it in a CSS comment ( #1676 )
...
The URL must not be allowed to terminate the comment.
2022-04-27 09:54:52 -07:00
Christophe Coevoet
7004d49f98
Fix the tracking of variable nodes for scopes ( #1681 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2022-04-26 14:59:21 -07:00
Natalie Weizenbaum
0c24114bad
Update the order of maps returned by map.deep-merge() ( #1680 )
...
Closes sass/sass#3092
2022-04-25 19:20:54 -07:00
Christophe Coevoet
6eed6eb62a
Fix the string representations of the Sass AST ( #1682 )
...
* Fix the string representations of the Sass AST
Those are used when providing recommendations in warnings or errors, so
it is better if they produce valid code.
* Add changelog
Co-authored-by: Jennifer Thakar <jathak@google.com>
2022-04-25 16:53:08 -07:00
Jennifer Thakar
039f2adeed
Add support for :where() ( #1662 )
2022-04-06 19:19:59 -07:00
Michael Crumm
c7ab426cb0
Abort sass if stdin is closed when watching ( #1411 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2022-04-06 17:37:40 -07:00
なつき
d0e4e6ca18
Set id on all OutboundMessage with id field ( #80 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2022-03-31 00:45:17 +00:00
Jennifer Thakar
6652001f19
Stop simplifying calculations in supports ( #1653 )
...
Fixes #1652 .
Also releases 1.49.10
2022-03-30 15:14:46 -07:00
Christophe Coevoet
85ca0b270f
Remove dead code in the stylesheet parser ( #1640 )
...
At that point, the scanner is still at the same position than the
previous check for children returning a nested declaration, so it is
impossible for it to be looking at children.
2022-03-23 13:48:14 -07:00
Natalie Weizenbaum
33f18c4b54
Preserve rgb/rgba/hsl/hsla formats in expanded mode ( #1651 )
...
This also fixes a bug where four- and eight-digit hex numbers weren't
being translated to more compatible formats.
Closes #1634
2022-03-17 15:44:38 -07:00
Natalie Weizenbaum
3abcc20595
Silence compiler warnings in dependency callables with --quiet-deps ( #1650 )
...
Closes #1560
2022-03-14 15:52:13 -07:00
Jennifer Thakar
c66ea3f9a5
Fix CSS import bug ( #1633 )
2022-02-17 13:25:21 -08:00
Awjin Ahn
864d526715
Allow Node 17 to pass extra args to inspect. ( #1631 )
2022-02-16 16:38:56 -08:00
Natalie Weizenbaum
53464a7979
Use the Sass shared Dart analysis options ( #67 )
2022-01-25 17:16:17 -08:00
Christophe Coevoet
f055db0797
Implement the sourceMapIncludeSources JS option ( #1583 )
2022-01-14 16:38:26 -08:00
Jennifer Thakar
e1fcbaaf36
Fix string.insert with negative indices ( #1598 )
2022-01-13 16:40:02 -08:00
Natalie Weizenbaum
720c358c06
Set LegacyResult.map to undefined rather than null ( #1592 )
2022-01-10 14:16:27 -08:00
Natalie Weizenbaum
6bf9853330
Pass undefined span instead of null to Logger.warn() in JS ( #1586 )
2022-01-05 15:59:15 -08:00
Natalie Weizenbaum
169178af6c
Fix the default separator for new SassArgumentList in the JS API ( #1580 )
2021-12-30 16:04:00 -08:00
Natalie Weizenbaum
5012b5c3da
Allow ImporterResponse.result to be null ( #59 )
2021-12-29 16:01:03 -08:00
Natalie Weizenbaum
26127d8a00
Treat invalid function signatures as function errors ( #58 )
...
See sass/embedded-protocol#85
2021-12-29 15:00:16 -08:00
Natalie Weizenbaum
1cbb0c5417
Implement FileImporter ( #57 )
2021-12-15 23:40:10 +00:00
Natalie Weizenbaum
f7669d5a99
Properly parse custom property values in @supports conditions ( #1570 )
...
Closes sass/sass#3216
2021-12-11 00:59:08 +00:00
Nate Bosch
6b35eb633e
Remove some dead code ( #1565 )
...
This change preserves behavior, though the current behavior has the
appearance of a bug so an author more familiar with the intention may
want to add a test.
There are no assignments to `first` so the conditional can be removed.
When building internally the analyze is surfacing a `dead_code`
diagnostic which needs to be ignored. Fixing the code will allow us to
remove the ignore.
I don't know why the diagnostic does not show up when analyzing using
the external analyzer.
https://github.com/dart-lang/sdk/issues/47837
2021-12-11 00:58:44 +00:00
Awjin Ahn
1798a7c275
Let inspect() print nested, empty, bracketed lists. ( #1547 )
...
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-12-10 23:01:16 +00:00
Natalie Weizenbaum
e86897be97
Fix new analysis issues from Dart 2.15
2021-12-10 14:02:17 -08:00
Natalie Weizenbaum
79541905bc
Release a release candidate for the new JS API ( #1562 )
2021-11-30 23:32:09 +00:00
Natalie Weizenbaum
98a947056e
Add support for custom functions in the new JS API ( #1558 )
2021-11-30 22:46:39 +00:00
Christophe Coevoet
3e231f784b
Improve the deprecation message for /-as-division ( #1561 )
...
This also changes the string representation of ParenthesizedExpression
to fix the recommendations involving them (otherwise the calc
recommendation would be an invalid one).
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2021-11-30 01:43:08 +00:00
Natalie Weizenbaum
97c51d6285
Add support for the JS API value types ( #1552 )
2021-11-30 00:10:47 +00:00
Paul Golmann
926781b782
Add support for css empty namespace attribute selector ( #1554 )
...
Closes sass/sass#3199
2021-11-24 23:20:33 +00:00
Christophe Coevoet
681bbb2a0d
Fix equality checks for CalculationOperation ( #1556 )
2021-11-16 13:05:29 -08:00
Natalie Weizenbaum
55cb4fd509
Track stack traces through rethrows ( #1545 )
...
This requires a lot of manual machinery when displaying stack traces
to the user, but it should make debugging errors (especially in JS)
much easier.
Works around dart-lang/sdk#10297 using expandos.
2021-11-05 06:05:50 +00:00
Natalie Weizenbaum
756fcd3911
Fix the logger option for render() ( #1538 )
...
Closes #1533
2021-10-26 21:06:40 +00:00
Natalie Weizenbaum
435e1b2f71
Merge pull request #1535 from sass/perf
...
Improve performance
2021-10-20 17:21:28 -07:00
Natalie Weizenbaum
2430ac6d20
Avoid creating zone variables inside _EvaluateVisitor
...
Instead, we create a single zone-scoped object that's visible for the
entire lifespan of the visitor, and which exposes evaluation internals
which can be updated as direct field modifications.
2021-10-20 16:36:52 -07:00
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
53cbcdb58e
Add support for calculations ( #55 )
...
See sass/sass#818
2021-09-29 00:17:11 +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