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

Drop inherits, buffer-alloc dependencies #22

Merged
merged 3 commits into from
Aug 7, 2019
Merged

Drop inherits, buffer-alloc dependencies #22

merged 3 commits into from
Aug 7, 2019

Conversation

feross
Copy link
Collaborator

@feross feross commented Aug 6, 2019

Buffer.alloc and Buffer.from were added in Node 6. inherits is not needed if we use a class.

This change only drops support for Node 4 and lower, which no one should be running at this point. Especially since Node 6 is already EOL and Node 8 is about to be EOL in December 2019. :)

I also removed package-lock.json which is not useful in packages since it doesn't get published to npm. It's existence only ensures that package authors get outdated deps that the users are not going to get.

This is not a breaking change since the exposed interface is still the same, i.e.

var stream = mp4.decode()

and

var stream = mp4.encode()

I know this is a lot of code to review. The only transformations I made were:

  • Remove inherits, buffer-alloc dep.
  • Use an ES class
  • Convert all self to this
  • Remove all lines with var self = this
  • Convert all anonymous functions to fat arrow syntax.

For: brave/brave-browser#5490

@feross feross requested a review from jhiesey August 6, 2019 23:10
feross added 3 commits August 6, 2019 16:26
Convert to ES class in order to drop the `inherits` dependency. This is not a breaking change since the exposed interface is still the same, i.e.

```js
var stream = mp4.decode()
```

and

```js
var stream = mp4.encode()
```
@feross feross merged commit 953b3a3 into master Aug 7, 2019
@feross feross deleted the es-class branch August 7, 2019 00:30
@feross
Copy link
Collaborator Author

feross commented Aug 7, 2019

3.1.0

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.

1 participant