Skip to content

Conversation

@azu
Copy link
Member

@azu azu commented Oct 12, 2025

Summary

Fixes npm publish failures by removing website-generator from the prepublishOnly script in textchecker-element package.

Problem

The prepublishOnly script was failing during lerna publish because:

  • website-generator was incorrectly included in the publish lifecycle
  • The script requires --output-dir flag but was never properly configured
  • Website generation is not part of the npm publish flow and should not block package publication

Solution

  • Removed npm run website-generator from prepublishOnly script
  • Updated website-generator script to use direct path (node ../@textlint/website-generator/bin/cmd.js) for potential future manual use
  • prepublishOnly now only runs build:public-lib and build, which are the actual requirements for publishing

Context

The actual deployment flow is:

  • Netlify deployment: root website script → textchecker-element website script → vite build
  • The website-generator script is separate and not used in deployment
  • Package publishing should only require building the distributable files

Test Plan

  • Run lerna publish --skip-git --skip-npm from repository root to verify prepublishOnly script succeeds
  • Verify build output is generated correctly in lib/ and public-dist/ directories
  • Confirm no errors related to missing --output-dir flag
  • Check that the package can be published successfully

website-generator is only needed for gh-pages deployment,
not for npm publishing. This script was causing publish failures
because it requires --output-dir flag and dependencies.
@azu azu added the Type: Maintenance Repository Maintenance label Oct 12, 2025
@github-actions
Copy link
Contributor

📦 NPM Package Status

Published Packages Missing OIDC Configuration

Configure OIDC for these packages:

Setup Instructions:

  1. Click each package link above
  2. Click "Add trusted publisher"
  3. Configure with:
    • Repository: textlint/editor
    • Workflow: .github/workflows/release.yml
    • Environment: npm

@azu azu merged commit 68d503c into master Oct 12, 2025
6 checks passed
@azu azu deleted the fix-prepublishonly-website-generator branch October 12, 2025 05:59
This was referenced Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Repository Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants