Commit Graph

1845 Commits

Author SHA1 Message Date
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
5709d90aaa Rename Environment.global to Environment.forImport
The previous name was misleading, since the environment could exist in
a nested context and thus contain local members.
2020-02-06 01:54:55 -08:00
Natalie Weizenbaum
7457d2e9e7
Create a release to test cli_pkg infrastructure (#940) 2020-01-24 16:49:59 -08:00
Natalie Weizenbaum
6234489eaa
Explicitly set the JS class names for SassNull and SassBoolean (#941)
For whatever reason the default name seems to have changed.
2020-01-24 15:51:50 -08:00
Natalie Weizenbaum
5450c1c07b
Use cli_pkg to build and release executables (#924) 2020-01-24 13:05:04 -08:00
Natalie Weizenbaum
33cb6aa499
Re-enable Node.js tests on Dart 2.8.0-dev (#937)
These should work now that dart-lang/sdk#40152 is fixed.
2020-01-21 14:34:19 -08:00
Natalie Weizenbaum
eeeac1d689
Give JavaScript value objects useful constructor.name values (#936)
Closes #810
2020-01-17 14:46:10 -08:00
Awjin Ahn
244a1d9cb8
Merge pull request #930 from sass/math-functions
More Math functions
2020-01-16 17:21:57 -08:00
awjin
4c0c6b48e4 Merge branch 'master' into math-functions 2020-01-16 14:55:40 -08:00
Natalie Weizenbaum
5e29ea63be
Merge pull request #935 from sass/release
Bump the pubspec version
2020-01-16 12:48:32 -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
99c58029d8 Bump the pubspec version 2020-01-15 17:20:58 -08:00
Natalie Weizenbaum
1fd8eb1a8d
Merge pull request #926 from sass/multi-span
Throw multi-span exceptions
2020-01-15 17:18:56 -08:00
Natalie Weizenbaum
e4db19be3f Resynchronize 2020-01-15 16:21:07 -08:00
Natalie Weizenbaum
aa18e65f57 Code review 2020-01-15 15:55:55 -08:00
Awjin Ahn
75cab86448 Add trigonometric math functions. (#921)
See https://github.com/sass/sass-spec/pull/1504
2020-01-15 14:44:13 -08:00
Awjin Ahn
3cbaec11b2 Add exponential math functions. (#909) 2020-01-15 14:44:13 -08:00
awjin
d487d761bd Revert "Revert "Add built-in variables e and pi. (#907)""
This reverts commit 3c64addbf3.
2020-01-15 14:44:13 -08:00
awjin
5f72acb14d Revert "Revert "Adds built-in clamp() and hypot() (#906)""
This reverts commit 76280409bd.
2020-01-15 14:44:13 -08:00
Natalie Weizenbaum
5957a5771f Merge remote-tracking branch 'origin/master' into multi-span 2020-01-15 14:35:24 -08:00
Natalie Weizenbaum
9f2b75b013
Merge pull request #931 from sass/no-node-on-dev
Work around dart-lang/sdk#40152
2020-01-15 14:30:31 -08:00
Natalie Weizenbaum
a148c5c366 Skip Node tests on Dart dev until dart-lang/sdk#40152 is fixed
We were still seeing errors when passing --use-old-rti, so we'll just
skip it entirely for now.
2020-01-15 13:57:38 -08:00
Natalie Weizenbaum
6118ded4b2 Don't upgrade source_span to avoid formatting changes 2020-01-15 11:42:06 -08:00
Natalie Weizenbaum
ed9052af3e Delete source_span override 2020-01-14 19:49:31 -08:00
Natalie Weizenbaum
b3823c945d Pass --use-old-rti for dart2js for now 2020-01-14 19:40:00 -08:00
Natalie Weizenbaum
9ecd4c3a87 Run Windows tests on Dart stable again 2020-01-14 19:33:11 -08:00
Natalie Weizenbaum
27c32d0582 Fix an error test 2020-01-14 16:54:23 -08:00
Natalie Weizenbaum
d67f341a17 Indicate the original configuration location for multi-config errors 2020-01-11 00:12:38 -08:00
Natalie Weizenbaum
c2baede4db Throw multi-span exceptions for argument errors 2020-01-10 23:24:23 -08:00
Natalie Weizenbaum
0c1370ce25 Allow errors to refer to multiple source spans at once
This makes error messages for issues like configuring a module after
it's loaded much clearer.
2020-01-10 22:31:48 -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
Lasse R.H. Nielsen
31c09606b9 Avoid depending on iterator.current != null. (#877)
With the NNBD change to Dart, it's no longer safe to rely on an iterator returning `null` when it has hit the end (or before calling `moveNext` the first time). For non-nullable element types, it will have to throw instead.

This PR rewrites code that currently rely on a `null` value to recognize the end of an iterator.
2020-01-07 13:58:48 -08:00
Natalie Weizenbaum
e110961120
Pass the version variable to script snapshots at build time (#920)
Closes #914
See https://github.com/dart-lang/sdk/issues/36579#issuecomment-571386118
2020-01-07 13:53:30 -08:00
Jennifer Thakar
bfdf4b35a4
Fix import-only files for Node importers (#919) 2020-01-03 15:41:12 -08:00
Jennifer Thakar
79d9a73474
Cache separate canonical URLs for @use and @import (#908)
Fixes #899.

The cache for canonical URLs is now keyed on *both* the rule URL and
whether that URL was canonicalized for an `@import` rule.
2020-01-02 15:25:02 -08:00
Natalie Weizenbaum
92a28feb25
Replace whitelist/blacklist with safelist/blocklist (#917)
Inspired by https://twitter.com/amlyhamm/status/1202684742069604353.
2020-01-02 14:53:39 -08:00
Natalie Weizenbaum
7113a729cd
Update dependency versions (#918) 2020-01-02 14:53:19 -08:00
Jennifer Thakar
76280409bd Revert "Adds built-in clamp() and hypot() (#906)"
This reverts commit 24f84e2c88.
2020-01-02 13:45:51 -08:00
Jennifer Thakar
3c64addbf3 Revert "Add built-in variables e and pi. (#907)"
This reverts commit 2cb69e70ab.
2020-01-02 13:45:49 -08:00
Awjin Ahn
2cb69e70ab
Add built-in variables e and pi. (#907) 2019-12-26 16:31:33 -08:00
Awjin Ahn
24f84e2c88
Adds built-in clamp() and hypot() (#906) 2019-12-26 12:40:08 -08:00
Natalie Weizenbaum
b3671c676b
Release 1.24.0 (#905) 2019-12-19 17:59:48 -08:00
Natalie Weizenbaum
b54643d319
Merge pull request #895 from sass/forward-with
Support @forward ... with
2019-12-19 17:12:29 -08:00
Natalie Weizenbaum
46be33e030 Merge branch 'master' of github.com:sass/dart-sass into forward-with 2019-12-19 16:10:51 -08:00
Natalie Weizenbaum
37534aaf7f
Merge pull request #903 from sass/fix-lints
Fix new pedantic lints
2019-12-19 16:08:54 -08:00
Natalie Weizenbaum
2755a8186d Avoid a path dependency 2019-12-18 17:49:54 -08:00
Natalie Weizenbaum
64cc529421 Reformat 2019-12-18 17:00:19 -08:00
Natalie Weizenbaum
ec3d0ddc19 Fix new pedantic lints 2019-12-18 15:46:36 -08:00
Natalie Weizenbaum
08d0b8d159 Move analysis options into a nested package
This allows other Sass team packages to re-use our analysis
configuration without having to copy it.
2019-12-18 15:37:25 -08:00
Natalie Weizenbaum
e35b51135b Code review 2019-12-17 15:26:43 -08:00