diff --git a/README.md b/README.md index 4b2e11f..e25022a 100644 --- a/README.md +++ b/README.md @@ -32,28 +32,30 @@ Additionally, the following soft skills will greatly impact your performance: On your first day as a junior web developer at a coding school, you have been assigned a ticket to complete. The task involves adding a new feature to the school's software platform. -Specifically, you need to complete a page that displays a list of learners along with their basic information such as ID, name, email, and a list of mentors. Users should be able to click on a learner to highlight it, and the list of mentors for each learner should be expandable and collapsible. You can refer to the [full mockup](https://w-s5-challenge.herokuapp.com/) for the design and behavior of the page. +Specifically, you need to complete a website that displays a list of learners along with their basic information such as ID, name, email, and a list of mentors. Users should be able to click on a learner to highlight it, and the list of mentors for each learner should be expandable and collapsible. You can refer to the [full mockup](https://w-s5-challenge.herokuapp.com/) for the design and behavior of the page. -**To help you complete the task, several members of your team will provide you with instructions and advice.** +To help you complete the task, several members of your team will provide you with instructions and advice. ### 💾 DevOps Engineer -Below, your DevOps expert will help you set up your local environment and launch the project. +**Below, your DevOps expert will help you set up your local environment and launch the project.**
Click to read --- -This is a **full-stack web application** that comprises both back-end and front-end components. When deployed to production, the back-end part would run in the cloud (think Amazon Web Services or Azure), while the front-end would execute inside the user's web browser (like Chrome for Android, or Firefox for desktop). +This is a **full-stack web application** that comprises both back-end and front-end components. If deployed to production, the back-end part would run in the cloud (think Amazon Web Services or Azure), while the front-end would execute inside the user's web browser (like Chrome for Android, or Firefox for desktop). -As a front-end engineer, your focus is mainly on the files that load **on the user's device**. In this particular project, these files live inside the `frontent` folder (but there are many ways to organize a project). The `backend` folder contains a web server built in Node, but the project as a whole is managed as a Node app, with a `package.json` file at the root containing meta-information and some useful commands developers can use to launch and test the application. +As a front-end engineer, your focus is mainly on the files that load **on the user's device**. In this particular case, these files live inside the `frontent` folder. The `backend` folder contains a web server built in Node, but the project as a whole is managed as a Node application. As such, it contains a `package.json` file at the root, containing some meta-information like name and version, and a few useful scripts developers can use as they work on the app, like "npm test". 1. You will **clone this repository** to your computer, which will allow you to run the software locally for development and testing purposes. -1. You will navigate your terminal to the project folder **and execute `npm install`**. This will install the libraries listed inside `package.json`. Some of these packages are needed for the back-end to do its job of serving JSON data and front-end assets. Other libs help with things like testing and linting your code. +1. You will navigate your terminal to the project folder **and execute `npm install`**. This will install the libraries declared inside `package.json`. Some of these packages are needed for the back-end to do its job of serving JSON data and front-end assets. Other libs help with things like testing and linting your code. -1. After successful installation you will run, in separate terminals, the two scripts found inside `package.json`. **Execute `npm start` in your first terminal, and `npm test` in your second**. On successful start, you will load the app in Chrome by **navigating the browser to `http://localhost:3001`**. The term "localhost" means "your machine", and the number is called a port, allowing multiple web servers to run on the same computer, with one server per port. +1. After successful installation you will run, in separate terminals, two of the scripts found inside `package.json`. To do this, **execute `npm start` in your first terminal, and `npm test` in your second**. On successful start, you will load the app in Chrome by **navigating the browser to `http://localhost:3003`**. The term "localhost" means "your machine", and the number is called a port, allowing multiple web servers to run on the same computer, with one server per port. + +1. If you haven't already, install the [Eslint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) for VSCode. It will highlight syntax errors and problems right inside your editor, which saves tons of time. My job assisting you with local setup of the app is done! You will speak to our designer next. @@ -65,7 +67,7 @@ My job assisting you with local setup of the app is done! You will speak to our ### 🎨 Product Designer -Below, you will find information on how to approach the task, from your Product Designer. +**Below, you will find information on how to approach the task, from your Product Designer.**
Click to read @@ -90,7 +92,7 @@ Fortunately, you have [a very detailed mock](https://w-s5-challenge.herokuapp.co ### 🥷 Lead Developer -Below, your Team Lead will discuss strategy and tactics for dealing with this ticket. +**Below, your Team Lead will discuss strategy and tactics for dealing with this ticket.**
Click to read @@ -105,8 +107,8 @@ Hey! Let's make sure you're up to speed with your **action items so far**. Awesome! Our back-end engineer says that the JSON data needed to build the Learner Cards comes from two endpoints: -- Endpoint A [GET] -- Endpoint B [GET] +- Endpoint A [GET] +- Endpoint B [GET] ❗ You should stop now, and **try out both endpoints using Postman**, to see what they return. @@ -129,16 +131,14 @@ Once you have the payloads from Endpoints A and B stored inside variables, check ] ``` -Once you have the data in the right shape, you can **create a component function** that takes a learner in the format above, and returns a Learner Card. Then just loop over the data, generating cards as you go, and attaching them to the DOM. +Once you have the data in the right shape, you can **create a component function** that takes a single learner in the format above as its argument, and returns a Learner Card. Then just loop over the data, generating cards as you go, and attaching them to the DOM. -Make sure that each element you create uses the **exact same class names and text contents** as those in the mock! Also, render the learners **in the same order** as they arrive from Endpoint A. +Make sure that each element you create uses the **exact same class names and text contents** as those in the design! Also, render the learners **in the same order** as they arrive from Endpoint A. As for interactivity, all the behaviors on the page as the user clicks on the cards boil down to **changes in text contents of some elements, and changes to some class names** which can be observed in the [mock](https://w-s5-challenge.herokuapp.com/). Do not use any other mechanisms! It might seem like you need several click handlers on different elements inside the card, but that would just make the code more complicated. Remember, events bubble up from the target to its ancestor elements! It's easier to just attach an event listener on the card element, and then **check who the target of the click is before taking the appropriate action**. -❗ Install the [Eslint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) for VSCode. It will highlight syntax errors and problems right inside your editor. - ❗ Only make changes to the `frontend/index.js` file. Reach out if you get too stuck, and have fun! @@ -161,7 +161,7 @@ You submit via Codegrade. Check the assignment page on your learning platform.
I am getting errors when I run npm install or npm start. What is going on? -This project requires Node correctly installed on your computer, in order to work. Your Orientation materials should have covered installation of Node. Sometimes Node can be installed but be mis-configured. If the errors persist, please request assistance from Staff. +This project requires Node correctly installed on your computer in order to work. Your learning materials should have covered installation of Node. Sometimes Node can be installed but mis-configured. You can try executing `npm run fixit` (check `package.json` to see what this does), but if Node errors are recurrent, it indicates something wrong with your machine or configuration, in which case you should request assistance from Staff.
@@ -173,51 +173,51 @@ No. Everything you need should be installed already, including Axios.
- Why can't I edit the CSS file? + Why am I not allowed to edit the CSS file? -The CSS is the domain of a different team, and in this particular project we're not supposed to touch it. Do not use inline styles to get around this! It will only make the CSS team angry. And believe me, you want them happy, as they can write CSS twenty times faster than you. +The CSS is the domain of a different team, and in this particular project we're not supposed to touch it. Do not use inline styles to get around this limitation! It will only make the CSS team angry. And believe us, you want CSS specialists happy because they can write CSS twenty times faster than you.
- Why can't I edit the HTML file? + Why am I not allowed to edit the HTML file? -This particular part of the product is a Single Page Application, so the HTML is mostly generated by JavaScript. We don't want to manually edit HTML files when the data that powers the site changes often! It would be untenable. +This particular part of the product is a Single Page Application, so the HTML is mostly empty and the page is generated automatically using JavaScript. We would not want to manually edit HTML files in a website that changed all the time! It would be untenable.
- How do I debug this project? + My page does not work! How do I debug it? -Save your changes, and reload the site in Chrome. If you have a syntax error in your code, the app will crash and you will see errors in the Console. Put console logs before the crash site (error messages usually inform of the line where the crash is happening) and see if your variables contain the data you think they do. +Save your changes, and reload the site in Chrome. If you have a syntax problem in your code, the app will print error messages in the Console. Focus on the first message. Place console logs right before the crash site (errors usually inform of the line number where the problem is originating) and see if your variables contain the data you think they do. If there are no errors but the page is not doing what it's supposed to, the debugging technique is similar: put console logs to ensure that the code you are working on is actually executing, and to check that all variables in the area hold the correct data.
How do I run tests against my code? -Execute `npm test` in your terminal. These are the same tests that execute inside Codegrade. Although this never crossed your mind, tampering with the test file won't change your score, because Codegrade uses a pristine copy of the original test file, `mvp.test.js`. +Execute `npm test` in your terminal. These are the same tests that execute inside Codegrade. Although this never crossed your mind, tampering with the test file won't change your score, because Codegrade uses a pristine copy of the original test file, `mvp.test.js`. If a particular test is giving you grief, don't jump straight to the code to try and fix it. Go to Chrome first, and make sure you can replicate the problem there. A problem we can reliably replicate is a problem mostly fixed.
I believe my code is correct and the test is wrong. What do I do? -Sometimes a test refuses to budge, even if (we think) our code is doing the right thing. Use CTRL-C to kill the tests, and then `npm test` to launch them again, just in case there is a problem with the test runner. More likely, there is a problem with your code. Try your best to reproduce the error by interacting with the site in Chrome. Do not code "to make the test happy". Code so that the browser does exactly what the mock does. The tests are there for confirmation. If the problem persists, please request assistance from Staff. +On occasion the test runner will get stuck. Use CTRL-C to kill the tests, and then `npm test` to launch them again. Try to reproduce the problem the test is complaining about by interacting with the site in Chrome, and do not code "to make the test happy". Code so that **your app does exactly what the mock does**. The tests are there for confirmation. Although it's possible that a particular test be flawed, statistically it's more likely that the bug is in your own code. If the problem persists, please request assistance from Staff.
- The output of the test script is too overwhelming! What do I do? + The output of the test script is just too overwhelming! What can I do? -If a test complains about something, you should try your best to replicate the problem in Chrome. If you need to disable all tests except the one you are focusing on, edit the `mvp.test.js` file and, as an example, change `test('👉 it works', () => { etc })` into `test.only('👉 it works', () => { etc })`. (Note the "only".) This won't affect Codegrade, because Codegrade runs its own version of the tests. +If you need to disable all tests except the one you are focusing on, edit the `mvp.test.js` file and, as an example, change `test('👉 focus on this', () => { etc })` to be `test.only('👉 focus on this', () => { etc })`. (Note the "only".) This won't affect Codegrade, because Codegrade runs its own version of the tests.
- Why can't a single endpoint provide the data in the correct shape? + Why can't endpoints provide the data in the correct shape from the get-go? -As web developers, we often don't have control over our sources of data, and it's common to have to combine JSON from various sources into a data structure that works for the front-end. Even if the endpoints were under our control, and the back-end team were willing to build a new endpoint or improve the existing ones, bug fixes and features sometimes can't wait that long. +As web developers, we often don't have control over our sources of data, and it's common to have to combine JSON from various sources into a data structure that works for the front-end. Even if the endpoints were under our control, and the back-end team were willing to build a new endpoint or improve existing ones, bug fixes and features sometimes can't wait that long.
@@ -238,21 +238,21 @@ Although a small, "old-fashioned" website might be made of just HTML, CSS and JS
Is this how web projects are normally organized? -Web projects can be organized in a million ways, there are no standards beyond the placement of configuration files, which typically live at the root. Some developers like it like this, while others prefer to use opinionated frameworks, which do a lot of magic but prescribe that folders and files be structured and named just so. +Web projects can be organized in a million ways, there aren't many standards. Some developers like it like this, while others prefer to use opinionated frameworks, which do a lot of magic but prescribe that folders and files be structured and named just so.
- Why is my code inside index.js wrapped in an async function called sprintChallenge5? + Why is my code inside index.js wrapped in an async function called "sprintChallenge5"? -This way we can easily import your code as a single function in the `mvp.test.js` test suite. The export syntax is at the bottom of `index.js`, but this syntax does not work in the browser, only in the environment where the tests execute, which is Node. The function declaration is prefixed by the `async` keyword to allow you to use `await` inside it. +This way we can easily import your code as a single function in the `mvp.test.js` test suite. The export syntax is at the bottom of `index.js`. The function declaration is prefixed by the `async` keyword to allow you to use `await` inside it.
What are the package.json and package-lock.json files? -The `package.json` file contains meta-information about the project like its version number, scripts that the developer can execute, and a list of the dependencies that are downloaded when you execute `npm install`. There can be some wiggle room to allow newer versions of the dependencies to be installed, so the `package-lock.json` file makes sure the exact same versions of everything are used every time the project is installed from scratch. +The `package.json` file contains meta-information about the project like its version number, scripts that the developer can execute, and a list of the dependencies that are downloaded when you execute `npm install`. There can be some wiggle room to allow newer versions of the dependencies to be installed, so the `package-lock.json` file, when present, makes sure the exact same versions of everything are used every time the project is installed from scratch.
diff --git a/backend/mock.js b/backend/mock.js index 8ca088c..d149170 100644 --- a/backend/mock.js +++ b/backend/mock.js @@ -15,8 +15,8 @@ function getMentors(req, res, ctx) { } const handlers = [ - rest.get('http://localhost:3001/api/learners', getLearners), - rest.get('http://localhost:3001/api/mentors', getMentors), + rest.get('http://localhost:3003/api/learners', getLearners), + rest.get('http://localhost:3003/api/mentors', getMentors), rest.get('/api/learners', getLearners), rest.get('/api/mentors', getMentors), ] diff --git a/backend/server.js b/backend/server.js index 33a4bb6..76ed8e5 100644 --- a/backend/server.js +++ b/backend/server.js @@ -4,7 +4,7 @@ const { learners, mentors } = require('./data') const delay = 500 const server = express() -const port = process.env.PORT || 3001 +const port = process.env.PORT || 3003 server.use(express.json()) server.use(express.static(path.join(__dirname, '../frontend'))) @@ -49,7 +49,7 @@ server.use((err, req, res, next) => { // eslint-disable-line server.listen(port, () => { console.log(` ------------------------------------------------------------------------- -See YOUR PROJECT in the browser, navigating to --> http://localhost:3001 +See YOUR PROJECT in the browser, navigating to --> http://localhost:3003 See the live mock navigating to --> https://w-s5-challenge.herokuapp.com/ ------------------------------------------------------------------------- diff --git a/frontend/index.html b/frontend/index.html index 78aa773..e3e9069 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,7 +1,7 @@ diff --git a/frontend/index.js b/frontend/index.js index 789ec09..59ecb0e 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -1,18 +1,15 @@ async function sprintChallenge5() { + // 👇 WORK WORK BELOW THIS LINE 👇 + const footer = document.querySelector('footer') const currentYear = new Date().getFullYear() footer.textContent = `© BLOOM INSTITUTE OF TECHNOLOGY ${currentYear}` - // 👇 WORK WORK BELOW THIS LINE 👇 - - // 👆 WORK WORK ABOVE THIS LINE 👆 } -// ❗ DO NOT CHANGE THE CODE BELOW -sprintChallenge5() -// This try/catch is needed to expose the sprintChallenge5 function to the test runner -try { module.exports = { sprintChallenge5 } } catch { - // module.exports does not exist in the browser - // so this is always a crash in Chrome -} +// ❗ DO NOT CHANGE THE CODE BELOW +// ❗ DO NOT CHANGE THE CODE BELOW +// ❗ DO NOT CHANGE THE CODE BELOW +if (typeof module !== 'undefined' && module.exports) module.exports = { sprintChallenge5 } +else sprintChallenge5() diff --git a/frontend/reset.css b/frontend/reset.css index 14a1e44..f5b8e04 100644 --- a/frontend/reset.css +++ b/frontend/reset.css @@ -1,6 +1,6 @@ -/* DO NOT CHANGE THIS FILE */ -/* DO NOT CHANGE THIS FILE */ -/* DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ /* RESET BY https://www.joshwcomeau.com/css/custom-css-reset */ *, diff --git a/frontend/styles.css b/frontend/styles.css index 8951570..cb842f6 100644 --- a/frontend/styles.css +++ b/frontend/styles.css @@ -1,6 +1,6 @@ -/* DO NOT CHANGE THIS FILE */ -/* DO NOT CHANGE THIS FILE */ -/* DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ +/* ❗ DO NOT CHANGE THIS FILE */ @font-face { font-family: 'Titillium Web'; src: url('./TitilliumWeb.ttf'); diff --git a/jest.config.js b/jest.config.js index 51dfdd4..45c5c64 100644 --- a/jest.config.js +++ b/jest.config.js @@ -166,17 +166,7 @@ module.exports = { -
-

