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

Any reason why details-element-polyfill.js is in the code base #806

Closed
kelson42 opened this issue Jun 11, 2019 · 7 comments · Fixed by #903
Closed

Any reason why details-element-polyfill.js is in the code base #806

kelson42 opened this issue Jun 11, 2019 · 7 comments · Fixed by #903

Comments

@kelson42
Copy link
Collaborator

Instead of being a dependence?

@ISNIT0
Copy link
Contributor

ISNIT0 commented Jun 11, 2019

This is copied from res/ to the ZIM file. This is the easier and simpler way to do things.
The alternative is installing it into node_modules, then hard-code a url like node_modules/details-element-polyfill/dist/index.js which would be more fragile and possibly give weird errors if node modules haven't been installed.

It also creates a new vector for someone to maliciously update a dependence

@kelson42
Copy link
Collaborator Author

kelson42 commented Jul 7, 2019

This is copied from res/ to the ZIM file. This is the easier and simpler way to do things.
The alternative is installing it into node_modules, then hard-code a url like node_modules/details-element-polyfill/dist/index.js which would be more fragile and possibly give weird errors if node modules haven't been installed.

If node modules are not installed or not fully installed according to the json files, mwoffliner does not work properly anyway? That is why npm checks this properly, isn't it?

It also creates a new vector for someone to maliciously update a dependence

How would that be introduced without going through a PR review?

@kelson42 kelson42 added the bug label Jul 13, 2019
@kelson42
Copy link
Collaborator Author

There is a gold rule in code mgmt: never put into your repo something which is not your source code. This includes:

  • automatically generated files
  • code belonging to other projects
  • ...

@kelson42
Copy link
Collaborator Author

I reopen the ticket as we still have a problem here:

$ zimcheck out/wikipedia_bm_all_2019-07.zim 
[INFO] Checking zim file out/wikipedia_bm_all_2019-07.zim
[INFO] Verifying Internal Checksum.. 
  [INFO] Internal checksum found correct
[INFO] Searching for metadata entries..
[INFO] Searching for Favicon..
[INFO] Searching for main page..
[INFO] Verifying Articles' content.. 
[INFO] Searching for redundant articles..
  Verifying Similar Articles for redundancies..
[ERROR] Invalid internal links found :
  -/j/node_modules/details-element-polyfill/dist/details-element-polyfill.js (../-/j/js_modules/../node_modules/details-element-polyfill/dist/details-element-polyfill.js) was not found in article A/(ߒߞߏ)
[INFO] Overall Test Status: Fail
[INFO] Total time taken by zimcheck: 2 seconds.

@ISNIT0 ISNIT0 removed this from the 1.9-maintenance milestone Jul 23, 2019
@ISNIT0 ISNIT0 reopened this Jul 26, 2019
@kelson42
Copy link
Collaborator Author

kelson42 commented Aug 2, 2019

@vaibhavmatta This is one which is quite easy and I would really like to get rid of it.

@kelson42 kelson42 pinned this issue Aug 2, 2019
@stale
Copy link

stale bot commented Oct 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@stale stale bot added the stale label Oct 1, 2019
@stale stale bot removed the stale label Oct 30, 2019
@kelson42 kelson42 unpinned this issue Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@kelson42 @ISNIT0 and others