Skip to content

Commit ac9f3c9

Browse files
lobsterkatieAbhiPrasad
authored andcommitted
ref(nextjs): Use new build process in vercel script (#5065)
This updates the script for testing an SDK branch in Vercel to use the new build process. It also updates the regex used to match version numbers when updating monorepo dependencies' `package.json` files, to accept alpha and beta releases.
1 parent 038ca05 commit ac9f3c9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

packages/nextjs/vercel/install-sentry-from-branch.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@ yarn --prod false
2727

2828
echo " "
2929
echo "BUILDING SDK"
30-
# Types are required for any type of build to succeed
31-
yarn build:types
32-
# We need to build es5 versions because `next.config.js` calls `require` on the SDK (to get `withSentryConfig`) and
33-
# therefore it looks for `cjs/index.js`
34-
yarn build:cjs
35-
# We need to build esm versions because that's what `next` actually uses when it builds the app
36-
yarn build:esm
30+
# build types, cjs, and esm
31+
yarn build:dev
3732

3833
# Set all packages in the repo to point to their siblings as file dependencies. That way, when we install the local copy
3934
# of @sentry/nextjs, it'll pull the local copy of each of its @sentry/* dependents. This mimics what Lerna does with
@@ -53,7 +48,7 @@ PACKAGE_NAMES=$(ls $PACKAGES_DIR)
5348
for package in ${PACKAGE_NAMES[@]}; do
5449
# Within a given package.json file, search for each of the other packages in turn, and if found, make the replacement
5550
for package_dep in ${PACKAGE_NAMES[@]}; do
56-
sed -Ei /"@sentry\/${package_dep}"/s/"[0-9]+\.[0-9]+\.[0-9]+"/"file:${ESCAPED_PACKAGES_DIR}\/${package_dep}"/ ${PACKAGES_DIR}/${package}/package.json
51+
sed -Ei /"@sentry\/${package_dep}"/s/"[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta)\.[0-9]+)?"/"file:${ESCAPED_PACKAGES_DIR}\/${package_dep}"/ ${PACKAGES_DIR}/${package}/package.json
5752
done
5853
done
5954

0 commit comments

Comments
 (0)