You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I started to run the npm scripts as the contribution guide suggests, I find several issues.
npm run fetch
Current await Promise.all() call in src/fetch.ts is too aggressive. Mozilla endpoint can return 429 Too many requests\r\n. Suggest change it to chunk-style promises.
When validating the latest fetched storage.json, I find that the json contains an entry at ~line 429 that breaks the current validation logic.
"session": {
"allowedContexts": [
"devtools"
],
"$ref": "StorageAreaWithUsage",
"description": "Items in the <code>session</code> storage area are kept in memory, and only until the either browser or extension is closed or reloaded.",
"properties": {
"QUOTA_BYTES": {
"description": "The maximum amount of data (in bytes, currently at 10MB) that can be stored in session storage, as measured by the StructuredCloneHolder of every value plus every key's length."
}
}
}
Seems like value-less description-only properties json cannot pass the existing validation(?) Coz once I manually remove this QUOTA_BYTES entry, validation will work ok.
This is definitely a blocker for anyone who want to contribute fixes, and yet I am not sure what's the correct fix to make the validation works again. Can maintainer please take a look?
Issues
As I started to run the npm scripts as the contribution guide suggests, I find several issues.
npm run fetch
Current
await Promise.all()
call insrc/fetch.ts
is too aggressive. Mozilla endpoint can return429 Too many requests\r\n
. Suggest change it to chunk-style promises.npm run validate:schemas
This may be the most critical issue.
When validating the latest fetched storage.json, I find that the json contains an entry at ~line 429 that breaks the current validation logic.
Seems like value-less description-only
properties
json cannot pass the existing validation(?) Coz once I manually remove thisQUOTA_BYTES
entry, validation will work ok.This is definitely a blocker for anyone who want to contribute fixes, and yet I am not sure what's the correct fix to make the validation works again. Can maintainer please take a look?
Ref: https://hg.mozilla.org/integration/autoland/raw-file/tip/toolkit/components/extensions/schemas/storage.json
Typechecking
Running
tsc --noEmit
in project level would result in error insrc/fetch.ts
. Potentially solvable by installing@types/got
I think?Solving this would definitely help for better IntelliSense on contributor-side.
The text was updated successfully, but these errors were encountered: