-
Notifications
You must be signed in to change notification settings - Fork 5
Add package uploading feature #1435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
a271640
to
6e1e6bd
Compare
09696da
to
15bef47
Compare
} | ||
}, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
(_error) => { |
Check failure
Code scanning / ESLint
Disallow unused variables Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 days ago
To fix the issue, we will remove the _error
parameter from the .then
callback function. Since the error is not being used, its removal will not affect the functionality of the code. Additionally, we will remove the eslint-disable-next-line
comment on line 404, as it will no longer be necessary once the unused variable is removed.
-
Copy modified line R404
@@ -403,4 +403,3 @@ | ||
}, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
(_error) => { | ||
(/* error */) => { | ||
setSubmissionError({ |
c432dc4
to
5df93c0
Compare
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
return new Promise((resolve, _reject) => { |
Check failure
Code scanning / ESLint
Disallow unused variables Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, we can remove the unused _reject
parameter from the Promise
constructor on line 62. Since _reject
is not used anywhere in the function body, its removal will not affect the functionality of the calculateMD5
method. This change will also satisfy the ESLint rule and eliminate the warning.
-
Copy modified line R61
@@ -60,4 +60,3 @@ | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
return new Promise((resolve, _reject) => { | ||
return new Promise((resolve) => { | ||
worker!.onmessage = (event: MessageEvent) => { |
1b2cfc6
to
97b6fb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
… and better usability The goal of these changes is to move the thunderstore-api package towards a state where it reflects the Django API endpoints better. Additionally one of the more important changes is the; moving of result parsing responsibility to be on thunderstore-api package.
As thunderstore-api now does the parsing of the results; dapper-ts doesn't have to do it anymore. Additionally add methods for submitting package submission and polling the state of submissions
The end result of the refactoring should reflect the previous changes to thunderstore-api
a23db98
to
3a059f4
Compare
Nimbus now dockerfile now uses node 24
…the Nimbus dev env
HTMLInputElement, | ||
SelectSearchProps | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
>(function SelectSearch(props, _forwardedRef) { |
Check failure
Code scanning / ESLint
Disallow unused variables Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 days ago
To fix the issue, we should remove the unused _forwardedRef
parameter from the SelectSearch
function. Since it is not used anywhere in the function body, its removal will not affect the existing functionality. Additionally, the ESLint directive // eslint-disable-next-line @typescript-eslint/no-unused-vars
on line 76 can also be removed, as it will no longer be necessary.
-
Copy modified line R76
@@ -75,4 +75,3 @@ | ||
SelectSearchProps | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
>(function SelectSearch(props, _forwardedRef) { | ||
>(function SelectSearch(props) { | ||
const { |
}; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const rejectAndRemoveListener = (reason: any) => { |
Check failure
Code scanning / ESLint
Disallow the `any` type Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 days ago
To fix the issue, we need to replace the any
type with a more specific type for the reason
parameter in the rejectAndRemoveListener
function. Since promises can be rejected with various types of values, we can use a union type such as unknown | Error
to cover common cases. Alternatively, if the application has a specific set of expected rejection reasons, we can define a custom type for them. For this fix, we will use unknown
as it is a safer alternative to any
and still allows flexibility.
-
Copy modified line R63
@@ -62,3 +62,3 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const rejectAndRemoveListener = (reason: any) => { | ||
const rejectAndRemoveListener = (reason: unknown) => { | ||
if (stopExecutionListener) { |
const uniqueId = "test-id"; | ||
|
||
// Mock worker response | ||
const mockResponse = { |
Check failure
Code scanning / ESLint
Disallow unused variables Error test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 days ago
To fix the problem, we should remove the unused variable mockResponse
from the code. This will eliminate the ESLint error and clean up the code. Since mockResponse
is not used, its removal will not affect the functionality of the test.
-
Copy modified line R53
@@ -52,7 +52,3 @@ | ||
// Mock worker response | ||
const mockResponse = { | ||
type: "complete", | ||
md5: "mock-md5-hash", | ||
uniqueId, | ||
}; | ||
|
||
|
const uniqueId = "test-id"; | ||
|
||
// Mock worker error response | ||
const mockError = { |
Check failure
Code scanning / ESLint
Disallow unused variables Error test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 days ago
To fix the issue, we should either use the mockError
variable in the test case or remove it if it is not needed. Since the test case is about handling worker errors, it is likely that the intention was to use mockError
to simulate an error response from the worker. We can fix the issue by modifying the onmessage
handler to use mockError
and ensure the test case properly validates the error handling logic.
-
Copy modified line R91
@@ -90,2 +90,3 @@ | ||
mockWorker.onmessage = null; | ||
mockWorker.postMessage(mockError); // Simulate error response | ||
} |
Evidently it's a new feature and required for non-localhost hosts
The session implementation is still super flaky (sowwy :3), as a result when me (Oksamies) added a session clearing function to prevent non-logged in users to access the new upload page; was ran when no currentUser was detected: the apihost was removed from the session. This commit quick fixes the issue, but more concise planning of the session architecture needs to be done.
This would cause the pages to crash
No description provided.