Commit Graph

276 Commits

Author SHA1 Message Date
Pavel Djundik
8a224809dd
Merge pull request #3498 from MiniDigger/feature/package-versions
Print package versions on startup
2019-11-07 11:32:43 +02:00
MiniDigger
6f8364b1dd Print package versions on startup 2019-11-06 18:02:28 +01:00
Pavel Djundik
79e0558b73 Add some tests for built css 2019-11-02 12:53:38 +02:00
Pavel Djundik
ddebb22afe
Merge pull request #3482 from thelounge/xpaw/fix-3219
Load existing users on startup when LDAP is enabled
2019-11-01 13:32:24 +02:00
Pavel Djundik
fb250682a1
Merge pull request #3483 from thelounge/xpaw/improve-user-startup
Improvements to network connections on startup
2019-11-01 13:26:24 +02:00
Pavel Djundik
a0c2495c42 Improvements to network connections on startup 2019-10-31 11:31:37 +02:00
Pavel Djundik
fe4e0343a4 Load existing users on startup when LDAP is enabled
Fixes #3219
2019-10-31 11:01:44 +02:00
Jay2k1
c89aea3c1e add bidi support to messages, actions, previews etc 2019-10-24 16:53:29 +02:00
Pavel Djundik
49fb6cc049 Hide user loaded message in tests 2019-10-23 12:42:01 +03:00
Pavel Djundik
ebfecc3e9d Fix client not loading messages after reconnect in channels with less than 100 total messages 2019-10-17 13:27:15 +03:00
Pavel Djundik
390a0b8e83 Let OS generate a port in link prefetch tests 2019-10-04 14:19:04 +03:00
Pavel Djundik
cee3a50ddc Move back to ldapjs dependency
Fixes #3381
2019-09-15 22:42:27 +03:00
Pavel Djundik
9eff3b51d7 Allow extra slash on Windows in expandHome tests
Github CI on Windows ends up formatting it as 'd:\\tmp', this causes no issues besides the failing test
2019-09-04 22:51:58 +03:00
Alistair McKinlay
133e7bf710 Format js/vue with prettier 2019-07-19 11:27:40 +01:00
Pavel Djundik
7e5c2672b2
Merge pull request #3307 from thelounge/xpaw/browser-object
Store ip and language in a separate object in user file
2019-07-19 13:11:20 +03:00
Alistair McKinlay
ab8d819193 Set up Prettier on md, html, json, and yaml 2019-07-17 10:22:30 +01:00
Pavel Djundik
54a4085b68 Store ip and language in a separate object in user file 2019-07-16 13:00:29 +03:00
Pavel Djundik
295b3a4251 Correctly parse numbers when passed in CLI
Fixes #3295
2019-07-12 10:56:19 +03:00
Pavel Djundik
48ae5a4cdd Only warn for top-level unknown config keys 2019-07-08 14:12:31 +03:00
Pavel Djundik
95a3ec42c2 Add a message about experimental API 2019-07-05 10:26:22 +03:00
Alistair McKinlay
4cbe72f635 Add support for command plugins 2019-07-02 17:02:05 +01:00
Pavel Djundik
b95c8236bd Use @github's emoji data 2019-06-10 22:17:00 +03:00
Pavel Djundik
fe68f2a1ee Replace request with got 2019-05-13 10:30:43 +03:00
Pavel Djundik
5723be00c7
Merge pull request #3150 from thelounge/astorije/test-stuff
Replace mocha-webpack with mochapack, and remove browser test setup that we never used
2019-03-27 10:13:59 +02:00
Jérémie Astori
c574234b99
Merge pull request #3073 from Jay2k1/patch-2
extend custom highlight regex
2019-03-27 00:10:48 -04:00
Jérémie Astori
e3dfedf8b5
Replace mocha-webpack with mochapack 2019-03-26 23:16:39 -04:00
Pavel Djundik
04dc1feaba Hide unknown key warning in mergeConfig test 2019-03-20 12:58:30 +02:00
Pavel Djundik
50fbf93d64 Move favicon.ico to the root folder 2019-03-18 12:56:52 +02:00
Jérémie Astori
0812ffc2e7
Run ESLint autofix after requiring new line on closing brackets 2019-02-25 00:57:48 -05:00
Jay2k1
c151ad69fa add test for custom highlights 2019-02-19 15:21:54 +01:00
Richard Lewis
caf728a2a7 Instrument tests with nyc instead of istanbul-instrumenter-loader. 2019-02-12 12:49:05 +02:00
Pavel Djundik
dd686b563d Remove tests, fix lint, update packages 2019-02-12 12:49:05 +02:00
Pavel Djundik
47b9924f26 Use server side rendering in parse tests
Co-Authored-By: Richard Lewis <richrd@users.noreply.github.com>
2019-02-12 12:49:05 +02:00
Pavel Djundik
cd94b5d655 Fix lint 2019-02-12 12:48:44 +02:00
Pavel Djundik
0730825185 Convert message actions to Vue 2019-02-12 12:48:41 +02:00
moundahiwale
c30684aad1 Assert LDAP bind failed error and search warning log messages in ldap tests 2019-01-05 23:08:10 +00:00
Pavel Djundik
e033010841 Rename manifest.json to thelounge.webmanifest
This makes express serve it with correct content-type of application/manifest+json

