Skip to content

Commit

Permalink
[v2] merge master into v2 (gatsbyjs#5451)
Browse files Browse the repository at this point in the history
* Use index within container

Confusing as to what is being asked. Later, the docs say to `import Container from "../components/container";`

* Pass through GTM environment params if present

Signed-off-by: Spencer Sanchez <[email protected]>

* Add abinavseelan.com to Showcase

* Add Dovetail (dovetailapp.com) to website examples

Thanks for creating Gatsby and for all of your hard work! We’ve enjoyed building our new marketing website with it.

* change link of `gatsby-advanced-blog` in docs

* Remove outdated contributing notes from gatsby-remark-prismjs

* Typo: Return to wrong file

I was doing the gatsby.js tutorial and I was running into one issue, the tutorial said to return to index.js, but it should be to my-files.js, I eventually figured out that this was probably just a typo, but for a long time I kept changing my index.js file and didn't understand what I was doing wrong, turns out I was editing the wrong file. For so far I have enjoyed gatsby.js, I want to use it for my personal portfolio.

* Fix distance between masthead and the icon (gatsbyjs#5068)

On mobile, the masthead is overlapping with the Gatsby icon.

* Update CONTRIBUTING.md

* Update README.md

Per issue gatsbyjs#5073

* Add better-queue to dependencies

* Remove index.js for more consistent paths

* removing "a"

* pre-inferring data sanitazation (gatsbyjs#5050)

* extractFieldExamples: omit not defined fields

this is especially helpful with ___NODE fields - plugins/users don't have to test if there are any values and be confident that empty ___NODE values or arrays will just be omitted and not error out during bootstrap

* sanitize field owner key when using createNodeField with name containing ___NODE

this fixes issue with inferring fieldOwners types - gatsby would try to link to not existing nodes

* Add getRenderer method (gatsbyjs#5017)

* Add getRenderer method

Signed-off-by: slorber <[email protected]>

* upgrade example versions

Signed-off-by: slorber <[email protected]>

* change name to renderer

* Change name to replaceHydrateFunction

* document replaceHydrateFunction

* fix(gatsby): remove `.js` suffixes in require() to allow transpilation (gatsbyjs#5087)

In earlier v1, one could write files such as `gatsby-config` in typescript and
use babel to transpile the file into js on the fly via
`babel-node --presets @babel/preset-typescript --extensions '.ts' gatsby
develop`. However, it's no longer possible in recent releases.

The reason is that the current implementation put a `.js` suffix on each
require(`gatsby-${env}.js`), which blocks `gatsby-{$env}` files being transpiled
from other languages via babel. The PR addresses this problem by removing the
unnecessary suffix and preserving the integrity.

Signed-off-by: Alvis HT Tang <[email protected]>

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* stylus plugin tests

Signed-off-by: Jan Winterfeld <[email protected]>

* add learnstorybook.com to showcase

* Bump yargs version to get help and version for free by default

* Update manifest extension to .webmanifest

Reason: https://sonarwhal.com/docs/user-guide/rules/rule-manifest-file-extension/

* Updated link to file

* team development workflows (gatsbyjs#5084)

* team development workflows

* Small typos

* Revert "Small typos"

This reverts commit ee7bc36.

* Revert "team development workflows"

This reverts commit a9e5498.

* move doc to blog

* excerpt

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Hyperlinks, optionality, and "easy" (gatsbyjs#5154)

Added a few changes. This document needs to be reorganized eventually; I just want to add these notes in the fastest way possible now so I don't forget them.

* Add bartvanderwaerden.com to showcase (gatsbyjs#5152)

* I guess I found the wrong word... (gatsbyjs#5088)

I think line 308's `src/pages/my-files.js` is wrong.
It should be `src/pages/index.js` isn't it?

* Add two missing spaces (minor validation error) (gatsbyjs#5150)

My previous commit missed adding a space after the backup blank `src=""` and `alt=""` attributes. This causes an HTML validation error when no `alt` value is supplied.

This commit simply adds those missing spaces (i.e. `src="" ` and `alt="" `) so there will always be a space between attributes.

* Adjust image processing example queries (gatsbyjs#5158)

* adjust queries to not use id as way to select by filenames

this will stop working in gatsby v2

* add link to code

* Update KaTeX to 0.9.0 (gatsbyjs#4712)

* Update KaTeX to 0.9.0

* Update snapshots

* DCO bye-bye (gatsbyjs#5165)

* source-contentful: Add environment support (gatsbyjs#5142)

* source-contentful: Add environment support

* fix lint

* fix default locale logix

* log error

* Update lock file

* Ulog the error

* Update package-lock.json

* revert lock changes, test shrinkwrap

* remove shrinkwrap, it's unused after all, add yarn resolutions

* cleanup debug console logs

* Link an example that uses gatsby-transformer-json (gatsbyjs#5169)

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Update RNW plugin and example (gatsbyjs#5174)

* Update RNW example to use new plugin version

Signed-off-by: slorber <[email protected]>

* Update React in example

Signed-off-by: slorber <[email protected]>

* Enhance RNW example

Signed-off-by: slorber <[email protected]>

* Add link to online demo

Signed-off-by: slorber <[email protected]>

* Add screenshot

Signed-off-by: slorber <[email protected]>

* Update createRemoteFileNode documentation (gatsbyjs#5171)

* Update createRemoteFileNode documentation

* Update README.md

* Fix replaceHydrateFunction doc (gatsbyjs#5175)

* Fix replaceHydrateFunction doc

* Add spaces

* Update "how gatsby works" documentation (gatsbyjs#243) (gatsbyjs#5181)

* Add a note about CNAME file in `static`

* Fix typo in the .eslintrc file (gatsbyjs#5173)

* added my site (gatsbyjs#5172)

* Added rafael.do (gatsbyjs#5199)

* Add Eviction Free NYC blog post and link to site (gatsbyjs#5159)

* Add evictionfreenyc.org to showcase

* Add Eviction Free NYC blog post

* Fixing a typo

* Copy edits

* Self-contained images

* [Ready 4 Review] SQIP - Vectorized primitive image previews (gatsbyjs#4205)

* first working version with Contentful assets only

* add readme

* respect width, height, aspect ratio, cropping, resize focus and background

* add support for gatsby-transformer-sharp

* integrate in gatsbygram

* avoid useless regeneration cus contentDigest changes

* proper way to get absolute path to ImageSharp nodes

* queue preview generation and cache results on disk

* upgrade to latest node-sqip to get rid of the GoLang dependency

* replace custom svg data uri function with package

* prepare images via sharp plugin and allow sharp transformations

* load cached svg properly from disk

* fix queue resolving to early

* set contentful images to 400px

* implement new sharp transformation awareness feature

* WIP - extract generation and write first pseudo test

* fix styling for gatsbygram post detail

* finalize unit tests for actual sqip implementation

* use 256px input image width to match sqip/primitive default

* add using-sqip example page

* some cleanup

* clean up example and enhance polaroid effect

* fix using-sqip dependency

* remove base64 since it was not implemented and is bad for compression

* remove sqip from gatsbygram example

* simplify tests

* Small change to trigger build

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Add tutorial on creating a source plugin

* Format

* Add extensions to .eslintrc (gatsbyjs#5206)

- Add .json or .yaml extension to .eslintrc files

```shell
$ cd ./packages
$ rename 's/.eslintrc/.eslintrc.yaml/' `find . -name .eslintrc`
$ cd ../
$ rename 's/.eslintrc/.eslintrc.json/' `find . -name .eslintrc`
```

- Tweak plopfile.js to add .json extension to examples to be generated

Signed-off-by: Masato Ohba <[email protected]>

* Add gatsby-starter-bulma-storybook to the starters list (gatsbyjs#5208)

Signed-off-by: Gianni Valdambrini <[email protected]>

* fix: style and typo correction

- Minor style tweaks (e.g. unlinked "pixabay.com" => "Pixabay")
- Typo patrol
- De-British some of the language (my apologies to the letter U)

* Toodle-pip British u

* Adjust heading hierarchy

* Use relative urls for gatsbyjs.org links

* Pull last few sections up a level

* Minor edits and consistency tweaks

* Cleanup example for the createPages API (gatsbyjs#5216)

* Update with @shannonbux's edits

* Additional header

* Bumps gatsby-plugin-mailchimp to 2.2.2 bc we updated its API to be more user friendly (gatsbyjs#5215)

* Add YAML data file for site showcase (gatsbyjs#5227)

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Update to Gitlab pages deploy (gatsbyjs#5243)

* Update to Gitlab pages deploy

Gitlab pages now include a Gatsby template for CI, which makes it a lot easier to add. Have updated the documentation to reflect this.

* Edit

* Update README.md (gatsbyjs#5247)

Adding explanation about available option `offsetY` to solve issue gatsbyjs#5061
Signed-off-by: Robin Cussol <[email protected]>

* [gatsby-source-contentful] Fix storing new sync token (gatsbyjs#5252)

* Add https://emoji.tinder.com/ to showcase (gatsbyjs#5257)

* Fix typo (gatsbyjs#5241)

* Link to website in contributing.md (gatsbyjs#5249)

* Publish

 - [email protected]
 - [email protected]
 - [email protected]

* Bump versions of packages that failed to publish earlier

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Add top padding for tablet masthead (gatsbyjs#5266)

* wordpress-source-plugin-tutorial (gatsbyjs#5235)

* wordpress-source-plugin-tutorial

Not sure if I got all the code samples formatted correctly.

Still need to edit the index.js page so the <p> tags don't render!!

Then, need a screenshot of the final result without <p> tags!

* removed unnecessary backticks and corrected link to Part 7 of tutorial

* Make links relative

* Use graphql for syntax highlighting + minor copy edits

* Image Tutorial (gatsbyjs#5236)

* Image Tutorial

Would be nice to add a screenshot of the finished result.

Eventually, a really cool image tutorial could include GIFs.

* Remove unneeded backticks around code

* Add example gif

* Fix image links

* added Gatsbygram link, fixed assumption spelling

* we --> you

* Added some more edits of my own

wasn't sure whether you wanted lines 153-155 to stay the same

* Changed back to previous lines 149-159

I accidentally deleted necessary stuff in my previous commit, so I'm just starting over

* Edited comments per Mike's suggestions

* Small tweaks

* Add site (gatsbyjs#5268)

* readme: Add aQuICK QC landing page site

* readme: Kill old event specific page

* Quick fix for wordpress source plugin tutorial (gatsbyjs#5276)

Fragments don't work on Graphiql

* Minor fix on wordpress source plugin tutorial (gatsbyjs#5277)

removed typo

* Update wordpress-source-plugin-tutorial.md (gatsbyjs#5278)

* add missing underscore to graphiql URL (gatsbyjs#5275)

* add missing underscore to graphiql

* Update image-tutorial.md

* Update wordpress-source-plugin-tutorial.md (gatsbyjs#5279)

* Update image-tutorial.md (gatsbyjs#5281)

* Update source-plugin-tutorial.md (gatsbyjs#5283)

* add missing .npmignore and .babelrc to sqip transformer (gatsbyjs#5282)

* Publish

 - [email protected]

* Fix typos in source-plugin-tutorial (gatsbyjs#5284)

* Add workshop-in-the-woods.com to the showcase (gatsbyjs#5291)

* Update README.md (gatsbyjs#5288)

* Update README.md

Missing curly bracket

* formatting

* Fix doc typo (gatsbyjs#5294)

*  fix: chang the url of blog in readme 🐛 (gatsbyjs#5302)

* feat: ✨ add gatsby-new-blog plugin

* docs: update showcase 📝

* flag importance of plugin order for prism-js vs embed-snippet (gatsbyjs#5313)

If gatsby-remark-prism-js is declared before gatsby-remark-embed-snippet, the latter will not pick up the `embed:example.js` syntax because it is looking for an inline-code node and it will have been transformed into a p node by gatsby-remark-prism-js. This needs to be noted as this is far from obvious.

* Add manifest.webmanifest to staticFileGlobs (gatsbyjs#5300)

Signed-off-by: Kaue Machado <[email protected]>

* Publish

 - [email protected]
 - [email protected]
 - [email protected]

* Fix post path comment (gatsbyjs#5295)

* Fix post path

* Fix

* Expand docs for custom components (gatsbyjs#5315)

* Expand docs for custom components

The docs for custom components only mention defining custom components in the markdown, but don't address one of the most useful aspects - that you can map generic markdown tags/elements to your own components. I've expanded the docs to point this out and added a simple example.

* Typo

* plugin-feed: Note feed xml file is production only (gatsbyjs#5305)

Add note that the rss.xml feed is only generated in production.

* Fixing grammar around CSS Modules (gatsbyjs#5286)

* Fix broken link to tutorial for building blog (gatsbyjs#5273)

I don't know if it's the original article but at least it looks fairly similar

* added develop command options to use custom key and certs (gatsbyjs#5056)

* added develop command options to use custom key and certs

* fixed typos in doc

* added condition to make sure both --key-file and --cert-file are present

* - passing https flag results in automatic https certs [devcert]
- --cert-file, --key-file, and --https flags can be used together for custom ssl
- if all flags needed for custom ssl are not present an error is displayed to the user
- if provided --cert-file and --key-file paths are not real files, node gives a rejection
- modified docs to express current behavior

* Add portfolio to the created with gatsby section (gatsbyjs#5331)

* Documentation for images in page components gatsbyjs#3380 (gatsbyjs#4191)

* adding first draft

* adding info about fragments

* cleaning up language

* renaming file, this commit is for issue gatsbyjs#3380

* technical edits on working with images in gatsby

* technical edits on working with images in gatsby

* punctuation and verb tense edits

* more punctuation and grammar

* commas

* Add new docs page to sidebar (gatsbyjs#5339)

* New issue, feature and question template (gatsbyjs#5274)

* Basic template for new issues

* updated issue template

* updated issue template

* Update ISSUE_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* changed bug report to the new GitHub issue template

* add feature request template

* question template

* fixed title of question and added emojis

* added RFC to question template

* Update bug_report.md

* Update feature_request.md

* Update question.md

* Typo

* Update custom-html.md (gatsbyjs#5341)

* Update custom-html.md

grammar corrections

* Revert one change

* Actually revert that one change

* add plugin option examples (gatsbyjs#5345)

add plugin option examples

* Remove workshop banner now that workshops have finished (gatsbyjs#5338)

* Update url-loader (gatsbyjs#5342)

* Update plugins.md

* [gatsby-source-contentful]: Add fallback locale support (gatsbyjs#5328)

* Add fallback locale support

* Fix linting

* test: Fix test

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* [gatsby-source-wordpress] check if parent exists (gatsbyjs#5373)

* [gatsby-source-filesystem] add fs error handling, bump got retry attemps count (gatsbyjs#5375)

* [gatsby-source-filesystem] catch fs stream errors

* [gatsby-source-filesystem] bump got retries from default 2 to 5

* normalize reject payload

* Add context to query-runner error log (gatsbyjs#5214)

* [www] Prevent image twitching in Chrome when hovering a blog index card (gatsbyjs#5396)

* [gatsby-transformer-yaml] Update docs: GraphQL query mismatch (gatsbyjs#5402)

GraphQL query references "value" when it should actually reference "character" as per the example output.

* [gatsby-transformer-json] Update docs: outdated Readme examples (gatsbyjs#5403)

`{ internal: { type } }` exists but it would actually be "LettersJson" (according to my GraphiQL checks).
Seems better to just remove this, so it at least has parity with gatsby-transformer-yaml readme.

* Add "Six Reasons I Chose Gatsby" blog post (gatsbyjs#5369)

* added  "Six Reasons I Chose Gatsby" blog post

* added site to showcase

* updated content based on review comments

* updated Gatsby links to be relative

* Fix for IE10 not loading scripts (gatsbyjs#5404)

* Fix for IE10 not loading scripts

* Fixed duplicate declaration.

* Update example config for netlify-cms (gatsbyjs#5405)

Added the public_folder attribute to make the assets accessible.

Also added the body field to the collection, so the html attribute of markdownRemark gets filled properly. Figuring out that the field has to be named "body" was a bit cumbersome.

https://www.netlifycms.org/docs/configuration-options/#fields

* Fix regression with prefix paths and gatsby-plugin-manifest (gatsbyjs#5406)

as per gatsbyjs@69ca247#diff-079fdad4111264c646208511aa18a321 manifest.webmanifest should start with /

it just works (tm) when your site is flat, but when your pages are in sub directory and prefixed, its assumes your manifest files are in the subdirectory, not the root of your site (which might be prefixed).

Fixing reversion

* Remove old comment (gatsbyjs#5407)

Code changed in gatsbyjs#5404, this comment no longer relevant.

* Add gatsby-starter-modern (gatsbyjs#5427)

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Mention in building apps docs page that we use React Router under the hood (gatsbyjs#5439)

* Add a how to add search to your website section (gatsbyjs#5272)

* Add a how to add search to your website section

* Update adding-search.md

* Update doc-links.yaml

* Update adding-search.md

* Better restructuring

* Update doc-links.yaml

* Update adding-search.md

* Address Changes

* Rewrite docs

* Add the link before the links to stub articles

The ones ending with * are stubs

* Tidy up

* Grammar/punctuation edits and some wording edits

* Adding Headers

* Edits

* More headings

* Minor edits

* Update adding-search.md (gatsbyjs#5448)

* regenerate yarn.lock

* temporarily disable stylus tests - need to update both tests and example sites to v2

* fix wrong conflict resolution
  • Loading branch information
pieh authored and m-allanson committed May 17, 2018
1 parent b2ea66e commit ec51077
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,5 @@ exports.downloadMediaFiles = ({ nodes, store, cache, createNode, _auth }) => {
})
}
```

The file node can then be queried using GraphQL. See an example of this in the [gatsby-source-wordpress README](/packages/gatsby-source-wordpress/#image-processing) where downloaded images are queried using [gatsby-transformer-sharp](/packages/gatsby-transformer-sharp/) to use in the component [gatsby-image](/packages/gatsby-image/).
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"dependencies": {
"@babel/runtime": "7.0.0-beta.47",
"better-queue": "^3.8.7",
"bluebird": "^3.5.0",
"chokidar": "^1.7.0",
"fs-extra": "^5.0.0",
Expand Down
12 changes: 10 additions & 2 deletions src/create-remote-file-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,23 @@ async function pushToQueue(task, cb) {
*/
const requestRemoteNode = (url, headers, tmpFilename, filename) =>
new Promise((resolve, reject) => {
const responseStream = got.stream(url, { ...headers, timeout: 30000 })
const responseStream = got.stream(url, {
...headers,
timeout: 30000,
retries: 5,
})
const fsWriteStream = fs.createWriteStream(tmpFilename)
responseStream.pipe(fsWriteStream)
responseStream.on(`downloadProgress`, pro => console.log(pro))

// If there's a 400/500 response or other error.
responseStream.on(`error`, (error, body, response) => {
fs.removeSync(tmpFilename)
reject({ error, body, response })
reject(error)
})

fsWriteStream.on(`error`, error => {
reject(error)
})

responseStream.on(`response`, response => {
Expand Down

0 comments on commit ec51077

Please sign in to comment.