Skip to content

Commit 0838484

Browse files
authored
Upgrade Packages (#207)
* chore: patches upgrade * chore: minor upgrades * chore: upgrade nuxt * chore: upgrade nuxt icons * chore: upgrade @vueuse/core and @vueuse/nuxt * chore: upgrade @unhead/vue * chore: update @nuxt/scripts to version 1.3.2 * chore: pin versions for @primeuix/themes, primevue, and @primevue/nuxt-module PrimeVue is now pinned to v4 (4.5.4 / 4.5.4 / 1.2.5). v5 is now a commercial license with no benefit for our usage; pinning prevents an accidental ^-drift to v5. * chore: remove deprecated matomo analytics configs * chore: upgrade eslint * chore: add ts * lint: fix eslint issues * chore: upgrade prettier-plugin-tailwindcss * lint: apply prettier * chore: remove vue-router as a direct dependency * chore: upgrade nuxt-auth-utils * chore: upgrade @nuxt/icon * fix: update matomo siteid
1 parent 54d66c6 commit 0838484

11 files changed

Lines changed: 3606 additions & 2865 deletions

File tree

.sample.env

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,3 @@ NUXT_PUBLIC_CMS_PREFIX=/api
8282

8383
#samplr#NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL=
8484
NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL=
85-
#samplr#NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_SITE_ID=
86-
NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_SITE_ID=
87-
#samplr#NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_TRACKER_URL=
88-
NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_TRACKER_URL=

.woodpecker/build-latest-image.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ when:
66
evaluate: 'CI_COMMIT_TARGET_BRANCH != "main"'
77

88
variables:
9-
- &registry_url "https://registry.cloud.josa.ngo"
10-
- &docker_repo "registry.cloud.josa.ngo/library/nuha-web"
11-
- &slack_channel "builds"
9+
- &registry_url 'https://registry.cloud.josa.ngo'
10+
- &docker_repo 'registry.cloud.josa.ngo/library/nuha-web'
11+
- &slack_channel 'builds'
1212
- &success_message >
1313
✅ *SUCCESS* - Latest Build #{{ build.number }}
1414

@@ -34,8 +34,8 @@ steps:
3434
- name: run-pre-commit-hooks
3535
image: registry.cloud.josa.ngo/library/pre-commit-runner
3636
settings:
37-
args: "--all-files"
38-
skip: "end-of-file-fixer, run-samplr"
37+
args: '--all-files'
38+
skip: 'end-of-file-fixer, run-samplr'
3939

4040
- name: build-latest-image
4141
image: woodpeckerci/plugin-docker-buildx

.woodpecker/build-stable-image.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ when:
77
exclude: [main]
88

99
variables:
10-
- &registry_url "https://registry.cloud.josa.ngo"
11-
- &docker_repo "registry.cloud.josa.ngo/library/nuha-web"
12-
- &slack_channel "builds"
10+
- &registry_url 'https://registry.cloud.josa.ngo'
11+
- &docker_repo 'registry.cloud.josa.ngo/library/nuha-web'
12+
- &slack_channel 'builds'
1313
- &success_message >
1414
✅ *SUCCESS* - Stable Build #{{ build.number }}
1515

@@ -35,8 +35,8 @@ steps:
3535
- name: run-pre-commit-hooks
3636
image: registry.cloud.josa.ngo/library/pre-commit-runner
3737
settings:
38-
args: "--all-files"
39-
skip: "end-of-file-fixer, run-samplr"
38+
args: '--all-files'
39+
skip: 'end-of-file-fixer, run-samplr'
4040

4141
- name: build-stable-image
4242
image: woodpeckerci/plugin-docker-buildx

composables/useLinks.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
export type LinkGroup =
2-
| 'desktop-header'
3-
| 'footer'
4-
| 'mobile-header'
5-
| 'social'
6-
| 'info'
2+
'desktop-header' | 'footer' | 'mobile-header' | 'social' | 'info'
73

84
export interface Link {
95
title(): string

eslint.config.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
import withNuxt from './.nuxt/eslint.config.mjs'
22
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
33

4-
export default withNuxt([eslintPluginPrettierRecommended])
4+
export default withNuxt([
5+
eslintPluginPrettierRecommended,
6+
{
7+
name: 'nuha/primevue-pt-hyphenation',
8+
rules: {
9+
// PrimeVue passthrough (`pt:`) attributes must stay camelCase to match
10+
'vue/attribute-hyphenation': ['warn', 'always', { ignore: ['pt:'] }],
11+
},
12+
},
13+
])

i18n/locales/ar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
"excelNoData": "ملف Excel لا يحتوي على بيانات",
221221
"excelRowError": "الصف {row}: يفتقد تعليقًا",
222222
"excelParseError": "خلل في تحليل ملف Excel",
223-
"missingCommentHeader": "عنوان التعليق مفقود",
223+
"missingCommentHeader": "عنوان التعليق مفقود",
224224
"unsupportedFileType": "نوع الملف غير مدعوم",
225225
"noFileUploaded": "لم يُرفَع أي ملف",
226226
"fileIsRequired": "الملف مطلوب",

middleware/geolocation.global.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default defineNuxtRouteMiddleware(async (to) => {
1414

1515
// region code in URL param has the priority over auto-detection
1616
const countryCode = (to.params.region as string)?.toLowerCase()
17-
let isRegionSet = false
1817
const regionSupported = isRegionSupported(countryCode)
1918

2019
if (countryCode) {
@@ -30,7 +29,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
3029
(r) => r.countryCode === countryCode
3130
)?.dialectName as Record<StrapiLocale, string>
3231

33-
isRegionSet =
32+
const isRegionSet =
3433
(
3534
await setRegion({
3635
countryCode,

nuxt.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ export default defineNuxtConfig({
6969
scripts: {
7070
registry: {
7171
matomoAnalytics: {
72+
trigger: 'onNuxtReady',
7273
matomoUrl: 'https://track.josa.ngo/',
73-
siteId: 2,
74+
siteId: 25,
7475
trackerUrl: 'https://track.josa.ngo/matomo.php',
7576
enableLinkTracking: true,
7677
watch: true,
@@ -145,10 +146,6 @@ export default defineNuxtConfig({
145146
matomoAnalytics: {
146147
// NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL
147148
matomoUrl: 'https://track.josa.ngo/',
148-
// NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_SITE_ID
149-
siteId: 2,
150-
// NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_TRACKER_URL
151-
trackerUrl: 'https://track.josa.ngo/matomo.php',
152149
},
153150
},
154151
authEmailEnabled: true,

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,40 @@
1313
"lint:fix": "prettier --write --list-different . && npm run lint --fix"
1414
},
1515
"dependencies": {
16-
"@nuxt/eslint": "1.5.2",
17-
"@nuxt/icon": "1.15.0",
18-
"@nuxt/scripts": "0.13.2",
19-
"@nuxtjs/i18n": "10.0.0",
20-
"@primeuix/themes": "^1.2.5",
16+
"@nuxt/eslint": "1.16.0",
17+
"@nuxt/icon": "2.4.1",
18+
"@nuxt/scripts": "1.3.2",
19+
"@nuxtjs/i18n": "10.5.0",
20+
"@primeuix/themes": "1.2.5",
2121
"@types/ioredis": "^5.0.0",
2222
"@types/jsonwebtoken": "^9.0.10",
23-
"@unhead/vue": "^2.0.3",
24-
"chart.js": "^4.5.0",
25-
"eslint": "^9.0.0",
23+
"@unhead/vue": "^3.2.3",
24+
"chart.js": "^4.5.1",
25+
"eslint": "^10.8.0",
2626
"eslint-config-prettier": "^10.1.8",
27-
"eslint-plugin-prettier": "^5.5.4",
27+
"eslint-plugin-prettier": "^5.5.6",
2828
"i18n-iso-countries": "^7.14.0",
29-
"ioredis": "^5.7.0",
30-
"jsonwebtoken": "^9.0.2",
31-
"nuxt": "^3.20.2",
29+
"ioredis": "^5.11.1",
30+
"jsonwebtoken": "^9.0.3",
31+
"nuxt": "^4.5.1",
3232
"nuxt-api-party": "3.4.2",
33-
"nuxt-auth-utils": "^0.5.24",
34-
"prettier": "^3.7.4",
35-
"prettier-plugin-tailwindcss": "^0.7.2",
36-
"primevue": "^4.3.9",
37-
"qs": "^6.14.0",
38-
"vue": "^3.5.17",
39-
"vue-chartjs": "^5.3.2",
40-
"vue-router": "^4.5.1",
33+
"nuxt-auth-utils": "^0.5.29",
34+
"prettier": "^3.9.6",
35+
"prettier-plugin-tailwindcss": "^0.8.1",
36+
"primevue": "4.5.4",
37+
"qs": "^6.15.3",
38+
"vue": "^3.5.40",
39+
"vue-chartjs": "^5.3.4",
4140
"xlsx": "^0.18.5"
4241
},
4342
"devDependencies": {
44-
"@iconify-json/circle-flags": "^1.2.8",
43+
"@iconify-json/circle-flags": "^1.2.10",
4544
"@iconify-json/mdi": "^1.2.3",
4645
"@nuxtjs/tailwindcss": "^6.14.0",
47-
"@primevue/nuxt-module": "^4.3.9",
48-
"@types/qs": "^6.14.0",
49-
"@vueuse/core": "^13.6.0",
50-
"@vueuse/nuxt": "^13.6.0"
46+
"@primevue/nuxt-module": "4.5.4",
47+
"@types/qs": "^6.15.1",
48+
"@vueuse/core": "^14.3.0",
49+
"@vueuse/nuxt": "^14.3.0",
50+
"typescript": "^5"
5151
}
5252
}

server/utils/input-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export const parseJsonFile = async (file: File): Promise<CommentData[]> => {
206206
})
207207
} catch (error) {
208208
if (error instanceof SyntaxError) {
209-
throw new Error(ERROR_KEYS.JSON_INVALID_FORMAT)
209+
throw new Error(ERROR_KEYS.JSON_INVALID_FORMAT, { cause: error })
210210
}
211211
throw error
212212
}

0 commit comments

Comments
 (0)