Skip to content
This repository was archived by the owner on Oct 1, 2019. It is now read-only.

Bump prettier #10

Merged
merged 2 commits into from
Dec 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"node": ">=6"
},
"dependencies": {
"prettier": "azz/prettier#f6d0b5fe"
"prettier": "prettier/prettier#ee148bfdeda373445ac9b67338cbae3df10a6576"
Copy link
Member

Choose a reason for hiding this comment

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

maybe prettier/prettier#master since this is under dev anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

Better to be explicit in package.json since it's locked in yarn.lock anyway.

},
"devDependencies": {
"eslint": "^4.14.0",
Expand Down
14 changes: 2 additions & 12 deletions tests_config/run_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const fs = require("fs");
const extname = require("path").extname;
const prettier = require("prettier");
const plugin = require("../src");
const massageAST = require("prettier/src/common/clean-ast").massageAST;

const AST_COMPARE = process.env["AST_COMPARE"];
Expand Down Expand Up @@ -32,7 +31,7 @@ function run_spec(dirname, parsers, options) {
) {
const source = read(path).replace(/\r\n/g, "\n");

const mergedOptions = Object.assign(mergeDefaultOptions(options || {}), {
const mergedOptions = Object.assign({}, options, {
parser: parsers[0]
});
const output = prettyprint(source, path, mergedOptions);
Expand Down Expand Up @@ -105,7 +104,7 @@ function stripLocation(ast) {
}

function parse(string, opts) {
return stripLocation(plugin.parsers.python.parse(string, {}, opts));
return stripLocation(prettier.__debug.parse(string, opts));
}

function prettyprint(src, filename, options) {
Expand Down Expand Up @@ -135,12 +134,3 @@ function raw(string) {
}
return { [Symbol.for("raw")]: string };
}

function mergeDefaultOptions(parserConfig) {
return Object.assign(
{
printWidth: 80
},
parserConfig
);
}
24 changes: 9 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,10 @@ fill-range@^2.1.0:
repeat-element "^1.1.2"
repeat-string "^1.5.2"

[email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/find-project-root/-/find-project-root-1.1.1.tgz#d242727a2d904725df5714f23dfdcdedda0b6ef8"

find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
Expand Down Expand Up @@ -2457,16 +2461,6 @@ path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"

path-root-regex@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"

[email protected]:
version "0.1.1"
resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
dependencies:
path-root-regex "^0.1.0"

path-type@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
Expand Down Expand Up @@ -2578,9 +2572,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@azz/prettier#f6d0b5fe:
prettier@prettier/prettier#ee148bfdeda373445ac9b67338cbae3df10a6576:
version "1.9.2"
resolved "https://codeload.github.com/azz/prettier/tar.gz/f6d0b5feceadbc460d05e5ee32ae50b2a071fa55"
resolved "https://codeload.github.com/prettier/prettier/tar.gz/ee148bfdeda373445ac9b67338cbae3df10a6576"
dependencies:
"@babel/code-frame" "7.0.0-beta.35"
babylon "7.0.0-beta.34"
Expand All @@ -2595,6 +2589,7 @@ prettier@azz/prettier#f6d0b5fe:
emoji-regex "6.5.1"
escape-string-regexp "1.0.5"
esutils "2.0.2"
find-project-root "1.1.1"
flow-parser "0.59.0"
get-stream "3.0.0"
globby "6.1.0"
Expand All @@ -2607,15 +2602,14 @@ prettier@azz/prettier#f6d0b5fe:
minimatch "3.0.4"
minimist "1.2.0"
parse5 "3.0.3"
path-root "0.1.1"
postcss-less "1.1.3"
postcss-media-query-parser "0.2.3"
postcss-scss "1.0.2"
postcss-selector-parser "2.2.3"
postcss-values-parser "1.3.1"
remark-frontmatter "1.1.0"
remark-parse "4.0.0"
resolve "^1.5.0"
resolve "1.5.0"
semver "5.4.1"
string-width "2.1.1"
typescript "2.6.2"
Expand Down Expand Up @@ -2860,7 +2854,7 @@ [email protected]:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"

resolve@^1.2.0, resolve@^1.5.0:
resolve@1.5.0, resolve@^1.2.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
dependencies:
Expand Down