You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gatsby-adapter-netlify): support monorepos (#39005) (#39037)
* 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]>
# this script will make checked out files move around and make git working directory dirty
4
+
# this is primarly for setting up monorepo structure for e2e tests that run in CI to avoid
5
+
# having to maintain additional fixture as we want to test all the same things as in single repo
6
+
# case
7
+
8
+
# move all items in the current directory to a new directory called workspace
9
+
rm -rf workspace
10
+
items=(*)
11
+
mkdir workspace
12
+
mv ${items[*]} workspace
13
+
14
+
# create root package.json and mark workspace directory as a npm/yarn workspace
15
+
echo'{ "workspaces": ["workspace"], "scripts": { "test": "EXTRA_NTL_CLI_ARGS=\"--filter=workspace\" E2E_MONOREPO=\"true\" npm run test -w workspace" }, "private": true }'> package.json
16
+
17
+
# update netlify.toml build command and publish dir
18
+
sed -i.bak -e 's/npm run build/npm run build -w workspace/g' -e 's/public/workspace\/public/g' workspace/netlify.toml
19
+
20
+
# update workspace's package.json to have correct path to helper script after moving site fixture into subdirectory
21
+
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
0 commit comments