Gathering detailed insights and metrics for postman-collection-transformer
Gathering detailed insights and metrics for postman-collection-transformer
Gathering detailed insights and metrics for postman-collection-transformer
Gathering detailed insights and metrics for postman-collection-transformer
Perform rapid conversion and validation of JSON structure between Postman Collection Format v1 and v2.
npm install postman-collection-transformer
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.1
Supply Chain
100
Quality
85.9
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
89 Stars
1,351 Commits
48 Forks
15 Watchers
22 Branches
51 Contributors
Updated on Jun 18, 2025
Latest Version
4.1.11
Package Id
postman-collection-transformer@4.1.11
Unpacked Size
188.37 kB
Size
39.01 kB
File Count
19
NPM Version
10.8.2
Node Version
20.19.1
Published on
May 30, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
28
Perform rapid conversion of JSON structure between Postman Collection Format v1 and v2.
The formats are documented at https://schema.postman.com
For CLI usage:
$ npm install -g postman-collection-transformer
As a library:
$ npm install --save postman-collection-transformer
The transformer provides a Command line API to convert collections.
Example:
$ postman-collection-transformer convert \
--input ./v1-collection.json \
--input-version 2.0.0 \
--output ./v2-collection.json \
--output-version 1.0.0 \
--pretty \
--overwrite
All options:
$ postman-collection-transformer convert -h
Usage: convert [options]
Convert Postman Collection from one format to another
Options:
-h, --help output usage information
-i, --input <path> path to the input postman collection file
-j, --input-version [version] the version of the input collection format standard (v1 or v2)
-o, --output <path> target file path where the converted collection will be written
-p, --output-version [version] required version to which the collection is needed to be converted to
-P, --pretty Pretty print the output
--retain-ids Retain the request and folder IDs during conversion (collection ID is always retained)
-w, --overwrite Overwrite the output file if it exists
If you'd rather use the transformer as a library:
1 var transformer = require('postman-collection-transformer'), 2 collection = require('./path/to/collection.json'), 3 inspect = require('util').inspect, 4 5 options = { 6 inputVersion: '1.0.0', 7 outputVersion: '2.0.0', 8 retainIds: true // the transformer strips request-ids etc by default. 9 }; 10 11 transformer.convert(collection, options, function (error, result) { 12 if (error) { 13 return console.error(error); 14 } 15 16 // result <== the converted collection as a raw Javascript object 17 console.log(inspect(result, {colors: true, depth: 10000})); 18 });
The transformer also allows you to convert individual requests (only supported when used as a library):
1 2 var transformer = require('postman-collection-transformer'), 3 4 objectToConvert = { /* A valid collection v1 Request or a collection v2 Item */ }, 5 6 options = { 7 inputVersion: '1.0.0', 8 outputVersion: '2.0.0', 9 retainIds: true // the transformer strips request-ids etc by default. 10 }; 11 12 transformer.convertSingle(objectToConvert, options, function (err, converted) { 13 console.log(converted); 14 });
You can convert individual responses too if needed:
1 2 var transformer = require('postman-collection-transformer'), 3 4 objectToConvert = { /* A v1 Response or a v2 Response */ }, 5 6 options = { 7 inputVersion: '1.0.0', 8 outputVersion: '2.0.0', 9 retainIds: true // the transformer strips request-ids etc by default. 10 }; 11 12 transformer.convertResponse(objectToConvert, options, function (err, converted) { 13 console.log(converted); 14 });
The transformer also provides a Command line API to normalize collections for full forward compatibility.
Example:
$ postman-collection-transformer normalize \
--input ./v1-collection.json \
--normalize-version 1.0.0 \
--output ./v1-norm-collection.json \
--pretty \
--overwrite
All options:
$ postman-collection-transformer normalize -h
Usage: normalize [options]
Normalizes a postman collection according to the provided version
Options:
-i, --input <path> Path to the collection JSON file to be normalized
-n, --normalize-version <version> The version to normalizers the provided collection on
-o, --output <path> Path to the target file, where the normalized collection will be written
-P, --pretty Pretty print the output
--retain-ids Retain the request and folder IDs during conversion (collection ID is always retained)
-w, --overwrite Overwrite the output file if it exists
-h, --help Output usage information
If you'd rather use the transformer as a library:
1 var transformer = require('postman-collection-transformer'), 2 collection = require('./path/to/collection.json'), 3 inspect = require('util').inspect, 4 5 options = { 6 normalizeVersion: '1.0.0', 7 mutate: false, // performs in-place normalization, false by default. 8 noDefaults: false, // when set to true, sensible defaults for missing properties are skipped. Default: false 9 prioritizeV2: false, // when set to true, v2 attributes are used as the source of truth for normalization. 10 retainEmptyValues: false, // when set to true, empty values are set to '', not removed. False by default. 11 retainIds: true // the transformer strips request-ids etc by default. 12 }; 13 14 transformer.normalize(collection, options, function (error, result) { 15 if (error) { 16 return console.error(error); 17 } 18 19 // result <== the converted collection as a raw Javascript object 20 console.log(inspect(result, {colors: true, depth: 10000})); 21 });
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 5/20 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More