Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node-sass incompatibility] Missing constants: sass.NULL, sass.TRUE and sass.FALSE #977

Closed
chriseppstein opened this issue Mar 29, 2020 · 0 comments · Fixed by #990
Closed
Assignees
Labels
bug JavaScript Issues particular to the Node.js distribution

Comments

@chriseppstein
Copy link

dart-sass doesn't support the node-sass constants sass.NULL, sass.TRUE and sass.FALSE as convenience accessors to sass.types.Null.NULL, sass.types.Boolean.TRUE, and sass.types.Boolean.FALSE respectively.

@chriseppstein chriseppstein added the JavaScript Issues particular to the Node.js distribution label Mar 29, 2020
chriseppstein added a commit to linkedin/eyeglass that referenced this issue Mar 29, 2020
* Upgrade to typescript 3.8 so that we can use `import type` statements.
* Removes `node-sass` as a direct dependency. Eyeglass will attempt to require both `node-sass` and `sass` unless a sass engine is explicitly passed as an option. In the case where both are installed, `node-sass` is used.
* All import statements to `node-sass` are now `import type` statements which ensures we won't accidently import a concrete aspect of the library into our module's namespace.
* Testing infrastructure and updates to run tests against both implementations of Sass.
* Ameliorations for incompatibilities between node-sass and dart-sass.
  * `dart-sass` has different behavior for importers that return both `file` and `contents`. A bug has been filed at sass/dart-sass#975. Note: Custom importers provided to eyeglass from eyeglass addons or applications using eyeglass are insulated from this incompatibility.
  * `dart-sass` doesn't support functional invocation of sass value types, so a lot of the code changes were to instantiate those classes with `new` instead. (I discussed this with @nex3 a while ago and she indicated that it wasn't an API difference that she intended to support.) Note: Eyeglass addons that wish to support dart-sass will also need to make this change.
  * `dart-sass` doesn't support the constants `sass.NULL`, `sass.TRUE` and `sass.FALSE`. Instead, the code in eyeglass has been updated to use the constants that are supported by both: `sass.types.Null.NULL`, `sass.types.Boolean.TRUE`, and `sass.types.Boolean.FALSE` respectively. An issue has been filed: sass/dart-sass#977
  * `dart-sass` doesn't support the `nested` output style which was the default for node-sass. So all test output has been converted to expect the `"expanded"` output style.
@nex3 nex3 added the bug label Apr 16, 2020
@jathak jathak self-assigned this Apr 24, 2020
jathak added a commit that referenced this issue Apr 24, 2020
jathak added a commit that referenced this issue Apr 24, 2020
jathak added a commit that referenced this issue Apr 24, 2020
jathak added a commit that referenced this issue Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug JavaScript Issues particular to the Node.js distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants