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: Upgrade to support Gatsby 2 (finally πŸŽ‰) #238

Merged
merged 14 commits into from
Apr 17, 2019

Conversation

jessestuart
Copy link
Owner

What does this PR do?

Several fun things.

NB: this release is not backwards-compatible, due to changes in the Gatsby V2 API. If you'd like to continue using this source plugin with a Gatsby V1 site, pin to the v0.x package of this dependency. Otherwise, the primary change required for users is just in the shape of the graphql query β€” note the addition of the childrenFile field, e.g.,:

export const pageQuery = graphql`
  query($name: String) {
    allS3ImageAsset(filter: { EXIF: { DateCreatedISO: { eq: $name } } }) {
      edges {
        node {
          id
          EXIF {
            DateCreatedISO
            DateTimeOriginal
          }
          childrenFile {
            childImageSharp {
              thumbnailSizes: fluid(maxWidth: 512) {
                aspectRatio
                src
                srcSet
                sizes
              }
            }
          }
        }
      }
    }
  }

I've verified the aforementioned changes in my personal site and haven't had any issues; in fact, performance / caching are significantly improved β€” builds with 100+ high-resolution JPEG's that used to cause Netlify builds to time out now no longer cause a problem. Of course, YMMV; don't hesitate to let me know if you see otherwise.

@jessestuart jessestuart added the enhancement New feature or request label Apr 17, 2019
@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@04e428a). Click here to learn what that means.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #238   +/-   ##
=========================================
  Coverage          ?   72.72%           
=========================================
  Files             ?        2           
  Lines             ?       44           
  Branches          ?        6           
=========================================
  Hits              ?       32           
  Misses            ?       12           
  Partials          ?        0
Impacted Files Coverage Ξ”
src/utils.ts 100% <100%> (ΓΈ)
src/source-nodes.ts 62.5% <62.5%> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 04e428a...5ae4a52. Read the comment docs.

@jessestuart jessestuart merged commit 6069feb into master Apr 17, 2019
@jessestuart jessestuart deleted the jesse/gatsby_2_upgrade branch April 17, 2019 11:42
@jessestuart jessestuart restored the jesse/gatsby_2_upgrade branch April 17, 2019 11:42
jessestuart pushed a commit that referenced this pull request Apr 17, 2019
# [1.0.0](v0.2.133...v1.0.0) (2019-04-17)

* Merge pull request #238 from jessestuart/jesse/gatsby_2_upgrade ([6069feb](6069feb)), closes [#238](#238)

### Bug Fixes

* **deps:** Fix peer dependencies. ([5405b8f](5405b8f))

### Features

* **ci:** Clean up CI workflow + add job for tests. ([005176f](005176f))
* **docs:** Update documentation to account for breaking changes. ([5ae4a52](5ae4a52))
* **gatsby:** Upgrade to gatsby v2, cont. ([14f6362](14f6362))
* **tests:** Add Codecov integration. ([91335d5](91335d5))
* **tests:** Basic test coverage for sourceNodes integration. ([85ed2d3](85ed2d3))
* **upgrade:** [wip] ([bc3884f](bc3884f))
* **upgrade:** Cleanup + test coverage. ([355f484](355f484))
* Upgrade to gatsby v2 APIs. ([6e3c828](6e3c828))

### BREAKING CHANGES

* Trigger a breaking change commit for semantic-release.

This is due to upstream breaking changes in Gatsby V2, e.g. within the
`gatsby-image` API.

* ref(cleanup): Pre-PR cleanup.

* chore(deps): update dependency prettier to v1.17.0

* ref(cleanup)

Signed-off-by: Jesse Stuart <hi@jessestuart.com>

* feat(tests): Basic test coverage for sourceNodes integration.

Signed-off-by: Jesse Stuart <hi@jessestuart.com>

* feat(docs): Update documentation to account for breaking changes.

Signed-off-by: Jesse Stuart <hi@jessestuart.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
@jessestuart
Copy link
Owner Author

πŸŽ‰ This PR is included in version 1.0.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

@jessestuart jessestuart deleted the jesse/gatsby_2_upgrade branch April 17, 2019 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Unable to find plugin "gatsby-source-s3-image"
3 participants