Publish under unscoped names and fix repository metadata

- Stop rewriting package names to @boardgamers/* before publish: trusted
  publishing on npmjs.com is configured for the original unscoped
  powergrid-engine / powergrid-viewer packages, so the rewrite caused
  E404 because the OIDC exchange has no trust relationship for the
  scoped names.
- Update each package.json's repository, homepage and bugs fields to
  point at boardgamers/powergrid (with a directory subpath) instead of
  the now-defunct LucasAMello/powergrid-engine fork.
- Switch the publish step to pnpm@latest via npx so we get both OIDC
  trusted-publishing support (pnpm >= 10.16) and the workspace:
  protocol rewrite that npm publish does not perform, without bumping
  the repo-wide packageManager.

Made-with: Cursor
This commit is contained in:
coyotte508 2026-04-27 11:23:14 +02:00
commit c0e5a67adf
4 changed files with 25 additions and 11 deletions

View file

@ -45,9 +45,7 @@ jobs:
node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');"
git add .
git commit -m "🔖 powergrid-engine $BUMPED_VERSION"
# Would be better to have correct package name in package.json, but need to check if anything broken
- run: sed -i 's:powergrid-engine:@boardgamers/powergrid-engine:' package.json
# Trusted publishing requires npm >= 11.5.1; ensure we have it regardless of the node distribution
- run: npm install -g npm@latest
- run: npm publish --access public
# pnpm 10.16+ supports OIDC trusted publishing; use it directly to avoid bumping the
# repo-wide packageManager (currently pnpm 7) which would force a lockfile rewrite.
- run: npx -y pnpm@latest publish --access public --no-git-checks
- run: git push --follow-tags

View file

@ -45,9 +45,8 @@ jobs:
node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');"
git add .
git commit -m "🔖 powergrid-viewer $BUMPED_VERSION"
# Would be better to have correct package name in package.json, but need to check if anything broken
- run: sed -i 's:"powergrid-viewer":"@boardgamers/powergrid-viewer":' package.json
# Trusted publishing requires npm >= 11.5.1; ensure we have it regardless of the node distribution
- run: npm install -g npm@latest
- run: npm publish --access public
# pnpm 10.16+ supports OIDC trusted publishing and rewrites the workspace:../engine
# dependency to a real version range; use it directly to avoid bumping the repo-wide
# packageManager (currently pnpm 7) which would force a lockfile rewrite.
- run: npx -y pnpm@latest publish --access public --no-git-checks
- run: git push --follow-tags

View file

@ -5,7 +5,15 @@
"main": "dist/index.js",
"types": "index.ts",
"source": "index.ts",
"repository": "git@github.com:LucasAMello/powergrid-engine.git",
"repository": {
"type": "git",
"url": "git+https://github.com/boardgamers/powergrid.git",
"directory": "engine"
},
"homepage": "https://github.com/boardgamers/powergrid#readme",
"bugs": {
"url": "https://github.com/boardgamers/powergrid/issues"
},
"publishConfig": {
"access": "public"
},

View file

@ -1,6 +1,15 @@
{
"name": "powergrid-viewer",
"version": "1.5.5",
"repository": {
"type": "git",
"url": "git+https://github.com/boardgamers/powergrid.git",
"directory": "viewer"
},
"homepage": "https://github.com/boardgamers/powergrid#readme",
"bugs": {
"url": "https://github.com/boardgamers/powergrid/issues"
},
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",