Skip to content

Commit 3a5fbfb

Browse files
authored
Merge pull request #726 from CenterForOpenScience/feature/pbs-25.02
Merge feature/pbs 25.02 into develop
2 parents f5ccfea + 25ae015 commit 3a5fbfb

File tree

273 files changed

+5088
-1200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+5088
-1200
lines changed

angular.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"styles": [
4949
"src/styles/styles.scss",
5050
"node_modules/primeflex/primeflex.css",
51-
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
5251
"node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css"
5352
],
5453
"stylePreprocessorOptions": {
@@ -74,7 +73,8 @@
7473
"maximumError": "25kB"
7574
}
7675
],
77-
"outputHashing": "all"
76+
"outputHashing": "all",
77+
"optimization": true
7878
},
7979
"analyze-bundle": {
8080
"sourceMap": true,
@@ -147,15 +147,15 @@
147147
},
148148
"development": {
149149
"buildTarget": "osf:build:development",
150-
"hmr": false
150+
"hmr": true
151151
},
152152
"docker": {
153153
"buildTarget": "osf:build:docker",
154-
"hmr": false
154+
"hmr": true
155155
},
156156
"staging": {
157157
"buildTarget": "osf:build:staging",
158-
"hmr": false
158+
"hmr": true
159159
},
160160
"test": {
161161
"buildTarget": "osf:build:test",

jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ module.exports = {
5050
extensionsToTreatAsEsm: ['.ts'],
5151
coverageThreshold: {
5252
global: {
53-
branches: 24.1,
54-
functions: 28.73,
55-
lines: 56.52,
56-
statements: 56.82,
53+
branches: 28.0,
54+
functions: 32.0,
55+
lines: 60.28,
56+
statements: 60.77,
5757
},
5858
},
5959
watchPathIgnorePatterns: [

package-lock.json

Lines changed: 0 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"@newrelic/browser-agent": "^1.301.0",
4848
"@ngx-translate/core": "^16.0.4",
4949
"@ngx-translate/http-loader": "^16.0.1",
50-
"@ngxs/devtools-plugin": "^19.0.0",
51-
"@ngxs/logger-plugin": "^19.0.0",
5250
"@ngxs/store": "^19.0.0",
5351
"@primeng/themes": "^19.0.9",
5452
"@sentry/angular": "^10.10.0",

setup-jest.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ class ResizeObserver {
3131
// eslint-disable-next-line @typescript-eslint/no-empty-function
3232
disconnect() {}
3333
}
34+
3435
Object.defineProperty(window, 'ResizeObserver', {
3536
writable: true,
3637
configurable: true,
3738
value: ResizeObserver,
3839
});
40+
41+
jest.mock('@newrelic/browser-agent/loaders/browser-agent', () => ({
42+
BrowserAgent: jest.fn().mockImplementation(() => ({
43+
start: jest.fn(),
44+
stop: jest.fn(),
45+
})),
46+
}));

src/app/app.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { withNgxsReduxDevtoolsPlugin } from '@ngxs/devtools-plugin';
21
import { provideStore } from '@ngxs/store';
32

43
import { TranslateModule } from '@ngx-translate/core';
@@ -49,7 +48,7 @@ export const appConfig: ApplicationConfig = {
4948
}),
5049
provideHttpClient(withInterceptors([authInterceptor, viewOnlyInterceptor, errorInterceptor])),
5150
provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'top', anchorScrolling: 'enabled' })),
52-
provideStore(STATES, withNgxsReduxDevtoolsPlugin({ disabled: true })),
51+
provideStore(STATES),
5352
provideZoneChangeDetection({ eventCoalescing: true }),
5453
SENTRY_PROVIDER,
5554
],

src/app/app.routes.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ import { provideStates } from '@ngxs/store';
33
import { Routes } from '@angular/router';
44

55
import { isFileGuard } from '@core/guards/is-file.guard';
6-
import { BookmarksState, ProjectsState } from '@shared/stores';
76

87
import { authGuard, redirectIfLoggedInGuard } from './core/guards';
98
import { isProjectGuard } from './core/guards/is-project.guard';
109
import { isRegistryGuard } from './core/guards/is-registry.guard';
11-
import { PreprintState } from './features/preprints/store/preprint';
10+
import { MyPreprintsState } from './features/preprints/store/my-preprints';
1211
import { ProfileState } from './features/profile/store';
1312
import { RegistriesState } from './features/registries/store';
1413
import { LicensesHandlers, ProjectsHandlers, ProvidersHandlers } from './features/registries/store/handlers';
1514
import { FilesHandlers } from './features/registries/store/handlers/files.handlers';
1615
import { LicensesService } from './shared/services';
16+
import { BookmarksState } from './shared/stores/bookmarks';
17+
import { ProjectsState } from './shared/stores/projects';
1718

1819
export const routes: Routes = [
1920
{
@@ -89,7 +90,7 @@ export const routes: Routes = [
8990
import('@osf/features/preprints/pages/my-preprints/my-preprints.component').then(
9091
(m) => m.MyPreprintsComponent
9192
),
92-
providers: [provideStates([PreprintState])],
93+
providers: [provideStates([MyPreprintsState])],
9394
},
9495
{
9596
path: 'preprints',

src/app/core/components/nav-menu/nav-menu.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CustomMenuItem } from '@osf/core/models';
88
import { AuthService } from '@osf/core/services';
99
import { ProviderSelectors } from '@osf/core/store/provider/provider.selectors';
1010
import { UserSelectors } from '@osf/core/store/user/user.selectors';
11-
import { CurrentResourceSelectors } from '@osf/shared/stores';
11+
import { CurrentResourceSelectors } from '@osf/shared/stores/current-resource';
1212

1313
import { NavMenuComponent } from './nav-menu.component';
1414

src/app/core/components/nav-menu/nav-menu.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IconComponent } from '@osf/shared/components';
2020
import { CurrentResourceType, ReviewPermissions } from '@osf/shared/enums';
2121
import { getViewOnlyParam } from '@osf/shared/helpers';
2222
import { WrapFnPipe } from '@osf/shared/pipes';
23-
import { CurrentResourceSelectors, GetResourceDetails } from '@osf/shared/stores';
23+
import { CurrentResourceSelectors, GetResourceDetails } from '@osf/shared/stores/current-resource';
2424

2525
@Component({
2626
selector: 'osf-nav-menu',

src/app/core/constants/ngxs-states.constant.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import { FilesState } from '@osf/features/files/store';
66
import { MetadataState } from '@osf/features/metadata/store';
77
import { ProjectOverviewState } from '@osf/features/project/overview/store';
88
import { RegistrationsState } from '@osf/features/project/registrations/store';
9-
import { AddonsState, CurrentResourceState, WikiState } from '@osf/shared/stores';
9+
import { AddonsState } from '@osf/shared/stores/addons';
1010
import { BannersState } from '@osf/shared/stores/banners';
11+
import { ContributorsState } from '@osf/shared/stores/contributors';
12+
import { CurrentResourceState } from '@osf/shared/stores/current-resource';
13+
import { WikiState } from '@osf/shared/stores/wiki';
1114
import { GlobalSearchState } from '@shared/stores/global-search';
1215
import { InstitutionsState } from '@shared/stores/institutions';
1316
import { InstitutionsSearchState } from '@shared/stores/institutions-search';
@@ -36,4 +39,5 @@ export const STATES = [
3639
GlobalSearchState,
3740
BannersState,
3841
LinkedProjectsState,
42+
ContributorsState,
3943
];

0 commit comments

Comments
 (0)