diff --git a/CHANGELOG.md b/CHANGELOG.md index 204949e..5918506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/aegrey/postman-to-k6/compare/v1.8.7...HEAD) +## [1.9.1] - 2024-03-27 + +### Added + +- Support for pm.response.headers.all() [#3](https://github.com/aegrey/postman-to-k6/issues/3) + ## [1.9.0] - 2024-03-26 ### Added diff --git a/README.md b/README.md index 5458c01..91f6294 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # POSTMAN TO k6 -This project is a friendly fork of [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6) from the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6), where I will focus on **building out new features not currently supported** alongside maintenance. +Due to the lack of feature support in the original library and the apideck fork, I have decided to build this out seperately as I require these features immediately in a project I'm working on. I will focus on **building out new features not currently supported** alongside maintenance -I have decided to build this out seperately as I require these features immediately in a project I'm working on. + +This project is a friendly fork of [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6) from the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6). + #### Request a New Features Open an issue with your feature request (must me something currently supported in postman) and I'll work on the requests with the most votes in order. @@ -76,22 +78,22 @@ While possible to install globally, we recommend that you, if possible, add the test project using: ```shell -$ npm install -D @apideck/postman-to-k6 +$ npm install -D @aegrey/postman-to-k6 ``` or using yarn... ```shell -$ yarn add @apideck/postman-to-k6 +$ yarn add @aegrey/postman-to-k6 ``` -Note that this will require you to run the converter with `npx @apideck/postman-to-k6 your-postman-file` or, if you are +Note that this will require you to run the converter with `npx @aegrey/postman-to-k6 your-postman-file` or, if you are using an older versions of npm, `./node_modules/.bin/postman-to-k6 your-postman-file`. ### Global Installation ```shell -$ npm install -g @apideck/postman-to-k6 +$ npm install -g @aegrey/postman-to-k6 ``` ## Usage diff --git a/aegrey-changes.md b/aegrey-changes.md index c5a5401..3be7210 100644 --- a/aegrey-changes.md +++ b/aegrey-changes.md @@ -4,5 +4,5 @@ By adding support for the Postman [Response Data](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#scripting-with-response-data) -has long been unsupported, despite it being a fairly straightforward change. v1.9.0 implements support for `pm.response.headers.get()` +has long been unsupported, despite it being a fairly straightforward change. v1.9.0 implements support for `pm.response.headers.get()` and `pm.response.headers.all()` diff --git a/lib/shim/core.js b/lib/shim/core.js index 7be1504..5a0a54a 100644 --- a/lib/shim/core.js +++ b/lib/shim/core.js @@ -466,6 +466,10 @@ const pm = Object.freeze({ const header = store.response.headers.cased[name]; return header ? header : null; }, + all() { + const headers = store.response.headers.cased; + return headers ? headers : null; + }, }), get code() { return store.response.code; diff --git a/package.json b/package.json index d4be1af..4da98e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aegrey/postman-to-k6", - "version": "1.9.0", + "version": "1.9.1", "description": "Convert a Postman collection to k6 JavaScript", "keywords": [ "k6",