Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
tractorcow committed May 27, 2024
2 parents 9917e88 + fc0b2fa commit 5cbd465
Show file tree
Hide file tree
Showing 43 changed files with 60,228 additions and 139,429 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
reports
reports
.env
**/.env
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Monorepo tooling

gatsby-plugin-s3 uses a Lerna-based monorepo. After cloning the repository, please use `npx lerna bootstrap` to install
gatsby-plugin-s3 uses a Lerna-based monorepo. After cloning the repository, please use `npm install` to install
dependencies and symlink the different projects together.

You can use `npx lerna run build` to automatically build all of the projects in the correct order.
Expand All @@ -12,4 +12,4 @@ please be patient.

## Test setup

Running our e2e tests requires some setup, please see [TESTING.md](./TESTING.md) for more details.
Running our e2e tests requires some setup, please see [TESTING.md](./TESTING.md) for more details.
61 changes: 35 additions & 26 deletions README.md

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions examples/with-redirects/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,16 @@ module.exports = {
options: {
bucketName: process.env.GATSBY_S3_TARGET_BUCKET || 'test',
bucketPrefix: process.env.GATSBY_S3_BUCKET_PREFIX ? process.env.GATSBY_S3_BUCKET_PREFIX : null,
region: 'eu-west-1',
generateRedirectObjectsForPermanentRedirects: !process.env.GATSBY_S3_LEGACY_REDIRECTS,
region: process.env.AWS_REGION || 'us-east-1',
...(process.env.GATSBY_S3_ACL
? {
acl: process.env.ACL != 'NULL' ? process.env.ACL : null,
}
acl: process.env.ACL !== 'NULL' ? process.env.ACL : null,
}
: {}),
removeNonexistentObjects: true,
retainObjectsPatterns: ['**/*.retain.js', '**/retain-folder/*'],
},
},
{
resolve: `gatsby-plugin-create-client-paths`,
options: { prefixes: [`/client-only/*`] },
},
'gatsby-plugin-offline',
],
};
23 changes: 16 additions & 7 deletions examples/with-redirects/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,39 @@ exports.createPages = ({ actions }) => {
// create some test redirects
actions.createRedirect({
fromPath: '/',
toPath: '/page-2',
toPath: '/page-2/',
});

actions.createRedirect({
fromPath: '/blog',
toPath: '/blog/1',
toPath: '/blog/1/',
isPermanent: true
});

actions.createRedirect({
fromPath: '/hello-there',
toPath: '/client-only',
toPath: '/client-only/',
isPermanent: false
});

actions.createRedirect({
fromPath: '/asdf123.-~_!$&\'()*+,;=:@%',
toPath: '/special-characters',
toPath: '/special-characters/',
isPermanent: true
});

actions.createRedirect({
fromPath: '/trailing-slash/',
toPath: '/trailing-slash/1',
toPath: '/trailing-slash/1/',
isPermanent: true
});
};
};

// Required for client only paths to work
exports.onCreatePage = async ({ page, actions }) => {
const {createPage} = actions
if (page.path.match(/^\/client-only/)) {
page.matchPath = "/client-only/*"
createPage(page)
}
}
Loading

0 comments on commit 5cbd465

Please sign in to comment.