Skip to content

Commit

Permalink
clean up config, add deps
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Aug 28, 2023
1 parent d736ac3 commit 6a0d3d1
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 27 deletions.
22 changes: 5 additions & 17 deletions apps/app/next-i18next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable turbo/no-undeclared-env-vars */
/* eslint-disable node/no-process-env */
// @ts-check
import LanguageDetector from 'i18next-browser-languagedetector'
Expand All @@ -10,20 +9,9 @@ import MultiBackend from 'i18next-multiload-backend-adapter'

import path from 'path'

export const namespaces = [
'attribute',
'common',
'country',
'gov-dist',
// 'org-data',
// 'org-description',
// 'org-service',
'phone-type',
'services',
'user',
]
const isBrowser = typeof window !== 'undefined'

const isDev = process.env.NODE_ENV !== 'production'
const isVerbose = !!process.env.NEXT_VERBOSE
// const Keys = z.record(z.string())

/**
Expand Down Expand Up @@ -60,8 +48,8 @@ const config = {
defaultNS: 'common',
localePath: path.resolve('./public/locales'),
fallbackLng: ['en'],
reloadOnPrerender: process.env.NODE_ENV !== 'production',
debug: process.env.NODE_ENV !== 'production' && isBrowser && !!process.env.NEXT_VERBOSE,
reloadOnPrerender: isDev,
debug: isDev && isBrowser && isVerbose,
partialBundledLanguages: true,
nonExplicitSupportedLngs: true,
cleanCode: true,
Expand Down Expand Up @@ -91,7 +79,7 @@ const config = {
interpolation: {
skipOnVariables: false,
alwaysFormat: true,
format: (value, format, lng, edit) => {
format: (value, format) => {
switch (format) {
case 'lowercase': {
if (typeof value === 'string') return value.toLowerCase()
Expand Down
5 changes: 5 additions & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@crowdin/ota-client": "1.0.0",
"@emotion/react": "11.11.1",
"@emotion/server": "11.11.0",
"@hookform/resolvers": "3.2.0",
"@iconify/react": "4.1.1",
"@mantine/carousel": "6.0.19",
"@mantine/core": "6.0.19",
Expand Down Expand Up @@ -98,10 +99,14 @@
"pretty-bytes": "6.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "4.0.11",
"react-hook-form": "7.45.4",
"react-hook-form-mantine": "2.0.0",
"react-i18next": "13.2.0",
"zod": "3.22.2"
},
"devDependencies": {
"@hookform/devtools": "4.3.1",
"@playwright/test": "1.37.1",
"@prisma/nextjs-monorepo-workaround-plugin": "5.2.0",
"@tanstack/react-query-devtools": "4.33.0",
Expand Down
18 changes: 14 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"localized-address-format": "1.3.1",
"nextjs-routes": "2.0.1",
"probe-image-size": "7.2.3",
"react-error-boundary": "4.0.11",
"react-phone-number-input": "3.3.4",
"react-string-replace": "1.1.1"
"react-string-replace": "1.1.1",
"zustand": "4.4.1"
},
"devDependencies": {
"@babel/core": "7.22.11",
Expand All @@ -58,7 +58,10 @@
"@emotion/server": "11.11.0",
"@faker-js/faker": "8.0.2",
"@geometricpanda/storybook-addon-badges": "2.0.0",
"@hookform/devtools": "4.3.1",
"@hookform/resolvers": "3.2.0",
"@iconify-json/carbon": "1.1.20",
"@iconify-json/fluent-mdl2": "1.1.3",
"@iconify-json/mdi": "1.1.54",
"@iconify-json/ph": "1.1.6",
"@iconify-json/simple-icons": "1.1.68",
Expand Down Expand Up @@ -151,6 +154,9 @@
"react": "18.2.0",
"react-docgen-typescript": "2.2.2",
"react-dom": "18.2.0",
"react-error-boundary": "4.0.11",
"react-hook-form": "7.45.4",
"react-hook-form-mantine": "2.0.0",
"react-hook-tracer": "1.4.0",
"react-i18next": "13.2.0",
"resolve-url-loader": "5.0.0",
Expand All @@ -172,8 +178,9 @@
"peerDependencies": {
"@emotion/react": "^11",
"@emotion/server": "^11",
"@iconify-json/carbon": "1.1.20",
"@iconify-json/simple-icons": "1.1.68",
"@hookform/resolvers": "^3.2.0",
"@iconify-json/carbon": "^1.1.20",
"@iconify-json/simple-icons": "^1.1.67",
"@iconify/react": "^4",
"@iconify/utils": "^2",
"@mantine/carousel": "^6",
Expand Down Expand Up @@ -212,6 +219,9 @@
"next-i18next": "^14.0.0",
"react": "^18",
"react-dom": "^18",
"react-error-boundary": "^4",
"react-hook-form": "^7.45.4",
"react-hook-form-mantine": "^2.0.0",
"react-i18next": "^13.0.0"
},
"msw": {
Expand Down
125 changes: 119 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a0d3d1

Please sign in to comment.