less/less.js — pull request #1636 by papandreou (2013-11-04 21:17:49+00:00)
Title: Avoid fs.statSync unless env.syncImports is specified

`less.Parser.fileLoader` uses `fs.statSync` even when used in an asynchronous context. This is bad for performance when the less compiler is used as a library that wants do things in parallel. Also, it happens to break a project I'm working on where I'm using the less compiler in a linting tool that works on a synthetic `fs` module that gets its data from a git repository and doesn't support the synchronous methods very well.

This commit switches to `fs.stat`, except when `env.syncImports` is specified.