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

chore: update ipfs dep #267

Merged
merged 3 commits into from
Aug 30, 2019
Merged

chore: update ipfs dep #267

merged 3 commits into from
Aug 30, 2019

Conversation

alanshaw
Copy link

@alanshaw alanshaw commented Aug 6, 2019

This PR updates ipfs to 0.37.0.

Due to the constructor changes in this version the examples have also been updated.

This required an update of react-live to a version that supports async/await. Unfortunately in this new version styling for syntax highlighting is done by "theme" objects not CSS so there are a bunch of changes that are fallout from this.

Notably, I've updated the syntax-highlighter component to use the same highlight method as react-live so that we can re-use the theme object and not also import the theme as a CSS file.

I also switchied to using the Prism instance provided by prism-react-renderer that react-live uses instead of importing prismjs. This should reduce overall bundle size.

Before After
Screenshot 2019-08-06 at 10 34 08 Screenshot 2019-08-06 at 10 16 23
Screenshot 2019-08-06 at 10 16 46 Screenshot 2019-08-06 at 10 16 37

This PR updates ipfs to 0.37.0-rc.0.

Due to the constructor changes in this version the examples have also been updated.

This required an update of `react-live` to a version that supports async/await. Unfortunately in this new version styling for syntax highlighting is done by "theme" objects not CSS so there are a bunch of changes that are fallout from this.

Notably, I've updated the `syntax-highlighter` component to use the same highlight method as `react-live` so that we can re-use the theme object and not also import the theme as a CSS file.

I also switchied to using the `Prism` instance provided by `prism-react-renderer` that `react-live` uses instead of importing `prismjs`. This should reduce overall bundle size.

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Copy link
Contributor

@lidel lidel left a comment

Choose a reason for hiding this comment

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

lgtm, but we probably should switch this PR to release version:

package.json Outdated Show resolved Hide resolved
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
package.json Outdated
@@ -35,17 +35,16 @@
"gatsby-plugin-postcss": "^2.0.0",
"gatsby-plugin-react-helmet": "^3.0.1",
"intersection-observer": "~0.5.0",
"ipfs": "~0.36.1",
"ipfs": "^0.37.0",
Copy link
Contributor

@lidel lidel Aug 15, 2019

Choose a reason for hiding this comment

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

@alanshaw CI fails with Dependency ipfs had version ^0.37.0 - development (e.g. < 1.0.0) versions should start with a ~

Suggested change
"ipfs": "^0.37.0",
"ipfs": "~0.37.0",

(probably needs update of package-lock too)

@lidel
Copy link
Contributor

lidel commented Aug 20, 2019

@PedroMiguelSS are you still around for reviewing and merging changes to the website, or should we find a new maintainer? :)

@alanshaw
Copy link
Author

alanshaw commented Aug 30, 2019

Merging as we have an approving review, tests are passing and 0.37 has been out for ages now and the examples really need to be changed!

@alanshaw alanshaw merged commit 67b0970 into master Aug 30, 2019
@alanshaw alanshaw deleted the chore/update-ipfs-dep-20190806 branch August 30, 2019 10:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants