Skip to content

Commit 222e3c8

Browse files
authored
Merge pull request #856 from postmanlabs/release/v5.0.1
Release version v5.0.1
2 parents 55f2b00 + 613db02 commit 222e3c8

File tree

6 files changed

+96
-22
lines changed

6 files changed

+96
-22
lines changed

.github/workflows/integration.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ jobs:
2020
- run: npm ci
2121
- run: npm run test-lint
2222
- run: npm run test-system
23-
- run: npm run test-unit
24-
23+
- run: npm run test-unit | tee coverage.txt && exit ${PIPESTATUS[0]}
24+
- name: Upload coverage-summary.json
25+
if: matrix.node-version == '22.x'
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: coverage-summary-unit
29+
path: |
30+
.coverage/coverage-summary.json
31+
coverage.txt
2532
Regression:
2633
needs: Unit-Tests
2734
runs-on: ubuntu-latest
@@ -35,4 +42,12 @@ jobs:
3542
with:
3643
node-version: ${{ matrix.node-version }}
3744
- run: npm ci
38-
- run: npm run test-regression
45+
- run: npm run test-regression | tee coverage.txt && exit ${PIPESTATUS[0]}
46+
- name: Upload coverage-summary.json
47+
if: matrix.node-version == '22.x'
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: coverage-summary-integration
51+
path: |
52+
.coverage/coverage-summary.json
53+
coverage.txt
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# owned by test infrastructure team
2+
name: 'Quality Check Action'
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- develop
9+
10+
env:
11+
GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
12+
GH_TOKEN: ${{ github.token }}
13+
GH_BASE_SHA: ${{ github.event.pull_request.base.sha }}
14+
GH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
15+
GITHUB_REPOSITORY: ${{ github.repository }}
16+
17+
jobs:
18+
track-unit-test-coverage:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Track unit-test coverage
22+
uses: postmanlabs/test-infra-scripts/.github/actions/coverage-pr-comment-action@main
23+
with:
24+
jobName: 'Unit-Tests'
25+
coverageType: unit
26+
squad: api-builder
27+
artifactSource: coverage-summary-unit
28+
sonarqube_check: false
29+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
31+
QE_HEVO_WEBHOOK_URL: ${{ secrets.QE_HEVO_WEBHOOK_URL }}
32+
QE_HEVO_ACCESS_KEY: ${{ secrets.QE_HEVO_ACCESS_KEY }}
33+
QE_HEVO_SECRET_KEY: ${{ secrets.QE_HEVO_SECRET_KEY }}
34+
POSTMAN_NPM_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }}
35+
36+
track-integration-test-coverage:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Track integration-test coverage
40+
uses: postmanlabs/test-infra-scripts/.github/actions/coverage-pr-comment-action@main
41+
with:
42+
jobName: 'Regression'
43+
coverageType: integration
44+
squad: api-builder
45+
artifactSource: coverage-summary-integration
46+
sonarqube_check: false
47+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
48+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
49+
QE_HEVO_WEBHOOK_URL: ${{ secrets.QE_HEVO_WEBHOOK_URL }}
50+
QE_HEVO_ACCESS_KEY: ${{ secrets.QE_HEVO_ACCESS_KEY }}
51+
QE_HEVO_SECRET_KEY: ${{ secrets.QE_HEVO_SECRET_KEY }}
52+
POSTMAN_NPM_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }}

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## [Unreleased]
44

5+
## [v5.0.1] - 2025-07-22
6+
57
## [v5.0.0] - 2025-03-07
68

79
### Breaking Changes
810

9-
- Drop support for node < v18.
11+
- Drop support for node &lt; v18.
1012

1113
## [v4.25.0] - 2025-01-15
1214

@@ -655,7 +657,9 @@ Newer releases follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0
655657

656658
- Base release
657659

658-
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.0...HEAD
660+
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.1...HEAD
661+
662+
[v5.0.1]: https://github.com/postmanlabs/openapi-to-postman/compare/v5.0.0...v5.0.1
659663

