Skip to content
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

Don't use new Buffer as it is deprecated #7

Merged
merged 7 commits into from Apr 30, 2018

Conversation

BYK
Copy link
Contributor

@BYK BYK commented Apr 28, 2018

Needed for yarnpkg/yarn#5477

@BYK
Copy link
Contributor Author

BYK commented Apr 28, 2018

Sorry about the styling changes, done by prettier automatically. Can roll them back if you wish.

@BYK BYK closed this Apr 28, 2018
@BYK BYK reopened this Apr 28, 2018
Copy link
Owner

@zertosh zertosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you drop all of the unrelated formatting changes please?

@@ -100,7 +100,7 @@ class FileSystemBlobStore {
this._storedBlob = fs.readFileSync(this._blobFilename);
this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename));
} catch (e) {
this._storedBlob = new Buffer(0);
this._storedBlob = Buffer.alloc(0);
Copy link
Owner

@zertosh zertosh Apr 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a dummy fallback buffer. Can you use Buffer.from([]) so that this passes in 5.7.0 please?

@zertosh zertosh merged commit f6f5dfa into zertosh:master Apr 30, 2018
@zertosh zertosh deleted the no-new-buffers branch April 30, 2018 18:03
@zertosh
Copy link
Owner

zertosh commented Apr 30, 2018

Thank you! Published as v8-compile-cache@2.0.0

BYK pushed a commit to yarnpkg/yarn that referenced this pull request Apr 30, 2018
**Summary**
These are a few upgrades of dependencies in order to address issues on node 10 (in relation to: #5477)

*duplexify* *3.5.0* => *3.5.4* (mafintosh/duplexify@00d08fa)
*v8-compile-cache* *^1.1.0* => *^2.0.0* (zertosh/v8-compile-cache#7)
*natives* *1.1.0* => *1.1.3* (gulpjs/gulp#2162)

The last did not have to do with `new Buffer` but was something I personally encountered when using `gulp` for building in `node 10`. I don't know how common this is, but the fix is easy and within scope, so decided to include it.


**Test plan**

CI should be green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants