Skip to content

Commit 3666b51

Browse files
committed
Merge tag '26.5.1' into develop
Hotfix for Angular SSR
2 parents c7f35df + ffa0cd0 commit 3666b51

5 files changed

Lines changed: 26 additions & 6 deletions

File tree

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
26.5.1 (2026-03-18)
6+
===================
7+
8+
* Hotfix for Angular SSR
9+
510
26.5.0 (2026-02-26)
611
===================
712

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ WORKDIR /app
1515
RUN npm prune --omit=dev --no-audit --no-fund
1616
EXPOSE 4000
1717
ENV PORT=4000
18-
CMD ["node", "dist/osf/server/server.mjs"]
18+
CMD ["node", "--enable-source-maps", "dist/osf/server/server.mjs"]
1919

2020
# Static dist artifact stage
2121
FROM node:22-alpine AS dist

angular.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"ssr": {
9797
"entry": "src/server.ts"
9898
},
99+
"sourceMap": true,
99100
"budgets": [
100101
{
101102
"type": "initial",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "osf",
3-
"version": "26.5.0",
3+
"version": "26.5.1",
44
"scripts": {
55
"ng": "ng",
66
"analyze-bundle": "ng build --configuration=analyze-bundle && source-map-explorer dist/**/*.js --no-border-checks",
@@ -29,7 +29,7 @@
2929
"test:check-coverage-thresholds": "node .github/scripts/check-coverage-thresholds.js",
3030
"test:display": "node .github/counter/counter.test.display.js",
3131
"watch": "ng build --watch --configuration development",
32-
"serve:ssr:osf": "node dist/osf/server/server.mjs"
32+
"serve:ssr:osf": "node --enable-source-maps dist/osf/server/server.mjs"
3333
},
3434
"private": true,
3535
"dependencies": {

src/app/features/preprints/components/preprint-details/preprint-tombstone/preprint-tombstone.component.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@ import { Card } from 'primeng/card';
66
import { Skeleton } from 'primeng/skeleton';
77
import { Tag } from 'primeng/tag';
88

9-
import { DatePipe } from '@angular/common';
10-
import { ChangeDetectionStrategy, Component, computed, effect, inject, input, OnDestroy, output } from '@angular/core';
9+
import { DatePipe, isPlatformBrowser } from '@angular/common';
10+
import {
11+
ChangeDetectionStrategy,
12+
Component,
13+
computed,
14+
effect,
15+
inject,
16+
input,
17+
OnDestroy,
18+
output,
19+
PLATFORM_ID,
20+
} from '@angular/core';
1121
import { Router } from '@angular/router';
1222

1323
import { ApplicabilityStatus, PreregLinkInfo } from '@osf/features/preprints/enums';
@@ -57,6 +67,8 @@ export class PreprintTombstoneComponent implements OnDestroy {
5767
});
5868
private router = inject(Router);
5969

70+
private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
71+
6072
preprintVersionSelected = output<string>();
6173

6274
preprintProvider = input.required<PreprintProviderDetails | undefined>();
@@ -91,7 +103,9 @@ export class PreprintTombstoneComponent implements OnDestroy {
91103
}
92104

93105
ngOnDestroy(): void {
94-
this.actions.resetContributorsState();
106+
if (this.isBrowser) {
107+
this.actions.resetContributorsState();
108+
}
95109
}
96110

97111
tagClicked(tag: string) {

0 commit comments

Comments
 (0)