Upgrade Node and dependent packages

This commit is contained in:
Yuki Hattori 2020-05-21 00:52:49 +09:00
parent 04ddec1a40
commit 66a88a2ad0
12 changed files with 947 additions and 842 deletions

View File

@ -69,7 +69,7 @@ jobs:
test-node: test-node:
executor: executor:
name: node name: node
version: '12.16.1' # Specify LTS version for development version: '12.16.3' # Specify LTS version for development
steps: steps:
- test - test

2
.nvmrc
View File

@ -1 +1 @@
12.16.1 12.16.3

View File

@ -22,8 +22,7 @@
], ],
"prettier": { "prettier": {
"semi": false, "semi": false,
"singleQuote": true, "singleQuote": true
"trailingComma": "es5"
}, },
"scripts": { "scripts": {
"check:format": "yarn -s format -c", "check:format": "yarn -s format -c",
@ -32,13 +31,10 @@
"website": "yarn -s workspace @marp-team/marp-website serve" "website": "yarn -s workspace @marp-team/marp-website serve"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^6.8.0", "eslint": "^7.0.0",
"eslint-config-prettier": "^6.10.0", "eslint-config-prettier": "^6.11.0",
"eslint-plugin-react": "^7.19.0", "eslint-plugin-react": "^7.20.0",
"lerna": "^3.20.2", "lerna": "^3.21.0",
"prettier": "^1.19.1" "prettier": "^2.0.5"
},
"resolutions": {
"**/optimist/minimist": "^0.2.1"
} }
} }

View File

@ -21,7 +21,7 @@
"@static/charge": "^1.7.0", "@static/charge": "^1.7.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"github-slugger": "^1.3.0", "github-slugger": "^1.3.0",
"highlight.js": "^9.18.1", "highlight.js": "^10.0.3",
"react-innertext": "^1.1.5" "react-innertext": "^1.1.5"
} }
} }

View File

@ -6,7 +6,7 @@ import { Layout, contentStyle, generateTitle } from './layout.jsx'
export default function Blog({ environment, pages }) { export default function Blog({ environment, pages }) {
const articles = pages const articles = pages
.filter(p => p.path.startsWith('/blog/') && p.meta.title && p.meta.date) .filter((p) => p.path.startsWith('/blog/') && p.meta.title && p.meta.date)
.sort((a, b) => new Date(b.meta.date) - new Date(a.meta.date)) .sort((a, b) => new Date(b.meta.date) - new Date(a.meta.date))
return ( return (
@ -24,7 +24,7 @@ export default function Blog({ environment, pages }) {
> >
Blog Blog
</Heading> </Heading>
{articles.map(article => ( {articles.map((article) => (
<section <section
key={article.path} key={article.path}
css={css` css={css`

View File

@ -236,12 +236,12 @@ export const BlogLayout = ({ children, meta }) => {
// Slugified headings // Slugified headings
const slugger = new GitHubSlugger() const slugger = new GitHubSlugger()
const h1 = props => <Heading {...props} level={1} slugger={slugger} /> const h1 = (props) => <Heading {...props} level={1} slugger={slugger} />
const h2 = props => <Heading {...props} level={2} slugger={slugger} /> const h2 = (props) => <Heading {...props} level={2} slugger={slugger} />
const h3 = props => <Heading {...props} level={3} slugger={slugger} /> const h3 = (props) => <Heading {...props} level={3} slugger={slugger} />
const h4 = props => <Heading {...props} level={4} slugger={slugger} /> const h4 = (props) => <Heading {...props} level={4} slugger={slugger} />
const h5 = props => <Heading {...props} level={5} slugger={slugger} /> const h5 = (props) => <Heading {...props} level={5} slugger={slugger} />
const h6 = props => <Heading {...props} level={6} slugger={slugger} /> const h6 = (props) => <Heading {...props} level={6} slugger={slugger} />
return ( return (
<Layout <Layout

View File

@ -96,7 +96,7 @@ const colors = {
}, },
} }
export const Button = props => { export const Button = (props) => {
const color = colors[props.color] || colors.default const color = colors[props.color] || colors.default
const style = [ const style = [
button, button,

View File

@ -19,14 +19,14 @@ const container = css`
display: inline-block; display: inline-block;
` `
export const Marp = props => { export const Marp = (props) => {
const marp = new MarpCore({ const marp = new MarpCore({
container: null, container: null,
script: false, script: false,
printable: false, printable: false,
}) })
marp.markdown.normalizeLink = url => resolvePath(url) marp.markdown.normalizeLink = (url) => resolvePath(url)
const rendered = marp.render(props.markdown, { htmlAsArray: true }) const rendered = marp.render(props.markdown, { htmlAsArray: true })

View File

@ -6,7 +6,7 @@ import { Button } from '../components/button.js.jsx'
import { Code } from '../components/code.js.jsx' import { Code } from '../components/code.js.jsx'
import { Marp } from '../components/marp.js.jsx' import { Marp } from '../components/marp.js.jsx'
const example = (resolver = v => v) => const example = (resolver = (v) => v) =>
` `
--- ---
theme: gaia theme: gaia

View File

@ -2,7 +2,7 @@
import { css, jsx } from '@emotion/core' import { css, jsx } from '@emotion/core'
import { contentStyle } from '../layout.jsx' import { contentStyle } from '../layout.jsx'
const FeatureSections = props => ( const FeatureSections = (props) => (
<section {...props}> <section {...props}>
<section> <section>
<figure> <figure>

View File

@ -8,7 +8,7 @@ export const defaultImage = '/assets/og-image.png'
export const generateTitle = (...breadcrumbs) => export const generateTitle = (...breadcrumbs) =>
['Marp', ...breadcrumbs].reverse().join(' | ') ['Marp', ...breadcrumbs].reverse().join(' | ')
export const resolvePath = path => export const resolvePath = (path) =>
new URL( new URL(
path, path,
(() => { (() => {

1739
yarn.lock

File diff suppressed because it is too large Load Diff