660664
[v5.0.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.25.0...v5.0.0
661665

assets/json-schema-faker.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23620,9 +23620,9 @@ function extend() {
2362023620

2362123621
var ALL_TYPES = ['array', 'object', 'integer', 'number', 'string', 'boolean', 'null'];
2362223622
var MOST_NEAR_DATETIME = 2524608000000;
23623-
var MIN_INTEGER = -100000000;
23624-
var MAX_INTEGER = 100000000;
23625-
var MIN_NUMBER = -100;
23623+
var MIN_INTEGER = 0;
23624+
var MAX_INTEGER = 10000;
23625+
var MIN_NUMBER = 0;
2362623626
var MAX_NUMBER = 100;
2362723627
var env = {
2362823628
ALL_TYPES: ALL_TYPES,
@@ -24261,20 +24261,15 @@ function extend() {
2426124261
return generated > 0 ? Math.floor(generated) : Math.ceil(generated);
2426224262
};
2426324263

24264-
var LIPSUM_WORDS = ('Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore'
24265-
+ ' et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea'
24266-
+ ' commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla'
24267-
+ ' pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est'
24268-
+ ' laborum').split(' ');
2426924264
/**
24270-
* Generates randomized array of single lorem ipsum words.
24265+
* This will always return "string" as a value instead of Lorem text.
24266+
* It is used to generate a value for the "string" type.
2427124267
*
2427224268
* @param length
2427324269
* @returns {Array.<string>}
2427424270
*/
2427524271
function wordsGenerator(length) {
24276-
var words = random.shuffle(LIPSUM_WORDS);
24277-
return words.slice(0, length);
24272+
return ['string'];
2427824273
}
2427924274

2428024275
// fallback generator
@@ -24452,6 +24447,8 @@ function extend() {
2445224447
minProps = Math.max(optionalsProbability === null || additionalProperties ? random.number(fillProps ? 1 : 0, max) : 0, min);
2445324448
}
2445424449

24450+
let propertyCount = 0;
24451+
2445524452
while (fillProps) {
2445624453
if (!(patternPropertyKeys.length || allowsAdditional)) {
2445724454
break;
@@ -24490,7 +24487,13 @@ function extend() {
2449024487
current += 1;
2449124488
}
2449224489
} else {
24493-
const word = get(requiredProperties) || (wordsGenerator(1) + hash());
24490+
/*
24491+
This will generate a key_0, key_1, etc. for any additional properties, instead of
24492+
using a random word. This is to ensure that the generated keys are predictable and
24493+
consistent across generations.
24494+
*/
24495+
const PREFIX_KEY = 'key_'
24496+
const word = get(requiredProperties) || (PREFIX_KEY + propertyCount++);
2449424497

2449524498
if (!props[word]) {
2449624499
props[word] = additionalProperties || anyType;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-to-postmanv2",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Convert a given OpenAPI specification to Postman Collection v2.0",
55
"homepage": "https://github.com/postmanlabs/openapi-to-postman",
66
"bugs": "https://github.com/postmanlabs/openapi-to-postman/issues",
@@ -150,10 +150,10 @@
150150
},
151151
"scripts": {
152152
"test": "./scripts/test.sh",
153-
"test-unit": "nyc --reporter=text -x **/assets/** -x **/test/** ./node_modules/mocha/bin/mocha --timeout 90000 \"test/unit/**/**.test.js\"",
153+
"test-unit": "nyc --reporter=text --reporter=json-summary --report-dir=.coverage -x **/assets/** -x **/test/** ./node_modules/mocha/bin/mocha --timeout 90000 \"test/unit/**/**.test.js\"",
154154
"test-lint": "./scripts/test-lint.sh",
155155
"test-system": "./node_modules/mocha/bin/mocha -x **/assets/** -x **/test/** \"test/system/**.test.js\"",
156-
"test-regression": "./node_modules/mocha/bin/mocha test/integration/integration.test.js test/unit/sanity.test.js",
156+
"test-regression": "nyc --reporter=text --reporter=json-summary --report-dir=.coverage ./node_modules/mocha/bin/mocha test/integration/integration.test.js test/unit/sanity.test.js",
157157
"release": "./scripts/release.sh",
158158
"coverage": "nyc report --reporter=html --reporter=text mocha"
159159
}

0 commit comments

Comments
 (0)