Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: gatsby@3.0.1
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gatsby@3.0.2
Choose a head ref
  • 4 commits
  • 18 files changed
  • 4 contributors

Commits on Mar 4, 2021

  1. fix(gatsby-plugin-sass): Change modules option around (#29986) (#30002

    )
    
    (cherry picked from commit bba21cd)
    
    Co-authored-by: Lennart <lekoarts@gmail.com>
    GatsbyJS Bot and LekoArts authored Mar 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    27db8e7 View commit details
  2. fix(gatsby): handle case of removing trailing slash in inc builds (#2…

    …9953) (#30001)
    
    * add test case
    
    * add one more edge case to tests
    
    * add more assertions
    
    * fix(gatsby): [incremental builds] handle case of page path changing during or between builds that wouldn't result in change of artifact filenames
    
    this is to cover for cases like `gatsby-plugin-remove-trailing-slashes` that change page path during the build or
    case when page path might be created from some cms content and trailing slash being added or removed there
    
    * make normalizePagePath terser
    
    * initial setup for calcDirtyHtmlFiles unit tests
    
    * flesh out tests
    
    (cherry picked from commit 7462030)
    
    Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
    GatsbyJS Bot and pieh authored Mar 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d050050 View commit details
  3. chore(gatsby-plugin-sass): Update README (#29965) (#30000)

    (cherry picked from commit dfb991f)
    
    Co-authored-by: Lennart <lekoarts@gmail.com>
    GatsbyJS Bot and LekoArts authored Mar 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    82d6500 View commit details
  4. chore(release): Publish

     - gatsby-admin@0.10.2
     - gatsby-plugin-sass@4.0.1
     - gatsby@3.0.2
    vladar committed Mar 4, 2021
    Copy the full SHA
    1939967 View commit details
11 changes: 10 additions & 1 deletion integration-tests/artifacts/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -369,7 +369,12 @@ describe(`First run (baseline)`, () => {
})
})

const expectedPages = [`stale-pages/stable`, `stale-pages/only-in-first`]
const expectedPages = [
`stale-pages/stable`,
`stale-pages/only-in-first`,
`page-that-will-have-trailing-slash-removed`,
`/stale-pages/sometimes-i-have-trailing-slash-sometimes-i-dont`,
]
const unexpectedPages = [`stale-pages/only-not-in-first`]

describe(`html files`, () => {
@@ -460,6 +465,7 @@ describe(`Second run (different pages created, data changed)`, () => {
`/page-query-dynamic-2/`,
`/static-query-result-tracking/should-invalidate/`,
`/page-query-template-change/`,
`/stale-pages/sometimes-i-have-trailing-slash-sometimes-i-dont/`,
]

const expectedPagesToRemainFromPreviousBuild = [
@@ -468,6 +474,7 @@ describe(`Second run (different pages created, data changed)`, () => {
`/page-query-changing-but-not-invalidating-html/`,
`/static-query-result-tracking/stable/`,
`/static-query-result-tracking/rerun-query-but-dont-recreate-html/`,
`/page-that-will-have-trailing-slash-removed`,
]

const expectedPages = [
@@ -542,6 +549,8 @@ describe(`Third run (js change, all pages are recreated)`, () => {
const expectedPages = [
`/stale-pages/only-not-in-first`,
`/page-query-dynamic-3/`,
`/page-that-will-have-trailing-slash-removed`,
`/stale-pages/sometimes-i-have-trailing-slash-sometimes-i-dont`,
]

const unexpectedPages = [
26 changes: 26 additions & 0 deletions integration-tests/artifacts/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ exports.onPreInit = ({ emitter }) => {
}

let previouslyCreatedNodes = new Map()
let didRemoveTrailingSlashForTestedPage = false

exports.sourceNodes = ({
actions,
@@ -145,6 +146,12 @@ exports.createPages = async ({ actions, graphql }) => {
createPageHelper(`only-not-in-first`)
}

createPageHelper(
`sometimes-i-have-trailing-slash-sometimes-i-dont${
runNumber % 2 === 0 ? `/` : ``
}`
)

const { data } = await graphql(`
{
allDepPageQuery {
@@ -181,6 +188,13 @@ exports.onPreBuild = () => {
let counter = 1
exports.onPostBuild = async ({ graphql }) => {
console.log(`[test] onPostBuild`)

if (!didRemoveTrailingSlashForTestedPage) {
throw new Error(
`Test setup failed - didn't remove trailing slash for /pages-that-will-have-trailing-slash-removed/ page`
)
}

const { data } = await graphql(`
{
allSitePage(filter: { path: { ne: "/dev-404-page/" } }) {
@@ -206,3 +220,15 @@ exports.onPostBuild = async ({ graphql }) => {
}
)
}

// simulating "gatsby-plugin-remove-trailing-slashes" scenario
exports.onCreatePage = ({ page, actions }) => {
if (page.path === `/page-that-will-have-trailing-slash-removed/`) {
actions.deletePage(page)
actions.createPage({
...page,
path: `/page-that-will-have-trailing-slash-removed`,
})
didRemoveTrailingSlashForTestedPage = true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as React from "react"

export default function NoTrailingSlashPage({ path, pathname }) {
return <div>I don't have trailing slash</div>
}
4 changes: 4 additions & 0 deletions packages/gatsby-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.10.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.10.1...gatsby-admin@0.10.2) (2021-03-04)

**Note:** Version bump only for package gatsby-admin

## [0.10.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.10.0...gatsby-admin@0.10.1) (2021-03-03)

**Note:** Version bump only for package gatsby-admin
4 changes: 2 additions & 2 deletions packages/gatsby-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-admin",
"version": "0.10.1",
"version": "0.10.2",
"main": "index.js",
"author": "Max Stoiber",
"license": "MIT",
@@ -20,7 +20,7 @@
"@typescript-eslint/parser": "^4.14.2",
"csstype": "^2.6.14",
"formik": "^2.2.6",
"gatsby": "^3.0.1",
"gatsby": "^3.0.2",
"gatsby-interface": "^0.0.244",
"gatsby-plugin-typescript": "^3.0.0",
"gatsby-plugin-webfonts": "^1.1.4",
6 changes: 6 additions & 0 deletions packages/gatsby-plugin-sass/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.0.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-sass@4.0.0...gatsby-plugin-sass@4.0.1) (2021-03-04)

### Bug Fixes

- **gatsby-plugin-sass:** Change `modules` option around ([#29986](https://github.com/gatsbyjs/gatsby/issues/29986)) ([#30002](https://github.com/gatsbyjs/gatsby/issues/30002)) ([27db8e7](https://github.com/gatsbyjs/gatsby/commit/27db8e7c4d02bd13b86257092701d6e62c34272a))

# [4.0.0](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-sass@4.0.0-v3rc.2...gatsby-plugin-sass@4.0.0) (2021-03-02)

**Note:** Version bump only for package gatsby-plugin-sass
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-sass/README.md
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@ plugins: [
]
```

If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader/tree/version-1):
**Note:** Gatsby is using `css-loader@1.0.1`.
If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader):
**Note:** Gatsby is using `css-loader@^5.0.0`.

```javascript:title=gatsby-config.js
plugins: [
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sass/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-plugin-sass",
"description": "Gatsby plugin to handle SCSS/Sass files",
"version": "4.0.0",
"version": "4.0.1",
"author": "Daniel Farrell <daniel@mobelux.com>",
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
Loading