diff --git a/.github/workflows/deploy-develop.yml b/.github/workflows/deploy-develop.yml index 68a8c0d..b5118d4 100644 --- a/.github/workflows/deploy-develop.yml +++ b/.github/workflows/deploy-develop.yml @@ -91,7 +91,9 @@ jobs: # Checkout main branch git checkout main - # Build main branch content + # Build main branch content (without develop GitVersion env vars) + # This allows the inject-version script to use git-based version calculation + # which will correctly determine the main branch version npm run build # Save main build @@ -105,10 +107,6 @@ jobs: else echo "No stash to pop" fi - env: - GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }} - GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }} - GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }} # Second: Build develop branch content for the subdirectory - name: Build develop branch for sub-directory diff --git a/package-lock.json b/package-lock.json index 0ec6f7a..efd1fa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "suncalc": "^1.9.0" }, "devDependencies": { + "@axe-core/playwright": "^4.10.2", "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", "@eslint/js": "^9.32.0", @@ -21,12 +22,15 @@ "@typescript-eslint/eslint-plugin": "^8.39.0", "@typescript-eslint/parser": "^8.37.0", "@vitest/ui": "^3.2.4", + "axe-core": "^4.10.3", + "axe-playwright": "^2.1.0", "eslint": "^9.32.0", "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.5.4", "happy-dom": "^18.0.1", "husky": "^9.1.7", "jsdom": "^26.1.0", + "playwright": "^1.54.2", "prettier": "^3.6.2", "typescript": "^5.9.2", "vitest": "^3.2.4" @@ -46,6 +50,19 @@ "lru-cache": "^10.4.3" } }, + "node_modules/@axe-core/playwright": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.10.2.tgz", + "integrity": "sha512-6/b5BJjG6hDaRNtgzLIfKr5DfwyiLHO4+ByTLB0cJgWSM8Ll7KqtdblIS6bEkwSF642/Ex91vNqIl3GLXGlceg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.10.3" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -1559,6 +1576,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/junit-report-builder": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/junit-report-builder/-/junit-report-builder-3.0.2.tgz", + "integrity": "sha512-R5M+SYhMbwBeQcNXYWNCZkl09vkVfAtcPIaCGdzIkkbeaTrVbGQ7HVgi4s+EmM/M1K4ZuWQH0jGcvMvNePfxYA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "24.2.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.0.tgz", @@ -2054,6 +2078,49 @@ "node": ">=12" } }, + "node_modules/axe-core": { + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", + "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axe-html-reporter": { + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/axe-html-reporter/-/axe-html-reporter-2.2.11.tgz", + "integrity": "sha512-WlF+xlNVgNVWiM6IdVrsh+N0Cw7qupe5HT9N6Uyi+aN7f6SSi92RDomiP1noW8OWIV85V6x404m5oKMeqRV3tQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mustache": "^4.0.1" + }, + "engines": { + "node": ">=8.9.0" + }, + "peerDependencies": { + "axe-core": ">=3" + } + }, + "node_modules/axe-playwright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/axe-playwright/-/axe-playwright-2.1.0.tgz", + "integrity": "sha512-tY48SX56XaAp16oHPyD4DXpybz8Jxdz9P7exTjF/4AV70EGUavk+1fUPWirM0OYBR+YyDx6hUeDvuHVA6fB9YA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/junit-report-builder": "^3.0.2", + "axe-core": "^4.10.1", + "axe-html-reporter": "2.2.11", + "junit-report-builder": "^5.1.1", + "picocolors": "^1.1.1" + }, + "peerDependencies": { + "playwright": ">1.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3588,6 +3655,21 @@ "node": "*" } }, + "node_modules/junit-report-builder": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/junit-report-builder/-/junit-report-builder-5.1.1.tgz", + "integrity": "sha512-ZNOIIGMzqCGcHQEA2Q4rIQQ3Df6gSIfne+X9Rly9Bc2y55KxAZu8iGv+n2pP0bLf0XAOctJZgeloC54hWzCahQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21", + "make-dir": "^3.1.0", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -3635,6 +3717,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -3722,6 +3811,32 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/meow": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", @@ -3802,6 +3917,16 @@ "dev": true, "license": "MIT" }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "dev": true, + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", @@ -3987,6 +4112,53 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/playwright": { + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz", + "integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.54.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz", + "integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", @@ -5032,6 +5204,16 @@ "node": ">=18" } }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", diff --git a/package.json b/package.json index 1f5f61a..5a02ee4 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ "build:watch": "tsc --watch", "dev": "tsc --watch", "clean": "rm -rf dist", - "copy-assets": "cp src/*.* dist/ && cp -r src/styles src/scripts dist/ && cp src/favicons/* dist/ && mkdir -p dist/scripts/suncalc && cp node_modules/suncalc/suncalc.js node_modules/suncalc/LICENSE dist/scripts/suncalc/ && mkdir -p dist/scripts/temporal && cp node_modules/@js-temporal/polyfill/dist/index.umd.js dist/scripts/temporal/", + "copy-assets": "cp src/*.* dist/ && cp -r src/styles src/scripts dist/ && cp src/favicons/* dist/ && mkdir -p dist/scripts/suncalc && cp node_modules/suncalc/suncalc.js node_modules/suncalc/LICENSE dist/scripts/suncalc/ && mkdir -p dist/scripts/temporal && cp node_modules/@js-temporal/polyfill/dist/index.umd.js node_modules/@js-temporal/polyfill/dist/index.umd.js.map dist/scripts/temporal/", "type-check": "tsc --noEmit", "lint": "eslint src/**/*.ts --no-warn-ignored", "lint:fix": "eslint src/**/*.ts --fix", "format": "prettier --write src/**/*.{ts,js,json,html,css,md}", "format:check": "prettier --check src/**/*.{ts,js,json,html,css,md}", - "test": "npm run lint && npm run format:check && npm run type-check && vitest run", + "test": "npm run build && npm run lint && npm run format:check && npm run type-check && vitest run", "test:watch": "vitest", "test:ui": "vitest --ui", "test:coverage": "vitest run --coverage", @@ -31,6 +31,7 @@ "author": "Taylor Marvin", "license": "MIT", "devDependencies": { + "@axe-core/playwright": "^4.10.2", "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", "@eslint/js": "^9.32.0", @@ -38,12 +39,15 @@ "@typescript-eslint/eslint-plugin": "^8.39.0", "@typescript-eslint/parser": "^8.37.0", "@vitest/ui": "^3.2.4", + "axe-core": "^4.10.3", + "axe-playwright": "^2.1.0", "eslint": "^9.32.0", "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.5.4", "happy-dom": "^18.0.1", "husky": "^9.1.7", "jsdom": "^26.1.0", + "playwright": "^1.54.2", "prettier": "^3.6.2", "typescript": "^5.9.2", "vitest": "^3.2.4" diff --git a/src/index.html b/src/index.html index ec7bdc5..0e41652 100644 --- a/src/index.html +++ b/src/index.html @@ -73,12 +73,14 @@