Registry / devops / template-subscriber-migration-system

template-subscriber-migration-system

JSON →
library0.2.3jsnpmunverified

A GitHub Actions helper library (v0.2.3, pre-1.0, monthly releases) for upstream template repositories to publish migration bundles and for downstream subscriber repositories to opt into controlled migration PRs. Provides three CLI binaries – publish-template-migration, subscriber-template-sync, and handle-template-sync-command – along with example workflows. Unlike raw git-based sync or manual cherry-picks, it offers a formal approve/revise/decline lifecycle for template changes in drifted subscriber repos. Requires Node >=20.

npm install template-subscriber-migration-system
INSTALL
IMPORT
SIG · TEMPLATE-SUBSCRIBE
T
template-subscriber-migration-system
devopsjavascriptv0.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

publish-template-migration
npx --yes --package template-subscriber-migration-system@latest -- publish-template-migration
npm exec template-subscriber-migration-system -- publish-template-migration
Use npx with --package flag to ensure correct package is used. Since v0.2.0, the package ships multiple binaries; require() not applicable.
subscriber-template-sync
npx --yes --package template-subscriber-migration-system@latest -- subscriber-template-sync
npx subscriber-template-sync
Avoid global install; use npx with explicit package name to avoid version conflicts.
handle-template-sync-command
npx --yes --package template-subscriber-migration-system@latest -- handle-template-sync-command
require('template-subscriber-migration-system')
This package exports only CLI binaries, not a JavaScript module. Do not attempt to import it programmatically.

Shows a complete GitHub Actions workflow that runs weekly to discover the newest template migration and open a subscriber PR.

name: Sync upstream template on: schedule: - cron: '0 0 * * 0' workflow_dispatch: env: TEMPLATE_SYNC_PACKAGE: template-subscriber-migration-system@latest jobs: sync: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Discover and apply latest migration run: | npx --yes --package ${{ env.TEMPLATE_SYNC_PACKAGE }} -- subscriber-template-sync env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Debug
Known issues
breakingNode.js 18 support dropped in v0.2.0. Requires Node >=20.
fix
Upgrade Node to version 20 or later.
affects: >=0.2.0
gotchaCLI binaries require GITHUB_TOKEN environment variable. Running without it will fail with authentication errors.
fix
Set GITHUB_TOKEN in the workflow environment.
affects: >=0.1.0
deprecatedThe config option `migration_path` was renamed to `subscriber_dir` in v0.2.0. Old configs silently ignored.
fix
Replace `migration_path` with `subscriber_dir` in your config file.
affects: >=0.1.0 <0.2.0
gotchaWorkflow example snippets use `TEMPORARY` (typo) instead of `TEMPLATE_SYNC_PACKAGE` in some versions.
fix
Use `TEMPLATE_SYNC_PACKAGE` as the environment variable name.
affects: 0.1.x
gotchaPre-1.0 version: breaking changes may occur in minor or patch releases. Pin to exact version or use @latest with caution.
fix
Pin to a specific version in production workflows, e.g., `template-subscriber-migration-system@0.2.3`.
affects: <1.0.0
Errors
Common errors & fixes
Error: GITHUB_TOKEN environment variable not set
Command requires a GitHub token to create PRs or access releases.
fix
Add `env: { GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} }` to the workflow step.
Command not found: subscriber-template-sync
Global install of package missing; npx not resolving the binary.
fix
Run `npx --yes --package template-subscriber-migration-system@latest subscriber-template-sync` instead of just `subscriber-template-sync`.
Could not find migration bundle for [ref]
No GitHub Release tagged with the expected migration pattern exists.
fix
Ensure the upstream template has published a migration bundle via `publish-template-migration` before running subscriber sync.
ValidationError: `subscriber_dir` path does not exist
The subscriber directory specified in config is missing.
fix
Verify the `subscriber_dir` path in your config file points to an existing directory within the repository.
Upgrade
Version history
0.2.3latest on npm
Audit
Dependencies
noderequiredRuntime requirement: Node >=20
github-actionsoptionalDesigned to be used within GitHub Actions workflows
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
2
Amazon
1
Resources
template-subscriber-migration-system — npm install template-subscriber-migration-system · libregistry