From f5d8e815f502916aa35c822939b9d7ca762ad0de Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 29 Jan 2024 08:34:05 -0500 Subject: [PATCH 1/4] Adding a unittest action --- .github/workflows/unittest.yml | 20 ++++++++++++++++++++ .gitignore | 1 + package.json | 8 ++++---- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/unittest.yml diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 000000000..2bc8ccaa2 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,20 @@ +name: unittest + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Cache Modules + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + - run: npm run install + - run: npm run test + diff --git a/.gitignore b/.gitignore index 2b7422568..484212c33 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ test/e2e/generated samples/generated samples/swagger-codegen-cli-v2.jar samples/swagger-codegen-cli-v3.jar +.env diff --git a/package.json b/package.json index ea94ce76e..f75f4fcf8 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "openapi-typescript-codegen", - "version": "0.27.0", + "name": "@canoapbc/openapi-typescript-codegen", + "version": "0.27.2", "description": "Library that generates Typescript clients based on the OpenAPI specification.", "author": "Ferdi Koomen", - "homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen", + "homepage": "https://github.com/CanoaPBC/openapi-typescript-codegen", "repository": { "type": "git", - "url": "git+https://github.com/ferdikoomen/openapi-typescript-codegen.git" + "url": "git+https://github.com/CanoaPBC/openapi-typescript-codegen.git" }, "bugs": { "url": "https://github.com/ferdikoomen/openapi-typescript-codegen/issues" From 43545383f73795f89983f79fbe35f587012fa6b4 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 29 Jan 2024 08:36:02 -0500 Subject: [PATCH 2/4] Fix yaml file --- .github/workflows/unittest.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 2bc8ccaa2..93a3d0267 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -4,17 +4,17 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - name: Cache Modules - uses: actions/cache@v3 - with: - path: "**/node_modules" - key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - - run: npm run install - - run: npm run test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Cache Modules + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + - run: npm run install + - run: npm run test From df0ab80cab1cc7a13581e945935ec79640fafe58 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 29 Jan 2024 08:36:44 -0500 Subject: [PATCH 3/4] Fix yaml file --- .github/workflows/unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 93a3d0267..3cbc52e7d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -15,6 +15,6 @@ jobs: with: path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - - run: npm run install + - run: npm install - run: npm run test From 664b4fe4f17f001c285a4a5f3771c91d99dde1e5 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 29 Jan 2024 08:39:05 -0500 Subject: [PATCH 4/4] Adjust flow trigger --- .github/workflows/unittest.yml | 2 +- package-lock.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 3cbc52e7d..5b78eb8c3 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -1,6 +1,6 @@ name: unittest -on: [push, pull_request] +on: [pull_request] jobs: test: diff --git a/package-lock.json b/package-lock.json index 8aa47d74d..0369699c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "openapi-typescript-codegen", - "version": "0.27.0", + "name": "@canoapbc/openapi-typescript-codegen", + "version": "0.27.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "openapi-typescript-codegen", - "version": "0.27.0", + "name": "@canoapbc/openapi-typescript-codegen", + "version": "0.27.2", "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^10.1.0",