765 Commits

Author SHA1 Message Date
Timo Tijhof
1e6f357ed2 tests: Use Chrome for 'npm test' in GitHub CI
Follows-up 55186c8. I had this check originally, but then
removed it after GitHub merged the upstream improvement.
It looks like some CI runners might not yet have it applied,
so keep it a little longer for now.
2021-01-27 07:13:16 +00:00
Timo Tijhof
33308af132 tests: On Linux, let npm test default to Chromium instead of Chrome
By default `npm test` will run concurrenty in Firefox and one of
Chromium/Chrome. Chrome for macOS and Win, and Chromium on Linux
unless CHROME_BIN is configured by the user's env variables, in
which case they're likely to prefer that and/or not have Chromium
installed.

Also provide `npm run test-unit-…` commands which run unit tests
in a single specific browser only (overrides the conf array).

Follows-up https://github.com/kiwix/kiwix-js/pull/672.
2021-01-27 06:13:40 +00:00
Timo Tijhof
3d448b3119 tests: Document npm dependency for unit tests in README
Follows-up https://github.com/kiwix/kiwix-js/pull/672.
2021-01-27 06:13:40 +00:00
Mossroy
c6cbe2c79b
Merge pull request #697 from kiwix/dependabot/npm_and_yarn/socket.io-2.4.1
Bump socket.io from 2.3.0 to 2.4.1
2021-01-23 17:22:53 +01:00
dependabot[bot]
2dcc4d80c8
Bump socket.io from 2.3.0 to 2.4.1
Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.1.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/2.4.1/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/2.3.0...2.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-21 16:42:00 +00:00
Timo Tijhof
8b3a5c3a1e
update QUnit, use Karma, make some of CI work locally as well (#672)
* workflows: Rename "CI" to "Release"

Rename this to make space for a separate "CI" workflow that will
run continuous integration and testing jobs for commits and PRs.

* workflows: add CI workflow for unit tests and support running locally

* Load qunit package from npm, this is the start of a larger transition.
  ref at https://github.com/kiwix/kiwix-js/issues/554.

* Update QUnit from 2.3 to 2.13.

* Use Karma for the running of unit tests (instead of Nightwatch).

  While it was possible to use a fake "UI" test to open the QUnit
  web page with Nightwatch, this had numerous limitations:

  - relies on fragile and unsupported DOM scraping to collect
    test results, which breaks between framework versions.
    ref https://github.com/kiwix/kiwix-js/pull/660.

  - severely limits debugging information for failing tests.

  - cannot easily be reproduced or debugged locally from the command-line
    as the Nightwatch config was pinned to Sauce Labs, and creating
    a local configuration is not easy because Nightwatch has a hard
    requirement for installing and running a WebDriver server.
    People usually do not have this installed and it's non-trivial
    to set up and keep working in the long term, and across multiple
    different software projects.

  - cannot easily be run in a secure container separate from your
    personal computer, thus putting personal data at risk.

  - lacks wider integration and plugins to enrich unit testing,
    such as test coverage reports.

  Using Karma means:
  - We can run 'npm test' locally during development and have it
    automatically run the tests in headless Firefox and Chrome
    and report back, all from the command-line.
  - The same exact same stack is also used in CI with SauceLabs
    for additional browser coverage (same as before).
  - It has no external dependencies other than the plain web
    browser itself. This means if you have a development container
    (e.g. based on Docker) that has Node.js + Firefox + Chromium,
    you can run the tests there without exposing anything from
    your personal computer, besides the current directory.
    <https://timotijhof.net/posts/2019/protect-yourself-from-npm/>
  - In a future change, we can plug in karma-coverage to generate
    a test coverage report, to submit to Codecov or Coveralls.
    ref https://github.com/kiwix/kiwix-js/issues/528.

* I have pinned the version of 'http-server' and 'nightwatch'
  in package.json so that these don't silently upgrade in a way
  that may introduce security issues or drop compatibility for
  the environment we currently support.

Fixes https://github.com/kiwix/kiwix-js/issues/653.

* Re-enable unit and UI tests in latest Edge

The tests were disabled after https://github.com/kiwix/kiwix-js/pull/499
due to an issue with the Edge version that was the default "edge" on
SauceLabs in May 2019 (not sure which version that was, the last pre-Chromium
Edge version was 44, which was passing, so perhaps SauceLabs defaulted
to a beta release, or used a much older version like 15-18?)

Now that Edge uses Chromium, try re-enabling the tests.

Fixes https://github.com/kiwix/kiwix-js/issues/502.
2021-01-03 14:49:18 +01:00
Jaifroid
aea8a7bb2b
Action: changemod before upload (#692) 2020-12-19 09:51:00 +00:00
Kelson
53d3aa2dda
Slightly better ZIM download URL (#689) 2020-12-13 18:14:10 +01:00
Jaifroid
99ec91fb49
Prepare source code for 3.2 (#688) 2020-12-13 15:41:11 +00:00
Kelson
afd03eb0f1
New badges (#687)
* New badges

* Use standard workflow naming

* Better badge for MS Edge
2020-12-13 16:32:02 +01:00
Jaifroid
de7b2e0297 Corrections to GitHub Action nightly or release build (#686) 2020-12-13 15:16:51 +00:00
Jaifroid
8a43ed014a
Finalize GitHub Action for nightly and release builds (#685) 2020-12-12 08:41:41 +00:00
Jaifroid
2d14569215 Update .gitattributes 2020-12-10 21:41:17 +00:00
Jaifroid
4a8efd48ed
GitHub Action: Create all packages on release [dryrun] (#683) 2020-12-10 09:56:42 +00:00
Jaifroid
21a3a3b218
Changelog for v3.1 (#682) 2020-12-06 16:53:30 +00:00
Jaifroid
34579987f5
Extract images sequentially in jQuery mode #671 (#677) 2020-11-29 07:36:32 +00:00
Timo Tijhof
cbc967e0da
tests: Remove redundant xzdec.js include (#676)
Follows-up 0c530101573cf95b, which removed this from www/index.html,
but it was still present in the test suite.

This is now loaded automatically by RequireJS.
2020-11-28 09:49:30 +01:00
Jaifroid
74cccba19a
Add WebP Polyfills in jQuery mode #650 (#670)
Fixes #650.
2020-11-22 09:50:18 +00:00
Jaifroid
56386914c7
Update supported platform information in README.md (#669) 2020-11-08 10:19:52 +00:00
ram690514
e1b572b7ae
Minor changes suggested by codefactor (#663) 2020-11-07 16:39:08 +00:00
Jaifroid
59a2fbc7d5
Exempt articleId assignment from Active Content Warning #667 (#668) 2020-11-07 09:08:39 +00:00
Jaifroid
158024d5a5
Add a low level block cache #619 (#658) 2020-11-05 18:07:48 +00:00
Jaifroid
cff7dece3b
Enable quick and complete cancellation of running searches #637 (#642) 2020-10-25 17:38:13 +00:00
Jaifroid
388bb33761
Prepare source code for 3.1 (#657) 2020-10-10 09:39:25 +01:00
Jaifroid
184a29ec9b Ignore package-lock.json 2020-10-08 14:41:05 +01:00
Jaifroid
01df82a1bc
Update CHANGELOG for v3.0.0 (#655) 3.0.0 2020-10-04 11:01:10 +01:00
Jaifroid
0c53010157
Add zstd decompression support #611 (#648)
Closes #611.
2020-09-29 11:42:18 +01:00
Jaifroid
b002ed2853
Make Privacy Policy publicly accessible (#640) 2020-07-11 18:00:26 +01:00
Mossroy
e126ee8c47 Prepare version 2.9 2020-07-11 16:04:06 +02:00
Jaifroid
ef31082d01
Update CHANGELOG for v2.8.0 (#634) 2.8.0 2020-07-11 14:20:48 +01:00
Jaifroid
823d1836bf
Better handling of case transformations in search (#617)
Fixes #179 and #184. A complete solution to cancelling some running binary searches after user has initiated a new search will be dealt with in #637.
2020-07-11 14:08:54 +01:00
Abhirup Pal
638728a58e
Updated cookie to ensure SameSite is set as Strict #627 (#635)
Fixes #627 .
2020-07-11 10:27:12 +01:00
Tania Malhotra
bc82070102
Merge pull request #626 from TaniaMalhotra/master
fixes #614
2020-07-01 22:38:08 +05:30
Tania Malhotra
34498afeb1
Changed const to var declaration for CACHE_NAME 2020-07-01 22:13:13 +05:30
Jaifroid
70d18a288c
Do not assume urlPtrPos is just after mimeList when reading it #628 (#630)
Fixes #621, #628 and #629.
2020-07-01 16:53:06 +01:00
Jaifroid
8be59da9ec For testing 2020-07-01 14:22:03 +01:00
Tania Malhotra
9c49c06c73
Update app.js 2020-06-25 18:31:47 +05:30
Tania Malhotra
a4138a1c5c
Update nightwatch.js 2020-06-25 18:30:26 +05:30
Tania Malhotra
9fe9e129cd
Update service-worker.js 2020-06-25 18:29:29 +05:30
Jaifroid
3429a98776
Intelligently select best Storage API for settings #612 (#613)
Fixes #612. Also fixes #438.
2020-04-14 16:45:42 +01:00
Mossroy
b4124bbaad Prepare source code for version 2.8 2020-03-29 18:53:19 +02:00
Jaifroid
c9401422ff Correction to changelog for v2.7.0 2.7.0 2020-03-29 16:41:59 +01:00
Jaifroid
614d84020e
Update changelog for v2.7.0 (#610) 2020-03-29 16:23:28 +01:00
soloturn
f8ee9ecfdd
Provide permalink for Ray Charles ZIM (#580) 2020-03-29 16:10:42 +01:00
Mossroy
9d04c0dbee
Merge pull request #608 from ykabusalah/master
fix issue #604
2020-03-28 22:49:36 +01:00
Yousef Abu-Salah
7afb605db3 update www 2020-03-26 18:05:57 -05:00
Abinash Maharana
379b63c4a3
Fixed extra vertical scrollbar appearing #566 (#572)
Closes #566 and #599.
2020-03-25 13:33:30 +00:00
Mossroy
2b72b58cd9
Merge pull request #601 from ashiscs/master
minor fix in README.md
2020-03-22 10:51:23 +01:00
Ashis Kumar Singh
2680be0ded
Minor changes to CHANGELOG.md (#602) 2020-03-17 06:38:04 +00:00
Ashis Kumar Singh
8d784c6111
minor fix 2020-03-16 23:41:31 +05:30