Skip to content

Commit

Permalink
fix: upgrade all the dependencies fixing tests and type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Jan 29, 2020
1 parent ab45842 commit f91a8b3
Show file tree
Hide file tree
Showing 8 changed files with 3,873 additions and 3,155 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins:
rules:
'@typescript-eslint/explicit-function-return-type': off
'@typescript-eslint/no-explicit-any': off
import/extensions: off
import/no-extraneous-dependencies: off
import/no-unresolved: off
import/order:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ lib/
module/
types/
storybook-static/
.idea/

# Created by https://www.gitignore.io/api/node,windows,macos,linux,sublimetext,emacs,vim,visualstudiocode
# Edit at https://www.gitignore.io/?templates=node,windows,macos,linux,sublimetext,emacs,vim,visualstudiocode
Expand Down
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,45 @@
"dependencies": {
"camelcase": "^5.3.1",
"he": "^1.2.0",
"htm": "^2.2.1",
"nanoid": "^2.0.4",
"style-to-object": "^0.2.3"
"htm": "^3.0.2",
"nanoid": "^2.1.10",
"style-to-object": "^0.3.0"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@marp-team/marp-core": "^0.12.1",
"@storybook/addon-knobs": "^5.1.11",
"@storybook/addons": "^5.1.11",
"@storybook/react": "^5.1.11",
"@types/enzyme": "^3.10.3",
"@types/jest": "^24.0.18",
"@types/react": "^16.9.2",
"@types/storybook__react": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"@babel/core": "^7.8.3",
"@marp-team/marp-core": "^1.0.1",
"@storybook/addon-knobs": "^5.3.9",
"@storybook/addons": "^5.3.9",
"@storybook/react": "^5.3.9",
"@types/enzyme": "^3.10.4",
"@types/jest": "^25.1.0",
"@types/react": "^16.9.19",
"@types/storybook__react": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"babel-loader": "^8.0.6",
"codecov": "^3.5.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "6.2.2",
"codecov": "^3.6.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "6.8.0",
"eslint-config-airbnb": "18.0.1",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-import": "2.18.2",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "2.20.0",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-react-hooks": "^2.0.1",
"jest": "^24.9.0",
"jest-junit": "^8.0.0",
"eslint-plugin-react": "7.18.0",
"eslint-plugin-react-hooks": "^2.3.0",
"jest": "^25.1.0",
"jest-junit": "^10.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"rimraf": "^3.0.0",
"ts-jest": "^24.0.2",
"ts-loader": "^6.0.4",
"typescript": "^3.5.3",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7",
"prettier": "^1.19.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"rimraf": "^3.0.1",
"ts-jest": "^25.0.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.5",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"worker-loader": "^2.0.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ export default function parse(htmlStr: string) {
const lines = htmlStr.split('\n')
const breaks = [...Array(lines.length - 1)].map(() => '\n')

return html(lines, ...breaks)
return html(lines as any, ...breaks)
}
4 changes: 3 additions & 1 deletion stories/marp.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ import MarpWorker from '../src/worker'
MarpWorker()

// Dummy export for TypeScript compiler
export default () => {}
export default () => {
/* do nothing */
}
16 changes: 13 additions & 3 deletions test/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EventEmitter from 'events'
import { EventEmitter } from 'events'
import { mount, ReactWrapper } from 'enzyme'
import React from 'react'
import { act } from 'react-dom/test-utils'
Expand Down Expand Up @@ -50,7 +50,12 @@ test({
`.trim()

const marp = mount(<Marp markdown={markdown} />)
expect(marp.text().trim()).toBe(
expect(
marp
.text()
.replace(/!function.*;/, '')
.trim()
).toBe(
`
test({
foo: 0,
Expand Down Expand Up @@ -181,7 +186,12 @@ describe('MarpWorker', () => {
act(() => {
worker.interrupt(false)
})
expect(marp.text().trim()).toBe('3')
expect(
marp
.text()
.replace(/!function.*;/, '')
.trim()
).toBe('3')

// 2nd rendering will be skipped
expect(worker.postQueue).not.toBeCalledWith(expect.arrayContaining(['2']))
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"lib": ["es2016", "es2017", "dom"],
"moduleResolution": "node",
"noImplicitAny": false,
"skipLibCheck": true,
"sourceMap": false,
"strict": true,
"target": "es2015",
Expand Down
Loading

0 comments on commit f91a8b3

Please sign in to comment.