npm @alex_neo/playwright-azure-reporter 1.14.0
Release v1.14.0

latest releases: 1.20.0, 1.19.2-pr144.143-feature-add-publishretryresults-and-markflakytests-options.c20432b, 1.19.2-pr144.143-feature-add-publishretryresults-and-markflakytests-options.f074c1d...
7 months ago

🎉 Release 1.14.0

This is a stable release.

Installation:

npm install @alex_neo/playwright-azure-reporter@latest

Changes

Feature

feat(auth): implement comprehensive authentication system with smart token refresh

  • Add support for three authentication types: pat, accessToken, and managedIdentity
  • Implement Azure DefaultAzureCredential integration for seamless Azure authentication
  • Add intelligent token refresh mechanism with expiration-based optimization
  • Make token field optional when using managedIdentity authentication
  • Add applicationIdURI field for Azure resource identification

BREAKING CHANGES:

  • authType field now supports 'managedIdentity' value requiring applicationIdURI
  • token field becomes optional for managedIdentity authentication type

Features:

  • New authType: 'managedIdentity' with Azure DefaultAzureCredential support
  • Automatic credential resolution (Azure CLI, managed identity, environment variables)
  • Smart token refresh with 5-minute expiration threshold to prevent unnecessary refreshes
  • Token expiration tracking using expiresOnTimestamp from Azure responses
  • Strategic refresh placement in onTestEnd for optimal timing during test execution
  • Backward compatibility maintained for existing PAT and accessToken configurations
  • Enhanced validation logic for different authentication scenarios

Performance Optimizations:

  • Token refresh only occurs when expiration is within 5 minutes
  • Prevents excessive API calls by tracking token expiration timestamps
  • Efficient credential reuse to avoid connection recreation
  • Connection updates only when token actually changes

Dependencies:

  • Add @azure/identity ^4.12.0 for Azure authentication services

Documentation:

  • Update README.md with comprehensive authentication examples
  • Add detailed authType-examples.md with usage patterns for all three types
  • Include configuration examples for different Azure environments
  • Document smart token refresh behavior and thresholds

Testing:

  • Add comprehensive test suite for token refresh mechanism (10 new tests)
  • Test coverage for all authentication scenarios and edge cases
  • Validate smart refresh logic with various expiration scenarios
  • Test error handling and graceful degradation
  • Maintain 83 passing unit tests with full feature coverage
  • Add validation tests for applicationIdURI requirement

Architecture:

  • Store DefaultAzureCredential instance for efficient token refresh
  • Track token expiration with _tokenExpiresOn property
  • Implement _refreshTokenIfNeeded with intelligent refresh logic
  • Update authentication handler creation to store expiration data
  • Ensure connection recreation only when necessary

Don't miss a new playwright-azure-reporter release

NewReleases is sending notifications on new releases.