Skip to content

Commit d9fdbfa

Browse files
committed
chore: release 1.7.1
1 parent abf5383 commit d9fdbfa

File tree

7 files changed

+32
-21
lines changed

7 files changed

+32
-21
lines changed

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
22
"name": "svelte-seo",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"license": "MIT",
55
"repository": "git@github.com:artiebits/svelte-seo.git",
66
"scripts": {
77
"dev": "vite dev",
88
"build": "svelte-kit sync && svelte-package",
9-
"prepublishOnly": "npm build",
9+
"prepublishOnly": "npm run build",
1010
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
1111
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
1212
"test": "playwright test",
1313
"lint": "prettier --check . && eslint .",
1414
"format": "prettier --write .",
1515
"preview": "vite build && vite preview"
1616
},
17+
"files": [
18+
"dist"
19+
],
1720
"devDependencies": {
1821
"@eslint/eslintrc": "^3.3.1",
1922
"@eslint/js": "^9.33.0",
@@ -58,8 +61,8 @@
5861
},
5962
"exports": {
6063
".": {
61-
"types": "./index.d.ts",
62-
"svelte": "./index.js"
64+
"types": "./dist/index.d.ts",
65+
"svelte": "./dist/index.js"
6366
}
6467
}
6568
}

src/lib/index.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
<script>
2-
/** @type {import('./types').SvelteSeo}*/
1+
<script lang="ts">
2+
import type { SvelteSeo } from './types';
3+
4+
interface Props extends SvelteSeo {}
5+
36
const {
47
title,
58
description,
@@ -20,7 +23,7 @@
2023
notranslate,
2124
jsonLd,
2225
children
23-
} = $props();
26+
}: Props = $props();
2427
2528
import OpenGraphComponent from "./open-graph.svelte";
2629
</script>

src/lib/open-graph.svelte

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
<script>
2-
/** @type {{ openGraph: import("./types").SvelteSeo['openGraph'] }} */
3-
const { openGraph } = $props();
1+
<script lang="ts">
2+
import type { OpenGraph } from './types';
3+
4+
interface Props {
5+
openGraph: OpenGraph;
6+
}
7+
8+
const { openGraph }: Props = $props();
49
</script>
510

611
{#if openGraph}

src/lib/types.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Thing, WithContext } from "schema-dts";
2+
import type { Snippet } from "svelte";
23

34
export interface SvelteSeo {
45
title?: string;
@@ -7,10 +8,10 @@ export interface SvelteSeo {
78
keywords?: string;
89
applicationName?: string;
910
themeColor?: string;
10-
nofollow?: Boolean;
11-
noindex?: Boolean;
12-
nositelinkssearchbox: Boolean;
13-
notranslate: Boolean;
11+
nofollow?: boolean;
12+
noindex?: boolean;
13+
nositelinkssearchbox: boolean;
14+
notranslate: boolean;
1415
canonical?: string;
1516
amp?: string;
1617
manifest?: string;
@@ -80,7 +81,7 @@ declare interface OpenGraph {
8081
movie?: OpenGraphVideo;
8182
article?: OpenGraphArticle;
8283
book?: OpenGraphBook;
83-
profile?: openGraphProfile;
84+
profile?: OpenGraphProfile;
8485
}
8586

8687
declare interface OpenGraphMusic {
@@ -123,7 +124,7 @@ declare interface OpenGraphBook {
123124
tag?: string[];
124125
}
125126

126-
declare interface openGraphProfile {
127+
declare interface OpenGraphProfile {
127128
first_name?: string;
128129
last_name?: string;
129130
username?: string;

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<SvelteSEO
77
title={SEO.title}
88
description={SEO.description}
9-
keywords={SEO.keywords.toString()}
9+
keywords={SEO.keywords}
1010
base={SEO.base}
1111
applicationName={SEO.applicationName}
1212
themeColor={SEO.themeColor}

src/routes/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
/** @type {import("../lib/types").SvelteSeo} */
12
const SEO = {
23
title: "Open Graph Article Title",
34
noindex: false,
45
nofollow: false,
56
description: "Description of open graph article",
67
base: "https://www.example.com",
7-
keywords: ["svelte", "sveltekit", "web"],
8+
keywords: "svelte, sveltekit, web",
89
applicationName: "Svelte SEO",
910
canonical: "https://www.example.com",
1011
themeColor: "red",
@@ -23,7 +24,6 @@ const SEO = {
2324
},
2425
],
2526

26-
/**@type {import("../lib/types").SvelteSeo['twitter']}*/
2727
twitter: {
2828
title: "Open Graph Article Title",
2929
description: "Description of open graph article",
@@ -50,7 +50,6 @@ const SEO = {
5050
appId: "12344567",
5151
},
5252

53-
/**@type {import("../lib/types").OpenGraph} */
5453
openGraph: {
5554
title: "Open Graph Article Title",
5655
type: "website",

src/tests/twitter.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ test.describe("Loads twitter tags", () => {
6767
).toBe("720");
6868
});
6969

70-
test("Loads twtter player height tag correctly", async ({ page }) => {
70+
test("Loads twitter player height tag correctly", async ({ page }) => {
7171
expect(
7272
await page
7373
.locator("meta[name='twitter:player:height']")

0 commit comments

Comments
 (0)