Fix postinstall patches for hoisted dependencies, add CI publish workflow

- Postinstall now walks up to find node_modules (works when deps are hoisted)
- All patches verified: piConfig, process.title, OAuth page, editor theme
- Add GitHub Actions workflow to publish on version bump

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Advait Paliwal
2026-03-23 19:05:24 -07:00
parent 6c9d629b5d
commit 58a515c168
4 changed files with 66 additions and 9 deletions

31
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Publish to npm
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- run: npm test
- name: Publish if version changed
run: |
CURRENT=$(npm view @companion-ai/feynman version 2>/dev/null || echo "0.0.0")
LOCAL=$(node -p "require('./package.json').version")
if [ "$CURRENT" != "$LOCAL" ]; then
npm publish --access public
else
echo "Version $LOCAL already published, skipping"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}