-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* test: run e2e adapters in monorepo setup * fix(gatsby-adapter-netlify): ensure we set includedFilesBasePath so monorepo cases will bundle all required files correctly * fix(gatsby): don't rely on process.cwd() in lambda for ssr/dsg, instead infer root of 'gatsby' through relative path from entry module and set process.cwd() based on that so rest of utils relying on process.cwd() continue to work in monorepo scenarios * chore: minor cleanup * chore: bump caniuse-lite (cherry picked from commit 1a56c34) Co-authored-by: Michal Piechowiak <[email protected]>
- Loading branch information
Showing
9 changed files
with
88 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# this script will make checked out files move around and make git working directory dirty | ||
# this is primarly for setting up monorepo structure for e2e tests that run in CI to avoid | ||
# having to maintain additional fixture as we want to test all the same things as in single repo | ||
# case | ||
|
||
# move all items in the current directory to a new directory called workspace | ||
rm -rf workspace | ||
items=(*) | ||
mkdir workspace | ||
mv ${items[*]} workspace | ||
|
||
# create root package.json and mark workspace directory as a npm/yarn workspace | ||
echo '{ "workspaces": ["workspace"], "scripts": { "test": "EXTRA_NTL_CLI_ARGS=\"--filter=workspace\" E2E_MONOREPO=\"true\" npm run test -w workspace" }, "private": true }' > package.json | ||
|
||
# update netlify.toml build command and publish dir | ||
sed -i.bak -e 's/npm run build/npm run build -w workspace/g' -e 's/public/workspace\/public/g' workspace/netlify.toml | ||
|
||
# update workspace's package.json to have correct path to helper script after moving site fixture into subdirectory | ||
sed -i.bak -e 's/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/..\/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/g' workspace/package.json | ||
|
||
git init | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
[build] | ||
command = "npm run build" | ||
publish = "public/" | ||
command = "npm run build" | ||
publish = "public/" | ||
base = "" | ||
|
||
[build.environment] | ||
NETLIFY_IMAGE_CDN = "true" | ||
NETLIFY_IMAGE_CDN = "true" | ||
|
||
[images] | ||
remote_images = [ | ||
"https://images.unsplash.com/.*", | ||
"https://www.gatsbyjs.com/.*", | ||
] | ||
remote_images = [ | ||
"https://images.unsplash.com/.*", | ||
"https://www.gatsbyjs.com/.*", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters