Skip to content

Commit

Permalink
Bump dependencies with Vite 5 & prevent some more type errors (#2238)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentiumYT authored Jan 24, 2024
1 parent 40591a1 commit 6631200
Show file tree
Hide file tree
Showing 14 changed files with 382 additions and 193 deletions.
2 changes: 1 addition & 1 deletion app/Actions/Diagnostics/Pipes/Checks/IniSettingsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function handle(array &$data, \Closure $next): array
if (extension_loaded('xdebug')) {
// @codeCoverageIgnoreStart
$msg = config('app.debug') !== true
? 'Errror: xdebug is enabled although Lychee is not in debug mode. Outside of debugging, xdebug will generate significant slowdown on your application.'
? 'Error: xdebug is enabled although Lychee is not in debug mode. Outside of debugging, xdebug will generate significant slowdown on your application.'
: 'Warning: xdebug is enabled. This will generate significant slowdown on your application.';
$data[] = $msg;
// @codeCoverageIgnoreEnd
Expand Down
532 changes: 361 additions & 171 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@lychee-org/leaflet.photo": "^1.0.0",
"@types/alpinejs": "^3.13.5",
"@types/alpinejs": "^3.13.6",
"@types/leaflet": "^1.9.8",
"@types/leaflet-rotatedmarker": "^0.2.5",
"@types/leaflet.markercluster": "^1.5.4",
Expand All @@ -21,23 +21,23 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.1",
"@types/justified-layout": "^4.1.4",
"autoprefixer": "^10.4.16",
"autoprefixer": "^10.4.17",
"justified-layout": "^4.1.0",
"laravel-vite-plugin": "^0.8.1",
"laravel-vite-plugin": "^1.0.1",
"lazysizes": "^5.3.2",
"leaflet": "^1.9.4",
"leaflet-gpx": "^1.7.0",
"leaflet-rotatedmarker": "^0.2.0",
"leaflet.markercluster": "^1.4.1",
"postcss": "^8.4.32",
"prettier": "^3.1.1",
"leaflet.markercluster": "^1.5.3",
"postcss": "^8.4.33",
"prettier": "^3.2.4",
"qrcode": "^1.5.3",
"tailwindcss": "^3.3.6",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"vite": "^4.5.2",
"vite": "^5.0.12",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-commonjs": "^0.10.0"
"vite-plugin-commonjs": "^0.10.1"
},
"browserslist": [
"defaults and fully supports es6-module"
Expand Down
1 change: 1 addition & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import('postcss-load-config').Config} */
export default {
plugins: {
tailwindcss: {},
Expand Down
3 changes: 1 addition & 2 deletions resources/js/data/panel/photoListingPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Selection from "@/lycheeOrg/actions/selection";
import { Photo } from "@/lycheeOrg/backend";

export type PhotoListingPanel = AlpineComponent<{
select: Selection;
photos: Photo[];
select: Selection;
}>;

/**
Expand All @@ -14,7 +14,6 @@ export type PhotoListingPanel = AlpineComponent<{
export const photoListingPanel = (Alpine: Alpine) =>
Alpine.data(
"photoListingPanel",
// @ts-expect-error
(photos: Photo[], select: Selection): PhotoListingPanel => ({
photos: photos,
select: select,
Expand Down
1 change: 0 additions & 1 deletion resources/js/data/panel/searchPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export type SearchPanel = AlpineComponent<{
export const searchPanel = (Alpine: Alpine) =>
Alpine.data(
"searchPanel",
// @ts-expect-error
(searchQuery: string, minLength: number, select: Selection): SearchPanel => ({
searchQuery: searchQuery,
hideMessage: false,
Expand Down
7 changes: 6 additions & 1 deletion resources/js/data/views/albumView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import PhotoLayout from "@/lycheeOrg/layouts/PhotoLayout";
export const albumView = (Alpine: Alpine) =>
Alpine.data(
"albumView",
// @ts-expect-error
(
base_url: string,
nsfwAlbumsVisible: boolean,
Expand Down Expand Up @@ -87,14 +86,17 @@ export const albumView = (Alpine: Alpine) =>
},

handleContextPhoto(event: MouseEvent) {
// @ts-expect-error
this.actions.handleContextPhoto(event, this);
},

handleClickPhoto(event: MouseEvent) {
// @ts-expect-error
this.actions.handleClickPhoto(event, this);
},

handleContextAlbum(event: MouseEvent) {
// @ts-expect-error
this.actions.handleContextAlbum(event, this);
},

Expand All @@ -121,6 +123,7 @@ export const albumView = (Alpine: Alpine) =>
// [l] login
// [?] keybinds
// [esc] back
// @ts-expect-error
if (this.keybinds.handleGlobalKeydown(event, this)) {
return;
}
Expand All @@ -135,6 +138,7 @@ export const albumView = (Alpine: Alpine) =>
// [s] Star
// [ctrl + ->] rotate CW
// [ctrl + <-] rotate CCW
// @ts-expect-error
if (this.photo_id !== null && this.keybinds.handlePhotoKeyDown(event, this)) {
return;
}
Expand All @@ -152,6 +156,7 @@ export const albumView = (Alpine: Alpine) =>
// [i] info
// [m] move (without select)
// [r] rename (without select)
// @ts-expect-error
this.keybinds.handleAlbumKeydown(event, this);
},

Expand Down
1 change: 0 additions & 1 deletion resources/js/data/views/dropboxView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type DropboxFile = {
export const dropboxView = (Alpine: Alpine) =>
Alpine.data(
"dropboxView",
// @ts-expect-error
(urlArea_: string, progress_: string): DropboxView => ({
urlArea: urlArea_,
progress: progress_,
Expand Down
2 changes: 0 additions & 2 deletions resources/js/data/views/photoView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export type PhotoView = AlpineComponent<{
export const photoView = (Alpine: Alpine) =>
Alpine.data(
"photoView",
// @ts-expect-error
(
// photo_id: string,
photoFlags: PhotoFlagsView,
Expand All @@ -42,7 +41,6 @@ export const photoView = (Alpine: Alpine) =>
mode: 0,

init() {
// @ts-expect-errror
console.log("init photoView!");

const photo = Alpine.store("photo") as Photo | undefined;
Expand Down
1 change: 0 additions & 1 deletion resources/js/data/views/uploadView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { UploadView, Livewire, UploadEvent } from "./types";
export const uploadView = (Alpine: Alpine) =>
Alpine.data(
"upload",
// @ts-expect-error
(chunkSize_val: number, parallelism_val: number = 3): UploadView => ({
isDropping: false,
chunkSize: chunkSize_val,
Expand Down
1 change: 0 additions & 1 deletion resources/js/data/webauthn/loginWebAuthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type LoginWebAuthn = AlpineComponent<{
export const loginWebAuthn = (Alpine: Alpine) =>
Alpine.data(
"loginWebAuthn",
// @ts-expect-error
(success_msg_val: string = "U2F_AUTHENTIFICATION_SUCCESS", error_msg_val: string = "ERROR_TEXT"): LoginWebAuthn => ({
webAuthnOpen: false,
success_msg: success_msg_val,
Expand Down
1 change: 0 additions & 1 deletion resources/js/data/webauthn/registerWebAuthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type RegisterWebAuthn = AlpineComponent<{
export const registerWebAuthn = (Alpine: Alpine) =>
Alpine.data(
"registerWebAuthn",
// @ts-expect-error
(success_msg_val: string = "U2F_REGISTRATION_SUCCESS", error_msg_val: string = "ERROR_TEXT"): RegisterWebAuthn => ({
success_msg: success_msg_val,
error_msg: error_msg_val,
Expand Down
4 changes: 2 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
export default {
safelist: [
'opacity-0',
'group-hover:opacity-100',
Expand Down Expand Up @@ -202,4 +202,4 @@ module.exports = {
},
plugins: [
],
}
}
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import laravel from 'laravel-vite-plugin';
import commonjs from 'vite-plugin-commonjs'
import checker from 'vite-plugin-checker'

/** @type {import('vite').UserConfig} */
export default defineConfig({
plugins: [
commonjs(/* options */),
Expand Down

0 comments on commit 6631200

Please sign in to comment.