chore: use pre-release version number on master (#4855)

* chore: use pre-release version number on master

* docs: tweak comment
master
Ika 2018-07-18 09:38:26 +08:00 committed by GitHub
parent cb7fe00863
commit 1a2c4e663e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 20 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "prettier", "name": "prettier",
"version": "1.13.7", "version": "1.14.0-dev",
"description": "Prettier is an opinionated code formatter", "description": "Prettier is an opinionated code formatter",
"bin": { "bin": {
"prettier": "./bin/prettier.js" "prettier": "./bin/prettier.js"

View File

@ -17,7 +17,9 @@ function getSupportInfo(version, opts) {
); );
if (!version) { if (!version) {
version = currentVersion; // pre-release version is smaller than the normal version in semver,
// we need to treat it as the normal one so as to test new features.
version = currentVersion.split("-", 1)[0];
} }
const plugins = opts.plugins; const plugins = opts.plugins;

View File

@ -1392,10 +1392,10 @@ how you can configure lint-staged.
Copy the following config into your \`.pre-commit-config.yaml\` file: Copy the following config into your \`.pre-commit-config.yaml\` file:
\`\`\`yaml \`\`\`yaml
- repo: https://github.com/prettier/prettier - repo: https://github.com/prettier/prettier
sha: '' # Use the sha or tag you want to point at sha: "" # Use the sha or tag you want to point at
hooks: hooks:
- id: prettier - id: prettier
\`\`\` \`\`\`
Find more info from [here](https://pre-commit.com). Find more info from [here](https://pre-commit.com).
@ -1801,9 +1801,9 @@ YAML:
\`\`\`yaml \`\`\`yaml
semi: false semi: false
overrides: overrides:
- files: "*.test.js" - files: "*.test.js"
options: options:
semi: true semi: true
\`\`\` \`\`\`
\`files\` is required for each override, and may be a string or array of strings. \`files\` is required for each override, and may be a string or array of strings.
@ -3363,10 +3363,10 @@ how you can configure lint-staged.
Copy the following config into your \`.pre-commit-config.yaml\` file: Copy the following config into your \`.pre-commit-config.yaml\` file:
\`\`\`yaml \`\`\`yaml
- repo: https://github.com/prettier/prettier - repo: https://github.com/prettier/prettier
sha: '' # Use the sha or tag you want to point at sha: '' # Use the sha or tag you want to point at
hooks: hooks:
- id: prettier - id: prettier
\`\`\` \`\`\`
Find more info from [here](https://pre-commit.com). Find more info from [here](https://pre-commit.com).
@ -3772,9 +3772,9 @@ YAML:
\`\`\`yaml \`\`\`yaml
semi: false semi: false
overrides: overrides:
- files: "*.test.js" - files: '*.test.js'
options: options:
semi: true semi: true
\`\`\` \`\`\`
\`files\` is required for each override, and may be a string or array of strings. \`files\` is required for each override, and may be a string or array of strings.

View File

@ -134,6 +134,12 @@ This option cannot be used with --range-start and --range-end.",
"vue", "vue",
], ],
}, },
Object {
"description": "YAML",
"enum": Array [
"yaml",
],
},
], ],
}, },
"pluginSearchDirs": Object { "pluginSearchDirs": Object {

View File

@ -429,7 +429,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"flow\\", \\"flow\\",
], ],
\\"JavaScript\\": Array [ \\"JavaScript\\": Array [
@@ -37,12 +43,23 @@ @@ -37,12 +43,26 @@
\\"scss\\", \\"scss\\",
], ],
\\"TypeScript\\": Array [ \\"TypeScript\\": Array [
@ -437,6 +437,9 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
], ],
+ \\"Vue\\": Array [ + \\"Vue\\": Array [
+ \\"vue\\", + \\"vue\\",
+ ],
+ \\"YAML\\": Array [
+ \\"yaml\\",
+ ], + ],
}, },
\\"options\\": Object { \\"options\\": Object {
@ -453,7 +456,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"type\\": \\"boolean\\", \\"type\\": \\"boolean\\",
}, },
\\"cursorOffset\\": Object { \\"cursorOffset\\": Object {
@@ -73,16 +90,27 @@ @@ -73,16 +93,28 @@
\\"typescript\\", \\"typescript\\",
\\"css\\", \\"css\\",
\\"less\\", \\"less\\",
@ -464,6 +467,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"graphql\\", \\"graphql\\",
\\"markdown\\", \\"markdown\\",
+ \\"vue\\", + \\"vue\\",
+ \\"yaml\\",
], ],
- \\"default\\": \\"babylon\\", - \\"default\\": \\"babylon\\",
+ \\"default\\": undefined, + \\"default\\": undefined,
@ -482,7 +486,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"range\\": Object { \\"range\\": Object {
\\"end\\": Infinity, \\"end\\": Infinity,
\\"start\\": 0, \\"start\\": 0,
@@ -90,14 +118,15 @@ @@ -90,14 +122,15 @@
}, },
\\"type\\": \\"int\\", \\"type\\": \\"int\\",
}, },
@ -786,6 +790,31 @@ exports[`CLI --support-info (stdout) 1`] = `
\\"tmScope\\": \\"text.html.vue\\", \\"tmScope\\": \\"text.html.vue\\",
\\"type\\": \\"markup\\", \\"type\\": \\"markup\\",
\\"vscodeLanguageIds\\": [\\"vue\\"] \\"vscodeLanguageIds\\": [\\"vue\\"]
},
{
\\"aceMode\\": \\"yaml\\",
\\"aliases\\": [\\"yml\\"],
\\"codemirrorMimeType\\": \\"text/x-yaml\\",
\\"codemirrorMode\\": \\"yaml\\",
\\"extensions\\": [
\\".yml\\",
\\".mir\\",
\\".reek\\",
\\".rviz\\",
\\".sublime-syntax\\",
\\".syntax\\",
\\".yaml\\",
\\".yaml-tmlanguage\\",
\\".yml.mysql\\"
],
\\"filenames\\": [\\".clang-format\\", \\".clang-tidy\\", \\".gemrc\\", \\"glide.lock\\"],
\\"linguistLanguageId\\": 407,
\\"name\\": \\"YAML\\",
\\"parsers\\": [\\"yaml\\"],
\\"since\\": \\"1.14.0\\",
\\"tmScope\\": \\"source.yaml\\",
\\"type\\": \\"data\\",
\\"vscodeLanguageIds\\": [\\"yaml\\"]
} }
], ],
\\"options\\": [ \\"options\\": [
@ -876,7 +905,8 @@ exports[`CLI --support-info (stdout) 1`] = `
}, },
{ \\"description\\": \\"GraphQL\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"graphql\\" }, { \\"description\\": \\"GraphQL\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"graphql\\" },
{ \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" }, { \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" },
{ \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" } { \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" },
{ \\"description\\": \\"YAML\\", \\"since\\": \\"1.14.0\\", \\"value\\": \\"yaml\\" }
], ],
\\"description\\": \\"Which parser to use.\\", \\"description\\": \\"Which parser to use.\\",
\\"name\\": \\"parser\\", \\"name\\": \\"parser\\",