Skip to content

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

Merged
merged 3 commits into from
May 20, 2025
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
935 changes: 0 additions & 935 deletions .yarn/releases/yarn-4.7.0.cjs

This file was deleted.

948 changes: 948 additions & 0 deletions .yarn/releases/yarn-4.9.1.cjs

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .yarnrc.yml
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
Copy link
Member Author

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

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
> - :house: [Internal]
> - :nail_care: [Polish]

# 12.0.0-alpha.14 (Unreleased)

# 12.0.0-alpha.13

#### :boom: Breaking Change
Expand Down
2 changes: 1 addition & 1 deletion compiler/common/bs_version.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
let version = "12.0.0-alpha.13"
let version = "12.0.0-alpha.14"
let header = "// Generated by ReScript, PLEASE EDIT WITH CARE"
let package_name = ref "rescript"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rescript",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript toolchain",
"type": "module",
"keywords": [
Expand Down Expand Up @@ -99,6 +99,6 @@
"tests/gentype_tests/**",
"tests/tools_tests"
],
"packageManager": "yarn@4.7.0",
"packageManager": "yarn@4.9.1",
"preferUnplugged": true
}
2 changes: 1 addition & 1 deletion packages/@rescript/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/darwin-arm64",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript binaries for MacOS ARM64",
"type": "module",
"homepage": "https://rescript-lang.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/@rescript/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/darwin-x64",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript binaries for MacOS x86_64",
"type": "module",
"homepage": "https://rescript-lang.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/@rescript/linux-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/linux-arm64",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript binaries for Linux ARM64",
"type": "module",
"homepage": "https://rescript-lang.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/@rescript/linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/linux-x64",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript binaries for Linux x86_64",
"type": "module",
"homepage": "https://rescript-lang.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/@rescript/win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/win32-x64",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"description": "ReScript binaries for Windows x86_64",
"type": "module",
"homepage": "https://rescript-lang.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/std/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rescript/std",
"version": "12.0.0-alpha.13",
"version": "12.0.0-alpha.14",
"keywords": [
"rescript",
"stdlib",
Expand Down
12 changes: 4 additions & 8 deletions yarn.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -46,23 +44,21 @@ async function enforceCompilerMeta({ Yarn }) {
}
}

const { compilerVersionFile } = await import("#dev/paths");
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes

Internal Error: require() of ES Module /Users/christoph/projects/cca/rescript/lib_dev/paths.js from /Users/christoph/projects/cca/rescript/yarn.config.cjs not supported.
Instead change the require of paths.js in /Users/christoph/projects/cca/rescript/yarn.config.cjs to a dynamic import() which is available in all CommonJS modules.
Instead change the require of paths.js in /Users/christoph/projects/cca/rescript/yarn.config.cjs to a dynamic import() which is available in all CommonJS modules.

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}"`)
Copy link
Member Author

Choose a reason for hiding this comment

The 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}.`
);
}
}
Expand Down