From ca96e2fb1e011ace4137ff1a7237babc6e351858 Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Wed, 8 Apr 2026 23:51:35 +0200 Subject: [PATCH 1/6] week 13 assignment --- .github/workflows/task-1.yaml | 45 +++++++++++++++ README.md | 2 +- task-1/package-lock.json | 86 +++++++---------------------- task-1/src/components/SearchBar.tsx | 1 - 4 files changed, 66 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/task-1.yaml diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml new file mode 100644 index 0000000..d03466a --- /dev/null +++ b/.github/workflows/task-1.yaml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm install + working-directory: ./task-1 + + - name: Run linter + run: npm run lint + working-directory: ./task-1 + + - name: Run unit tests + run: npm test + working-directory: ./task-1 + + - name: Build the React application + run: npm run build + working-directory: ./task-1 + + - name: Zip the build output + run: zip -r task-1-dist.zip task-1/dist + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: task-1-dist.zip diff --git a/README.md b/README.md index eb0daee..3966706 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ The week 13 assignment for the HackYourFuture Core program can be found at the f ## Implementation Instructions ### Task 1 -Add your gitHub action file in `.github/workflows/task-1.yaml` (Note: inside the existing .github folder found on the root of the repository) +Add your gitHub action file in `.github/workflows/task-1.yaml` (Note: inside the existing .github folder found on the root of the repository) \ No newline at end of file diff --git a/task-1/package-lock.json b/task-1/package-lock.json index a0131d8..17b7698 100644 --- a/task-1/package-lock.json +++ b/task-1/package-lock.json @@ -109,6 +109,7 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -439,6 +440,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" }, @@ -487,35 +489,11 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" } }, - "node_modules/@emnapi/core": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz", - "integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz", - "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", @@ -523,7 +501,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -927,9 +904,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -947,9 +921,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -967,9 +938,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -987,9 +955,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1007,9 +972,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1027,9 +989,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1227,8 +1186,7 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/chai": { "version": "5.2.3", @@ -1268,6 +1226,7 @@ "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -1278,6 +1237,7 @@ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1288,6 +1248,7 @@ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "dev": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -1337,6 +1298,7 @@ "integrity": "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", @@ -1763,6 +1725,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1803,7 +1766,6 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -1931,6 +1893,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -2151,8 +2114,7 @@ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/electron-to-chromium": { "version": "1.5.331", @@ -2210,6 +2172,7 @@ "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3004,9 +2967,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3028,9 +2988,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3052,9 +3009,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3076,9 +3030,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3173,7 +3124,6 @@ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -3426,6 +3376,7 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -3478,7 +3429,6 @@ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -3494,7 +3444,6 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -3517,6 +3466,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -3526,6 +3476,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -3538,8 +3489,7 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/redent": { "version": "3.0.0", @@ -3875,6 +3825,7 @@ "integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3971,6 +3922,7 @@ "integrity": "sha512-nmu43Qvq9UopTRfMx2jOYW5l16pb3iDC1JH6yMuPkpVbzK0k+L7dfsEDH4jRgYFmsg0sTAqkojoZgzLMlwHsCQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", @@ -4049,6 +4001,7 @@ "integrity": "sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/expect": "4.1.2", "@vitest/mocker": "4.1.2", @@ -4259,6 +4212,7 @@ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/task-1/src/components/SearchBar.tsx b/task-1/src/components/SearchBar.tsx index 6574666..6579f9b 100644 --- a/task-1/src/components/SearchBar.tsx +++ b/task-1/src/components/SearchBar.tsx @@ -7,7 +7,6 @@ interface Props { export function SearchBar({ onSearch, loading }: Props) { const [value, setValue] = useState(""); - const unusedConstMaybeDeleteMe = "Search"; const handleSubmit = (e: FormEvent) => { e.preventDefault(); From 3bd052f0112572181cebbbaa82a948288d034bb4 Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Wed, 8 Apr 2026 23:53:55 +0200 Subject: [PATCH 2/6] week 13 assignment --- .github/workflows/task-1.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml index d03466a..c973f34 100644 --- a/.github/workflows/task-1.yaml +++ b/.github/workflows/task-1.yaml @@ -2,9 +2,7 @@ name: CI on: push: - branches: [ main, develop ] - pull_request: - branches: [ main, develop ] + branches: main jobs: ci: @@ -16,7 +14,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' cache: 'npm' - name: Install dependencies From 02270199bdf5f80dd948cdca935a962f99c2294b Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Wed, 8 Apr 2026 23:58:29 +0200 Subject: [PATCH 3/6] week 13 assignment --- .github/workflows/task-1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml index c973f34..be0e8d4 100644 --- a/.github/workflows/task-1.yaml +++ b/.github/workflows/task-1.yaml @@ -40,4 +40,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: build-artifact - path: task-1-dist.zip + path: task-1/dist/task-1-dist.zip From f35100f2a9d5ec699f63755d9f56b63d6d101228 Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Thu, 9 Apr 2026 00:01:48 +0200 Subject: [PATCH 4/6] week 13 assignment --- .github/workflows/task-1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml index be0e8d4..ac0ef43 100644 --- a/.github/workflows/task-1.yaml +++ b/.github/workflows/task-1.yaml @@ -34,10 +34,10 @@ jobs: working-directory: ./task-1 - name: Zip the build output - run: zip -r task-1-dist.zip task-1/dist + run: zip -r build.zip dist - name: Upload build artifact uses: actions/upload-artifact@v4 with: name: build-artifact - path: task-1/dist/task-1-dist.zip + path: task-1/build.zip From c949050bc5845c68d0ea7958f791bc91e2b8c8ea Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Thu, 9 Apr 2026 00:02:43 +0200 Subject: [PATCH 5/6] week 13 assignment --- .github/workflows/task-1.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml index ac0ef43..0520fa6 100644 --- a/.github/workflows/task-1.yaml +++ b/.github/workflows/task-1.yaml @@ -15,7 +15,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - cache: 'npm' - name: Install dependencies run: npm install From 743fc9d71289b3f18824d02e2c8b950670e50d40 Mon Sep 17 00:00:00 2001 From: Atiqa Naseer Date: Thu, 9 Apr 2026 00:04:29 +0200 Subject: [PATCH 6/6] week 13 assignment --- .github/workflows/task-1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml index 0520fa6..0ceaad6 100644 --- a/.github/workflows/task-1.yaml +++ b/.github/workflows/task-1.yaml @@ -33,10 +33,10 @@ jobs: working-directory: ./task-1 - name: Zip the build output - run: zip -r build.zip dist + run: zip -r task-1-dist.zip task-1/dist - name: Upload build artifact uses: actions/upload-artifact@v4 with: name: build-artifact - path: task-1/build.zip + path: task-1-dist.zip