Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
🔒 lock gatsby-transformer-remark version
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Apr 22, 2020
1 parent 582fe79 commit d2d17bb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion @antv/gatsby-theme-antv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"gatsby-remark-reading-time": "^1.0.1",
"gatsby-source-filesystem": "^2.1.22",
"gatsby-source-github": "^0.0.2",
"gatsby-transformer-remark": "^2.6.24",
"gatsby-transformer-remark": "2.7.3",
"git-url-parse": "^11.1.2",
"i18next": "^19.0.0",
"indent-string": "^4.0.0",
Expand Down
18 changes: 8 additions & 10 deletions @antv/gatsby-theme-antv/site/templates/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { groupBy } from 'lodash-es';
import { useTranslation } from 'react-i18next';
import Drawer from 'rc-drawer';
import { useMedia } from 'react-use';
import RehypeReact from 'rehype-react';
import Article from '../components/Article';
import SEO from '../components/Seo';
import Tabs from '../components/Tabs';
Expand Down Expand Up @@ -136,14 +137,17 @@ export default function Template({
}
const {
frontmatter,
html,
htmlAst,
fields: { slug },
parent: { relativePath },
} = markdownRemark;
const {
siteMetadata: { examples = [], githubUrl, playground },
} = site;
const { t, i18n } = useTranslation();
const renderAst = new RehypeReact({
createElement: React.createElement,
}).Compiler;
const groupedEdges = groupBy(
edgesInExamples,
({
Expand Down Expand Up @@ -299,10 +303,7 @@ export default function Template({
</div>
<div className={styles.galleryContent}>
<h1>{frontmatter.title}</h1>
<div
/* eslint-disable-next-line react/no-danger */
dangerouslySetInnerHTML={{ __html: html }}
/>
<div>{renderAst(htmlAst)}</div>
{Categories.map((category: string, i) => (
<div key={i}>
{category !== 'OTHER' && (
Expand Down Expand Up @@ -372,10 +373,7 @@ export default function Template({
</a>
</Tooltip>
</h1>
<div
/* eslint-disable-next-line react/no-danger */
dangerouslySetInnerHTML={{ __html: html }}
/>
<div>{renderAst(htmlAst)}</div>
<Tabs
slug={exampleRootSlug}
active={activeTab}
Expand Down Expand Up @@ -473,7 +471,7 @@ export const pageQuery = graphql`
) {
edges {
node {
html
htmlAst
fields {
slug
}
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7244,10 +7244,10 @@ gatsby-telemetry@^1.2.5:
stack-utils "1.0.2"
uuid "3.4.0"

gatsby-transformer-remark@^2.6.24:
version "2.7.4"
resolved "https://registry.npmjs.org/gatsby-transformer-remark/-/gatsby-transformer-remark-2.7.4.tgz#20ce5e26716f7d6888c424b855f5cd7c343801b8"
integrity sha512-p/eMLpL5KcRM7ZBPk/C4TE95woS5aqzqkpyRPrATf03MbpAEQFCwpfvCf2P62IKF2PBMMMtd1LmS/1NZV+On2w==
gatsby-transformer-remark@2.7.3:
version "2.7.3"
resolved "https://registry.npmjs.org/gatsby-transformer-remark/-/gatsby-transformer-remark-2.7.3.tgz#11828281a8ec979a5dfbe1d17f99f83c88c78035"
integrity sha512-Q88BTKI5g2ITE61oKh7LD6F0ZG7aKw9Zulwo2fIYrPfvTI7WeLo/dG8XHmma3hBbvuK1hmPvtZVRNEDnhqB10w==
dependencies:
"@babel/runtime" "^7.8.7"
bluebird "^3.7.2"
Expand Down Expand Up @@ -11367,9 +11367,9 @@ nlcst-to-string@^2.0.0:
integrity sha512-3x3jwTd6UPG7vi5k4GEzvxJ5rDA7hVUIRNHPblKuMVP9Z3xmlsd9cgLcpAMkc5uPOBna82EeshROFhsPkbnTZg==

node-abi@^2.7.0:
version "2.15.0"
resolved "https://registry.npmjs.org/node-abi/-/node-abi-2.15.0.tgz#51d55cc711bd9e4a24a572ace13b9231945ccb10"
integrity sha512-FeLpTS0F39U7hHZU1srAK4Vx+5AHNVOTP+hxBNQknR/54laTHSFIJkDWDqiquY1LeLUgTfPN7sLPhMubx0PLAg==
version "2.16.0"
resolved "https://registry.npmjs.org/node-abi/-/node-abi-2.16.0.tgz#7df94e9c0a7a189f4197ab84bac8089ef5894992"
integrity sha512-+sa0XNlWDA6T+bDLmkCUYn6W5k5W6BPRL6mqzSCs6H/xUgtl4D5x2fORKDzopKiU6wsyn/+wXlRXwXeSp+mtoA==
dependencies:
semver "^5.4.1"

Expand Down

0 comments on commit d2d17bb

Please sign in to comment.