Skip to content

Migrate to dart-sass, update divisions #447

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

Merged
merged 4 commits into from
Oct 19, 2021
Merged

Conversation

ColinFrick
Copy link
Contributor

Migrate from node-sass to (dart-) sass. Replace divisions with multiplications or math.div

Closes #344

@ColinFrick
Copy link
Contributor Author

ColinFrick commented Oct 15, 2021

I verified the resulting css. It changes the quotation marks from double to single quotes. It also adds them to the attribute selectors.

The published scss in npm (dist/npm) would be incompatible to any project using node-sass as it's compiler. Is this ok? Or should the scss be compatible?

I also saw that with commit abb37a3 all packages were installed from the npmjs registry instead of the yarn registry. Is this correct? Should I also change my project registry to https://registry.npmjs.org/ ?

# Conflicts:
#	yarn.lock
@ColinFrick ColinFrick marked this pull request as ready for review October 15, 2021 20:44
@bidoubiwa
Copy link
Contributor

bidoubiwa commented Oct 18, 2021

I also saw that with commit abb37a3 all packages were installed from the npmjs registry instead of the yarn registry. Is this correct? Should I also change my project registry to https://registry.npmjs.org/ ?

This is a mistake! I'm asking for its removal :)

@bidoubiwa
Copy link
Contributor

The published scss in npm (dist/npm) would be incompatible to any project using node-sass as it's compiler. Is this ok? Or should the scss be compatible?

So to make it work for our users, they will have to make the migration to dart-saas as well? Is it possible to make it compilable with node-sass while removing the deprecated package?

@ColinFrick
Copy link
Contributor Author

The published scss in npm (dist/npm) would be incompatible to any project using node-sass as it's compiler. Is this ok? Or should the scss be compatible?

So to make it work for our users, they will have to make the migration to dart-saas as well? Is it possible to make it compilable with node-sass while removing the deprecated package?

Exactly. If a user uses the library with @import "~docs-searchbar.js/dist/npm/styles/main"; they would be required to use dart-sass. I replaced math.div with multiplications where possible. But the even-px function requires division to remove the unit.

So we have two options: Require dart-sass from the user or ignore the deprecations for now with the --no-deps option.
(I have already updated the PR with --no-deps)
It still compiles, until dart-sass 2.0.0 is released (whenever that might be)

@bidoubiwa
Copy link
Contributor

I think we should plan ahead and remove compatibility with node-sass. It is already deprecated. What do you think?

@ColinFrick
Copy link
Contributor Author

@bidoubiwa I concur. I have reverted the changes. You can review the changes now.

@bidoubiwa bidoubiwa added the breaking-change The related changes are breaking for the users label Oct 18, 2021
@curquiza curquiza changed the title feat: migrate to dart-sass, update divisions Migrate to dart-sass, update divisions Oct 18, 2021
@bidoubiwa bidoubiwa self-requested a review October 19, 2021 08:24
Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is great! 🔥🔥 Thanks for your involvement.

Maybe you already completed the form as per the previous merged PR, but just in case:
if you are participating in Hacktoberfest, and you would like to receive a small gift from MeiliSearch too, please complete this form.

@bidoubiwa
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 19, 2021

Build succeeded:

@bors bors bot merged commit a9bb524 into meilisearch:main Oct 19, 2021
@ColinFrick ColinFrick deleted the feat/344 branch October 19, 2021 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove divisions inside scss as they are deprecated and will be removed in dart sass 2.0
2 participants