svelte-meta-tags 2.6.0 → 2.6.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [2.6.3](https://github.com/oekazuma/svelte-meta-tags/compare/v2.6.2...v2.6.3) (2022-08-31)
2
+
3
+ - add schema-dts to dependencies([9824e38](https://github.com/oekazuma/svelte-meta-tags/commit/9824e388728e37009aa06f56642ec4a2b9520921))
4
+
5
+ # [2.6.2](https://github.com/oekazuma/svelte-meta-tags/compare/v2.6.1...v2.6.2) (2022-08-11)
6
+
7
+ - trim production dependencies([2008183](https://github.com/oekazuma/svelte-meta-tags/commit/2008183b0a712cc6288e188cabdb14c85f93b0ee))
8
+
9
+ # [2.6.1](https://github.com/oekazuma/svelte-meta-tags/compare/v2.6.0...v2.6.1) (2022-05-27)
10
+
11
+ - clean up JSON-LD ([16d107c](https://github.com/oekazuma/svelte-meta-tags/commit/16d107c09546ffd6b2f8312a6851d46bd0da6ae1))
12
+
13
+ # [2.6.0](https://github.com/oekazuma/svelte-meta-tags/compare/v2.5.5...v2.6.0) (2022-05-16)
14
+
15
+ ### Features
16
+
17
+ - allow all public type definitions to be retrieved ([3e04e2f](https://github.com/oekazuma/svelte-meta-tags/commit/3e04e2fd8ff8446709a7d015b5819971cb42765d))
18
+
1
19
  ## [2.5.5](https://github.com/oekazuma/svelte-meta-tags/compare/v2.5.4...v2.5.5) (2022-05-06)
2
20
 
3
21
  ### Bug Fixes
package/JsonLd.svelte CHANGED
@@ -1,16 +1,20 @@
1
1
  <script>
2
2
  export let output = 'head';
3
- export let schema = undefined;
3
+ export let schema = {};
4
4
 
5
- const jsonSchema = (schema) => JSON.stringify({ '@context': 'https://schema.org', ...schema });
5
+ $: isValid = schema && typeof schema === 'object';
6
+ $: json = `${'<scri' + 'pt type="application/ld+json">'}${JSON.stringify({
7
+ '@context': 'https://schema.org',
8
+ ...schema
9
+ })}${'</scri' + 'pt>'}`;
6
10
  </script>
7
11
 
8
12
  <svelte:head>
9
- {#if schema && output === 'head'}
10
- {@html `${'<scri' + 'pt type="application/ld+json">'}${jsonSchema(schema)}${'</scri' + 'pt>'}`}
13
+ {#if isValid && output === 'head'}
14
+ {@html json}
11
15
  {/if}
12
16
  </svelte:head>
13
17
 
14
- {#if schema && output === 'body'}
15
- {@html `${'<scri' + 'pt type="application/ld+json">'}${jsonSchema(schema)}${'</scri' + 'pt>'}`}
18
+ {#if isValid && output === 'body'}
19
+ {@html json}
16
20
  {/if}
package/MetaTags.svelte CHANGED
@@ -29,25 +29,18 @@
29
29
  unavailableAfter
30
30
  } = robotsProps;
31
31
 
32
- robotsParams = `${nosnippet ? ',nosnippet' : ''}${
33
- maxSnippet ? `,max-snippet:${maxSnippet}` : ''
34
- }${maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ''}${
35
- noarchive ? ',noarchive' : ''
36
- }${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ''}${
32
+ robotsParams = `${nosnippet ? ',nosnippet' : ''}${maxSnippet ? `,max-snippet:${maxSnippet}` : ''}${
33
+ maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ''
34
+ }${noarchive ? ',noarchive' : ''}${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ''}${
37
35
  noimageindex ? ',noimageindex' : ''
38
- }${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ''}${
39
- notranslate ? ',notranslate' : ''
40
- }`;
36
+ }${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ''}${notranslate ? ',notranslate' : ''}`;
41
37
  }
42
38
  </script>
43
39
 
44
40
  <svelte:head>
45
41
  <title>{updatedTitle}</title>
46
42
 
47
- <meta
48
- name="robots"
49
- content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`}
50
- />
43
+ <meta name="robots" content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`} />
51
44
  <meta
52
45
  name="googlebot"
53
46
  content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`}
package/README.md CHANGED
@@ -11,10 +11,6 @@ Svelte Meta Tags is a plugin that makes managing your SEO easier in Svelte proje
11
11
 
12
12
  This library is inspired by [next-seo](https://github.com/garmeeh/next-seo)
13
13
 
14
- **Would you like to support this project?**
15
-
16
- <a href="https://www.buymeacoffee.com/oekazuma" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-orange.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
17
-
18
14
  **Table of Contents**
19
15
 
20
16
  - [Installing](#-installing)
@@ -1032,12 +1028,7 @@ interface RDFaMetaTag extends BaseMetaTag {
1032
1028
 
1033
1029
  ```ts
1034
1030
  interface HTTPEquivMetaTag extends BaseMetaTag {
1035
- httpEquiv:
1036
- | 'content-security-policy'
1037
- | 'content-type'
1038
- | 'default-style'
1039
- | 'x-ua-compatible'
1040
- | 'refresh';
1031
+ httpEquiv: 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh';
1041
1032
  name?: undefined;
1042
1033
  property?: undefined;
1043
1034
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-meta-tags",
3
- "version": "2.6.0",
3
+ "version": "2.6.3",
4
4
  "description": "Svelte Meta Tags is a plugin that makes managing your SEO easier in Svelte projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,36 +18,29 @@
18
18
  "url": "https://github.com/oekazuma/svelte-meta-tags"
19
19
  },
20
20
  "dependencies": {
21
- "schema-dts": "1.1.0"
21
+ "schema-dts": "^1.1.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@commitlint/cli": "16.3.0",
25
- "@commitlint/config-conventional": "16.2.4",
26
- "@semantic-release/changelog": "6.0.1",
27
- "@semantic-release/git": "10.0.1",
28
- "@sveltejs/adapter-auto": "1.0.0-next.42",
29
- "@sveltejs/kit": "1.0.0-next.330",
30
- "@typescript-eslint/eslint-plugin": "5.23.0",
31
- "@typescript-eslint/parser": "5.23.0",
32
- "cypress": "9.6.1",
33
- "eslint": "8.15.0",
34
- "eslint-config-prettier": "8.5.0",
35
- "eslint-plugin-cypress": "2.12.1",
36
- "eslint-plugin-svelte3": "4.0.0",
37
- "husky": "8.0.1",
38
- "lint-staged": "12.4.1",
39
- "prettier": "2.6.2",
40
- "prettier-plugin-svelte": "2.7.0",
41
- "semantic-release": "19.0.2",
42
- "svelte": "3.48.0",
43
- "svelte-check": "2.7.1",
44
- "svelte-preprocess": "4.10.6",
45
- "svelte2tsx": "0.5.10",
46
- "tslib": "2.4.0",
47
- "typescript": "4.6.4"
48
- },
49
- "peerDependencies": {
50
- "svelte": "^3.39.0"
24
+ "@playwright/test": "^1.25.1",
25
+ "@sveltejs/adapter-auto": "^1.0.0-next.71",
26
+ "@sveltejs/kit": "^1.0.0-next.460",
27
+ "@sveltejs/package": "^1.0.0-next.3",
28
+ "@typescript-eslint/eslint-plugin": "^5.36.1",
29
+ "@typescript-eslint/parser": "^5.36.1",
30
+ "eslint": "^8.23.0",
31
+ "eslint-config-prettier": "^8.5.0",
32
+ "eslint-plugin-svelte3": "^4.0.0",
33
+ "husky": "^8.0.1",
34
+ "lint-staged": "^13.0.3",
35
+ "prettier": "^2.7.1",
36
+ "prettier-plugin-svelte": "^2.7.0",
37
+ "svelte": "^3.49.0",
38
+ "svelte-check": "^2.9.0",
39
+ "svelte-preprocess": "^4.10.7",
40
+ "svelte2tsx": "^0.5.16",
41
+ "tslib": "^2.4.0",
42
+ "typescript": "^4.8.2",
43
+ "vite": "^3.1.0-beta.1"
51
44
  },
52
45
  "exports": {
53
46
  "./package.json": "./package.json",
@@ -56,4 +49,4 @@
56
49
  ".": "./index.js"
57
50
  },
58
51
  "svelte": "./index.js"
59
- }
52
+ }
package/types.d.ts CHANGED
@@ -116,12 +116,7 @@ interface RDFaMetaTag extends BaseMetaTag {
116
116
  }
117
117
 
118
118
  interface HTTPEquivMetaTag extends BaseMetaTag {
119
- httpEquiv:
120
- | 'content-security-policy'
121
- | 'content-type'
122
- | 'default-style'
123
- | 'x-ua-compatible'
124
- | 'refresh';
119
+ httpEquiv: 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh';
125
120
  name?: undefined;
126
121
  property?: undefined;
127
122
  }