@dargmuesli/nuxt-vio 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,6 @@ const siteDescriptionProp = toRef(() => props.siteDescription)
|
|
23
23
|
const { $dayjs } = useNuxtApp()
|
24
24
|
const { locale } = useI18n()
|
25
25
|
const cookieControl = useCookieControl()
|
26
|
-
const siteConfig = useSiteConfig()
|
27
26
|
|
28
27
|
const { loadingIds, indicateLoadingDone } = useLoadingDoneIndicator('app')
|
29
28
|
|
@@ -68,7 +67,6 @@ updateSiteConfig({
|
|
68
67
|
defineOgImage({
|
69
68
|
alt: ogImageAltProp.value,
|
70
69
|
component: ogImageComponentProp.value,
|
71
|
-
description: siteDescriptionProp.value,
|
72
70
|
})
|
73
71
|
useAppLayout()
|
74
72
|
useFavicons()
|
@@ -76,10 +74,7 @@ usePolyfills()
|
|
76
74
|
useSchemaOrg([
|
77
75
|
defineWebSite({
|
78
76
|
description: siteDescriptionProp,
|
79
|
-
inLanguage: locale,
|
80
|
-
name: siteConfig.name,
|
81
77
|
}),
|
82
|
-
defineWebPage(),
|
83
78
|
])
|
84
79
|
init()
|
85
80
|
</script>
|
@@ -11,6 +11,7 @@ export const useHeadDefault = ({
|
|
11
11
|
const attrs = useAttrs()
|
12
12
|
|
13
13
|
const defaults: Parameters<typeof useServerSeoMeta>[0] = {
|
14
|
+
description: attrs['site-description'] as string, // TODO: remove (https://github.com/harlan-zw/nuxt-site-config/pull/7)
|
14
15
|
msapplicationConfig: `/assets/static/favicon/browserconfig.xml?v=${CACHE_VERSION}`,
|
15
16
|
title,
|
16
17
|
twitterDescription: attrs['site-description'] as string,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.8.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"engines": {
|
9
9
|
"node": "20"
|
10
10
|
},
|
11
|
-
"packageManager": "pnpm@8.7.
|
11
|
+
"packageManager": "pnpm@8.7.5",
|
12
12
|
"files": [
|
13
13
|
"assets",
|
14
14
|
"components",
|
@@ -25,6 +25,7 @@
|
|
25
25
|
"error.vue",
|
26
26
|
"i18n.config.ts",
|
27
27
|
"nuxt.config.ts",
|
28
|
+
"playwright.config.ts",
|
28
29
|
"tailwind.config.ts"
|
29
30
|
],
|
30
31
|
"main": "nuxt.config.ts",
|
@@ -41,7 +42,7 @@
|
|
41
42
|
"prepare": "nuxt prepare .playground",
|
42
43
|
"preview": "nuxt preview .playground",
|
43
44
|
"start": "PORT=3001 node .playground/.output/server/index.mjs",
|
44
|
-
"test:e2e:dev": "
|
45
|
+
"test:e2e:dev": "pnpm test:e2e",
|
45
46
|
"test:e2e:docker:br": "pnpm test:e2e:docker:build && pnpm test:e2e:docker:run",
|
46
47
|
"test:e2e:docker:build": "docker build -t test-e2e_base --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_base ..",
|
47
48
|
"test:e2e:docker:dev:update": "pnpm test:e2e:docker:dev --update-snapshots",
|
@@ -49,7 +50,7 @@
|
|
49
50
|
"test:e2e:docker:prod:update": "pnpm test:e2e:docker:prod --update-snapshots",
|
50
51
|
"test:e2e:docker:prod": "pnpm test:e2e:docker:br pnpm --dir src run test:e2e:prod",
|
51
52
|
"test:e2e:docker:run": "docker run --rm -v \"$PWD/..:/srv/app\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_base",
|
52
|
-
"test:e2e:prod": "cross-env
|
53
|
+
"test:e2e:prod": "cross-env NODE_ENV=production pnpm test:e2e",
|
53
54
|
"test:e2e": "playwright test"
|
54
55
|
},
|
55
56
|
"dependencies": {
|
@@ -76,6 +77,7 @@
|
|
76
77
|
"@vuelidate/validators": "2.0.4",
|
77
78
|
"clipboard": "2.0.11",
|
78
79
|
"cookie": "0.5.0",
|
80
|
+
"cross-env": "7.0.3",
|
79
81
|
"dayjs": "2.0.0-alpha.4",
|
80
82
|
"is-https": "4.0.0",
|
81
83
|
"jiti": "1.20.0",
|
@@ -89,7 +91,6 @@
|
|
89
91
|
"devDependencies": {
|
90
92
|
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.3",
|
91
93
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
92
|
-
"cross-env": "7.0.3",
|
93
94
|
"eslint": "8.49.0",
|
94
95
|
"eslint-config-prettier": "9.0.0",
|
95
96
|
"eslint-plugin-compat": "4.2.0",
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test'
|
2
|
+
import { BASE_URL } from './utils/constants'
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Read environment variables from file.
|
6
|
+
* https://github.com/motdotla/dotenv
|
7
|
+
*/
|
8
|
+
// require('dotenv').config();
|
9
|
+
|
10
|
+
/**
|
11
|
+
* See https://playwright.dev/docs/test-configuration.
|
12
|
+
*/
|
13
|
+
export default defineConfig({
|
14
|
+
expect: {
|
15
|
+
toHaveScreenshot: {
|
16
|
+
maxDiffPixelRatio: 0.01,
|
17
|
+
},
|
18
|
+
},
|
19
|
+
|
20
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
21
|
+
forbidOnly: !!process.env.CI,
|
22
|
+
|
23
|
+
/* Run tests in files in parallel */
|
24
|
+
fullyParallel: true,
|
25
|
+
|
26
|
+
outputDir: 'tests/e2e/results',
|
27
|
+
|
28
|
+
/* Configure projects for major browsers */
|
29
|
+
projects: [
|
30
|
+
{
|
31
|
+
name: 'chromium',
|
32
|
+
use: { ...devices['Desktop Chrome'] },
|
33
|
+
},
|
34
|
+
|
35
|
+
{
|
36
|
+
name: 'firefox',
|
37
|
+
use: { ...devices['Desktop Firefox'] },
|
38
|
+
},
|
39
|
+
|
40
|
+
{
|
41
|
+
name: 'webkit',
|
42
|
+
use: { ...devices['Desktop Safari'] },
|
43
|
+
},
|
44
|
+
|
45
|
+
/* Test against mobile viewports. */
|
46
|
+
// {
|
47
|
+
// name: 'Mobile Chrome',
|
48
|
+
// use: { ...devices['Pixel 5'] },
|
49
|
+
// },
|
50
|
+
// {
|
51
|
+
// name: 'Mobile Safari',
|
52
|
+
// use: { ...devices['iPhone 12'] },
|
53
|
+
// },
|
54
|
+
|
55
|
+
/* Test against branded browsers. */
|
56
|
+
// {
|
57
|
+
// name: 'Microsoft Edge',
|
58
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
59
|
+
// },
|
60
|
+
// {
|
61
|
+
// name: 'Google Chrome',
|
62
|
+
// use: { ..devices['Desktop Chrome'], channel: 'chrome' },
|
63
|
+
// },
|
64
|
+
],
|
65
|
+
|
66
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
67
|
+
reporter: [['html', { outputFolder: 'tests/e2e/report' }]],
|
68
|
+
|
69
|
+
/* Retry on CI only */
|
70
|
+
retries: process.env.CI ? 1 : 0,
|
71
|
+
|
72
|
+
testDir: './tests/e2e/specs',
|
73
|
+
|
74
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
75
|
+
use: {
|
76
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
77
|
+
baseURL: BASE_URL,
|
78
|
+
|
79
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
80
|
+
trace: 'on-first-retry',
|
81
|
+
},
|
82
|
+
|
83
|
+
/* Run your local dev server before starting the tests */
|
84
|
+
webServer: {
|
85
|
+
command:
|
86
|
+
process.env.NODE_ENV === 'production' ? 'pnpm run start' : 'pnpm run dev',
|
87
|
+
env: {
|
88
|
+
NUXT_PUBLIC_VIO_IS_TESTING: 'true',
|
89
|
+
},
|
90
|
+
timeout: process.env.NODE_ENV === 'production' ? 10000 : 100000,
|
91
|
+
url: BASE_URL,
|
92
|
+
reuseExistingServer: !process.env.CI,
|
93
|
+
},
|
94
|
+
|
95
|
+
/* Opt out of parallel tests on CI. */
|
96
|
+
workers: process.env.CI ? 1 : undefined,
|
97
|
+
})
|
package/utils/constants.ts
CHANGED
@@ -7,9 +7,9 @@ export const BASE_URL =
|
|
7
7
|
'://' +
|
8
8
|
(process.env.NUXT_PUBLIC_HOST ||
|
9
9
|
`${process.env.HOST || 'localhost'}:${
|
10
|
-
|
11
|
-
? '
|
12
|
-
: '
|
10
|
+
process.env.PORT || process.env.NODE_ENV === 'production'
|
11
|
+
? '3001'
|
12
|
+
: '3000'
|
13
13
|
}`)
|
14
14
|
export const CACHE_VERSION = 'bOXMwoKlJr'
|
15
15
|
export const COOKIE_PREFIX = SITE_NAME.toLocaleLowerCase()
|