Skip to content

Commit a2864b6

Browse files
authored
Merge pull request #789 from postmanlabs/release/v2.0.0
Release version v2.0.0
2 parents 54753ea + 586a424 commit a2864b6

File tree

37 files changed

+463
-354
lines changed

37 files changed

+463
-354
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/ci-install.sh

.github/workflows/test.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,28 @@ on:
1010
jobs:
1111
Unit-Tests:
1212
runs-on: ubuntu-20.04
13+
strategy:
14+
max-parallel: 10
15+
matrix:
16+
node-version: [ 18.x, 20.x ]
17+
language-variant: [ 'csharp-httpclient', 'csharp-restsharp', 'curl', 'dart-dio', 'dart-http', 'golang', 'http',
18+
'java-okhttp', 'java-unirest', 'js-fetch', 'js-jquery', 'js-xhr', 'kotlin-okhttp', 'libcurl',
19+
'nodejs-axios', 'nodejs-native', 'nodejs-request', 'nodejs-unirest', 'objective-c', 'ocaml-cohttp',
20+
'php-curl', 'php-guzzle', 'php-httprequest2', 'php-pecl-http', 'powershell-restmethod',
21+
'python-http.client', 'python-requests', 'r-httr', 'r-rcurl', 'ruby', 'rust-reqwest',
22+
'shell-httpie', 'shell-wget', 'swift' ]
1323
steps:
1424
- name: Get Code
1525
uses: actions/checkout@v3
16-
- name: Setup Node JS
26+
- name: Use Node JS ${{ matrix.node-version }}
1727
uses: actions/setup-node@v1
1828
with:
19-
node-version: '12.x'
20-
- name: Install system dependencies
21-
run: npm run cirequirements
29+
node-version: ${{ matrix.node-version }}
2230
- name: Install package dependencies
2331
run: npm install
32+
- name: Install system dependencies
33+
run: npm run cirequirements ${{ matrix.language-variant }}
2434
- name: Install dependencies for individual codegens
2535
run: npm run deepinstall dev
2636
- name: Run tests
27-
run: npm run test
37+
run: npm run test ${{ matrix.language-variant }}

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
## [v2.0.0] - 2025-03-10
6+
7+
### Breaking Changes
8+
9+
- Dropped support for node < v18.
10+
511
## [v1.14.2] - 2025-02-21
612

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

199-
[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v1.14.2...HEAD
205+
[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v2.0.0...HEAD
206+
207+
[v2.0.0]: https://github.com/postmanlabs/postman-code-generators/compare/v1.14.2...v2.0.0
200208

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

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
sudo apt-get update
5+
echo "Installing dependencies required for tests in codegens/csharp-httpclient"
6+
# Install latest .net6.0 sdk
7+
pushd ./codegens/csharp-httpclient &>/dev/null;
8+
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
9+
sudo dpkg -i packages-microsoft-prod.deb
10+
sudo apt-get install apt-transport-https
11+
sudo apt-get update
12+
sudo apt-get install dotnet-sdk-6.0
13+
dotnet new console -o testProject -f net6.0
14+
# no extra packages needed
15+
popd &>/dev/null;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
sudo apt-get update
5+
echo "Installing dependencies required for tests in codegens/csharp-restsharp"
6+
pushd ./codegens/csharp-restsharp &>/dev/null;
7+
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
8+
sudo dpkg -i packages-microsoft-prod.deb
9+
sudo apt-get install apt-transport-https
10+
sudo apt-get update
11+
sudo apt-get install dotnet-sdk-6.0
12+
dotnet new console -o testProject -f net6.0
13+
pushd ./testProject &>/dev/null;
14+
dotnet add package RestSharp --version 112.0.0
15+
popd &>/dev/null;
16+
popd &>/dev/null;
17+
18+
sudo apt-get install -y mono-complete

codegens/curl/test/ci-install.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
echo "Installing curl"
5+
sudo apt-get install -y curl

codegens/dart-dio/test/ci-install.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
echo "Installing dependencies required for tests in codegens/dart-dio"
5+
pushd ./codegens/dart-dio &>/dev/null;
6+
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.4/linux_packages/dart_3.0.4-1_amd64.deb
7+
sudo dpkg -i dart_3.0.4-1_amd64.deb
8+
echo '''name: test
9+
version: 1.0.0
10+
environment:
11+
sdk: ^3.0.3
12+
dependencies:
13+
dio: ^5.2.0
14+
''' > pubspec.yaml
15+
dart pub get
16+
popd &>/dev/null;

codegens/dart-http/test/ci-install.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
echo "Installing dependencies required for tests in codegens/dart-http"
5+
pushd ./codegens/dart-http &>/dev/null;
6+
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.4/linux_packages/dart_3.0.4-1_amd64.deb
7+
sudo dpkg -i dart_3.0.4-1_amd64.deb
8+
echo '''name: test
9+
version: 1.0.0
10+
environment:
11+
sdk: ^3.0.3
12+
dependencies:
13+
http: ^1.0.0
14+
''' > pubspec.yaml
15+
dart pub get
16+
popd &>/dev/null;

codegens/http/npm-shrinkwrap.json

+16-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codegens/http/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"license": "Apache-2.0",
2222
"homepage": "https://github.com/postmanlabs/code-generators/tree/master/codegens/http",
2323
"dependencies": {
24-
"postman-collection": "^4.4.0"
24+
"postman-collection": "^5.0.0"
2525
},
2626
"scripts": {
2727
"test": "node npm/test.js",
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
echo "Installing dependencies required for tests in codegens/java-okhttp"
5+
pushd ./codegens/java-okhttp &>/dev/null;
6+
sudo add-apt-repository ppa:openjdk-r/ppa -y
7+
sudo rm -rf /var/lib/apt/lists/*
8+
sudo apt-get update
9+
sudo apt-get install -y openjdk-8-jdk
10+
unzip test/unit/fixtures/dependencies.zip
11+
popd &>/dev/null;
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -ev; # stop on error
3+
4+
echo "Installing dependencies required for tests in codegens/java-unirest"
5+
pushd ./codegens/java-unirest &>/dev/null;
6+
unzip test/unit/fixtures/dependencies.zip
7+
popd &>/dev/null;

codegens/js-fetch/npm-shrinkwrap.json

+40-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codegens/js-fetch/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
"homepage": "https://github.com/postmanlabs/code-generators/tree/master/codegens/js-fetch",
2929
"dependencies": {},
3030
"devDependencies": {
31-
"form-data": "2.5.1",
32-
"node-fetch": "2.6.7"
31+
"formdata-node": "6.0.3",
32+
"node-fetch2": "npm:[email protected]",
33+
"node-fetch": "3.3.2"
3334
},
3435
"engines": {
3536
"node": ">=8"

0 commit comments

Comments
 (0)