-
Notifications
You must be signed in to change notification settings - Fork 2
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit build error when external resources are detected without integrity hashes #10
Conversation
- build test apps as before the 'Embroider build' test group - add test apps for testing build error, excluding that from default scenarios
This includes changes from my other PR. So lets land that first. I'm working on the test now. |
We'll need to filter these test apps from the root package.json build step
otherwise the workflow will fail |
* main: Release 0.1.3 lint wanted to fix this again modified incorrect environment file fix app name in test app - ignore all node_modules - update test app name fix lockfile add test scenario for rootURL run lint fix rename buildPath to outputPath to support destructuring remove external resource skip - use destructuring to get buildPath and publicPath - fix typo - strip publicPath from asset locations - skip external resources - use base64 encoding for hash instead of hex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing all my typos. 馃檲
I think we can improve test coverage without much work. Please have a look at my tests.
Add comment to make sure we don't remove jquery script tag being used for external resrouce test Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com>
comment to ensure we do not remove the jquery script being used to test we pass the build when the integrity hash is present Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com>
test for protocol-less src as well as http(s) Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com>
- check integrity attribute isn't an empty string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor code formatting. Hope it's okay to change before merging. I struggled reading it due to missing blank lines when reviewing. It had problems noticing immediately where one code block ends and the other starts. Maybe I'm just too used to blank lines as deliminators. But as I will likely read that code from time to time again, would be great if you could accept the suggestions.
Yeah no problem. I assumed prettier would take care of that 馃槄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Released as v0.2.0. |
Results in the following error being thown
I also have a version which does do the hashing for you, just to see what that looks like
evoactivity#1