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

fix: upgrade all the dependencies #22

Merged
merged 3 commits into from
Jan 29, 2020
Merged

Conversation

exKAZUu
Copy link
Contributor

@exKAZUu exKAZUu commented Jan 29, 2020

Close #23

  • Confirm CI is OK
  • Check storybook manually (though the story Use worker via CDN doesn't work both in master and this PR because the js file in the CDN is probably too old)
  • Test this PR in my projects

@exKAZUu exKAZUu force-pushed the update-deps branch 4 times, most recently from 8d1bdf0 to f91a8b3 Compare January 29, 2020 15:11
.eslintrc.yml Show resolved Hide resolved
.gitignore Show resolved Hide resolved
src/utils/parse.ts Outdated Show resolved Hide resolved
test/index.tsx Outdated
expect(
marp
.text()
.replace(/!function.*;/, '')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replacement is to remove the polyfill code. (I believe the tests should ignore the polyfill code)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marp Core's polyfill should never output in HTML, and be controlled in Marp React. We've already calling polyfill individually in useMarpReady() hook (via useLayoutEffect).
https://github.com/marp-team/marp-react/blob/master/src/hooks/marp-ready.ts

Revert change of test case, and disable script injection through script: false in the option defined by useMarpOptions() hook.

Copy link
Contributor Author

@exKAZUu exKAZUu Jan 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean using <Marp markdown={markdown} options={{ script: false }} /> in the tests? Or forcing to change script option to false in Marp.tsx (or marp-options.ts) ?
=>
I've tried adding a new change of the latter approach: #22 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And Marp Core peerDependency will require >= v1.0.1.

"@marp-team/marp-core": ">=0.6.0",

tsconfig.json Outdated Show resolved Hide resolved
@exKAZUu exKAZUu changed the title [WIP] fix: upgrade all the dependencies fixing tests and type errors [WIP] fix: upgrade all the dependencies Jan 29, 2020
@@ -24,6 +24,7 @@ export default function useMarpOptions(
identifier,
marpOptions: {
...(opts || {}),
script: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this change is what you wanted. (sorry if not)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly 👍

@yhatt yhatt merged commit d6f6ef0 into marp-team:master Jan 29, 2020
@exKAZUu exKAZUu deleted the update-deps branch January 29, 2020 17:34
@exKAZUu exKAZUu changed the title [WIP] fix: upgrade all the dependencies fix: upgrade all the dependencies Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn audit show some vulnerabilities with high severity
2 participants