Commit graph

29 commits

Author SHA1 Message Date
Skyler Grey
a40be5499e Add prettier
Prettier is a code formatter for javascript/typescript. It's relatively
common to see complaints about style in pull requests or inconsistent
style getting in to Collabora Online. Also, without a formatter it's
harder for editors to automatically format code in sensible and
consistent ways

Prettier doesn't have many options, but those which it does have I have
set to the closest values to current behavior (e.g. single quotes) in
order to minimize unnecessary changes

This commit doesn't format all existing files. Doing so would cause
blames, cherry-picks and diffs to become much less useful. Instead, we
use browser/.beforeprettier to list all files that would need to be
changed, and this file is ignored. You are encouraged but not required
to set your editor's equivalent of 'editor.formatOnSaveMode' to only
format changed lines

This commit also does format of docstatefunctions.js, previously it did
not in to check that an incorrectly-formatted file could fail CI. Now it
does to make sure that formatting fixes the issue. This file was chosen
because it is very new and very small.

Change-Id: Ie6067f34aa658f887e149a08aebd0180b2354005
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
2024-03-09 15:53:21 +01:00
Skyler Grey
97a86549a7 Convert Control.UserList.js to typescript
I'm working on a set of patches to improve the userlist/following UI in
Collabora Online. Using typescript will allow me to be more certain
about the code I'm writing and make my code easier for other people to
understand.

Additionally, as I'm about to make significant changes to this file,
updating it to typescript now won't even damage the ability to blame too
much!

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Iccf64a01a465d895cbc1c24ad107f85665b5fbf3
2024-02-28 16:07:22 +01:00
Skyler Grey
0384682492 Add @types/jquery
Previously we were declaring $ as "any" but a type package for jquery
exists. Using it will provide us type definitions for jquery throughout
the project. This means we need to remove our previous definitions and
install the package

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Id54b3c6c9a4ab86897296fe9ba26570db8697207
2024-02-28 16:07:22 +01:00
Szymon Kłos
111d782d14 es2015: bump uglify-js version
so it will allow es2015

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic4d572905c274a88323a98d6cb2bb01cba623f46
2024-02-09 12:14:19 +01:00
Henry Castro
6013d78904 browser: remove 'tmp' dependency
It was a dependency of "pako" package, which it was removed.

Change-Id: Ia35b4c4ff9ee5e9ab1f09da398f6d93e51d24a1f
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-25 22:54:13 +01:00
Michael Meeks
df5cf10002 drop pako dependency.
Unused in the package since:

    commit 2def6dc3d5
    Date:   Sat Aug 27 17:49:50 2022 +0100

    Switch to zstd image compression.

Change-Id: I785ad2c1522721ed34cf89a1922ee06d5e2507e4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-16 22:28:10 -04:00
Ashod Nakashian
cacbaae014 js: update package.json sorting
Change-Id: I7abf8adfc235d410823014c0a91131492498fa90
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-24 09:20:32 +02:00
Szymon Kłos
bde5ee533f Enable duplicate checker
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If08ceb5dd6ca83b6c1bd5e8bd1d8028a61f4296f
2023-10-18 11:47:02 +02:00
Gökay Şatır
e309e0ffee Update packages.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4d90323dade99f325a9c3b6d46fd3b595030d1ce
2023-09-19 14:21:06 +02:00
Szymon Kłos
dc93ac9d2c Decrease code-duplication limit to 18 lines
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I98b398a9468ddc9e3087b7cf8d09c1015f325964
2023-09-14 12:26:53 +02:00
Szymon Kłos
76f0b11551 Detect code duplicates in make-check run
It uses jscpd project by invoking it using npm script
"duplication". For now set minimum lines to report
as 26, because we have some 25 line duplicates.
Later we can reduce that number.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I20e0ba9a07528e15a65f01d2247420da33339749
2023-09-14 12:26:53 +02:00
Rash419
944f269926 admin: added new cluster overview page
- added DlgLoading class to show loading modal dialog
- upgraded the d3

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8bd99bbadaa59a7de1e83bebde8db0dce920705d
2023-08-05 14:28:29 +05:30
Caolán McNamara
357f7cf2db bump to latest fzstd release
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I79bcfce90a858ad5a6f432ba8e36b0936c505bf3
2023-07-08 17:20:24 +02:00
Gökay Şatır
5bf2db45f9 Update sanitize-url package.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Iab936fbf2e743dc1908cc978c2c4e5380f4ca47e
2023-04-01 17:49:56 +03:00
Gökay Şatır
aa47a9f0a9 Remove json-js and stylelint-config-standart packages.
We don't need the first one and we don't use the latter one.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I1f48ff5487621781eb38dd8e4e8e2a389a3059d6
2023-04-01 11:30:07 +03:00
Gökay Şatır
260cbed5d3 Remove vex from code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I054977b5c71364c59c7f1fdd1f5d691380951ebb
2023-03-25 07:03:05 +03:00
Rash419
507d0f1a4a js: added localization for jquery-ui datepicker
replaced jquery-ui-dist node_module with jquery-ui
for localization

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6dd95cb8859cd2e0626195a0b87b496fe44afc49
2023-02-28 15:51:36 +01:00
Ashod Nakashian
12f3f1e6a4 browser: package.json always get resorted anyway
On every build, nodejs (v12.22.9 for me) re-sorts
the packages in package.json. I expect this is
the case for everyone, so best to commit it
sorted.

