# Changelog

Todos los cambios relevantes de `netpay3ds` se documentan en este archivo. El
proyecto utiliza SemVer y dist-tags de npm para mantener una sola identidad de
paquete.

## [2.0.0] - 2026-08-24

### Changed

- Migrated the library toolchain sequentially from Angular 13 through Angular
  22 using the official Angular migrations.
- Updated the supported peer range to Angular `>=22.0.0 <23.0.0` while keeping
  RxJS `>=7.5.0 <8.0.0`.
- Updated the distributable to the Angular 22 Package Format with Partial-Ivy
  compilation and FESM2022 output.

### Compatibility

- Preserves all four public exports, all ten public service methods and the
  observable callback behavior from 1.1.1.
- Preserves dynamic Songbird loading, SRI, frictionless and delayed challenge
  handling without changes to the payment flow.
- Validated the published prerelease in Hosted Checkout with Angular 22,
  including a successful approved 3DS Challenge.

## [1.1.1] - 2026-08-21

### Documentation

- Remove repository-internal consumer, development, release-pipeline and
  security sections from the public npm README.
- Replace obsolete NetPay documentation URLs with verified versioned links.
- Avoid npm-invalid relative links for packaged documentation and use the
  canonical Open Source Initiative page for the MIT license.

## [1.1.0] - 2026-08-21

### Fixed

- Preserve both arguments emitted by Cardinal `payments.validated`, including
  the response JWT required after a delayed approved challenge.
- Recover `ProcessorTransactionId` from the decoded response data first and
  from `responseJWT.Payload.Payment` as a compatibility fallback.
- Preserve the public `proceed(context, acsUrl, paReq,
  authenticationTransactionID, callback)` contract and return control exactly
  once to the consumer.
- Add regression coverage for delayed challenges and the Cardinal `SUCCESS`,
  `NOACTION`, `FAILURE`, and `ERROR` outcomes.
- No backend contract change.

## [1.0.9] - 2026-08-20

### Fixed

- Accept numeric safe-integer `ReferenceId` values from existing Cardinal auth
  JWT responses and normalize them internally to string.
- Preserve string `ReferenceId` behavior without modifying or reconstructing the
  signed JWT.
- Support the existing `PROCEED_TO_VALIDATE_AUTHENTICATION` challenge action in
  `canProceed` while preserving the legacy `review` behavior.
- No backend contract change.

## [1.0.8] - 2026-08-20

### Fixed

- Normaliza a texto un `ReferenceId` numérico seguro recibido en el JWT de
  Cardinal para mantener compatibilidad con las respuestas existentes del
  backend.
- Rechaza valores numéricos negativos, fraccionarios o fuera del rango entero
  seguro de JavaScript para evitar pérdida de precisión.

## [1.0.1] - Unreleased

### Documentation

- Restored and consolidated the complete integration documentation from the
  0.5.x line.
- Added 1.x dynamic Songbird configuration, environment, SRI, compatibility
  and migration guidance.
- Added README package validation to prevent documentation regressions.

No se modifica la lógica pública de Songbird, Cardinal, 3DS, Angular ni sus
peer dependencies.

## [1.0.0] - 2026-08-18

### Added

- Configuración dinámica de la URL, versión, SRI, `crossOrigin` y fecha de
  Songbird obtenida desde el backend del ambiente seleccionado.
- Validación estricta de HTTPS, host por ambiente, ruta/version e integrity
  SHA-384 antes de insertar el script.
- Timeouts y códigos internos para configuración, carga de Songbird, JWT,
  `setupComplete` y `payments.validated`.
- Deduplificación de cargas y serialización de operaciones Cardinal.
- Contrato automatizado de exports públicos y validación del tarball.
- Licencia MIT incluida y validada dentro del paquete npm.
- `netpay-3ds-sample` como consumer oficial del tarball con build, smoke y
  mocks funcionales de los flujos 3DS.

### Changed

- Primera versión estable SemVer de la línea Angular 13.
- Compatibilidad explícita: Angular `>=13.2.0 <22.0.0` y RxJS
  `>=7.5.0 <8.0.0`.
- Política de release automática: 1.x usa `latest` y `legacy` hasta existir una
  versión 2.x estable; después sólo puede mover `legacy`.
- `publishConfig` conserva registro/acceso, pero el pipeline decide los
  dist-tags según las versiones publicadas.
- Build npm Partial-Ivy sin sourcemaps productivos.
- Separación entre readiness técnico reproducible y aprobación corporativa de
  publicación.

### Removed

- Dependencias no utilizadas `scriptjs` y `@types/scriptjs`; el script se carga
  con DOM nativo y SRI.

### Compatibility

- Se conservan los exports y métodos públicos de 0.5.7.
- El mismo tarball final instala y compila en consumers Angular 13–21; versiones
  fuera del peer range declarado se rechazan de forma controlada.

## [0.5.7]

- Última versión publicada antes de adoptar la estrategia SemVer 1.x/2.x.
