* Fix plugin resolution when path does not start with ./
* Minor consistency fix: use "if (resolvedPluginSearchDir) {...}" in load-plugins
* Use more appropriate quotes in plugin-resolution.js
* Try both local paths and node modules when resolving plugins manually
* Test bespoke plugin loading by node module name
* Simplify getFileInfo() as suggested by @j-f1
https://github.com/prettier/prettier/pull/4341#discussion_r187112707
* Implement prettier.getFileInfo() method and --file-info CLI option
* Add empty line between functions in index.js
* Support --plugin-search-dirs / pluginSearchDirs() in --file-info / getFileInfo()
* Address review comments by @ikatyang
* Fix plugin API in globally installed Prettier and introduce optional --plugin-search-dir
* Use find-parent-dir instead of find-up and test autoloading (with mocked fn)
* Add two test cases where --plugin-search-dir is not .
* Do not mutate pluginSearchDirs argument in load-plugins.js
* Do not test automatic plugin resolution as mocking of "find-parent-dir" does not work due to rollup
* Document --plugin-search-dir / pluginSearchDirs and improve spacing
* Address @ikatyang's review comments
* Fix require path for third-party
* Undo alphabetic sorting of third-party scripts
* Added support for the graph ql comment tag
As described in the issue https://github.com/prettier/prettier/issues/4360
Prettier still adds a space inbetween the comment tag and the template literal.
* Added comment explaining the random spaces around GraphQL
* Fixed failing AST_COMPARE tests
* Add tests showing existing behavior of various TS casts.
* Improve formatting of TS casts with generics and unions.
By adding a soft break between the cast and the expression. Also
includes wrapping parentheses for clarity as suggested in #4171.
Avoids changing behavior at all though if casting an array or object
literal because those already have good behavior where the array or
object literal breaks before the cast does so including them would just
result in a pointless extra layer of parentheses that would add no
clarity.
* Update tests in prepation for updating long cast format.
* Update so nested breaks inside type cast are indented.
* Add tests where expression being cast is too long itself.
* Update cast formatting to only sometimes break after cast.
Specifically it will break after the cast if that makes the cast itself
fit on a single line. If the cast itself won't fit on a single line then
the expression being cast will be placed directly after the `>` at the
end of the cast.
* Add heuristic to format functional composition more nicely
* Regex -> array
* Use object instead of array for faster lookup
* Remove empty lines
* Add redux connect
Also add comments for libraries
* handle cusor position relative to comments correctly
* use more robust method of cursor offset tracking
* add support for cursorOffset with rangeStart/End
* add tests for cursorOffset
* use old JS syntax for node4
* add another cursor offset test case
* remove trailing whitespace in cursor tests
* fix null findNodeAtOffset handling
* remove dead code
* add more test cases
* use indexOf for node4
* revert comments.js
* add more comment tests
* change tests infra
* Fix AST_COMPARE
* move CURSOR to top level of file
* mutate result
* use es6 property shorthand
* simplify diff offset calculation
* put remaining test cases in individual files
* Fix: Always preserve frontmatter, remove dependency
* Move correct test to correct filename
* Add test for malformed frontmatter, finetune regex
* Use other malformed test case
* Update yarn.lock
* fix(glimmer): preserve leading/trailing spaces in text nodes underneath attribute nodes when next to mustache statements.
* fix(glimmer): format printer-glimmer.js
* fix(glimmer): lint fix
* fix(glimmer): removed decomposition assignments to be compatible with Node 4
* fix(glimmer): Array.includes() -> indexOf() for Node 4