Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Remove use of global process.sass #1427

Merged
merged 2 commits into from
Mar 25, 2016
Merged

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Mar 25, 2016

This replaces the global process.sass with proper module exports.
Unfortunately process.sass, although undocumented, is available
to other modules. This patch keeps the existing public API available
until we bump the major.

@xzyfer xzyfer self-assigned this Mar 25, 2016
@xzyfer xzyfer added this to the next.patch milestone Mar 25, 2016
@xzyfer xzyfer force-pushed the feat/remove-process-sass branch 3 times, most recently from 3460b32 to ad5e2b5 Compare March 25, 2016 08:47
@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 25, 2016

@am11 @andrew do either you have some context as to why process.sass was used in this way?

@andrew
Copy link
Contributor

andrew commented Mar 25, 2016

No idea, I don't remember setting it up, any idea when it was first introduced?

This replaces the global `process.sass` with proper module exports.
Unfortunately `process.sass`, although undocumented, is available
to other modules. This patch keeps the existing public API available
until we bump the major.
@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 25, 2016

@andrew did some digging. Looks like @am11 added the first use of process in #660 and later namespaced using to process.sass in #743.

To the looks of those commits it was just a way to pass information around so it looks safe to remove. Please confirm @am11?

@xzyfer xzyfer merged commit 41db8b9 into sass:master Mar 25, 2016
@xzyfer xzyfer deleted the feat/remove-process-sass branch March 25, 2016 10:33
@am11
Copy link
Contributor

am11 commented Mar 31, 2016

Sorry, couldn't sync up earlier as I was travelling the whole past week.
I think the rationale at the time was to create a sass namespace in persistent process object and use it elsewhere.

This new approach is not just pretty ok, it is excellent as the old method was analogous to the practice of frequently appending document object in browser apps, which is discouraged as altering the object layout at runtime is a bad idea (the same reason deleteing object's property is discouraged in JavaScript).

👍

@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 31, 2016

Thanks for the background @am11. Hope you enjoyed your travels :)

@xzyfer xzyfer modified the milestone: next.patch Sep 4, 2016
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this pull request Apr 7, 2024
Correctly handle comments on property declarations
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants