Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(playground): fix report version #3614

Merged
merged 1 commit into from Dec 31, 2017

Conversation

ikatyang
Copy link
Member

Revert #3613 and apply another solution since we don't actually expose prVersion from prettier module, which cause the wrong version on copy markdown. 😂

cc @azz

@@ -24,7 +24,7 @@ const parserPaths = parsers.map(stripLanguageDirectory);

if (isPullRequest) {
const pkg = require("../../package.json");
pkg.prVersion = `pr-${process.env.REVIEW_ID}`;
pkg.version = `999.999.999-pr.${process.env.REVIEW_ID}`;
Copy link
Member

Choose a reason for hiding this comment

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

Why not use [current version]-pr.1234?

Copy link
Member

@duailibe duailibe Dec 30, 2017

Choose a reason for hiding this comment

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

I think a version followed by -something is meant to denote pre-releases of a version (which is not the case)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ref #3433 and #3573

const usePostCssParser = semver.lt(version, "1.7.1");
const languages = loadPlugins(options)
.reduce((all, plugin) => all.concat(plugin.languages), [])
.filter(language => language.since && semver.gte(version, language.since))
.map(language => {

We use this version to determine which language (and option in the future PR) can be used, which means it should be greater than the current version in PR builds so we can test it on the preview playground.

@azz azz merged commit 8a86c0c into prettier:master Dec 31, 2017
@ikatyang ikatyang deleted the fix/playground-report-version branch December 31, 2017 01:41
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants