File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
99TARBALLS_DIR=" $SCRIPT_DIR /.tarballs"
10- # Resolve the main repo root (works from git worktrees too).
11- REPO_ROOT=" $( cd " $( git -C " $SCRIPT_DIR " rev-parse --git-common-dir ) /.. " && pwd ) "
10+ # Resolve the repo root (works from git worktrees too).
11+ REPO_ROOT=" $( git -C " $SCRIPT_DIR " rev-parse --show-toplevel ) "
1212PACKAGES_DIR=" $REPO_ROOT /packages"
1313
14- # Compute a hash of all package dist directories to detect changes .
14+ # Compute a hash of package dist directories + package.json manifests .
1515HASH_FILE=" $TARBALLS_DIR /.packages-hash"
16- CURRENT_HASH=$( find " $PACKAGES_DIR /core/dist" " $PACKAGES_DIR /react/dist" " $PACKAGES_DIR /server-util/dist" " $PACKAGES_DIR /mantine/dist" -type f 2> /dev/null | sort | xargs cat 2> /dev/null | shasum -a 256 | cut -d' ' -f1)
16+ CURRENT_HASH=$( ( find " $PACKAGES_DIR /core/dist" " $PACKAGES_DIR /react/dist" " $PACKAGES_DIR /server-util/dist" " $PACKAGES_DIR /mantine/dist" -type f 2> /dev/null | sort | xargs cat 2> /dev/null; cat " $PACKAGES_DIR /core/package.json " " $PACKAGES_DIR /react/package.json " " $PACKAGES_DIR /server-util/package.json " " $PACKAGES_DIR /mantine/package.json " 2> /dev/null) | shasum -a 256 | cut -d' ' -f1)
1717
1818if [ -f " $HASH_FILE " ] && [ -d " $SCRIPT_DIR /node_modules/@blocknote/core" ] && [ " $( cat " $HASH_FILE " ) " = " $CURRENT_HASH " ]; then
1919 echo " Tarballs up to date, skipping pack+install"
Original file line number Diff line number Diff line change @@ -114,15 +114,18 @@ describe(`server-util in Next.js App Router (#942) [${MODE}]`, () => {
114114 try {
115115 errorMessage =
116116 JSON . parse ( nextDataMatch [ 1 ] ) ?. err ?. message || errorMessage ;
117- } catch { }
117+ } catch {
118+ // ignore invalid JSON
119+ }
118120 }
119121 throw new Error ( errorMessage ) ;
120122 }
121- expect ( res . status , `Response: ${ JSON . stringify ( body ) } ` ) . toBe ( 200 ) ;
122- expect (
123- body . allPassed ,
124- `Failed results: ${ JSON . stringify ( body . results , null , 2 ) } ` ,
125- ) . toBe ( true ) ;
123+ expect ( res . status ) . toBe ( 200 ) ;
124+ if ( ! body . allPassed ) {
125+ throw new Error (
126+ `Failed results: ${ JSON . stringify ( body . results , null , 2 ) } ` ,
127+ ) ;
128+ }
126129
127130 // Verify individual results match ReactServer.test.tsx scenarios
128131 expect ( body . results . simpleReactBlock ) . toMatch ( / ^ P A S S : / ) ;
@@ -144,7 +147,9 @@ describe(`server-util in Next.js App Router (#942) [${MODE}]`, () => {
144147 if ( nextDataMatch ) {
145148 try {
146149 errorDetail = JSON . parse ( nextDataMatch [ 1 ] ) ?. err ?. message ;
147- } catch { }
150+ } catch {
151+ // ignore invalid JSON
152+ }
148153 }
149154 if ( ! errorDetail && digestMatch ) {
150155 errorDetail = `digest: ${ digestMatch [ 1 ] } ` ;
You can’t perform that action at this time.
0 commit comments