-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prettierx refactor: read prettier version from package.json
(in prettierx-update-branch-0010 version branch) as proposed in: - #569 - #603 Co-authored-by: Adaline Valentina Simonian <[email protected]> Co-authored-by: Christopher J. Brody <[email protected]>
- Loading branch information
1 parent
d5e29cb
commit 1ea011b
Showing
2 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,12 @@ const semver = { | |
gte: require("semver/functions/gte"), | ||
}; | ||
const arrayify = require("../utils/arrayify"); | ||
// [prettierx] read info from package.json: | ||
const pkg = require("../../package.json"); | ||
const coreOptions = require("./core-options").options; | ||
|
||
// [prettierx merge update from [email protected] ...] | ||
// [prettierx] quick workaround: | ||
const currentVersion = "2.4.0"; | ||
// [prettierx] get info from package.json: | ||
const currentVersion = pkg["prettier-version"]; | ||
|
||
/** | ||
* Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version | ||
|