Refs:
- https://w3c.github.io/manifest/#media-type-registration
- https://webhint.io/docs/user-guide/hints/hint-manifest-file-extension/
2018-11-13 13:33:25 +02:00
Renovate Bot
2c69a28ffd Update dependency nyc to v13.1.0 2018-10-15 11:07:00 +03:00
Pavel Djundik
88ce0cee99 Use Date.toISOString for logging 2018-09-23 21:57:40 +03:00
Pavel Djundik
b538360c5e Limit network name length and replace spaces in log folders 2018-09-09 13:09:30 +03:00
Pavel Djundik
9bcec3bea5 Remember disconnected networks between server restarts 2018-08-25 12:11:59 +03:00
Max Leiter
9bee3eca5a refactor getHumanDate() to accept a timestamp; fixes test 2018-07-22 00:27:49 -07:00
Pavel Djundik
11bd2dfa4c Increase delay between links to remove random test failure 2018-07-06 12:29:21 +03:00
Pavel Djundik
08682d2448 Fix circular dependency in Helper+log
Fixes #2568
2018-06-19 10:09:38 +03:00
Pavel Djundik
a07b372c71 Move .nyc_output folder out of root 2018-06-16 12:13:29 +03:00
Pavel Djundik
472d618033 Remove log from global 2018-06-15 23:31:06 +03:00
Pavel Djundik
0d48c596c8 Fix multiple <title> tags being concatenated 2018-06-11 11:32:32 +03:00
Pavel Djundik
4e2523060b De-duplicate link fetching to one request at once 2018-06-11 10:38:03 +03:00
Ben Harris
d2987d037c use http for protocol-less URLs 2018-06-09 13:46:46 -04:00
Pavel Djundik
c0d712c53d Remove ability to change date format and timezone 2018-06-05 12:03:06 +03:00
Alexandre Oliveira
468427bfdb Add support for /ignore, /unignore and /ignorelist commands 2018-05-28 16:46:12 -03:00
Pavel Djundik
0de90daa64
Merge pull request #2366 from thelounge/xpaw/refactor-userlog
Refactor userLog to be the same as sqlite logger
2018-05-26 23:53:17 +03:00
Pavel Djundik
5cfec76d3a Refactor userLog to be the same as sqlite logger
Fixes #1392
2018-05-23 16:56:18 +03:00
Pavel Djundik
97dfdbf7c0 Default to https: for urls with no scheme 2018-05-23 16:50:59 +03:00
Pavel Djundik
d4fa6bbcb0 Use WHATWG URL parser in link prefetcher 2018-05-23 16:31:02 +03:00
Pavel Djundik
629ae8bfa4 Fix protocol-aware urls, add better link validation in previews 2018-05-23 16:31:02 +03:00
Pavel Djundik
15c14c6dea Change test cases to match linkify-it 2018-05-23 16:31:02 +03:00
Pavel Djundik
58ec2768ec Use linkify-it 2018-05-23 16:31:02 +03:00
Pavel Djundik
95a435c5c9 Fix merge() in parser not filling unstyled text correctly 2018-05-07 21:19:54 +03:00
Pavel Djundik
d19c00faab Build clean text message only once 2018-05-01 14:32:13 +03:00
Pavel Djundik
886301e765
Merge pull request #2396 from thelounge/xpaw/fix-2341
Use per-client channel and message ids
2018-05-01 13:26:38 +03:00
Jérémie Astori
1daad45f11
Use the new logo for favicons, notifications badges, and homescreen app icons 2018-04-28 12:14:41 -04:00
Pavel Djundik
bf8a16b7fe Use per-client channel and message ids
Fixes #2341
2018-04-27 13:16:23 +03:00
Pavel Djundik
e136edb6ac Remove network ids and use uuids everywhere 2018-04-26 12:37:28 +03:00
Jérémie Astori
34f4d0abf4
Add project version in outputs that mention source SHA 2018-04-16 00:19:25 +02:00
Pavel Djundik
2bea5f67b9 Use default nick set in config for fallback 2018-04-12 10:39:03 +03:00
Pavel Djundik
c1406adcb2 Add tests for editing network 2018-04-12 10:38:35 +03:00
Pavel Djundik
f86d73972d Implement network editing UI and object updating 2018-04-12 10:38:35 +03:00
Pavel Djundik
a222dc9237 Ensure sqlite tests are serialized 2018-03-25 16:00:48 +03:00
Pavel Djundik
ca96d09a23 Send Accept header
Closes #2277
2018-03-23 20:17:03 +02:00
Jérémie Astori
dbe81f1e59
Merge pull request #2254 from thelounge/astorije/sign-out-settings
Empty local storage on sign out and move the sign out button to the settings
2018-03-20 21:06:44 -04:00
Jérémie Astori
c86ea9463d
Use Sinon to stub the logger instead of manual stubbing 2018-03-20 01:54:04 -04:00
Jérémie Astori
d1548572d4
Move the sign out button to the settings and empty local storage on sign out
This change improves privacy/security by ensuring all local storage (which includes settings, etc.) is destroyed on sign out or when revoking a remote session. Because signing out is now more "risky", the button has been moved to the settings along with other existing sessions.

