Skip to content

Commit

Permalink
chore: Fix spelling (#28761)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored Jan 4, 2021
1 parent 7d71cca commit b960334
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe(`the site data object`, () => {
.should(`equal`, `Gatsby Default Starter`)
})

it(`description is overriden by value in config`, () => {
it(`description is overridden by value in config`, () => {
cy.getTestElement(`description`)
.invoke(`text`)
.should(`equal`, `This is site for production runtime e2e tests`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ exports.onCreateNode = async ({
createNodeId,
node,
}) => {
// transfrom remote file nodes using Gatsby sharp plugins
// transform remote file nodes using Gatsby sharp plugins
// because onCreateNode is called for all nodes, verify that you are only running this code on nodes created by your plugin
if (node.internal.type === POST_NODE_TYPE) {
// create a FileNode in Gatsby that gatsby-transformer-sharp will create optimized images for
Expand Down
2 changes: 1 addition & 1 deletion packages/create-gatsby/src/__tests__/init-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe(`init-starter`, () => {
it(`gently informs the user that yarn is not available when trying to use it`, async () => {
process.env.npm_config_user_agent = `yarn`
;(execSync as any).mockImplementation(() => {
throw new Error(`Something wrong occured when trying to use yarn`)
throw new Error(`Something wrong occurred when trying to use yarn`)
})
;(path as any).join.mockImplementation(() => `/somewhere-here`)
;(execa as any).mockImplementation(() => Promise.resolve())
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Performance Improvements

- **gatsby-cli:** avoid unnecesary rerenders for static messages in CLI ([#21955](https://github.com/gatsbyjs/gatsby/issues/21955)) ([5aff49d](https://github.com/gatsbyjs/gatsby/commit/5aff49d))
- **gatsby-cli:** avoid unnecessary rerenders for static messages in CLI ([#21955](https://github.com/gatsbyjs/gatsby/issues/21955)) ([5aff49d](https://github.com/gatsbyjs/gatsby/commit/5aff49d))

## [2.10.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-cli@2.10.1...gatsby-cli@2.10.2) (2020-03-06)

Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-plugin-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ The optional helper function `getImage` takes a file node and returns `file?.chi

These arguments can be passed to the `gatsbyImageData()` resolver:

- **width**: The display width of the generated image. The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities. Ignored if layout = FLUID or CONSTRAINED, where you should use "maxWidth" instead.
- **width**: The display width of the generated image. The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities. Ignored if layout = FLUID or CONSTRAINED, where you should use "maxWidth" instead.
- **height**: If set, the height of the generated image. If omitted, it is calculated from the supplied width, matching the aspect ratio of the source image.
- **maxWidth**:
Maximum display width of generated files.
The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities
The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities
This only applies when layout = FLUID or CONSTRAINED. For other layout types, use "width"
- **maxHeight**: If set, the generated image is a maximum of this height, cropping if necessary. If the image layout is "constrained" then the image will be limited to this height. If the aspect ratio of the image is different than the source, then the image will be cropped.`,
- **placeholder**: Format of generated placeholder image.
Expand All @@ -336,7 +336,7 @@ These arguments can be passed to the `gatsbyImageData()` resolver:
Default is `[ 0.25, 0.5, 1, 2 ]`, for fluid/constrained images, and `[ 1, 2 ]` for fixed. In this case, an image with a fluid layout and maxWidth = 400 would generate images at 100, 200, 400 and 800px wide
- **sizes**: The "[sizes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images)" attribute, passed to the `<img>` tag. This describes the display size of the image. This does not affect the generated images, but is used by the browser to decide which images to download. You can leave this blank for fixed images, or if the responsive image container will be the full width of the screen. In these cases we will generate an appropriate value. If, however, you are generating responsive images that are not the full width of the screen, you should provide a sizes property for best performance. You can alternatively pass this value to the component.
- **formats**: an array of file formats to generate. The default is `[AUTO, WEBP]`, which means it will generate images in the same format as the source image, as well as in the next-generation [WebP](https://developers.google.com/speed/webp) format. We strongly recommend you do not change this option, as doing so will affect performance scores.
- **quality**: The default quality. This is overriden by any format-specific options
- **quality**: The default quality. This is overridden by any format-specific options
- **blurredOptions**: Options for the low-resolution placeholder image. Set placeholder to "BLURRED" to use this
- width
- toFormat
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-image/src/resolver-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function getGatsbyImageFieldConfig<TSource, TContext>(
type: GraphQLInt,
description: stripIndent`
Maximum display width of generated files.
The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities
The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities
This only applies when layout = FLUID or CONSTRAINED. For other layout types, use "width"`,
},
maxHeight: {
Expand All @@ -78,7 +78,7 @@ export function getGatsbyImageFieldConfig<TSource, TContext>(
type: GraphQLInt,
description: stripIndent`
The display width of the generated image.
The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities
The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities
Ignored if layout = FLUID or CONSTRAINED, where you should use "maxWidth" instead.
`,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-page-creator/src/path-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function extractAllCollectionSegments(
// This shouldn't happen - but TS requires us to validate
if (!slugParts) {
throw new Error(
`An error occured building the slug parts. This is likely a bug within Gatsby and not your code. Please report it to us if you run into this.`
`An error occurred building the slug parts. This is likely a bug within Gatsby and not your code. Please report it to us if you run into this.`
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ interface ErrorFormattingOptions {
*/
stack?: boolean
/**
* overrides the way values are wrapped (e.g. `[]` arround arrays, `""` around labels).
* overrides the way values are wrapped (e.g. `[]` around arrays, `""` around labels).
* Each key can be set to a string with one (same character before and after the value) or two characters (first character
* before and second character after), or `false` to disable wrapping.
*/
Expand Down Expand Up @@ -871,7 +871,7 @@ interface AnySchema extends SchemaInternals {
* - a function which returns the default value using the signature `function(parent, helpers)` where:
* - `parent` - a clone of the object containing the value being validated. Note that since specifying a
* `parent` ragument performs cloning, do not declare format arguments if you are not using them.
* - `helpers` - same as thsoe described in [`any.custom()`](anycustomermethod_description)
* - `helpers` - same as those described in [`any.custom()`](anycustomermethod_description)
*
* When called without any `value` on an object schema type, a default value will be automatically generated
* based on the default values of the object keys.
Expand Down Expand Up @@ -1102,7 +1102,7 @@ interface AnySchema extends SchemaInternals {
rule(options: RuleOptions): this

/**
* Registers a schema to be used by decendents of the current schema in named link references.
* Registers a schema to be used by descendants of the current schema in named link references.
*/
shared(ref: Schema): this

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-recipes/src/graphql-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async function startGraphQLServer(programPath, forceStart) {
all: true,
env: {
// Chalk doesn't want to output color in a child process
// as it (correctly) thinks it's not in a normal terminal environemnt.
// as it (correctly) thinks it's not in a normal terminal environment.
// Since we're just returning data, we'll override that.
FORCE_COLOR: `true`,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-recipes/src/renderer/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ const render = (recipe, cb, context = {}, isApply, isStream, name) => {
})

// When there's no resources, renderResources finishes synchronously
// so wait for the next tick so the emitter listners can be setup first.
// so wait for the next tick so the emitter listeners can be setup first.
process.nextTick(() => renderResources())

if (isStream) {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-remark-autolink-headers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = {

## How to style the anchor link

By default, the anchor link has a class of `anchor` (see `className` option to change this name) on the element but has no additional styling. To make it fit your website, you'll have to write some CSS to change the appeareance.
By default, the anchor link has a class of `anchor` (see `className` option to change this name) on the element but has no additional styling. To make it fit your website, you'll have to write some CSS to change the appearance.

In your CSS you can specify this element, in this instance the anchor tag will appear red:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe(`create-file-node`, () => {
beforeEach(() => {
// If this breaks, note that the actual values here are not relevant. They just need to be mocked because
// otherwise the tests change due to changing timestamps. The returned object should mimic the real fs.stat
// Note: async tests should run in serial so this mock should not cause cross test polution on this thread.
// Note: async tests should run in serial so this mock should not cause cross test pollution on this thread.
fs.stat = jest.fn().mockResolvedValue(
Promise.resolve({
isDirectory() {
Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-transformer-sharp/src/customize-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ const imageNodeType = ({
type: GraphQLInt,
description: stripIndent`
Maximum display width of generated files.
The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities
The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities
This only applies when layout = FLUID or CONSTRAINED. For other layout types, use "width"`,
},
maxHeight: {
Expand All @@ -425,7 +425,7 @@ const imageNodeType = ({
type: GraphQLInt,
description: stripIndent`
The display width of the generated image.
The actual largest image resolution will be this value multipled by the largest value in outputPixelDensities
The actual largest image resolution will be this value multiplied by the largest value in outputPixelDensities
Ignored if layout = FLUID or CONSTRAINED, where you should use "maxWidth" instead.
`,
},
Expand Down Expand Up @@ -480,7 +480,7 @@ const imageNodeType = ({
},
quality: {
type: GraphQLInt,
description: `The default quality. This is overriden by any format-specific options`,
description: `The default quality. This is overridden by any format-specific options`,
},
jpgOptions: {
type: JPGOptionsType,
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
### Bug Fixes

- **gatsby:** don't fail validation on fragments that are not used ([#24032](https://github.com/gatsbyjs/gatsby/issues/24032)) ([61d0ef4](https://github.com/gatsbyjs/gatsby/commit/61d0ef4))
- **gatsby:** update script to generate apis.json to accomodate Typescript ([#24023](https://github.com/gatsbyjs/gatsby/issues/24023)) ([7878d0f](https://github.com/gatsbyjs/gatsby/commit/7878d0f))
- **gatsby:** update script to generate apis.json to accommodate Typescript ([#24023](https://github.com/gatsbyjs/gatsby/issues/24023)) ([7878d0f](https://github.com/gatsbyjs/gatsby/commit/7878d0f))

## [2.21.28](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.21.27...gatsby@2.21.28) (2020-05-13)

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/cache/__tests__/cache-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe(`DiskStore`, function () {
expect(countFilesInCacheDir()).toEqual(2)
})

it(`should save buffers in seperate files promise`, async function () {
it(`should save buffers in separate files promise`, async function () {
await cache.set(`key`, Buffer.alloc(100000))
expect(countFilesInCacheDir()).toEqual(2)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/cache/cache-fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function DiskStore(options): void {
subdirs: options.subdirs || false,
zip: options.zip || false,
lockFile: {
//check lock at 0ms 50ms 100ms ... 400ms 1400ms 1450ms... up to 10 seconds, after that just asume the lock is staled
//check lock at 0ms 50ms 100ms ... 400ms 1400ms 1450ms... up to 10 seconds, after that just assume the lock is staled
wait: 400,
pollPeriod: 50,
stale: 10 * 1000,
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby/src/utils/__tests__/jobs-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe(`Jobs manager`, () => {
Promise.reject(new Error(`An error occurred`))
)
.mockImplementationOnce(() =>
Promise.reject({ message: `An error occured` })
Promise.reject({ message: `An error occurred` })
)
.mockImplementationOnce(() =>
Promise.reject({ key: `weird error object` })
Expand All @@ -247,7 +247,7 @@ describe(`Jobs manager`, () => {
try {
await enqueueJob(jobArgs3)
} catch (err) {
expect(err).toMatchInlineSnapshot(`[WorkerError: An error occured]`)
expect(err).toMatchInlineSnapshot(`[WorkerError: An error occurred]`)
}

try {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/dev-ssr/render-dev-html-child.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const parseError = function ({ err, directory, componentPath }) {
const filename = sysPath.join(
directory,
// Don't need to use path.sep as webpack always uses a single forward slash
// as a path seperator.
// as a path separator.
...position.filename.split(`/`).slice(2)
)

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/start-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ module.exports = {
// This isn't used in development.
if (fullUrl.endsWith(`app-data.json`)) {
res.json({ webpackCompilationHash: `123` })
// If this gets here, it's a non-existant file so just send back 404.
// If this gets here, it's a non-existent file so just send back 404.
} else if (fullUrl.endsWith(`.json`)) {
res.json({}).status(404)
} else {
Expand Down
2 changes: 1 addition & 1 deletion rfcs/text/000-cli-redesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The user can:
- [x] select a starter in the CLI without needing a URL. See PR https://github.com/gatsbyjs/gatsby/pull/14097
- [ ] be redirected to the correct URL when typing in “localhost:8000/\_ \_ graphiql incorrectly (we could either redirect to "correct" one or just support multiple different cases)
- [ ] be directed to another localhost address is localhost:8000 is already taken (https://github.com/gatsbyjs/gatsby/issues/368 and https://github.com/gatsbyjs/gatsby/issues/13512#issuecomment-485781525)
- [ ] misspell a Gatsby command and the CLI will run the correct command anyway just like Google search does when you mispell something (requires us to update the did-you-mean file). https://github.com/gatsbyjs/gatsby/issues/13512
- [ ] misspell a Gatsby command and the CLI will run the correct command anyway just like Google search does when you misspell something (requires us to update the did-you-mean file). https://github.com/gatsbyjs/gatsby/issues/13512
- [ ] get createPages page count in output to help users optimize for speed and catch errors faster''
- [ ] get notified that they might need to hit `r` if they’ve changed package.json, gatsby node, etc. when `gatsby develop` is running
- [ ] see only relevant warnings; e.g. omission of peer dependency warnings that they can ignore
Expand Down
2 changes: 1 addition & 1 deletion rfcs/text/0004-native-graphql-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
url: "https://api.graphcms.com/simple/v1/swapi",
},
},
// Passing paramaters (passed to apollo-link)
// Passing parameters (passed to apollo-link)
{
resolve: "gatsby-source-graphql",
options: {
Expand Down
2 changes: 1 addition & 1 deletion rfcs/text/0006-node-8-minimum-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ We've internally discussed something called `gatsby doctor` which can be run pri

This proposal requires documentation to be updated. Our documentation can be considered a code style-guide and oftentimes developers directly copy and paste from our documentation. If we are documenting what we think is a best practice (e.g. Node 6 features like async/await) we are implicitly easing the migration cost of any developer who reads our documentation--which is hopefully all of them!

I strongly feel that tweaking the documentation, as well as minimum version requirements, will lead to developers having a _better_ experience using Gatsby, and Gatsby as a whole becomes easier to teach. It resolves the idiosyncracy of _why_ do I need a global install and _when_ do I use `async` / `await` or `return new Promise`. This change should have a net positive impact on the ease-of-use of teaching Gatsby to new and experienced developers, alike.
I strongly feel that tweaking the documentation, as well as minimum version requirements, will lead to developers having a _better_ experience using Gatsby, and Gatsby as a whole becomes easier to teach. It resolves the idiosyncrasy of _why_ do I need a global install and _when_ do I use `async` / `await` or `return new Promise`. This change should have a net positive impact on the ease-of-use of teaching Gatsby to new and experienced developers, alike.

# Unresolved questions

Expand Down

0 comments on commit b960334

Please sign in to comment.