Commit Graph

323 Commits

Author SHA1 Message Date
Natalie Weizenbaum
17e3a48639
Convert Sass to Dart 3 style (#2038) 2023-08-02 00:34:45 +00:00
なつき
2836216ba5
Fix deprotofy SassCalculation.clamp (#2043) 2023-07-21 15:08:08 -07:00
Natalie Weizenbaum
b1d56a4f07
Change terminology to refer to JS instead of Node.js (#2039)
Now that we support running in a browser, saying "Node.js" is
generally inaccurate. It's still preserved in places that are
genuinely Node-specific.
2023-07-21 14:36:12 -07:00
Ed Rivas
ca2be2ace9
Expose calculations in JS API (#1988)
Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2023-07-19 14:36:22 -07:00
Natalie Weizenbaum
2bece76153
Un-skip a test (#2028)
This should pass now that dart-lang/stream_channel#92 has landed and been released.
2023-06-23 15:50:54 -07:00
Natalie Weizenbaum
a48ced8ec9
Fix a race condition with re-used compilation isolate IDs (#2018)
Closes #2004
2023-06-20 17:55:46 -07:00
なつき
aa59a5f4a9
Fix race condition between spawning and killing isolates during shutdown (#2007)
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2023-06-09 15:55:47 -07:00
Natalie Weizenbaum
a88318f5a9
Run embedded compilations across multiple isolates (#1981)
Closes #1980
Closes #1959
2023-06-06 14:23:17 -07:00
Ed Rivas
cca9464b09
Add support for running in the browser (#1895)
Closes #25

Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
2023-05-19 13:22:44 -07:00
Natalie Weizenbaum
6d6d5ee5a4 Merge branch 'embedded-move' into embedded 2023-05-15 14:34:52 -07:00
Natalie Weizenbaum
3fc6a42e8f Move source and test files to namespaced subdirectories 2023-05-08 17:34:32 -07:00
Natalie Weizenbaum
f5a3dea748
Add support for constants in calculations (#1922)
Closes #1900
See sass/sass#3258
2023-03-23 15:59:27 -07:00
Jennifer Thakar
8f8138dfab
Add --fatal-deprecations and --future-deprecations (#1820)
* Add fatal/futureDeprecations to Dart API

This adds a new `Deprecation` class that specifies an ID for each
deprecated feature along with what Dart Sass version deprecated it.

The compile functions allow you to pass a set of `fatalDeprecations`
that will cause an error instead of a warning. You can also pass a set
of `futureDeprecations`, which let you opt-in to deprecations (like
`@import`) early.

* Add future deprecation for `@import`

* Add flags

* Merge colorUnits and randomWithUnits

* Update changelogs and pubspecs

* Add tests

* Use isFuture instead of deprecatedIn == null
* Split warnForDeprecation from warn

* Add missing word to error message
2023-03-10 14:24:33 -08:00
dannypernik
c4523884bf
Add timestamp to printed compile statement (#1876)
Co-authored-by: dannypernik <dannypernik@mail.com>
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
Co-authored-by: なつき <i@ntk.me>
2023-02-16 17:27:30 -08:00
Natalie Weizenbaum
6310dfb129
Update synchronization tests to verify the entire file (#1880)
This catches cases where the target file is edited directly without
also editing the source file.

Also re-run `pub run grinder`.
2023-02-01 16:23:37 -08:00
Natalie Weizenbaum
98fe9a43dd
Track dependencies through meta.load-css() with --watch (#1877)
Closes #1808
2023-01-31 16:58:45 -08:00
なつき
bec6b3da67
Do not throw ProtocolErrorType.PARAMS for custom functions and importers (#118) 2022-12-08 12:07:54 -08:00
Natalie Weizenbaum
103cb19b41
Consistently use floating-point numbers everywhere (#1802)
Closes #1794
2022-09-21 14:15:42 -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
eeedebcee5
Add partial support for Media Queries Level 4 (#1749)
See sass/sass#2538
See #1728
2022-07-22 13:34:07 -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
Natalie Weizenbaum
3abcc20595
Silence compiler warnings in dependency callables with --quiet-deps (#1650)
Closes #1560
2022-03-14 15:52:13 -07:00
Christophe Coevoet
565318f47f
Remove an unused import (#71) 2022-02-09 13:09:47 -08:00
Christophe Coevoet
5509f1c754
Implement support for sourceMapIncludeSources (#62) 2022-01-31 15:15:23 -08:00
Natalie Weizenbaum
2b34ec0b1a Add a test that verifies the Dart Sass version
This ensures it matches the version declared in the pubspec, so that
we don't end up merging a different version than the PR tested.
2022-01-25 17:20:21 -08:00
Natalie Weizenbaum
69077ddcea
Delete legacy Node.js API tests (#1610)
These are now tested using the runner in sass-spec.
2022-01-25 17:16:24 -08:00
Natalie Weizenbaum
53464a7979
Use the Sass shared Dart analysis options (#67) 2022-01-25 17:16:17 -08:00
Natalie Weizenbaum
54fd309079
Cut a release with TS definitions for TRUE/FALSE (#1591)
See sass/sass#3241
2022-01-07 15:12:42 -08:00
Natalie Weizenbaum
21f0219157
Don't return a CompileFailure without a span (#60)
We weren't adding a span for a compile failure due to a path not being
found. There's no real source in this situation, so we just create an
empty span instead.
2021-12-29 17:18:10 -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
e86897be97 Fix new analysis issues from Dart 2.15 2021-12-10 14:02:17 -08:00
Natalie Weizenbaum
97c51d6285
Add support for the JS API value types (#1552) 2021-11-30 00:10:47 +00: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
2cf2f27499 Use the latest version of cli_pkg
Closes #1531
2021-10-12 16:39:55 -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
f73e4bec3c Stop testing fibers
We'll still include the code for this, but on a best-effort basis and
with the understanding that it will never work on Node 16 or later.
Once Node 14 is out of LTS or we fully remove the old Node Sass API,
we can get rid of fiber support entirely.
2021-10-05 13:21:19 -07: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
Jennifer Thakar
f06937e2df
Fix analysis errors (#1470) 2021-09-09 22:35:12 +00:00
Christophe Coevoet
8012e0e9c9
Avoid the /-as-division warning when running the dart_api tests (#1467) 2021-09-07 12:25:08 -07:00
Christophe Coevoet
49c75b1509
Fix the test covering space-separated list to actually do it (#1466) 2021-09-07 12:23:33 -07:00
Christophe Coevoet
f098c7f5ac
Fix the test description for the list separator of non-empty maps (#1464) 2021-09-07 12:22:39 -07:00
Christophe Coevoet
1288b92b4e
Fix the description of some tests for SassNumber (#1463)
123/5 does not produce an integer.
2021-09-07 12:22:21 -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
4396693276
Support consuming Value.HwbColor and emitting Value.HslColor (#54) 2021-08-31 00:15:06 +00:00