Skip to content

Commit

Permalink
Release 24.2 (#84)
Browse files Browse the repository at this point in the history
* Update github checkout version from v3 to v4

* Remove Node v16.x from testing

* Update version to 24.2.0

* Add 'types' field to recognition tests
  • Loading branch information
Denis-Averin authored Feb 29, 2024
1 parent bbe0cb2 commit d847fbe
Show file tree
Hide file tree
Showing 11 changed files with 459 additions and 13,250 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check badges in README.md
run: ./scripts/check-badges.bash "README.md"
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
strategy:
matrix:
# see https://nodejs.org/en/about/previous-releases for active releases
node-version: [16.x, 18.x, 20.x, 21.x, lts/*, latest]
node-version: [ 18.x, 20.x, 21.x, lts/*, latest ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/try-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use the latest versiob of Node.js
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![npm](https://img.shields.io/npm/v/aspose-barcode-cloud-node)](https://www.npmjs.com/package/aspose-barcode-cloud-node)

+ API version: 3.0
+ Package version: 24.1.0
+ Package version: 24.2.0

## Demo applications

Expand Down
13,676 changes: 444 additions & 13,232 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aspose-barcode-cloud-node",
"version": "24.1.0",
"version": "24.2.0",
"description": "Aspose.BarCode Cloud SDK for Node.js",
"homepage": "https://products.aspose.cloud/barcode/nodejs",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ let typeMap: { [index: string]: any } = {
export class BarcodeApi {
protected defaultHeaders: any = {
'x-aspose-client': 'nodejs sdk',
'x-aspose-client-version': '24.1.0',
'x-aspose-client-version': '24.2.0',
};
protected _configuration: Configuration;
private _client: HttpClient;
Expand Down Expand Up @@ -1449,7 +1449,7 @@ export class BarcodeApi {
export class FileApi {
protected defaultHeaders: any = {
'x-aspose-client': 'nodejs sdk',
'x-aspose-client-version': '24.1.0',
'x-aspose-client-version': '24.2.0',
};
protected _configuration: Configuration;
private _client: HttpClient;
Expand Down Expand Up @@ -1698,7 +1698,7 @@ export class FileApi {
export class FolderApi {
protected defaultHeaders: any = {
'x-aspose-client': 'nodejs sdk',
'x-aspose-client-version': '24.1.0',
'x-aspose-client-version': '24.2.0',
};
protected _configuration: Configuration;
private _client: HttpClient;
Expand Down Expand Up @@ -1920,7 +1920,7 @@ export class FolderApi {
export class StorageApi {
protected defaultHeaders: any = {
'x-aspose-client': 'nodejs sdk',
'x-aspose-client-version': '24.1.0',
'x-aspose-client-version': '24.2.0',
};
protected _configuration: Configuration;
private _client: HttpClient;
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Generate and recognize', () => {
assert.ok(imageSize > 0, `ImageSize=${imageSize}`);

const recognizeRequest = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
recognizeRequest.type = Barcode.DecodeBarcodeType.QR;
recognizeRequest.types = [Barcode.DecodeBarcodeType.QR];
recognizeRequest.preset = Barcode.PresetType.HighPerformance;
recognizeRequest.fastScanOnly = true;

Expand Down
2 changes: 1 addition & 1 deletion test/getBarcodeRecognize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('getBarcodeRecognize', () => {
assert.strictEqual(uploaded.body.uploaded[0], filename);

const recognizeRequest = new Barcode.GetBarcodeRecognizeRequest(filename);
recognizeRequest.type = Barcode.DecodeBarcodeType.Pdf417;
recognizeRequest.types = [Barcode.DecodeBarcodeType.Pdf417];
recognizeRequest.preset = Barcode.PresetType.HighPerformance;
recognizeRequest.fastScanOnly = true;

Expand Down
7 changes: 2 additions & 5 deletions test/postBarcodeRecognizeFromUrlOrContent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('postBarcodeRecognizeFromUrlOrContent', () => {

it('should recognize from body', async () => {
const request = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
request.type = Barcode.DecodeBarcodeType.Pdf417;
request.types = [Barcode.DecodeBarcodeType.Pdf417];
request.preset = Barcode.PresetType.HighPerformance;
request.fastScanOnly = true;

Expand All @@ -38,12 +38,9 @@ describe('postBarcodeRecognizeFromUrlOrContent', () => {

it('should fail with Timeout', async () => {
const request = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
request.type = Barcode.DecodeBarcodeType.Pdf417;
request.preset = Barcode.PresetType.HighPerformance;
request.fastScanOnly = true;

request.image = imageBuffer;
request.timeout = 1;

await assert.rejects(
async () => {
await api.postBarcodeRecognizeFromUrlOrContent(request);
Expand Down
2 changes: 1 addition & 1 deletion test/putBarcodeRecognizeFromBody.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('putBarcodeRecognizeFromBody', () => {
const imageBuffer = fs.readFileSync('./testdata/pdf417Sample.png');

const readerParams = new Barcode.ReaderParams();
readerParams.type = Barcode.DecodeBarcodeType.Pdf417;
readerParams.types = [Barcode.DecodeBarcodeType.Pdf417];
readerParams.preset = Barcode.PresetType.HighPerformance;
readerParams.fastScanOnly = true;

Expand Down

0 comments on commit d847fbe

Please sign in to comment.