From b61854c5caea976fd9fbae277c5839ec9f1a6349 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya Date: Mon, 28 Aug 2023 16:40:06 +0200 Subject: [PATCH 1/9] update workflows to node20 --- .github/workflows/artifact-tests.yml | 8 ++++---- .github/workflows/audit.yml | 4 ++-- .github/workflows/cache-tests.yml | 4 ++-- .github/workflows/cache-windows-test.yml | 4 ++-- .github/workflows/releases.yml | 4 ++-- .github/workflows/unit-tests.yml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index 2b150fcb..c6988efe 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -26,10 +26,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package @@ -85,10 +85,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 918a68de..6e492488 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -20,10 +20,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: npm install run: npm install diff --git a/.github/workflows/cache-tests.yml b/.github/workflows/cache-tests.yml index cac6d20b..e05362a3 100644 --- a/.github/workflows/cache-tests.yml +++ b/.github/workflows/cache-tests.yml @@ -24,10 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed diff --git a/.github/workflows/cache-windows-test.yml b/.github/workflows/cache-windows-test.yml index ca4846ba..75792fc0 100644 --- a/.github/workflows/cache-windows-test.yml +++ b/.github/workflows/cache-windows-test.yml @@ -23,10 +23,10 @@ jobs: run: | rm "C:\Program Files\Git\usr\bin\tar.exe" - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v1 with: - node-version: 16.x + node-version: 20.x # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 51649a3e..13d494f2 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -18,10 +18,10 @@ jobs: - name: verify package exists run: ls packages/${{ github.event.inputs.package }} - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: npm install run: npm install diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index dc9231da..f56c2395 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,10 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: npm install run: npm install From 2f1b34f165df2b7e4c8abbed6e43d2b93e22efdf Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya Date: Mon, 28 Aug 2023 16:59:29 +0200 Subject: [PATCH 2/9] test tests --- .github/workflows/unit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f56c2395..dc9231da 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,10 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 20.x + - name: Set Node.js 16.x uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 16.x - name: npm install run: npm install From c171cf52fb277ea7353e9243cd4f746653e436e3 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya Date: Mon, 28 Aug 2023 17:09:50 +0200 Subject: [PATCH 3/9] upd --- .github/workflows/unit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index dc9231da..f56c2395 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,10 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set Node.js 16.x + - name: Set Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: npm install run: npm install From 0956e634dffb8d254ce64c73e8ddfd9c29548a97 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 10:27:11 +0000 Subject: [PATCH 4/9] test --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f56c2395..77b4f6ef 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: run: npm run build - name: npm test - run: npm test -- --runInBand + run: npm test -- --runInBand --detectOpenHandles env: GITHUB_TOKEN: ${{ github.token }} From e3b060122897b606ce4c685fc50dcf17a603acb3 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 10:43:51 +0000 Subject: [PATCH 5/9] test --- packages/core/__tests__/core.test.ts | 9 +++++++-- packages/http-client/__tests__/auth.test.ts | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/core/__tests__/core.test.ts b/packages/core/__tests__/core.test.ts index 09bc587b..4371924a 100644 --- a/packages/core/__tests__/core.test.ts +++ b/packages/core/__tests__/core.test.ts @@ -670,7 +670,12 @@ describe('oidc-client-tests', () => { it('HTTP get request to get token endpoint', async () => { const http = new HttpClient('actions/oidc-client') - const res = await http.get(getTokenEndPoint()) - expect(res.message.statusCode).toBe(200) + try { + const res = await http.get(getTokenEndPoint()) + expect(res.message.statusCode).toBe(200) + } + finally { + http.dispose() + } }) }) diff --git a/packages/http-client/__tests__/auth.test.ts b/packages/http-client/__tests__/auth.test.ts index 50d0a6a4..1bfa8e95 100644 --- a/packages/http-client/__tests__/auth.test.ts +++ b/packages/http-client/__tests__/auth.test.ts @@ -59,6 +59,7 @@ describe('auth', () => { const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests', [ ph ]) + try { const res: httpm.HttpClientResponse = await http.get( 'http://postman-echo.com/get' ) @@ -68,5 +69,9 @@ describe('auth', () => { const auth: string = obj.headers.authorization expect(auth).toBe(`Bearer ${token}`) expect(obj.url).toBe('http://postman-echo.com/get') + } + finally { + http.dispose() + } }) }) From b5529727173a1ef722a5ea03618493e1c1ce2a02 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 11:19:06 +0000 Subject: [PATCH 6/9] revert --- packages/core/__tests__/core.test.ts | 9 ++------- packages/http-client/__tests__/auth.test.ts | 5 ----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/core/__tests__/core.test.ts b/packages/core/__tests__/core.test.ts index 4371924a..09bc587b 100644 --- a/packages/core/__tests__/core.test.ts +++ b/packages/core/__tests__/core.test.ts @@ -670,12 +670,7 @@ describe('oidc-client-tests', () => { it('HTTP get request to get token endpoint', async () => { const http = new HttpClient('actions/oidc-client') - try { - const res = await http.get(getTokenEndPoint()) - expect(res.message.statusCode).toBe(200) - } - finally { - http.dispose() - } + const res = await http.get(getTokenEndPoint()) + expect(res.message.statusCode).toBe(200) }) }) diff --git a/packages/http-client/__tests__/auth.test.ts b/packages/http-client/__tests__/auth.test.ts index 1bfa8e95..50d0a6a4 100644 --- a/packages/http-client/__tests__/auth.test.ts +++ b/packages/http-client/__tests__/auth.test.ts @@ -59,7 +59,6 @@ describe('auth', () => { const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests', [ ph ]) - try { const res: httpm.HttpClientResponse = await http.get( 'http://postman-echo.com/get' ) @@ -69,9 +68,5 @@ describe('auth', () => { const auth: string = obj.headers.authorization expect(auth).toBe(`Bearer ${token}`) expect(obj.url).toBe('http://postman-echo.com/get') - } - finally { - http.dispose() - } }) }) From 83bb7cdeefb082f25991330868efb29b3d2a1d48 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 14:09:20 +0000 Subject: [PATCH 7/9] . --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 77b4f6ef..453f9bcc 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: run: npm run build - name: npm test - run: npm test -- --runInBand --detectOpenHandles + run: npm test -- --runInBand --forceExit env: GITHUB_TOKEN: ${{ github.token }} From a08d666c7813ce581a6b68b5b8b5819ca6f09245 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 14:23:58 +0000 Subject: [PATCH 8/9] . --- .github/workflows/unit-tests.yml | 2 +- packages/core/package-lock.json | 14 +++++++------- packages/core/package.json | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 453f9bcc..f56c2395 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: run: npm run build - name: npm test - run: npm test -- --runInBand --forceExit + run: npm test -- --runInBand env: GITHUB_TOKEN: ${{ github.token }} diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 4652aeac..46fb92f2 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -9,7 +9,7 @@ "version": "1.10.0", "license": "MIT", "dependencies": { - "@actions/http-client": "^2.0.1", + "@actions/http-client": "^2.1.1", "uuid": "^8.3.2" }, "devDependencies": { @@ -18,9 +18,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", - "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", + "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", "dependencies": { "tunnel": "^0.0.6" } @@ -56,9 +56,9 @@ }, "dependencies": { "@actions/http-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", - "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", + "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", "requires": { "tunnel": "^0.0.6" } diff --git a/packages/core/package.json b/packages/core/package.json index 629b4a2d..32b83922 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,11 +36,11 @@ "url": "https://github.com/actions/toolkit/issues" }, "dependencies": { - "@actions/http-client": "^2.0.1", + "@actions/http-client": "^2.1.1", "uuid": "^8.3.2" }, "devDependencies": { "@types/node": "^12.0.2", "@types/uuid": "^8.3.4" } -} \ No newline at end of file +} From b051b4bada15ec65be7e6cce433fb1dc52fedc8b Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 29 Aug 2023 14:56:32 +0000 Subject: [PATCH 9/9] . --- .github/workflows/unit-tests.yml | 2 +- packages/core/package-lock.json | 14 +++++++------- packages/core/package.json | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f56c2395..453f9bcc 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: run: npm run build - name: npm test - run: npm test -- --runInBand + run: npm test -- --runInBand --forceExit env: GITHUB_TOKEN: ${{ github.token }} diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 46fb92f2..4652aeac 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -9,7 +9,7 @@ "version": "1.10.0", "license": "MIT", "dependencies": { - "@actions/http-client": "^2.1.1", + "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" }, "devDependencies": { @@ -18,9 +18,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", - "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "dependencies": { "tunnel": "^0.0.6" } @@ -56,9 +56,9 @@ }, "dependencies": { "@actions/http-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", - "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "requires": { "tunnel": "^0.0.6" } diff --git a/packages/core/package.json b/packages/core/package.json index 32b83922..629b4a2d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,11 +36,11 @@ "url": "https://github.com/actions/toolkit/issues" }, "dependencies": { - "@actions/http-client": "^2.1.1", + "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" }, "devDependencies": { "@types/node": "^12.0.2", "@types/uuid": "^8.3.4" } -} +} \ No newline at end of file