Skip to content

Conversation

@nicknisi
Copy link
Member

Summary

  • Add version check that fetches latest version from npm registry on CLI startup
  • Display warning with npx workos@latest command when running outdated version
  • Fail silently on network errors/timeouts (500ms max)

Why

Users running npx workos receive cached, outdated versions due to npx caching behavior. The cache stores the first downloaded version indefinitely, causing users to unknowingly run deprecated versions (e.g., v0.0.24) instead of current (v0.3.2). This leads to bugs, missing features, and API incompatibilities.

Notes

  • Check runs before any commands/prompts to avoid UI corruption
  • Uses existing semver dependency for version comparison
  • 9 unit tests cover success, timeout, and error scenarios

Checks npm registry for latest version on startup and displays a warning
if the current version is outdated, suggesting `npx workos@latest`.

- Blocks up to 500ms for the check before any commands run
- Fails silently on network errors or timeouts
- Uses semver for version comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants