Skip to content

Commit

Permalink
Merge branch 'release/4.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
codenirvana committed Sep 13, 2023
2 parents d335231 + 37449cf commit 1907c3c
Show file tree
Hide file tree
Showing 14 changed files with 2,189 additions and 454 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CI

on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches: [$default-branch]
schedule:
- cron: '0 12 * * 0'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install
run: npm ci

- name: Run lint tests
run: npm run test-lint

browser-tests:
name: Browser Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install
run: npm ci

- name: Run browser tests
run: npm run test-browser

tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
os: [ubuntu-latest, windows-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install
run: npm ci

- name: Run system tests
run: npm run test-system

- name: Run unit tests
run: npm run test-unit

- name: Run schema tests
run: npm run test-schema
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ test/
examples/
.eslintrc
.nycrc.js
.travis.yml
.editorconfig
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

12 changes: 11 additions & 1 deletion CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
4.1.7:
date: 2023-09-13
fixed bugs:
- >-
GH-617 Fixed a bug where `noDefaults` is not handled correctly on v1.x ->
v2.x conversions
chores:
- GH-619 Migrate to GitHub Actions
- Updated dependencies

4.1.6:
date: 2022-02-23
fixed bugs:
Expand All @@ -8,7 +18,7 @@
4.1.5:
date: 2022-02-21
chores:
- 'GH-486 [private] Added handlePartial option for v2.x -> v1 conversions'
- GH-486 [private] Added handlePartial option for v2.x -> v1 conversions
- Updated dependencies

4.1.4:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![Build Status](https://travis-ci.com/postmanlabs/postman-collection-transformer.svg?branch=develop)](https://travis-ci.com/postmanlabs/postman-collection-transformer)
# postman-collection-transformer
# Postman Collection Transformer [![Build Status](https://github.com/postmanlabs/postman-collection-transformer/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/postmanlabs/postman-collection-transformer/actions/workflows/ci.yml)

Perform rapid conversion of JSON structure between Postman Collection Format v1 and v2.

The formats are documented at https://schema.getpostman.com
The formats are documented at https://schema.postman.com

## Installation

Expand Down
6 changes: 3 additions & 3 deletions lib/converters/v1.0.0/converter-v1-to-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ _.assign(Builders.prototype, {
var self = this,
retainIds = self.options.retainIds,
units = ['request', 'response'],
variable = self.variable(requestV1, { retainIds: retainIds }),
variable = self.variable(requestV1, self.options),
item = {
name: requestV1.name || '', // Inline building to avoid additional function call
event: self.event(requestV1)
Expand Down Expand Up @@ -689,7 +689,7 @@ _.assign(Builders.prototype, {
var retainIds = self.options.retainIds,
auth = self.auth(folder),
event = self.event(folder),
variable = self.variable(folder, { retainIds: retainIds }),
variable = self.variable(folder, self.options),
result = {
name: folder.name,
item: []
Expand Down Expand Up @@ -865,7 +865,7 @@ module.exports = {
units = ['info', 'item'],
builders = new Builders(options),
authOptions = { excludeNoauth: true },
varOpts = options && { fallback: options.env, retainIds: options.retainIds };
varOpts = options && ({ fallback: options.env, ...options });

try {
units.forEach(function (unit) {
Expand Down
2 changes: 1 addition & 1 deletion lib/converters/v1.0.0/converter-v1-to-v21.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ module.exports = {
units = ['info', 'item'],
builders = new Builders(options),
authOptions = { excludeNoauth: true },
varOpts = options && { fallback: options.env, retainIds: options.retainIds };
varOpts = options && { fallback: options.env, ...options };

try {
units.forEach(function (unit) {
Expand Down
30 changes: 30 additions & 0 deletions npm/release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env node
// ---------------------------------------------------------------------------------------------------------------------
// This script is intended to automate the versioning and changelog generation process for a release.
// ---------------------------------------------------------------------------------------------------------------------

const shipit = require('@postman/shipit'),

// npm run release [true] [beta]
[pushToOrigin, preReleaseSuffix] = process.argv.splice(2);

// only support `beta` suffix
if (preReleaseSuffix && preReleaseSuffix !== 'beta') {
throw new Error(`Can't prerelease with \`${preReleaseSuffix}\` suffix.`);
}

// 🚢 Just Ship It!
shipit({
mainBranch: 'main',
// don't push to origin unless explicitly set
pushToOrigin: pushToOrigin === 'true',
// prerelease suffix, if any
preReleaseSuffix: preReleaseSuffix,
// make sure that following dependencies are up to date
dependencyList: []
}).then((version) => {
console.info('🚀', version);
}).catch((err) => {
console.error('🔥', err);
process.exit(1);
});
4 changes: 0 additions & 4 deletions npm/test-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const path = require('path'),
KARMA_CONFIG_PATH = path.join(__dirname, '..', 'test', 'karma.conf');

module.exports = function (exit) {
if (process.env.TRAVIS_OS_NAME === 'windows') { // eslint-disable-line no-process-env
return console.info(chalk.yellow.bold('Skipping browser tests on windows...'));
}

console.info(chalk.yellow.bold('Running unit tests within browser...'));

(new KarmaServer({ // eslint-disable no-new
Expand Down

0 comments on commit 1907c3c

Please sign in to comment.