From f13949af48e750e1822d3291c9c82fa78165b450 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Jun 2020 22:45:18 +0200 Subject: [PATCH 1/3] Fix loader not being published anymore --- .github/workflows/publish.yml | 6 +++++- lib/loader/package.json | 2 +- scripts/postversion.js | 21 ++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 020dc2c7da..f9bb9a4aca 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,4 +26,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: node node_modules/semantic-release/bin/semantic-release.js --unstable + run: | + node node_modules/semantic-release/bin/semantic-release.js --unstable + cd lib/loader + npm publish --access public + cd ../.. diff --git a/lib/loader/package.json b/lib/loader/package.json index ea9e7f2af0..09449c325d 100644 --- a/lib/loader/package.json +++ b/lib/loader/package.json @@ -35,4 +35,4 @@ "package.json", "README.md" ] -} +} \ No newline at end of file diff --git a/scripts/postversion.js b/scripts/postversion.js index dcc985353b..c9d39aad38 100644 --- a/scripts/postversion.js +++ b/scripts/postversion.js @@ -1,7 +1,18 @@ -// Make sure that we are not publishing a v1 just yet - -const pkg = require("../package.json"); +const fs = require("fs"); +const path = require("path"); -if (!/^0\./.test(pkg.version)) { - throw Error("Unexpected version: " + pkg.version); +// Make sure that we are not publishing a v1 just yet +const mainPkg = require("../package.json"); +if (!/^0\./.test(mainPkg.version)) { + throw Error("Unexpected version: " + mainPkg.version); } + +// Sync lib with main package +[ + "lib/loader" +].forEach(dir => { + const pkgFile = path.join(__dirname, "..", dir, "package.json"); + const pkg = require(pkgFile); + pkg.version = mainPkg.version; + fs.writeFileSync(pkgFile, JSON.stringify(pkg, null, 2)); +}); From 81e00cbd7627086aaa3f761648b883bf6cd5e1f5 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Jun 2020 22:54:10 +0200 Subject: [PATCH 2/3] apply config in case semantic-release doesn't save it --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f9bb9a4aca..b435873583 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,5 +29,6 @@ jobs: run: | node node_modules/semantic-release/bin/semantic-release.js --unstable cd lib/loader + npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" npm publish --access public cd ../.. From 2657eb45aeb2b24f8797ceeb49c4f62b15bb8a4f Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Jun 2020 23:03:40 +0200 Subject: [PATCH 3/3] non-stale compat label --- .github/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/stale.yml b/.github/stale.yml index a5fcffe32a..2ccd92d651 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -5,6 +5,7 @@ daysUntilClose: 7 exemptLabels: - bug - enhancement + - compatibility exemptProjects: true exemptMilestones: true exemptAssignees: true