Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-theme-kb): upgrade to Gatsby v4 #37

Merged
merged 9 commits into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions demo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.4.2](https://github.com/hikerpig/gatsby-project-kb/compare/demo@1.4.2-alpha.1...demo@1.4.2) (2022-02-06)

**Note:** Version bump only for package demo





# [1.4.0](https://github.com/hikerpig/gatsby-project-kb/compare/demo@1.3.8...demo@1.4.0) (2021-10-24)


Expand Down
4 changes: 2 additions & 2 deletions demo/content/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
- [X] Responsive design
- [X] Collapsable sidebar tree
- [X] Support nested folder without the chore of manually adding link definitions
- [ ] Make Mobile TOC view available in mobile
- [ ] Better style for graph-view
- [X] Make Mobile TOC view available in mobile
- [X] Better style for graph-view
- [ ] Knobs to config the force graph in graph-view
6 changes: 3 additions & 3 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.4.0",
"version": "1.4.2",
"name": "demo",
"license": "MIT",
"scripts": {
Expand All @@ -10,10 +10,10 @@
"clean": "gatsby clean"
},
"dependencies": {
"gatsby": "^3.12.0",
"gatsby": "^4.4.0",
"gatsby-plugin-no-sourcemaps": "^2.8.0",
"gatsby-remark-prismjs": "^3.13.0",
"gatsby-theme-kb": "^0.8.0",
"gatsby-theme-kb": "^0.9.0",
"prismjs": "^1.23.0",
"react": "^17",
"react-dom": "^17"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"gatsby": "^3.0.0",
"gatsby": "^4.0.0",
"lerna": "^4.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/gatsby-remark-wiki-link/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.4.0](https://github.com/hikerpig/gatsby-project-kb/compare/gatsby-remark-wiki-link@0.4.0-alpha.0...gatsby-remark-wiki-link@0.4.0) (2022-02-06)

**Note:** Version bump only for package gatsby-remark-wiki-link





## [0.3.1](https://github.com/hikerpig/gatsby-project-kb/compare/gatsby-remark-wiki-link@0.3.0...gatsby-remark-wiki-link@0.3.1) (2021-10-24)

**Note:** Version bump only for package gatsby-remark-wiki-link
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-remark-wiki-link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-remark-wiki-link",
"version": "0.3.1",
"version": "0.4.0",
"description": "A gatsby remark plugin for parsing wiki-link in markdown",
"author": "hikerpig <hikerpigwinnie@gmail.com>",
"homepage": "https://github.com/hikerpig/gatsby-project-kb#readme",
Expand Down
10 changes: 7 additions & 3 deletions packages/gatsby-remark-wiki-link/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import visit from 'unist-util-visit'
import * as visit from 'unist-util-visit'
import { Node } from 'unist'
import { LinkReference, Definition, Link, Text, StaticPhrasingContent } from 'mdast'
import slugify from 'slugify'
Expand Down Expand Up @@ -63,7 +63,7 @@ const processWikiLinks = (
if (node.referenceType !== 'shortcut') {
return
}

const definition = definitions[node.identifier]
const linkInfo = definition ? getLinkInfo(definition): null
const linkUrl = linkInfo ? linkInfo.linkUrl: definition?.url
Expand Down Expand Up @@ -121,4 +121,8 @@ const processWikiLinks = (
})
}

export default processWikiLinks
// default export may have issue being loaded by gatsby-plugin-mdx
// see https://github.com/gatsbyjs/gatsby/issues/34015
// export default processWikiLinks

export = processWikiLinks
3 changes: 1 addition & 2 deletions packages/gatsby-remark-wiki-link/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"module": "commonjs",
"declaration": true,
"inlineSourceMap": false,
"esModuleInterop": true,
"lib": ["es5", "dom"],
"types": ["jest", "node"],
"typeRoots": ["node_modules/@types"],
Expand All @@ -17,4 +16,4 @@
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**"],
"compileOnSave": false
}
}
8 changes: 8 additions & 0 deletions packages/gatsby-theme-kb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.9.0](https://github.com/hikerpig/gatsby-project-kb/compare/gatsby-theme-kb@0.9.0-alpha.4...gatsby-theme-kb@0.9.0) (2022-02-06)

**Note:** Version bump only for package gatsby-theme-kb





# [0.8.0](https://github.com/hikerpig/gatsby-project-kb/compare/gatsby-theme-kb@0.7.8...gatsby-theme-kb@0.8.0) (2021-10-24)


Expand Down
32 changes: 16 additions & 16 deletions packages/gatsby-theme-kb/package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"name": "gatsby-theme-kb",
"description": "A Gatsby theme for publishing Knowledge Base.",
"version": "0.8.0",
"version": "0.9.0",
"dependencies": {
"@gatsby-project-kb/transformer-wiki-references": "^0.3.0",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@reecelucas/react-use-hotkeys": "^1.3.1",
"@tippyjs/react": "^4.2.5",
"autoprefixer": "^10.3.3",
"@tippyjs/react": "^4.2.6",
"autoprefixer": "^10.4.0",
"classnames": "^2.3.1",
"downshift": "^6.1.7",
"flexsearch": "^0.6.32",
"gatsby-plugin-local-search": "^2.0.1",
"gatsby-plugin-mdx": "^2.13.0",
"gatsby-plugin-postcss": "^4.13.0",
"gatsby-plugin-purgecss": "^6.0.2",
"gatsby-plugin-react-helmet": "^4.13.0",
"gatsby-plugin-mdx": "^3.4.0",
"gatsby-plugin-postcss": "^5.4.0",
"gatsby-plugin-purgecss": "^6.1.0",
"gatsby-plugin-react-helmet": "^5.4.0",
"gatsby-plugin-tocbot": "^0.1.0",
"gatsby-plugin-typescript": "^4.4.0",
"gatsby-react-router-scroll": "^4.13.0",
"gatsby-react-router-scroll": "^5.4.0",
"gatsby-remark-double-parenthesis-link": "^0.1.5",
"gatsby-remark-wiki-link": "^0.3.1",
"gatsby-source-filesystem": "^3.13.0",
"gatsby-remark-wiki-link": "^0.4.0",
"gatsby-source-filesystem": "^4.4.0",
"note-graph": "^0.3.0",
"path-browserify": "^1.0.1",
"postcss": "^8.3.6",
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"tailwindcss": "^2.2.9",
"use-breakpoint": "^2.0.2",
"use-breakpoint": "^3.0.0",
"use-dark-mode": "^2.3.1"
},
"devDependencies": {
"@types/node": "^16.7.10",
"prettier": "2.3.2",
"typescript": "^4.4.2"
"@types/node": "^17.0.1",
"prettier": "2.5.1",
"typescript": "^4.5.4"
},
"peerDependencies": {
"gatsby": "^3.12.0"
"gatsby": "^4.4.0"
},
"keywords": [
"gatsby",
Expand Down