Sprint 5 Challenge Submission

-

Learner Cards

-

Fetching learner cards...

-
-
-
- -
-
-
+ diff --git a/mvp.test.js b/mvp.test.js index 308ed8a..861e0a4 100644 --- a/mvp.test.js +++ b/mvp.test.js @@ -9,8 +9,7 @@ const waitForOptions = { timeout: 150 } // so Codegrade does not take forever beforeAll(() => { server.listen() }) afterAll(() => { server.close() }) -beforeEach(async () => { await sprintChallenge5() }) -afterEach(() => { +beforeEach(async () => { document.querySelector('body').innerHTML = `

Sprint 5 Challenge Submission

@@ -22,8 +21,8 @@ afterEach(() => { -
-` +` + await sprintChallenge5() }) async function firstCardRender() { diff --git a/package-lock.json b/package-lock.json index 004978a..34d43d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "solution", + "name": "w_s5_challenge", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "solution", + "name": "w_s5_challenge", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -17,7 +17,7 @@ "@testing-library/jest-dom": "^5.16.5", "@types/jest": "^29.5.1", "cross-env": "^7.0.3", - "eslint": "^8.39.0", + "eslint": "^8.40.0", "fkill-cli": "^7.1.0", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", @@ -649,14 +649,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -672,9 +672,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", + "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1521,9 +1521,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.16.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz", - "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==", + "version": "20.1.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.2.tgz", + "integrity": "sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -2183,9 +2183,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001482", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz", - "integrity": "sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==", + "version": "1.0.30001486", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz", + "integrity": "sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==", "dev": true, "funding": [ { @@ -2818,9 +2818,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.380", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.380.tgz", - "integrity": "sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==", + "version": "1.4.391", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.391.tgz", + "integrity": "sha512-GqydVV1+kUWY5qlEzaw34/hyWTApuQrHiGrcGA2Kk/56nEK44i+YUW45VH43JuZT0Oo7uY8aVtpPhBBZXEWtSA==", "dev": true }, "node_modules/emittery": { @@ -3002,15 +3002,15 @@ } }, "node_modules/eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", - "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", + "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3021,8 +3021,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3075,9 +3075,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3087,14 +3087,14 @@ } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6055,9 +6055,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" diff --git a/package.json b/package.json index 531d5bc..df74e82 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { - "name": "solution", + "name": "w_s5_challenge", "version": "1.0.0", - "description": "", - "main": "index.js", "scripts": { - "start": "fkill :3001 -s && node ./backend/server.js", - "test": "cross-env NODE_ENV=testing jest --watchAll --verbose" + "start": "fkill :3003 -s && node ./backend/server.js", + "test": "cross-env NODE_ENV=testing jest --watchAll --verbose", + "fixit": "rm -rf node_modules package-lock.json && npm cache clean --force && npm i" }, "license": "MIT", "devDependencies": { @@ -13,7 +12,7 @@ "@testing-library/jest-dom": "^5.16.5", "@types/jest": "^29.5.1", "cross-env": "^7.0.3", - "eslint": "^8.39.0", + "eslint": "^8.40.0", "fkill-cli": "^7.1.0", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0",