Conversation
- changes the types from "module" to "CommonJS"
Going back to CommonJS
Pull Request Test Coverage Report for Build 2427942034Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
web/frontend/package.json
Outdated
| "@heroicons/react": "^1.0.6", | ||
| "@material-ui/core": "^4.12.3", | ||
| "@mui/material": "^5.4.0", | ||
| "@material-ui/core": "^4.12.4", |
There was a problem hiding this comment.
I don't see any imports inside the code of material UI , I think we can remove it .
web/backend/src/Server.ts
Outdated
| }); | ||
|
|
||
| // Keeps an in-memory mapping between a SCIPER (userid) and its opened session | ||
| // IDs. Needed to invalidate the sessions of a used when its role changes. The |
There was a problem hiding this comment.
| // IDs. Needed to invalidate the sessions of a used when its role changes. The | |
| // IDs. Needed to invalidate the sessions of a user when its role changes. The |
web/backend/src/Server.ts
Outdated
| // Keeps an in-memory mapping between a SCIPER (userid) and its opened session | ||
| // IDs. Needed to invalidate the sessions of a used when its role changes. The | ||
| // value is a bag of sessions IDs. | ||
| const sess2sciper = new Map<number, Map<string, undefined>>(); |
There was a problem hiding this comment.
What is the undefined field of the inner map ?
There was a problem hiding this comment.
The map is used as a bag/set. Javascript doesn't have a native data structure for that, so I am using a map where only the keys are used.
There was a problem hiding this comment.
Oh ok I see, although sets do exist in Javascript which should work for the session IDs, at least if it doesn't matter if duplicate session IDs for a user only appear once in the set ?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
There was a problem hiding this comment.
Thanks for pointing that, I overlooked this native Set data-structure, which exactly fits the purpose !
|
Kudos, SonarCloud Quality Gate passed! |








No description provided.