From 18795bd0c5c39a2d01a40d8815fd48e230d89a92 Mon Sep 17 00:00:00 2001 From: Muna Nasher Date: Wed, 8 Apr 2026 19:44:21 +0200 Subject: [PATCH 1/5] c55-Muna-week13 --- task-1/.gethub/workflows/ci.yml | 0 task-1/github | 0 task-1/package-lock.json | 86 +++++++---------------------- task-1/src/components/SearchBar.tsx | 2 +- 4 files changed, 21 insertions(+), 67 deletions(-) create mode 100644 task-1/.gethub/workflows/ci.yml create mode 100644 task-1/github diff --git a/task-1/.gethub/workflows/ci.yml b/task-1/.gethub/workflows/ci.yml new file mode 100644 index 0000000..e69de29 diff --git a/task-1/github b/task-1/github new file mode 100644 index 0000000..e69de29 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..fef84fc 100644 --- a/task-1/src/components/SearchBar.tsx +++ b/task-1/src/components/SearchBar.tsx @@ -7,7 +7,7 @@ interface Props { export function SearchBar({ onSearch, loading }: Props) { const [value, setValue] = useState(""); - const unusedConstMaybeDeleteMe = "Search"; + //const unusedConstMaybeDeleteMe = "Search"; const handleSubmit = (e: FormEvent) => { e.preventDefault(); From ec417661aadce0172c2bb2dbb31b3b2369db38ad Mon Sep 17 00:00:00 2001 From: Muna Nasher Date: Sun, 12 Apr 2026 21:17:56 +0200 Subject: [PATCH 2/5] add and fix CI pipeline workflow --- .github/workflows/task-1.yml | 40 +++++++++++++++++++++++++++++++++ task-1/.gethub/workflows/ci.yml | 0 task-1/github | 0 3 files changed, 40 insertions(+) create mode 100644 .github/workflows/task-1.yml delete mode 100644 task-1/.gethub/workflows/ci.yml delete mode 100644 task-1/github diff --git a/.github/workflows/task-1.yml b/.github/workflows/task-1.yml new file mode 100644 index 0000000..706ba0c --- /dev/null +++ b/.github/workflows/task-1.yml @@ -0,0 +1,40 @@ +name: CI Pipeline + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: +name: Checkout code + uses: actions/checkout@v4 + +name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + +name: Install dependencies + run: npm install + +name: Run Linter + run: npm run lint + +name: Run Tests + run: npm test -- --watchAll=false + +name: Build project + run: npm run build + +name: Zip build folder + run: zip -r dist.zip dist + +name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: dist.zip \ No newline at end of file diff --git a/task-1/.gethub/workflows/ci.yml b/task-1/.gethub/workflows/ci.yml deleted file mode 100644 index e69de29..0000000 diff --git a/task-1/github b/task-1/github deleted file mode 100644 index e69de29..0000000 From fda4e5af2d5d13c825e2a1e53bc3fabc33fa58b8 Mon Sep 17 00:00:00 2001 From: Muna Nasher Date: Sun, 12 Apr 2026 21:41:20 +0200 Subject: [PATCH 3/5] fix github actions yaml syntax --- .github/workflows/task-1.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/task-1.yml b/.github/workflows/task-1.yml index 706ba0c..c29bdf6 100644 --- a/.github/workflows/task-1.yml +++ b/.github/workflows/task-1.yml @@ -10,30 +10,30 @@ jobs: runs-on: ubuntu-latest steps: -name: Checkout code + - name: Checkout code uses: actions/checkout@v4 -name: Setup Node.js + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 18 -name: Install dependencies + - name: Install dependencies run: npm install -name: Run Linter + - name: Run Linter run: npm run lint -name: Run Tests + - name: Run Tests run: npm test -- --watchAll=false -name: Build project + - name: Build project run: npm run build -name: Zip build folder + - name: Zip build folder run: zip -r dist.zip dist -name: Upload artifact + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-artifact From e25d5db09983b23180ecb36bd99f4c5a684d9d6f Mon Sep 17 00:00:00 2001 From: Muna Nasher Date: Sun, 12 Apr 2026 22:06:54 +0200 Subject: [PATCH 4/5] fix CI working directory for task-1 --- .github/workflows/task-1.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/task-1.yml b/.github/workflows/task-1.yml index c29bdf6..f9b3c7f 100644 --- a/.github/workflows/task-1.yml +++ b/.github/workflows/task-1.yml @@ -1,14 +1,11 @@ -name: CI Pipeline - -on: - push: - branches: [main] - pull_request: - jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: task-1 + steps: - name: Checkout code uses: actions/checkout@v4 @@ -19,7 +16,7 @@ jobs: node-version: 18 - name: Install dependencies - run: npm install + run: npm ci - name: Run Linter run: npm run lint From 6ca0f1946ef9213840ce912a701f60d7cc9dab4a Mon Sep 17 00:00:00 2001 From: Muna Nasher Date: Sun, 12 Apr 2026 22:13:13 +0200 Subject: [PATCH 5/5] fix CI working directory issue --- .github/workflows/task-1.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/task-1.yml b/.github/workflows/task-1.yml index f9b3c7f..53453f0 100644 --- a/.github/workflows/task-1.yml +++ b/.github/workflows/task-1.yml @@ -1,11 +1,14 @@ +name: CI Pipeline + +on: + push: + branches: [main] + pull_request: + jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: task-1 - steps: - name: Checkout code uses: actions/checkout@v4 @@ -17,21 +20,26 @@ jobs: - name: Install dependencies run: npm ci + working-directory: task-1 - name: Run Linter run: npm run lint + working-directory: task-1 - name: Run Tests run: npm test -- --watchAll=false + working-directory: task-1 - name: Build project run: npm run build + working-directory: task-1 - name: Zip build folder run: zip -r dist.zip dist + working-directory: task-1 - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-artifact - path: dist.zip \ No newline at end of file + path: task-1/dist.zip \ No newline at end of file