This commit:

- Removes the power/sign-out icon from the sidebar footer (gives additional room for when the admin panel gets added)
- Adds a "Sign out" button next to the current session info in the settings session list
- Renames "Disconnect" buttons into "Revoke" to better clarify the intent (I will admit that I borrowed the wording from Telegram)
- Fixes incorrect `localStorage.remove` method
- Uses Sinon.js to mock wrappers for `window.localStorage` and `window.location` (does not mock those themselves, in the "Do not mock what you do not own" fashion, mock our layer instead). I expect we will be able to test a bit more from the UI with this. A good next candidate will be the `mockLogger` things.
2018-03-20 01:52:22 -04:00
Jérémie Astori
22725968e8
Fix yarn coverage script on Windows 2018-03-19 20:01:25 -04:00
Max Leiter
01753a814c Improve accessibility for emoji 2018-03-18 12:13:48 -07:00
Jérémie Astori
00bca229f0
Enforce object literal shorthand syntax with ESLint 2018-03-15 00:22:09 -04:00
Pavel Djundik
351a203acd Fix some URLs not being sent as-is to the client 2018-03-13 22:08:19 +02:00
Al McKinlay
5ce67ba093 Insert channel/user into channel list at alphabetically sorted point, not just the end
Don't sort queries/users after special chans


Set all users in tests to be of type query


Add test for not inserting infront of lobby


Break after finding the index, otherwise it always adds it to the end


Add checking for lobby in first test


Fix off-by-one error on the frontend


Fix utterly idiotic issue adding a duplicate of the channel we are on rather than the new user when we query


