marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.01k stars 793 forks source link

Replace deprecated "licenses" property in skill-sharing website's package.json #477

Closed alexandersandberg closed 5 years ago

alexandersandberg commented 5 years ago

(I was going to open an issue for this, but thought I might as well get some practice with opening pull requests, since I'm somewhat new to Git and GitHub.)

The code for the skill-sharing website contains a now deprecated "licenses" property, which leads to the following error when running npm install:

npm WARN ejs-skillsharing@1.0.0 No license field.

This pull request fixes this, by instead replacing "licenses" with a "license" field, containing an SPDX identifier for the MIT license ("MIT"). I also removed some weird indentation.

I'm not sure if this change would up the version number to 1.0.1 or not, so I left it at 1.0.0 for now.

Let me know if there's anything I should fix before this can be merged.

marijnh commented 5 years ago

Thank you!

alexandersandberg commented 5 years ago

@marijnh I also noticed that the downloadable files for the skill-sharing website (available at https://eloquentjavascript.net/code/skillsharing.zip) contain some older code, compared to what's in the book.

What I could tell, there's only a difference in declaration though. The downloadable code still use var, which has been replaced with const or let in the book. I couldn't find the files in the repository to open a pull request for this.

marijnh commented 5 years ago

That is the current code, just compiled down to ECMAScript version 5 to make sure it runs everywhere.

alexandersandberg commented 5 years ago

Oh, I see! Appreciate the explanation.