From f28890f23fd939d984bb6b3517468c4170339d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Fri, 20 Jun 2025 21:17:03 -0600 Subject: [PATCH 1/9] chore: Move tests outside the src folder --- package-lock.json | 123 +++++++++++---------------- package.json | 8 +- {src/tests => tests}/DrFetch.test.ts | 6 +- {src/tests => tests}/headers.test.ts | 2 +- {src/tests => tests}/index.test.ts | 2 +- 5 files changed, 59 insertions(+), 82 deletions(-) rename {src/tests => tests}/DrFetch.test.ts (99%) rename {src/tests => tests}/headers.test.ts (99%) rename {src/tests => tests}/index.test.ts (93%) diff --git a/package-lock.json b/package-lock.json index ff36064..28ed640 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,12 +11,12 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.1", + "@types/node": "^24.0.3", "@types/sinon": "^17.0.3", "chai": "^5.1.2", - "mocha": "^11.1.0", + "mocha": "^11.7.0", "publint": "^0.3.9", - "sinon": "^20.0.0", + "sinon": "^21.0.0", "ts-mocha": "^11.1.0", "ts-node": "^10.9.2", "typescript": "^5.7.2" @@ -176,9 +176,9 @@ "license": "MIT" }, "node_modules/@types/chai": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.1.tgz", - "integrity": "sha512-iu1JLYmGmITRzUgNiLMZD3WCoFzpYtueuyAgHTXqgwSRAMIlFTnZqG6/xenkpUGRJEzSfklUTI4GNSzks/dc0w==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", "dev": true, "license": "MIT", "dependencies": { @@ -200,13 +200,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", + "version": "24.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz", + "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.8.0" } }, "node_modules/@types/sinon": { @@ -227,9 +227,9 @@ "license": "MIT" }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -313,9 +313,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -536,9 +536,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -577,9 +577,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -698,22 +698,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -845,9 +829,9 @@ } }, "node_modules/loupe": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", - "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.4.tgz", + "integrity": "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==", "dev": true, "license": "MIT" }, @@ -866,16 +850,19 @@ "license": "ISC" }, "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minipass": { @@ -889,29 +876,29 @@ } }, "node_modules/mocha": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.2.2.tgz", - "integrity": "sha512-VlSBxrPYHK4YNOEbFdkCxHQbZMoNzBkoPprqtZRW6311EUF/DlSxoycE2e/2NtRk4WKkIXzyrXDTrlikJMWgbw==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.0.tgz", + "integrity": "sha512-bXfLy/mI8n4QICg+pWj1G8VduX5vC0SHRwFpiR5/Fxc8S2G906pSfkyMmHVsdJNQJQNh3LE67koad9GzEvkV6g==", "dev": true, "license": "MIT", "dependencies": { "browser-stdout": "^1.3.1", "chokidar": "^4.0.1", "debug": "^4.3.5", - "diff": "^5.2.0", + "diff": "^7.0.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", + "minimatch": "^9.0.5", "ms": "^2.1.3", "picocolors": "^1.1.1", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", - "workerpool": "^6.5.1", + "workerpool": "^9.2.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1", "yargs-unparser": "^2.0.0" @@ -981,9 +968,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/package-manager-detector": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.2.0.tgz", - "integrity": "sha512-PutJepsOtsqVfUsxCzgTTpyXmiAgvKptIgY4th5eq5UXXFhj5PxfQ9hnGkypMeovpAvVshFRItoFHYO18TCOqA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.3.0.tgz", + "integrity": "sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ==", "dev": true, "license": "MIT" }, @@ -1178,9 +1165,9 @@ } }, "node_modules/sinon": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-20.0.0.tgz", - "integrity": "sha512-+FXOAbdnj94AQIxH0w1v8gzNxkawVvNqE3jUzRLptR71Oykeu2RrQXXl/VQjKay+Qnh73fDt/oDfMo6xMeDQbQ==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", + "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1195,16 +1182,6 @@ "url": "https://opencollective.com/sinon" } }, - "node_modules/sinon/node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/sinon/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1453,9 +1430,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "dev": true, "license": "MIT" }, @@ -1483,9 +1460,9 @@ } }, "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.2.tgz", + "integrity": "sha512-Xz4Nm9c+LiBHhDR5bDLnNzmj6+5F+cyEAWPMkbs2awq/dYazR/efelZzUAjB/y3kNHL+uzkHvxVVpaOfGCPV7A==", "dev": true, "license": "Apache-2.0" }, diff --git a/package.json b/package.json index 37ea9b5..0506539 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "dist/index.d.ts", "type": "module", "scripts": { - "test": "ts-mocha -n loader=ts-node/esm -p ./tsconfig.json ./src/tests/**/*.test.ts", + "test": "ts-mocha -n loader=ts-node/esm -p ./tsconfig.json ./tests/**/*.test.ts", "build": "tsc && publint", "prebuild": "npm run test", "prepublishOnly": "npm run build" @@ -40,12 +40,12 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.1", + "@types/node": "^24.0.3", "@types/sinon": "^17.0.3", "chai": "^5.1.2", - "mocha": "^11.1.0", + "mocha": "^11.7.0", "publint": "^0.3.9", - "sinon": "^20.0.0", + "sinon": "^21.0.0", "ts-mocha": "^11.1.0", "ts-node": "^10.9.2", "typescript": "^5.7.2" diff --git a/src/tests/DrFetch.test.ts b/tests/DrFetch.test.ts similarity index 99% rename from src/tests/DrFetch.test.ts rename to tests/DrFetch.test.ts index 62fe296..140a1a4 100644 --- a/src/tests/DrFetch.test.ts +++ b/tests/DrFetch.test.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; import { describe, test } from "mocha"; import { fake } from 'sinon'; -import { DrFetch } from "../DrFetch.js"; -import type { FetchFnInit, FetchFnUrl, StatusCode } from "../types.js"; -import { getHeader } from "../headers.js"; +import { DrFetch } from "../src/DrFetch.js"; +import type { FetchFnInit, FetchFnUrl, StatusCode } from "../src/types.js"; +import { getHeader } from "../src/headers.js"; const shortcutMethodsWithBody = [ 'post', diff --git a/src/tests/headers.test.ts b/tests/headers.test.ts similarity index 99% rename from src/tests/headers.test.ts rename to tests/headers.test.ts index 80938d9..1c0b5b0 100644 --- a/src/tests/headers.test.ts +++ b/tests/headers.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { describe, test } from 'mocha'; -import { getHeader, hasHeader, makeIterableHeaders, setHeaders } from '../headers.js'; +import { getHeader, hasHeader, makeIterableHeaders, setHeaders } from '../src/headers.js'; describe('setHeaders', () => { test("Should throw an error whenever the 'init' argument is undefined.", () => { diff --git a/src/tests/index.test.ts b/tests/index.test.ts similarity index 93% rename from src/tests/index.test.ts rename to tests/index.test.ts index f58f826..0709cfd 100644 --- a/src/tests/index.test.ts +++ b/tests/index.test.ts @@ -14,7 +14,7 @@ describe('index', () => { ]; // Act. - const module = await import('../index.js'); + const module = await import('../src/index.js'); for (const name of expectedExports) { expect(module, `Expected object '${name}' is not exported.`).to.have.property(name); } From 8d9aac7b6cb5e1f9e30be2106ffd988b838b3c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Fri, 20 Jun 2025 22:14:35 -0600 Subject: [PATCH 2/9] Merge branch 'main' --- .github/workflows/dispatch-test-pr.yml | 19 ++++++++++++++++ .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++ .github/workflows/test-pr.yml | 16 ++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 .github/workflows/dispatch-test-pr.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml new file mode 100644 index 0000000..3bea8b0 --- /dev/null +++ b/.github/workflows/dispatch-test-pr.yml @@ -0,0 +1,19 @@ +name: On-Demand Unit Testing + +on: + workflow_dispatch: + inputs: + ref: + description: 'Branch or tag to test' + required: true + default: 'main' + +jobs: + test: + name: On-Demand Unit Testing on ${{ inputs.ref }} + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 + secrets: inherit + with: + pwsh: false + build: false + ref: ${{ inputs.ref }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d9bab60 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Publish NPM Package + +on: + workflow_dispatch: + inputs: + node-version: + description: Node.js version to use. + required: false + type: choice + options: + - '18' + - '20' + - '22' + - '24' + default: '24' + dry-run: + description: Performs a dry run of the publish. + required: false + type: boolean + default: false + +jobs: + publish: + name: Publish NPM Package + uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.1.0 + secrets: inherit + with: + node-version: ${{ inputs.node-version }} + npm_tag: latest + dry_run: ${{ inputs.dry-run }} diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 0000000..bc3c30c --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,16 @@ +name: Test Pull Request + +on: + pull_request: + branches: + - '**' + +jobs: + test: + name: Unit Testing + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 + secrets: inherit + with: + pwsh: false + build: false + ref: ${{ github.head_ref }} From 2dcdaa9427a7c0d4c61cbeaf3459808422be445b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Fri, 20 Jun 2025 22:31:57 -0600 Subject: [PATCH 3/9] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit c47fb9b37d62633e7f9e58383d257b88e9fb9cde Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:30:43 2025 -0600 chore(CI): Allow on-demand testing selecting the Node.js version (#50) commit 197246d4262b93f75654fd60c5c98f8f83d3cf68 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:13:10 2025 -0600 feat: On-demand unit testing (#49) commit c7a30f4cf1d3158f6cbc1d3e013ade129713fadf Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:46:30 2025 -0600 fix: Correct test CI file (#48) commit 56aefc5bdf1a2fda95c6fcd0c9a601d72a056617 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:29:44 2025 -0600 feat: Add CI/CD (#46) --- .github/workflows/dispatch-test-pr.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml index 3bea8b0..9f719a7 100644 --- a/.github/workflows/dispatch-test-pr.yml +++ b/.github/workflows/dispatch-test-pr.yml @@ -3,17 +3,23 @@ name: On-Demand Unit Testing on: workflow_dispatch: inputs: - ref: - description: 'Branch or tag to test' + node-version: + description: Node.js version to use. required: true - default: 'main' + type: choice + options: + - '18' + - '20' + - '22' + - '24' + default: '24' jobs: test: - name: On-Demand Unit Testing on ${{ inputs.ref }} - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 + name: On-Demand Unit Testing on Node.js v${{ inputs.node-version }} + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.1.0 secrets: inherit with: pwsh: false build: false - ref: ${{ inputs.ref }} + node-version: ${{ inputs.node-version }} From 8df2892bd19fe40bde1891ccd42057e0205b37e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Fri, 20 Jun 2025 22:42:15 -0600 Subject: [PATCH 4/9] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 0baa56fa368d813f3745eb743f2f466f08b981da Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:41:29 2025 -0600 fix: Convert version number to number (#51) commit c47fb9b37d62633e7f9e58383d257b88e9fb9cde Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:30:43 2025 -0600 chore(CI): Allow on-demand testing selecting the Node.js version (#50) commit 197246d4262b93f75654fd60c5c98f8f83d3cf68 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:13:10 2025 -0600 feat: On-demand unit testing (#49) commit c7a30f4cf1d3158f6cbc1d3e013ade129713fadf Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:46:30 2025 -0600 fix: Correct test CI file (#48) commit 56aefc5bdf1a2fda95c6fcd0c9a601d72a056617 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:29:44 2025 -0600 feat: Add CI/CD (#46) --- .github/workflows/dispatch-test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml index 9f719a7..dd0e0ee 100644 --- a/.github/workflows/dispatch-test-pr.yml +++ b/.github/workflows/dispatch-test-pr.yml @@ -22,4 +22,4 @@ jobs: with: pwsh: false build: false - node-version: ${{ inputs.node-version }} + node-version: ${{ format('{0}', inputs.node-version) }} From 29c84462b28daf2169e18996bc8d8cbceec475de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Fri, 20 Jun 2025 22:50:37 -0600 Subject: [PATCH 5/9] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit be3e49b72ffc16cf89138dad06ea01c331bf5151 Author: Ramirez Vargas, José Pablo Date: Fri Jun 20 22:49:55 2025 -0600 chore(CJ): Node.js version as string commit 0baa56fa368d813f3745eb743f2f466f08b981da Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:41:29 2025 -0600 fix: Convert version number to number (#51) commit c47fb9b37d62633e7f9e58383d257b88e9fb9cde Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:30:43 2025 -0600 chore(CI): Allow on-demand testing selecting the Node.js version (#50) commit 197246d4262b93f75654fd60c5c98f8f83d3cf68 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 22:13:10 2025 -0600 feat: On-demand unit testing (#49) commit c7a30f4cf1d3158f6cbc1d3e013ade129713fadf Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:46:30 2025 -0600 fix: Correct test CI file (#48) commit 56aefc5bdf1a2fda95c6fcd0c9a601d72a056617 Author: José Pablo Ramírez Vargas Date: Fri Jun 20 21:29:44 2025 -0600 feat: Add CI/CD (#46) --- .github/workflows/dispatch-test-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml index dd0e0ee..211e6aa 100644 --- a/.github/workflows/dispatch-test-pr.yml +++ b/.github/workflows/dispatch-test-pr.yml @@ -17,9 +17,9 @@ on: jobs: test: name: On-Demand Unit Testing on Node.js v${{ inputs.node-version }} - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.1.0 + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 secrets: inherit with: pwsh: false build: false - node-version: ${{ format('{0}', inputs.node-version) }} + node-version: ${{ inputs.node-version }} From d29788974ed466c2fe62ab62a5ed6f21389c1b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Tue, 24 Jun 2025 12:15:58 -0600 Subject: [PATCH 6/9] fix(tests): Upgrade mocha --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28ed640..ad9b392 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@types/node": "^24.0.3", "@types/sinon": "^17.0.3", "chai": "^5.1.2", - "mocha": "^11.7.0", + "mocha": "^11.7.1", "publint": "^0.3.9", "sinon": "^21.0.0", "ts-mocha": "^11.1.0", @@ -876,9 +876,9 @@ } }, "node_modules/mocha": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.0.tgz", - "integrity": "sha512-bXfLy/mI8n4QICg+pWj1G8VduX5vC0SHRwFpiR5/Fxc8S2G906pSfkyMmHVsdJNQJQNh3LE67koad9GzEvkV6g==", + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.1.tgz", + "integrity": "sha512-5EK+Cty6KheMS/YLPPMJC64g5V61gIR25KsRItHw6x4hEKT6Njp1n9LOlH4gpevuwMVS66SXaBBpg+RWZkza4A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 0506539..61ba036 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@types/node": "^24.0.3", "@types/sinon": "^17.0.3", "chai": "^5.1.2", - "mocha": "^11.7.0", + "mocha": "^11.7.1", "publint": "^0.3.9", "sinon": "^21.0.0", "ts-mocha": "^11.1.0", From f5f26685688dfba59b67f31684ccbb6b7eee46dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Tue, 24 Jun 2025 12:21:15 -0600 Subject: [PATCH 7/9] chore(cicd): Update workflows --- .github/workflows/publish.yml | 6 +++--- .github/workflows/test-pr.yml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d9bab60..04ba145 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,9 +22,9 @@ on: jobs: publish: name: Publish NPM Package - uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.1.0 + uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.3 secrets: inherit with: node-version: ${{ inputs.node-version }} - npm_tag: latest - dry_run: ${{ inputs.dry-run }} + npm-tag: latest + dry-run: ${{ inputs.dry-run }} diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 20b0a12..78faa9b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -8,8 +8,9 @@ on: jobs: test: name: Unit Testing - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.3 secrets: inherit with: pwsh: false build: false + ref: ${{ github.head_ref }} From 68750845954276e52cd27d2dae08684eef17d6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Tue, 24 Jun 2025 16:08:53 -0600 Subject: [PATCH 8/9] chore(cicd): Update dispatch test workflow --- .github/workflows/dispatch-test-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml index 211e6aa..da743e4 100644 --- a/.github/workflows/dispatch-test-pr.yml +++ b/.github/workflows/dispatch-test-pr.yml @@ -17,9 +17,10 @@ on: jobs: test: name: On-Demand Unit Testing on Node.js v${{ inputs.node-version }} - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2 + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.3 secrets: inherit with: pwsh: false build: false node-version: ${{ inputs.node-version }} + ref: ${{ github.ref }} From 24f03f298896d3367b4714ce4c8efe0cecc431d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Vargas=2C=20Jos=C3=A9=20Pablo?= Date: Tue, 24 Jun 2025 16:16:51 -0600 Subject: [PATCH 9/9] chore: Update CI/CD to v0.4 --- .github/workflows/dispatch-test-pr.yml | 3 +-- .github/workflows/publish.yml | 2 +- .github/workflows/test-pr.yml | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dispatch-test-pr.yml b/.github/workflows/dispatch-test-pr.yml index da743e4..e35c23c 100644 --- a/.github/workflows/dispatch-test-pr.yml +++ b/.github/workflows/dispatch-test-pr.yml @@ -17,10 +17,9 @@ on: jobs: test: name: On-Demand Unit Testing on Node.js v${{ inputs.node-version }} - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.3 + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.4 secrets: inherit with: pwsh: false build: false node-version: ${{ inputs.node-version }} - ref: ${{ github.ref }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 04ba145..41a3db7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ on: jobs: publish: name: Publish NPM Package - uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.3 + uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.4 secrets: inherit with: node-version: ${{ inputs.node-version }} diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 78faa9b..61cc62f 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -8,9 +8,8 @@ on: jobs: test: name: Unit Testing - uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.3 + uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.4 secrets: inherit with: pwsh: false build: false - ref: ${{ github.head_ref }}