react-helmet-async
Advanced tools
Comparing version 1.0.4 to 1.0.5
declare module 'react-helmet-async' { | ||
import * as React from 'react'; | ||
import { Helmet, HelmetData } from 'react-helmet'; | ||
export { Helmet }; | ||
export type FilledContext = { | ||
interface OtherElementAttributes { | ||
[key: string]: string | number | boolean | null | undefined; | ||
} | ||
type HtmlProps = JSX.IntrinsicElements['html'] & OtherElementAttributes; | ||
type BodyProps = JSX.IntrinsicElements['body'] & OtherElementAttributes; | ||
type LinkProps = JSX.IntrinsicElements['link']; | ||
type MetaProps = JSX.IntrinsicElements['meta']; | ||
export interface HelmetTags { | ||
baseTag: Array<any>; | ||
linkTags: Array<HTMLLinkElement>; | ||
metaTags: Array<HTMLMetaElement>; | ||
noscriptTags: Array<any>; | ||
scriptTags: Array<HTMLScriptElement>; | ||
styleTags: Array<HTMLStyleElement>; | ||
} | ||
export interface HelmetProps { | ||
async?: boolean; | ||
base?: any; | ||
bodyAttributes?: BodyProps; | ||
defaultTitle?: string; | ||
defer?: boolean; | ||
encodeSpecialCharacters?: boolean; | ||
htmlAttributes?: HtmlProps; | ||
onChangeClientState?: (newState: any, addedTags: HelmetTags, removedTags: HelmetTags) => void; | ||
link?: LinkProps[]; | ||
meta?: MetaProps[]; | ||
noscript?: Array<any>; | ||
script?: Array<any>; | ||
style?: Array<any>; | ||
title?: string; | ||
titleAttributes?: Object; | ||
titleTemplate?: string; | ||
} | ||
export class Helmet extends React.Component<HelmetProps> { | ||
} | ||
export interface HelmetData { | ||
base: HelmetDatum; | ||
bodyAttributes: HelmetHTMLBodyDatum; | ||
htmlAttributes: HelmetHTMLElementDatum; | ||
link: HelmetDatum; | ||
meta: HelmetDatum; | ||
noscript: HelmetDatum; | ||
script: HelmetDatum; | ||
style: HelmetDatum; | ||
title: HelmetDatum; | ||
titleAttributes: HelmetDatum; | ||
} | ||
export interface HelmetDatum { | ||
toString(): string; | ||
toComponent(): React.Component<any>; | ||
} | ||
export interface HelmetHTMLBodyDatum { | ||
toString(): string; | ||
toComponent(): React.HTMLAttributes<HTMLBodyElement>; | ||
} | ||
export interface HelmetHTMLElementDatum { | ||
toString(): string; | ||
toComponent(): React.HTMLAttributes<HTMLHtmlElement>; | ||
} | ||
export interface FilledContext { | ||
helmet: HelmetData; | ||
}; | ||
type ProviderProps = { | ||
interface ProviderProps { | ||
context?: {}; | ||
}; | ||
export const HelmetProvider: React.ComponentClass<ProviderProps>; | ||
export class HelmetProvider extends React.Component<ProviderProps> { | ||
static canUseDOM = canUseDOM; | ||
} | ||
} |
{ | ||
"name": "react-helmet-async", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Thread-safe Helmet for React 16+ and friends", | ||
@@ -19,37 +19,35 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@babel/runtime": "^7.3.4", | ||
"@babel/runtime": "^7.9.2", | ||
"invariant": "^2.2.4", | ||
"prop-types": "^15.7.2", | ||
"react-fast-compare": "^2.0.4", | ||
"react-fast-compare": "^3.0.1", | ||
"shallowequal": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.6.2", | ||
"@babel/core": "7.6.2", | ||
"@babel/plugin-proposal-class-properties": "7.5.5", | ||
"babel-eslint": "10.0.1", | ||
"babel-preset-kyt-react": "1.0.0-alpha.8d1d2ff9", | ||
"enzyme": "3.10.0", | ||
"enzyme-adapter-react-16": "1.15.1", | ||
"enzyme-to-json": "3.4.2", | ||
"eslint": "5.16.0", | ||
"eslint-config-airbnb": "17.1.0", | ||
"eslint-config-kyt": "1.0.0-alpha.8d1d2ff9", | ||
"eslint-config-prettier": "4.2.0", | ||
"eslint-plugin-import": "2.17.2", | ||
"eslint-plugin-jest": "22.3.0", | ||
"eslint-plugin-json": "1.4.0", | ||
"eslint-plugin-jsx-a11y": "6.2.1", | ||
"eslint-plugin-kyt": "1.0.0-alpha.8d1d2ff9", | ||
"eslint-plugin-prettier": "3.1.0", | ||
"eslint-plugin-react": "7.13.0", | ||
"eslint-plugin-react-hooks": "1.6.0", | ||
"jest": "24.5.0", | ||
"jsdom": "15.2.0", | ||
"microbundle": "^0.11.0", | ||
"prettier": "1.17.1", | ||
"@babel/cli": "7.8.4", | ||
"@babel/core": "7.9.0", | ||
"babel-eslint": "10.1.0", | ||
"babel-preset-kyt-react": "1.0.0-beta.37", | ||
"enzyme": "3.11.0", | ||
"enzyme-adapter-react-16": "1.15.2", | ||
"enzyme-to-json": "3.4.4", | ||
"eslint": "6.8.0", | ||
"eslint-config-airbnb": "18.1.0", | ||
"eslint-config-kyt": "1.0.0-beta.37", | ||
"eslint-config-prettier": "6.10.1", | ||
"eslint-plugin-import": "2.20.2", | ||
"eslint-plugin-jest": "23.8.2", | ||
"eslint-plugin-json": "2.1.1", | ||
"eslint-plugin-jsx-a11y": "6.2.3", | ||
"eslint-plugin-prettier": "3.1.3", | ||
"eslint-plugin-react": "7.19.0", | ||
"eslint-plugin-react-hooks": "3.0.0", | ||
"jest": "25.3.0", | ||
"jsdom": "15.2.1", | ||
"microbundle": "0.11.0", | ||
"prettier": "2.0.2", | ||
"raf": "3.4.1", | ||
"react": "16.8.4", | ||
"react-dom": "16.8.4", | ||
"rimraf": "^2.6.3" | ||
"react": "16.13.1", | ||
"react-dom": "16.13.1", | ||
"rimraf": "3.0.2" | ||
}, | ||
@@ -64,3 +62,3 @@ "peerDependencies": { | ||
"lint-fix": "eslint . --fix", | ||
"test": "KYT_ENV_TYPE=test jest --no-cache", | ||
"test": "KYT_ENV_TYPE=test jest", | ||
"test-watch": "npm run test -- --watch", | ||
@@ -67,0 +65,0 @@ "test-update": "npm run test -- -u", |
@@ -81,5 +81,3 @@ import React, { Component } from 'react'; | ||
throw new Error( | ||
`<${ | ||
child.type | ||
} /> elements are self-closing and can not contain children. Refer to our API for more information.` | ||
`<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.` | ||
); | ||
@@ -160,7 +158,3 @@ } | ||
!nestedChildren.some(nestedChild => typeof nestedChild !== 'string')), | ||
`Helmet expects a string as a child of <${ | ||
child.type | ||
}>. Did you forget to wrap your children in braces? ( <${child.type}>{\`\`}</${ | ||
child.type | ||
}> ) Refer to our API for more information.` | ||
`Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\`\`}</${child.type}> ) Refer to our API for more information.` | ||
); | ||
@@ -238,3 +232,5 @@ | ||
<Context.Consumer> | ||
{context => <Dispatcher {...newProps} context={context} />} | ||
{( | ||
context // eslint-disable-next-line react/jsx-props-no-spreading | ||
) => <Dispatcher {...newProps} context={context} />} | ||
</Context.Consumer> | ||
@@ -241,0 +237,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
218420
26
1061
+ Addedreact-fast-compare@3.2.2(transitive)
- Removedreact-fast-compare@2.0.4(transitive)
Updated@babel/runtime@^7.9.2
Updatedreact-fast-compare@^3.0.1