Uh oh!
There was an error while loading. Please reload this page.
chore: add Node Releases JSON to bundle - #5443
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@HinataKah0 is attempting to deploy a commit to the OpenJS Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Can I get someone to approve the deployment (Not PR)? |
ovflowd
commented
Jun 19, 2023
@HinataKah0 I just approved your deployment. Sorry for the delay! |
mikeesto
commented
Jun 19, 2023
It is being tracked atm. You should be able to do |
ovflowd
commented
Jun 19, 2023
FYI IMHO you should actually do the following:
This will tell git to ignore future changes to this file. |
If I understand correctly, this is only available in local machine. Edit: |
HinataKah0
commented
Jun 20, 2023
Incorrect. The command above applies to the repository. (Doesn't matter if local, others or upstream) as soon as they pull this commit it will affect them. |
Client Side: Screen.Recording.2023-06-20.at.8.43.20.PM.mov126kB (compressed) -> 441kB (uncompressed) Included in the bundle: Screen.Recording.2023-06-20.at.8.45.30.PM.mov127kB (compressed) -> 435kB (uncompressed) (I can't explain why this is lower uncompressed) I feel that it's far better to include the Node Releases data in the bundle for now... |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
After fighting with Git for some time... I tried both approaches described above and some other combinations but nothing work 😅 I think we just don't want to upset TS, right? Edit: What do you all think? |
ovflowd
commented
Jun 20, 2023
Not really needed.
Not sure what you're doing wrong. Also not sure what behaviour is happening for you. I also have no idea what exactly you're doing. It would be interesting if you could write the steps you're doing. |
Not sure what you're saying. The JSON file type is resolved implicitly by TypeScript itself, so no need to define types for the JSON. The Provider itself has a type, and if you pass the mapped data it should also be all good. If that is still not enough you can create a type for an individual entry of the array and pass it within the callback |
Oops, I just typed it out without re-reading again. 😅 So, I tried exactly these steps:
It works in my local (the JSON file is not tracked). I tried the step suggested by Mike as well but it also doesn't work. I've tried other combinations of steps as well but none is working. Not sure if it just happened to me or not. 😅 Then, I checked online, it seems that I believe our concern of having the JSON file with empty array |
ovflowd
commented
Jun 21, 2023
What if after committing the file with the empty array you re-add the file to the gitignore? |
This comment was marked as outdated.
This comment was marked as outdated.
The step suggested by Mike will delete the actual file in remote, see here (talking about this outdated comment above)
I tried it as well... |
ovflowd
commented
Jun 21, 2023
What about this: https://stackoverflow.com/a/26245961 |
HinataKah0
commented
Jun 21, 2023
88a03a1 to
324cfd8Compareovflowd
commented
Jun 26, 2023
@HinataKah0 did you follow Husky getting started steps correctly? The |
ovflowd
commented
Jun 26, 2023
NVM, just saw it. |
HinataKah0
commented
Jun 26, 2023
I followed these steps: https://typicode.github.io/husky/getting-started.html#automatic-recommended |
ovflowd
commented
Jun 26, 2023
FYI I've pushed some little changes to your branch to fix some things. (Like Husky) |
BTW nvm the PR failures, that's something else that I'm patching on |
ccb387b to
396c317CompareThanks! FYI, my original intention of keeping different types ( I am okay with the new abstractions ( |


Result: #5443 (comment)
This PR will include Node releases data JSON in the bundle. Based on our experiment, we found that fetching the JSON file in Client Side harms UX badly in slow 3G network. Not to mention that the bundle size increment is tiny and it takes a very long time for it to grow and become harmful.
We added
node-releases-data.jsoncontaining an empty array[]as placeholder. This file will be overwritten during Build time and we don't want to commit unnecessary changes. However, once a file exist in the repository,.gitignorewon't work anymore. As a workaround, we will have a pre-commit hook to discard the changes.We use
huskyfor pre-commit hooks (we followed these steps).Related to: #5438