Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
aa57e0d
Merge pull request #787 from postmanlabs/release/v1.14.2
aman-v-singh Feb 21, 2025
c32f341
chore: Bump postman-collection to v5 and drop support for node < 18
parthverma1 Feb 25, 2025
d16be64
chore: Update repository tests
parthverma1 Feb 25, 2025
89e8d14
chore: Update js fetch test dependency
parthverma1 Feb 25, 2025
6389566
chore: Added trace deprecation option for debugging test failures
parthverma1 Feb 25, 2025
3dbffe1
chore: Fixed node-fetch versioning for js-fetch tests
parthverma1 Feb 26, 2025
ed7f9be
chore: Fixed axios versioning for node-axios tests
parthverma1 Feb 26, 2025
379c58e
chore: Gave up on supporting Node v22 due node js request dependency …
parthverma1 Feb 26, 2025
ac2ddc3
chore: Add individual run for each language
parthverma1 Feb 26, 2025
d83ed50
fix: Workflow file to run tests for individual packages
parthverma1 Feb 26, 2025
31d2912
fix: Added .eslintignore to ignore shell files
parthverma1 Feb 26, 2025
4eef7e8
chore: Set max parallel runs to 10
parthverma1 Feb 26, 2025
f63de4e
chore: Disabled fail fast to run all tests to completion
parthverma1 Feb 26, 2025
e3c2806
fix: Failing builds for R and httpie
parthverma1 Feb 26, 2025
9763317
chore: PR Clean up
parthverma1 Feb 26, 2025
cfd487f
chore: Update postman-collection version for codegens
parthverma1 Mar 6, 2025
4c62aeb
chore: Add sudo to all ci dependencies install script
parthverma1 Mar 7, 2025
253c430
Revert "chore: Add sudo to all ci dependencies install script"
parthverma1 Mar 10, 2025
441bed6
Merge pull request #788 from parthverma1/feature/bump-postman-collect…
VShingala Mar 10, 2025
6b0a4f1
Prepare release v2.0.0
web-flow Mar 10, 2025
586a424
Update CHANGELOG.md
VShingala Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/ci-install.sh
20 changes: 15 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ on:
jobs:
Unit-Tests:
runs-on: ubuntu-20.04
strategy:
max-parallel: 10
matrix:
node-version: [ 18.x, 20.x ]
language-variant: [ 'csharp-httpclient', 'csharp-restsharp', 'curl', 'dart-dio', 'dart-http', 'golang', 'http',
'java-okhttp', 'java-unirest', 'js-fetch', 'js-jquery', 'js-xhr', 'kotlin-okhttp', 'libcurl',
'nodejs-axios', 'nodejs-native', 'nodejs-request', 'nodejs-unirest', 'objective-c', 'ocaml-cohttp',
'php-curl', 'php-guzzle', 'php-httprequest2', 'php-pecl-http', 'powershell-restmethod',
'python-http.client', 'python-requests', 'r-httr', 'r-rcurl', 'ruby', 'rust-reqwest',
'shell-httpie', 'shell-wget', 'swift' ]
steps:
- name: Get Code
uses: actions/checkout@v3
- name: Setup Node JS
- name: Use Node JS ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install system dependencies
run: npm run cirequirements
node-version: ${{ matrix.node-version }}
- name: Install package dependencies
run: npm install
- name: Install system dependencies
run: npm run cirequirements ${{ matrix.language-variant }}
- name: Install dependencies for individual codegens
run: npm run deepinstall dev
- name: Run tests
run: npm run test
run: npm run test ${{ matrix.language-variant }}
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [v2.0.0] - 2025-03-10

### Breaking Changes

- Dropped support for node < v18.

## [v1.14.2] - 2025-02-21

### Fixed
Expand Down Expand Up @@ -196,7 +202,9 @@ v1.0.0 (May 29, 2020)
- Add ES6 syntax support for NodeJS Request, NodeJS Native and NodeJS Unirest
- Fix snippet generation for powershell and jquery, where form data params had no type field

[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v1.14.2...HEAD
[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v2.0.0...HEAD

[v2.0.0]: https://github.com/postmanlabs/postman-code-generators/compare/v1.14.2...v2.0.0

[v1.14.2]: https://github.com/postmanlabs/postman-code-generators/compare/v1.14.1...v1.14.2

Expand Down
15 changes: 15 additions & 0 deletions codegens/csharp-httpclient/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -ev; # stop on error

sudo apt-get update
echo "Installing dependencies required for tests in codegens/csharp-httpclient"
# Install latest .net6.0 sdk
pushd ./codegens/csharp-httpclient &>/dev/null;
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-6.0
dotnet new console -o testProject -f net6.0
# no extra packages needed
popd &>/dev/null;
18 changes: 18 additions & 0 deletions codegens/csharp-restsharp/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -ev; # stop on error

sudo apt-get update
echo "Installing dependencies required for tests in codegens/csharp-restsharp"
pushd ./codegens/csharp-restsharp &>/dev/null;
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-6.0
dotnet new console -o testProject -f net6.0
pushd ./testProject &>/dev/null;
dotnet add package RestSharp --version 112.0.0
popd &>/dev/null;
popd &>/dev/null;

sudo apt-get install -y mono-complete
5 changes: 5 additions & 0 deletions codegens/curl/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -ev; # stop on error

echo "Installing curl"
sudo apt-get install -y curl
16 changes: 16 additions & 0 deletions codegens/dart-dio/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -ev; # stop on error

echo "Installing dependencies required for tests in codegens/dart-dio"
pushd ./codegens/dart-dio &>/dev/null;
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.4/linux_packages/dart_3.0.4-1_amd64.deb
sudo dpkg -i dart_3.0.4-1_amd64.deb
echo '''name: test
version: 1.0.0
environment:
sdk: ^3.0.3
dependencies:
dio: ^5.2.0
''' > pubspec.yaml
dart pub get
popd &>/dev/null;
16 changes: 16 additions & 0 deletions codegens/dart-http/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -ev; # stop on error

echo "Installing dependencies required for tests in codegens/dart-http"
pushd ./codegens/dart-http &>/dev/null;
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.4/linux_packages/dart_3.0.4-1_amd64.deb
sudo dpkg -i dart_3.0.4-1_amd64.deb
echo '''name: test
version: 1.0.0
environment:
sdk: ^3.0.3
dependencies:
http: ^1.0.0
''' > pubspec.yaml
dart pub get
popd &>/dev/null;
48 changes: 16 additions & 32 deletions codegens/http/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codegens/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"license": "Apache-2.0",
"homepage": "https://github.com/postmanlabs/code-generators/tree/master/codegens/http",
"dependencies": {
"postman-collection": "^4.4.0"
"postman-collection": "^5.0.0"
},
"scripts": {
"test": "node npm/test.js",
Expand Down
11 changes: 11 additions & 0 deletions codegens/java-okhttp/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -ev; # stop on error

echo "Installing dependencies required for tests in codegens/java-okhttp"
pushd ./codegens/java-okhttp &>/dev/null;
sudo add-apt-repository ppa:openjdk-r/ppa -y
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
sudo apt-get install -y openjdk-8-jdk
unzip test/unit/fixtures/dependencies.zip
popd &>/dev/null;
7 changes: 7 additions & 0 deletions codegens/java-unirest/test/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -ev; # stop on error

echo "Installing dependencies required for tests in codegens/java-unirest"
pushd ./codegens/java-unirest &>/dev/null;
unzip test/unit/fixtures/dependencies.zip
popd &>/dev/null;
73 changes: 40 additions & 33 deletions codegens/js-fetch/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions codegens/js-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"homepage": "https://github.com/postmanlabs/code-generators/tree/master/codegens/js-fetch",
"dependencies": {},
"devDependencies": {
"form-data": "2.5.1",
"node-fetch": "2.6.7"
"formdata-node": "6.0.3",
"node-fetch2": "npm:[email protected]",
"node-fetch": "3.3.2"
},
"engines": {
"node": ">=8"
Expand Down
Loading
Loading