Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build: Generate sub-resource integrity hashes of the distribution files #2082

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

Merged
merged 2 commits into from
May 29, 2018

Conversation

Arkni
Copy link
Member

@Arkni Arkni commented Sep 24, 2017

With this, running grunt release will generate 3 new files 1 file in the dist folder:

  • sri-core.json: contains the hashes of jquery-validate.js and jquery-validate.min.js
  • sri-additional.json: contains the hashes of additional-methods.js and additional-methods.min.js
  • sri-localization.json: contains the hashes of all JS files inside localization folder
  • jquery-validation-sri.json: contains the hashes of all JS files inside dist folder

I can add those files to the list of distribution files in case we want to commit them to GitHub.

//c @staabm @vanillajonathan

@staabm
Copy link
Member

staabm commented Sep 24, 2017

Looks cool. Did we discuss using a single sri file vs the 3 you added?
Need to test it locally before merge.

@staabm staabm self-requested a review September 24, 2017 22:16
@Arkni
Copy link
Member Author

Arkni commented Sep 25, 2017

No, we didn't. I just felt the need for separating and categorizing the hashes by component.

@staabm
Copy link
Member

staabm commented Sep 25, 2017

I guess it would be easier for tool driven consumption when all hashes are contained in a single file.
(if this is too much work, we can just merge as is)

@Arkni
Copy link
Member Author

Arkni commented Sep 25, 2017

Make sense. I will update it this evening.

@Arkni
Copy link
Member Author

Arkni commented Sep 25, 2017

@staabm
Updated per suggestion!

@Arkni
Copy link
Member Author

Arkni commented Feb 13, 2018

Hi @staabm

any comment on this PR?
Should I add those files to the list of distribution files in case we want to commit them to GitHub?

@staabm
Copy link
Member

staabm commented Feb 14, 2018

I love this change.

Should I add those files to the list of distribution files

I guess we should.

we want to commit them to GitHub?

we dont have this dist folder in our codebase on github.. I dont get what you mean here?

@vanillajonathan
Copy link
Contributor

I would like to see the hash on the website, next to the download link.

@Arkni
Copy link
Member Author

Arkni commented Feb 14, 2018

we dont have this dist folder in our codebase on github.. I dont get what you mean here?

We publish the dist folder with every tagged release. For example, see https://github.com/jquery-validation/jquery-validation/tree/1.17.0
So, if someone navigates the tags, they will see the dist folder with its content (additional-methods.js, additional-methods.min.js, jquery.validate.js, jquery.validate.min.js). And I would like to add the sri file to be added to this list too.

I would like to see the hash on the website, next to the download link.

We can provide a link to the file in our docs. The file will be hosted here on GitHub, so everyone can access it without going to the website.

@staabm
Copy link
Member

staabm commented Feb 14, 2018

ok cool. please go for it then.

@Arkni
Copy link
Member Author

Arkni commented Feb 14, 2018

@staabm

Updated the proposal to include the sri hashes file in tagged releases.

@Arkni Arkni added the Build label Mar 4, 2018
@Arkni
Copy link
Member Author

Arkni commented May 29, 2018

Hi @staabm,

Can we merge this PR? Does it need any other changes I need to do?

@staabm staabm merged commit a3925cd into jquery-validation:master May 29, 2018
@Arkni Arkni deleted the sri branch May 29, 2018 09:42
@staabm
Copy link
Member

staabm commented May 29, 2018

Looks great, thanks

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

Successfully merging this pull request may close these issues.

3 participants