From f940073fd0d51693930523492803d6ae02d090fd Mon Sep 17 00:00:00 2001 From: James Bourne Date: Sun, 10 Mar 2024 14:50:50 +0100 Subject: [PATCH] ci: run matrix test --- .github/workflows/build.yml | 2 ++ README.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eab7c301..c680e6cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,7 @@ jobs: strategy: matrix: node-version: [18.x, 20.x] + axios-version: ["1.4.0", "1.5.0", "1.6.0", "latest"] steps: - uses: actions/checkout@v3 @@ -25,6 +26,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci + - run: npm install axios@${{ matrix.axios-version }} - run: npm run build - run: npm run lint - run: npm run test diff --git a/README.md b/README.md index 6c9acc65..ef9769dc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # aws4-axios + [![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) + [![npm version](https://img.shields.io/npm/v/aws4-axios.svg?style=flat-square)](https://www.npmjs.org/package/aws4-axios) @@ -17,6 +19,18 @@ This may be useful for accessing AWS services protected with IAM auth such as an | --------------------- | ------------------------------- | | `yarn add aws4-axios` | `npm install --save aws4-axios` | +# Compatibility + +This interceptor is heavily dependent on Axios internals, so minor changes to them can cause the interceptor to fail. + +Please make sure you are using one of the following versions of Axios before submitting issues etc. + +| Axios Version | Supported? | +| ------------------- | ---------- | +| `< 1.4.0` | ❌ No | +| `>= 1.4.0 <= 1.6.7` | ✅ Yes | +| `> 1.6.7` | Unknown | + # Usage To add an interceptor to the default Axios client: