From 54272053d70074eba8b0c6e5665859eba6608ff9 Mon Sep 17 00:00:00 2001 From: jugalthakkar <2640821+jugalthakkar@users.noreply.github.com> Date: Wed, 31 Aug 2022 13:09:41 +0530 Subject: [PATCH 1/4] docs: update docs package ver from main on release fixes https://github.com/eslint/eslint/issues/16212 --- Makefile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.js b/Makefile.js index a9c527df557..428ff196732 100644 --- a/Makefile.js +++ b/Makefile.js @@ -282,6 +282,13 @@ function generateRelease() { generateBlogPost(releaseInfo); commitSiteToGit(`v${releaseInfo.version}`); + echo("Updating version in docs package"); + const docsPackagePath = path.join(__dirname, "docs", "package.json"); + const docsPackage = require(docsPackagePath); + + docsPackage.version = releaseInfo.version; + fs.writeFileSync(docsPackagePath, JSON.stringify(docsPackage, null, 4)); + echo("Updating commit with docs data"); exec("git add docs/ && git commit --amend --no-edit"); exec(`git tag -a -f v${releaseInfo.version} -m ${releaseInfo.version}`); From 0101cfe85368c9c29a8e63b6f9952be76b016773 Mon Sep 17 00:00:00 2001 From: jugalthakkar <2640821+jugalthakkar@users.noreply.github.com> Date: Wed, 31 Aug 2022 13:10:15 +0530 Subject: [PATCH 2/4] docs: read docs package ver instead of main fixes https://github.com/eslint/eslint/issues/16212 --- docs/src/_data/eslintVersion.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/_data/eslintVersion.js b/docs/src/_data/eslintVersion.js index cd60276b37a..24964276c0d 100644 --- a/docs/src/_data/eslintVersion.js +++ b/docs/src/_data/eslintVersion.js @@ -14,7 +14,7 @@ const path = require("path"); // Initialization //----------------------------------------------------------------------------- -const pkgPath = path.resolve(__dirname, "../../../package.json"); +const pkgPath = path.resolve(__dirname, "../../package.json"); const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); const { ESLINT_VERSION } = process.env; @@ -23,7 +23,7 @@ const { ESLINT_VERSION } = process.env; //----------------------------------------------------------------------------- /* - * Because we want to differentiate between the development branch and the + * Because we want to differentiate between the development branch and the * most recent release, we need a way to override the version. The * ESLINT_VERSION environment variable allows us to set this to override * the value displayed on the website. The most common case is we will set From b54c610793aa645ee196247074de9100b381f494 Mon Sep 17 00:00:00 2001 From: Jugal Thakkar <2640821+jugalthakkar@users.noreply.github.com> Date: Sat, 3 Sep 2022 06:48:28 +0530 Subject: [PATCH 3/4] docs: add newline to updated docs package json Co-authored-by: Milos Djermanovic --- Makefile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.js b/Makefile.js index 428ff196732..af7b446eb96 100644 --- a/Makefile.js +++ b/Makefile.js @@ -287,7 +287,7 @@ function generateRelease() { const docsPackage = require(docsPackagePath); docsPackage.version = releaseInfo.version; - fs.writeFileSync(docsPackagePath, JSON.stringify(docsPackage, null, 4)); + fs.writeFileSync(docsPackagePath, `${JSON.stringify(docsPackage, null, 4)}\n`); echo("Updating commit with docs data"); exec("git add docs/ && git commit --amend --no-edit"); From ae326a11c631020da832900ee36516d792f06c02 Mon Sep 17 00:00:00 2001 From: Jugal Thakkar <2640821+jugalthakkar@users.noreply.github.com> Date: Sat, 3 Sep 2022 06:50:19 +0530 Subject: [PATCH 4/4] docs: update docs package json version --- docs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 558d41f97a9..6137ce86a2e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "docs-eslint", "private": true, - "version": "1.0.0", + "version": "8.23.0", "description": "", "main": "index.js", "keywords": [],