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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 020dc2c7da..b435873583 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,4 +26,9 @@ 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 config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" + 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)); +});