-
Notifications
You must be signed in to change notification settings - Fork 470
Set version to 12.0.0-alpha.14 #7492
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
yarnPath: .yarn/releases/yarn-4.7.0.cjs | ||
|
||
nodeLinker: node-modules | ||
defaultSemverRangePrefix: "" | ||
|
||
nmMode: hardlinks-global | ||
|
||
defaultSemverRangePrefix: "" | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-4.9.1.cjs | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,11 @@ | |
const fs = require("node:fs/promises"); | ||
const { defineConfig } = require("@yarnpkg/types"); | ||
|
||
const { compilerVersionFile } = require("#dev/paths"); | ||
|
||
/** | ||
* @param {Yarn.Constraints.Context} ctx | ||
*/ | ||
async function enforceCompilerMeta({ Yarn }) { | ||
const EXPECTED_VERSION = "12.0.0-alpha.13"; | ||
const EXPECTED_VERSION = "12.0.0-alpha.14"; | ||
|
||
for (const workspace of Yarn.workspaces()) { | ||
const { ident } = workspace.pkg; | ||
|
@@ -46,23 +44,21 @@ async function enforceCompilerMeta({ Yarn }) { | |
} | ||
} | ||
|
||
const { compilerVersionFile } = await import("#dev/paths"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes
Cannot be at the top level |
||
const versionFile = await fs.readFile(compilerVersionFile, "utf8"); | ||
const versionPattern = /^let version = "(?<version>[^"]+)"$/m; | ||
|
||
if (process.argv.includes("--fix")) { | ||
await fs.writeFile( | ||
compilerVersionFile, | ||
versionFile.replace( | ||
versionPattern, | ||
`let version = "${EXPECTED_VERSION}"`, | ||
), | ||
versionFile.replace(versionPattern, `let version = "${EXPECTED_VERSION}"`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reformatted by biome |
||
); | ||
} else { | ||
const versionMatch = versionFile.match(versionPattern); | ||
const foundVersion = versionMatch?.groups?.version; | ||
if (foundVersion !== EXPECTED_VERSION) { | ||
Yarn.workspace().error( | ||
`compiler/common/bs_version.ml file need to be fixed; expected ${EXPECTED_VERSION}, found ${foundVersion}.`, | ||
`compiler/common/bs_version.ml file need to be fixed; expected ${EXPECTED_VERSION}, found ${foundVersion}.` | ||
); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of the lines in this file changed when running
yarn set version 4.9.1