Conversation
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| check-latest: true | ||
| #cache: 'npm' |
There was a problem hiding this comment.
| #cache: 'npm' | |
| cache: 'npm' |
The actions team said that the cache problem has been resolved
| await readBinFileV2(); | ||
| } | ||
|
|
||
| fd.binVersion = binVersion; |
There was a problem hiding this comment.
Why do you add the binVersion to the fd instead of return it in the object below?
I could see the return value be { fd, sections, binVersion } instead. Thoughts?
|
|
||
| return {fd, sections}; | ||
|
|
||
| async function readBinFileV1() { |
There was a problem hiding this comment.
Do you want these functions inside the closure instead of passing in arguments you need?
There was a problem hiding this comment.
Yes, it should only be used inside readBinFile(...).
| } | ||
| } | ||
|
|
||
| async function readBinFileV2() { |
There was a problem hiding this comment.
Do you want these functions inside the closure instead of passing in arguments you need?
| } | ||
| } | ||
|
|
||
| fd.binVersion = binVersion; |
There was a problem hiding this comment.
Same question as above. We could return { fd, binVersion } below
| throw new Error("Already writing a section"); | ||
| } | ||
|
|
||
| if(BIN_FORMAT_1 === fd.binVersion) { |
There was a problem hiding this comment.
Ah, I see that you didn't want to change the parameters here, which only works if you attached binVersion to the fd 🤔
There was a problem hiding this comment.
It's a flag for the file descriptor indicating which binary format version is using
No description provided.