From 2ffa5c5e3356ca5a3f2bc15b3ef03552216687e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Tue, 1 Oct 2024 18:37:58 +0200 Subject: [PATCH 1/7] Added navite RequestInit type instead of IRequest --- readme.md | 4 ++-- src/Interfaces.ts | 9 +-------- src/Resource.ts | 6 ++---- src/Types.ts | 4 ++-- tests/index.spec.js | 29 ++++++++++++++++++----------- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/readme.md b/readme.md index b7cddc8..34baed4 100644 --- a/readme.md +++ b/readme.md @@ -30,7 +30,7 @@ You can send insert, update, delete, and fetch data from Axe API servers without ## ⚙️ Config ```ts -import { api, IRequest } from "axe-api-client"; +import { api } from "axe-api-client"; api.setConfig({ baseURL: "https://bookstore.axe-api.com/api/v1", @@ -38,7 +38,7 @@ api.setConfig({ params: {}, }); -api.interceptors.addRequest((request: IRequest) => { +api.interceptors.addRequest((request: RequestInit) => { return request; }); diff --git a/src/Interfaces.ts b/src/Interfaces.ts index 617db12..6ac9705 100644 --- a/src/Interfaces.ts +++ b/src/Interfaces.ts @@ -1,12 +1,5 @@ import { Resource } from "./Resource"; -import { ConditionTypes, MethodType, QueryFunctionType } from "./Types"; - -export interface IRequest { - url: string; - method: MethodType; - headers: Record; - body: string | undefined; -} +import { ConditionTypes, QueryFunctionType } from "./Types"; export interface IConfig { baseURL?: string; diff --git a/src/Resource.ts b/src/Resource.ts index 8568d50..fdaa5df 100644 --- a/src/Resource.ts +++ b/src/Resource.ts @@ -5,7 +5,6 @@ import { IPaginate, IPagination, IQueryable, - IRequest, } from "./Interfaces"; import { ConditionTypes, @@ -544,8 +543,7 @@ export class Resource implements IQueryable { } private async sendRequest(method: MethodType, data?: FormBody) { - let request: IRequest = { - url: this.toURL(), + let request: RequestInit = { method, headers: { "Content-Type": "application/json", @@ -557,7 +555,7 @@ export class Resource implements IQueryable { request = interceptor(request); } - const response = await fetch(request.url, request); + const response = await fetch(this.toURL(), request); for (const interceptor of this.config.interceptors.responses) { interceptor(response); diff --git a/src/Types.ts b/src/Types.ts index 61ad1d9..86f8cfd 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -1,4 +1,4 @@ -import { IQueryable, IRequest } from "./Interfaces"; +import { IQueryable } from "./Interfaces"; export type FormBody = object | undefined; @@ -6,7 +6,7 @@ export type QueryArray = object[]; export type QueryFunctionType = (query: IQueryable) => IQueryable; -export type RequestInterceptorType = (request: IRequest) => IRequest; +export type RequestInterceptorType = (request: RequestInit) => RequestInit; export type ResponseInterceptorType = (response: Response) => void; diff --git a/tests/index.spec.js b/tests/index.spec.js index a413d24..11fe58a 100644 --- a/tests/index.spec.js +++ b/tests/index.spec.js @@ -173,8 +173,9 @@ describe("axe-api-client", () => { }); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users"); // NOSONAR + expect(url).toBe("https://axe-api.com/api/v1/users"); // NOSONAR expect(request.method).toBe("POST"); expect(request.headers["Content-Type"]).toBe("application/json"); expect(request.body).toBe(`{"name":"Karl"}`); @@ -191,8 +192,9 @@ describe("axe-api-client", () => { }); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users/1"); + expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("PUT"); expect(request.body).toBe(`{"name":"Karl"}`); expect(response.id).toBe(100); @@ -208,8 +210,9 @@ describe("axe-api-client", () => { }); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users/1"); + expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("PATCH"); expect(request.body).toBe(`{"name":"Karl"}`); expect(response.id).toBe(100); @@ -221,8 +224,9 @@ describe("axe-api-client", () => { const response = await api.resource("users/1").delete(); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users/1"); + expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("DELETE"); expect(request.body).toBe(undefined); expect(response).toBe(undefined); @@ -237,10 +241,9 @@ describe("axe-api-client", () => { .paginate({ page: 10, perPage: 5 }); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe( - "https://axe-api.com/api/v1/users?page=10&per_page=5", - ); + expect(url).toBe("https://axe-api.com/api/v1/users?page=10&per_page=5"); expect(request.method).toBe("GET"); expect(response).toBe(mockResponse); }); @@ -257,8 +260,9 @@ describe("axe-api-client", () => { .paginate(); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe( + expect(url).toBe( `https://axe-api.com/api/v1/users?page=1&per_page=10&fields=id&sort=id&q=%5B%7B%22id%22%3A1%7D%5D`, ); expect(request.method).toBe("GET"); @@ -273,8 +277,9 @@ describe("axe-api-client", () => { const response = await api.resource("users").post(data); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users"); + expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("POST"); expect(JSON.parse(request.body).name).toBe(data.name); expect(response).toBe("RESULT"); @@ -288,8 +293,9 @@ describe("axe-api-client", () => { const response = await api.resource("users").put(data); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users"); + expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("PUT"); expect(JSON.parse(request.body).name).toBe(data.name); expect(response).toBe("RESULT"); @@ -303,8 +309,9 @@ describe("axe-api-client", () => { const response = await api.resource("users").patch(data); expect(global.fetch.mock.calls.length).toBe(1); + const url = global.fetch.mock.calls[0][0]; const request = global.fetch.mock.calls[0][1]; - expect(request.url).toBe("https://axe-api.com/api/v1/users"); + expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("PATCH"); expect(JSON.parse(request.body).name).toBe(data.name); expect(response).toBe("RESULT"); From 00688f03392cf1bdee3cb8d380cf427b3aa609f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Tue, 1 Oct 2024 20:14:07 +0200 Subject: [PATCH 2/7] Fixed changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c05514..bd6a90f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes +## [3.0.0 (2024-XX-XX)](https://github.com/axe-api/axe-api/compare/3.0.0...x.x.x) + +- Added navite `RequestInit` type instead of `IRequest` + ## [2.1.0 (2024-09-28)](https://github.com/axe-api/axe-api/compare/2.1.0...2.0.1) - Added missing requests to the Resource object From 08da1bd3dc62f13870caf1aff94572ad2eca2fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Sat, 5 Oct 2024 15:24:43 +0200 Subject: [PATCH 3/7] Removed `response.json()` calls internally. Request functions return `Response` object now --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- src/Constants.ts | 2 -- src/Interfaces.ts | 11 ++++++++--- src/Resource.ts | 28 ++++++++-------------------- tests/index.spec.js | 28 +++++++++++++++++++--------- 7 files changed, 40 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6a90f..fcac8a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## [3.0.0 (2024-XX-XX)](https://github.com/axe-api/axe-api/compare/3.0.0...x.x.x) - Added navite `RequestInit` type instead of `IRequest` +- Removed `DEFINED_STATUS_CODES` constant. +- Removed `response.json()` calls internally. Request functions return `Response` object now. ## [2.1.0 (2024-09-28)](https://github.com/axe-api/axe-api/compare/2.1.0...2.0.1) diff --git a/package-lock.json b/package-lock.json index bd94a36..4b0c942 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "axe-api-client", - "version": "2.1.0", + "version": "3.0.0-rc-1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "axe-api-client", - "version": "2.1.0", + "version": "3.0.0-rc-1", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.25.4", diff --git a/package.json b/package.json index b605726..dd185e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axe-api-client", - "version": "2.1.0", + "version": "3.0.0-rc-1", "description": "axe-api-client is a native JavaScript client for Axe API servers.", "type": "module", "main": "dist/index.cjs", diff --git a/src/Constants.ts b/src/Constants.ts index dc3040e..f6a36d6 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -16,5 +16,3 @@ export const SUFFIX_MAP: Record = { NULL: "", "NOT NULL": "$not", }; - -export const DEFINED_STATUS_CODES = [200, 204, 400, 404]; diff --git a/src/Interfaces.ts b/src/Interfaces.ts index 6ac9705..05b4dc8 100644 --- a/src/Interfaces.ts +++ b/src/Interfaces.ts @@ -1,5 +1,10 @@ import { Resource } from "./Resource"; -import { ConditionTypes, QueryFunctionType } from "./Types"; +import { + ConditionTypes, + QueryFunctionType, + RequestInterceptorType, + ResponseInterceptorType, +} from "./Types"; export interface IConfig { baseURL?: string; @@ -13,8 +18,8 @@ export interface IInternalConfig extends IConfig { } export interface IInterceptors { - requests: any[]; - responses: any[]; + requests: RequestInterceptorType[]; + responses: ResponseInterceptorType[]; } export interface IPaginate { diff --git a/src/Resource.ts b/src/Resource.ts index fdaa5df..c2e9bb4 100644 --- a/src/Resource.ts +++ b/src/Resource.ts @@ -1,11 +1,6 @@ import { getConfig } from "./Config"; -import { DEFINED_STATUS_CODES, SUFFIX_MAP } from "./Constants"; -import { - IInternalConfig, - IPaginate, - IPagination, - IQueryable, -} from "./Interfaces"; +import { SUFFIX_MAP } from "./Constants"; +import { IInternalConfig, IPaginate, IQueryable } from "./Interfaces"; import { ConditionTypes, FormBody, @@ -488,7 +483,7 @@ export class Resource implements IQueryable { * @param query IPaginate * @returns object */ - async paginate(query?: IPaginate): Promise { + async paginate(query?: IPaginate): Promise { this.params.append("page", query?.page?.toString() ?? "1"); this.params.append("per_page", query?.perPage?.toString() ?? "10"); return this.sendRequest("GET"); @@ -542,7 +537,10 @@ export class Resource implements IQueryable { return this.sendRequest("DELETE"); } - private async sendRequest(method: MethodType, data?: FormBody) { + private async sendRequest( + method: MethodType, + data?: FormBody, + ): Promise { let request: RequestInit = { method, headers: { @@ -555,17 +553,7 @@ export class Resource implements IQueryable { request = interceptor(request); } - const response = await fetch(this.toURL(), request); - - for (const interceptor of this.config.interceptors.responses) { - interceptor(response); - } - - if (DEFINED_STATUS_CODES.includes(response.status)) { - return response.json(); - } - - return response; + return await fetch(this.toURL(), request); } private toURL() { diff --git a/tests/index.spec.js b/tests/index.spec.js index 11fe58a..c40d933 100644 --- a/tests/index.spec.js +++ b/tests/index.spec.js @@ -179,7 +179,9 @@ describe("axe-api-client", () => { expect(request.method).toBe("POST"); expect(request.headers["Content-Type"]).toBe("application/json"); expect(request.body).toBe(`{"name":"Karl"}`); - expect(response.id).toBe(100); + const data = await response.json(); + expect(response.status).toBe(200); + expect(data.id).toBe(100); }); test(`update()`, async () => { @@ -197,7 +199,8 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("PUT"); expect(request.body).toBe(`{"name":"Karl"}`); - expect(response.id).toBe(100); + const data = await response.json(); + expect(data.id).toBe(100); }); test(`patch()`, async () => { @@ -215,7 +218,8 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("PATCH"); expect(request.body).toBe(`{"name":"Karl"}`); - expect(response.id).toBe(100); + const data = await response.json(); + expect(data.id).toBe(100); }); test(`delete()`, async () => { @@ -229,7 +233,8 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users/1"); expect(request.method).toBe("DELETE"); expect(request.body).toBe(undefined); - expect(response).toBe(undefined); + const json = await response.json(); + expect(json).toBe(undefined); }); test(`paginate()`, async () => { @@ -245,7 +250,8 @@ describe("axe-api-client", () => { const request = global.fetch.mock.calls[0][1]; expect(url).toBe("https://axe-api.com/api/v1/users?page=10&per_page=5"); expect(request.method).toBe("GET"); - expect(response).toBe(mockResponse); + const json = await response.json(); + expect(json).toBe(mockResponse); }); test(`URL Tests`, async () => { @@ -266,7 +272,8 @@ describe("axe-api-client", () => { `https://axe-api.com/api/v1/users?page=1&per_page=10&fields=id&sort=id&q=%5B%7B%22id%22%3A1%7D%5D`, ); expect(request.method).toBe("GET"); - expect(response).toBe(mockResponse); + const json = await response.json(); + expect(json).toBe(mockResponse); }); test(`post()`, async () => { @@ -282,7 +289,8 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("POST"); expect(JSON.parse(request.body).name).toBe(data.name); - expect(response).toBe("RESULT"); + const json = await response.json(); + expect(json).toBe("RESULT"); }); test(`put()`, async () => { @@ -298,7 +306,8 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("PUT"); expect(JSON.parse(request.body).name).toBe(data.name); - expect(response).toBe("RESULT"); + const json = await response.json(); + expect(json).toBe("RESULT"); }); test(`patch()`, async () => { @@ -314,6 +323,7 @@ describe("axe-api-client", () => { expect(url).toBe("https://axe-api.com/api/v1/users"); expect(request.method).toBe("PATCH"); expect(JSON.parse(request.body).name).toBe(data.name); - expect(response).toBe("RESULT"); + const json = await response.json(); + expect(json).toBe("RESULT"); }); }); From 7466190f9307376a9c2eb44ded6e216f4fce099a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Sat, 5 Oct 2024 15:48:07 +0200 Subject: [PATCH 4/7] Added `searchParams()` method to add additional URLSearchParams. --- CHANGELOG.md | 1 + package-lock.json | 4 ++-- package.json | 2 +- src/Resource.ts | 14 ++++++++++++++ tests/index.spec.js | 17 ++++++++++++++++- 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcac8a2..60ea800 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Added navite `RequestInit` type instead of `IRequest` - Removed `DEFINED_STATUS_CODES` constant. - Removed `response.json()` calls internally. Request functions return `Response` object now. +- Added `searchParams()` method to add additional URLSearchParams. ## [2.1.0 (2024-09-28)](https://github.com/axe-api/axe-api/compare/2.1.0...2.0.1) diff --git a/package-lock.json b/package-lock.json index 4b0c942..7590c24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "axe-api-client", - "version": "3.0.0-rc-1", + "version": "3.0.0-rc-2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "axe-api-client", - "version": "3.0.0-rc-1", + "version": "3.0.0-rc-2", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.25.4", diff --git a/package.json b/package.json index dd185e6..dcca9c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axe-api-client", - "version": "3.0.0-rc-1", + "version": "3.0.0-rc-2", "description": "axe-api-client is a native JavaScript client for Axe API servers.", "type": "module", "main": "dist/index.cjs", diff --git a/src/Resource.ts b/src/Resource.ts index c2e9bb4..715169c 100644 --- a/src/Resource.ts +++ b/src/Resource.ts @@ -35,6 +35,20 @@ export class Resource implements IQueryable { this.withPath = undefined; } + /** + * Add additonal URLSearchParams to the request URL + * + * @param searchParams Record + * @returns IQueryable + */ + searchParams(searchParams: Record) { + for (const key in searchParams) { + this.params.append(key, searchParams[key]); + } + + return this; + } + /** * Select the fields that will be fetched. * diff --git a/tests/index.spec.js b/tests/index.spec.js index c40d933..33449e1 100644 --- a/tests/index.spec.js +++ b/tests/index.spec.js @@ -11,9 +11,12 @@ const BASE_CONFIG = { }; const mock = (status, data) => { - return jest.fn(() => { + return jest.fn((url) => { return Promise.resolve({ status, + mock: { + url, + }, json: () => { return data; }, @@ -326,4 +329,16 @@ describe("axe-api-client", () => { const json = await response.json(); expect(json).toBe("RESULT"); }); + + test(`searchParams()`, async () => { + global.fetch = mock(200, "RESULT"); + + const response = await api + .resource("users") + .searchParams({ myFlag: "true", addUsers: 1 }) + .paginate(); + + expect(response.mock.url.includes("myFlag=true")).toBe(true); + expect(response.mock.url.includes("addUsers=1")).toBe(true); + }); }); From 1c8beba72c1b5a3170bc0e2b9598738a31784305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Fri, 11 Oct 2024 19:06:56 +0200 Subject: [PATCH 5/7] Fixed `addResponse()` interceptor issues. --- CHANGELOG.md | 1 + src/Resource.ts | 11 +++++++++- src/Types.ts | 2 +- tests/interceptors.spec.js | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 tests/interceptors.spec.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 60ea800..820ff84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Removed `DEFINED_STATUS_CODES` constant. - Removed `response.json()` calls internally. Request functions return `Response` object now. - Added `searchParams()` method to add additional URLSearchParams. +- Fixed `addResponse()` interceptor issues. ## [2.1.0 (2024-09-28)](https://github.com/axe-api/axe-api/compare/2.1.0...2.0.1) diff --git a/src/Resource.ts b/src/Resource.ts index 715169c..c563e1d 100644 --- a/src/Resource.ts +++ b/src/Resource.ts @@ -563,11 +563,20 @@ export class Resource implements IQueryable { body: data ? JSON.stringify(data) : undefined, }; + // Calls the request interceptors for (const interceptor of this.config.interceptors.requests) { request = interceptor(request); } - return await fetch(this.toURL(), request); + // Send the request + let response = await fetch(this.toURL(), request); + + // Calls the response interceptors + for (const interceptor of this.config.interceptors.responses) { + response = interceptor(response); + } + + return response; } private toURL() { diff --git a/src/Types.ts b/src/Types.ts index 86f8cfd..616b647 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -8,7 +8,7 @@ export type QueryFunctionType = (query: IQueryable) => IQueryable; export type RequestInterceptorType = (request: RequestInit) => RequestInit; -export type ResponseInterceptorType = (response: Response) => void; +export type ResponseInterceptorType = (response: Response) => Response; export type LogicType = "$or" | "$and"; diff --git a/tests/interceptors.spec.js b/tests/interceptors.spec.js new file mode 100644 index 0000000..c1d9f1f --- /dev/null +++ b/tests/interceptors.spec.js @@ -0,0 +1,45 @@ +import { api } from "../index"; + +const BASE_CONFIG = { + baseURL: "https://axe-api.com/api/v1", // NOSONAR + headers: { + "x-api-request": 100, + }, + params: { + requestTime: "20231021", + }, +}; + +describe("Interceptors", () => { + beforeAll(() => { + api.setConfig(BASE_CONFIG); + }); + + test("addRequet()", async () => { + global.fetch = (url, request) => { + return { url, request, status: 200, data: { id: 1 } }; + }; + + api.interceptors.addRequest((request) => { + request.headers["x-my-header"] = "MyValue"; + return request; + }); + + const { request } = await api.resource("users").get(); + expect(request.headers["x-my-header"]).toBe("MyValue"); + }); + + test("addResponse()", async () => { + global.fetch = (url, request) => { + return { url, request, status: 200, data: { id: 1 } }; + }; + + api.interceptors.addResponse((response) => { + response.status = 404; + return response; + }); + + const { status } = await api.resource("users").get(); + expect(status).toBe(404); + }); +}); From d3a9bfa5661d14e44465b3cba49c5047652c8112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Fri, 11 Oct 2024 19:07:07 +0200 Subject: [PATCH 6/7] 3.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7590c24..bca103f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "axe-api-client", - "version": "3.0.0-rc-2", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "axe-api-client", - "version": "3.0.0-rc-2", + "version": "3.0.0", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.25.4", diff --git a/package.json b/package.json index dcca9c2..11c1376 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axe-api-client", - "version": "3.0.0-rc-2", + "version": "3.0.0", "description": "axe-api-client is a native JavaScript client for Axe API servers.", "type": "module", "main": "dist/index.cjs", From 5fee22f60d888bb1057c544b7266eedd78bb5d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Fri, 11 Oct 2024 19:08:19 +0200 Subject: [PATCH 7/7] Fixed version name --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bca103f..f7e807d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "axe-api-client", - "version": "3.0.0", + "version": "3.0.0-rc-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "axe-api-client", - "version": "3.0.0", + "version": "3.0.0-rc-3", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.25.4", diff --git a/package.json b/package.json index 11c1376..ca3859c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axe-api-client", - "version": "3.0.0", + "version": "3.0.0-rc-3", "description": "axe-api-client is a native JavaScript client for Axe API servers.", "type": "module", "main": "dist/index.cjs",