Check that we always insert before first special chan
2018-03-12 12:42:59 +00:00
Jérémie Astori
c28fda6b28
Switch to Font Awesome 5 2018-03-11 15:57:35 -04:00
Pavel Djundik
a15e922e27 Close sqlite database when user quits
Fixes #2178
2018-03-11 00:21:47 +02:00
Pavel Djundik
ddb1a280cb Allow overriding arrays in config, warn about incorrect types
Fixes #2176
2018-03-10 13:59:24 +02:00
Pavel Djundik
49046be361 Try to fix sqlite test failing on CI randomly 2018-03-09 11:41:30 +02:00
Pavel Djundik
5aa9d7e1dc
Merge pull request #1839 from thelounge/sqlite
Add sqlite logging and reloading messages
2018-03-09 09:06:25 +02:00
Jérémie Astori
5e6e27d73f
Ignore order of preview results in unicode link tests 2018-03-08 21:01:57 -05:00
Pavel Djundik
dfc4cad712 Add test coverage for sqlite plugin 2018-03-08 20:23:29 +02:00
Pavel Djundik
941849eaa8 Add message indexing 2018-03-08 20:23:29 +02:00
Pavel Djundik
731b29c059 Generate uuid per network 2018-03-08 20:23:29 +02:00
Pavel Djundik
f475cc39ef Normalize unicode URLs in link prefetcher
Fixes #1644
2018-03-08 19:43:39 +02:00
Pavel Djundik
eab823ba66 Allow setting rejectUnauthorized per network 2018-03-04 12:45:48 +02:00
Pavel Djundik
fb17107406
Increase test timeout on CI 2018-02-28 22:42:21 +02:00
Jérémie Astori
ecede860ef
Enable in-browser run of client testing
This gets us one step closer to cross-browser testing 🎉
2018-02-23 23:52:36 -05:00
Pavel Djundik
59ec07be87
Update all links to thelounge repository 2018-02-21 22:47:52 -05:00
William Boman
acb6179b30 relay client's preferred language in link preview requests
Closes #1440.
2018-02-21 10:35:33 +01:00
Jérémie Astori
9c4ea85041 Instrument client code before running tests
Despite being a bit gross to look at, this brings a few advantages:

- Tests are now closer to what actually runs, so more likely to find broken stuff.
- We can start using things that were so far Webpack-only or browser-only, like ES6 imports, loading Handlebars templates, etc.
- We open ourselves to browser testing (there is some work to do, but that would be a necessary step).
- We improve the client/server separation, by making it possible to run them independently

I do some extra steps around coverage: now we have 2 reports (client + server), so I have an extra step to combine them (the `nyc report` part). This is  strictly to keep feature parity (the coverage report of this code is effectively the same as before), but in the near future, we might want to keep both reports separate, for example to continue separating client/server. Another reason would be to use something like Codecov, which I believe has the ability to have multiple reports. This is down the road though, our coverage is not good enough to make hosting them somewhere be useful (I think).

A few extras with this commit:

- Coverage summary is displayed when tests are run (this is not slowing down tests)
- Tests check for leaks (see https://mochajs.org/#--check-leaks)
- Tests now output with the `dot` reporter. This is nice as `npm test` runs in parallel, the whole output holds in a few lines instead of spanning over multiple screens.
2018-02-20 15:32:30 +02:00
Pavel Djundik
c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik
51684f7a2a Switch default home location to ~/.thelounge and remove support of .lounge_home 2018-02-19 20:43:53 +02:00
Pavel Djundik
c97352905d
Merge pull request #1962 from thelounge/xpaw/no-var
Enable no-var rule
2018-02-19 20:12:31 +02:00
Pavel Djundik
8886459be9
Merge pull request #2049 from thelounge/xpaw/ui-network-status
Sync network status and security to client UI
2018-02-19 19:57:36 +02:00
Pavel Djundik
a3e448acf5 Enable no-var rule
Fixes #1961
2018-02-19 19:49:39 +02:00
Jérémie Astori
8403d277b4
Replace reference to website with new URL 2018-02-19 12:23:41 -05:00