Change-Id: Ifa69989ae1bee0fda5a9cc19c2215db92959a434
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-06 11:19:18 +03:00
Henry Castro
38764966dc browser: add fzstd lib
usage

	var decompressed = fzstd.decompress(compressed);
	// Second argument is optional: custom output buffer
	var outBuf = new Uint8Array(100000);

	// IMPORTANT: fzstd will assume the buffer is sufficiently sized, so it
	// will yield corrupt data if the buffer is too small. It is highly
	// recommended to only specify this if you know the maximum output size.
	window.fzstd.decompress(compressed, outBuf);

Change-Id: I0b378f9395b2442bac9f0790f7633e6a6cb0402e
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-02 12:09:53 +01:00
Miklos Vajna
5f54484fc6 browser: fix indent in package.json
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Icdba3a955783d34dc851876ee47cf15c949269ab
2022-10-25 11:59:01 +02:00
Gökay Şatır
5c017d85dc Move node-canvas into devdependencies.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I779dc0d4c328e5fba20b9c458152358d2038f170
2022-10-19 17:23:20 +03:00
Yunusemre Şentürk
b382fd722c Revert "Attempt to solve FreeBSD issue" and fix freebsd check
canvas module is needed for make check. --disable-werror is
required, because npm canvas module is not available as a
binary package on all target platforms, and it does not
compile without warnings from source.

Signed-off-by: Yunusemre Şentürk <yunusemre@collabora.com>
Change-Id: I03e1d72d96ec0d6863ccd6236223a87ee481eb09
2022-09-12 15:24:37 +03:00
Gökay Şatır
b412d61ca8 Attempt to solve FreeBSD issue.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I8d3e85ab0b1d590a130569dd74d3c45cade708f5
2022-09-08 10:53:47 +02:00
Henry Castro
299457e49a browser: add tmp module package
Change-Id: I2daaf027ea9888f9e543f7543cccd129e1c3bf69
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
e3c170cf94 browser: add pako dev dependency
https://github.com/nodeca/pako

Change-Id: I115c6c729f6783a23856a0e41f1908a7fc7f61fe
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Mert Tumer
e0511aa1bd sanitize-url: bump package version to 6.0.0
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I7c58e3a417e7a247b781800a2ec93417d3b7bc8f
2022-03-28 14:38:20 +03:00
Henry Castro
cc8a84af60 config: rename 'lool' -> 'cool'
.
Change-Id: I13596547abac424482096a9af13c6785a8e2b897
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-17 09:19:04 +01:00
Henry Castro
1597aee396 browser: update package.json
rename loleaflet -> cool

Change-Id: I64293bdd7e34724531ac316651fcad8dbc8f4704
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro
e5c1d0e637 initial rename loleaflet -> browser
Change-Id: Ief7edfe7e3ff3a0a1ec24b4dc106bdeee5d0f8ff
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Renamed from loleaflet/package.json (Browse further)