Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to NX and refactor of Utils and Core into libraries. #4019

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
20bb4ca
[DURACOM-307] start migration and type fixing
FrancescoMolinaro Feb 5, 2025
1ddcd2a
[DURACOM-307] fix nested var issue
FrancescoMolinaro Feb 6, 2025
83cf4f6
[DURACOM-307] fix lint
FrancescoMolinaro Feb 6, 2025
cd4c1a2
[DURACOM-307] remove NgIf and NgFor imports
FrancescoMolinaro Feb 6, 2025
cc835e0
[DURACOM-307] remove not migrated directives, clean up
FrancescoMolinaro Feb 6, 2025
a038fff
[DURACOM-307] fix tests
FrancescoMolinaro Feb 6, 2025
c3d3b1a
[DURACOM-307] add eslint rule to enforce control flow
FrancescoMolinaro Feb 7, 2025
1a5d015
[DURACOM-237] Migrate and Init NX
atarix83 Feb 17, 2025
2003ef4
[DURACOM-327] Fix start:dev command
atarix83 Feb 18, 2025
3498315
[DURACOM-327] Add utils library
atarix83 Feb 18, 2025
2bddd1e
[DURACOM-327] move modules called from core into core
FrancescoMolinaro Feb 19, 2025
98fc55b
[DURACOME-327] move into core state selectors and some models and utils
FrancescoMolinaro Feb 19, 2025
cc3e06a
[DURACOM-327] extract route util method
FrancescoMolinaro Feb 19, 2025
57d6d92
[DURACOM-327] move correlation id into core, replace AppState with Co…
FrancescoMolinaro Feb 19, 2025
b9587b0
[DURACOM-327] move core dependencies (imported files) into core folde…
FrancescoMolinaro Feb 20, 2025
34412fd
[DURACOM-327] move core dependencies (imported files) into core folde…
FrancescoMolinaro Feb 20, 2025
9eaefaf
[DURACOM-327] substitute environment import with injection token
FrancescoMolinaro Feb 20, 2025
163b27b
[DURACOM-327] move mocks and routing functions + remaining references…
FrancescoMolinaro Feb 20, 2025
0d00475
[DURACOM-327] move form field metadata value model into core
FrancescoMolinaro Feb 21, 2025
9f25941
[DURACOM-327] remove wrong import
FrancescoMolinaro Feb 21, 2025
a8053f2
[DURACOM-327] move core into library
FrancescoMolinaro Feb 21, 2025
12848e3
[DURACOM-327] remove all remaining references to app config, create i…
FrancescoMolinaro Feb 21, 2025
40d5ed2
[DURACOM-327] update index ts files
FrancescoMolinaro Feb 21, 2025
c06ba44
[DURACOM-327] update indexes and fix compilation issue
FrancescoMolinaro Feb 21, 2025
181ea33
[CST-15085] Fix internal core import WIP
alexandrevryghem Dec 4, 2024
9b76890
[CST-15085] Fix internal core import WIP
atarix83 Feb 22, 2025
9888a6a
[CST-15085] Fix lint using the root config
atarix83 Feb 23, 2025
18b493e
[CST-15085] Fix internal core import WIP
atarix83 Feb 23, 2025
5214e2c
[CST-15085] Fix internal core import WIP
atarix83 Feb 24, 2025
019ba26
[DURACOM-327] Fix internal core import WIP
atarix83 Feb 24, 2025
de427a6
[DURACOM-327] Fix ts config
atarix83 Feb 24, 2025
7f26b5f
[DURACOM-327] Fix lint
atarix83 Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@
"rules": {
// Custom DSpace Angular rules
"dspace-angular-html/themed-component-usages": "error",
"dspace-angular-html/no-disabled-attribute-on-button": "error"
"dspace-angular-html/no-disabled-attribute-on-button": "error",
"@angular-eslint/template/prefer-control-flow": "error"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ yarn-error.log
junit.xml

/src/mirador-viewer/config.local.js



.nx/cache
.nx/workspace-data
.angular
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
.angular
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"nrwl.angular-console",
"angular.ng-template",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner"
]
}
292 changes: 0 additions & 292 deletions angular.json

This file was deleted.

4 changes: 2 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import {
AuthTokenInfo,
TOKENITEM,
} from 'src/app/core/auth/models/auth-token-info.model';
} from '@dspace/core';
import {
DSPACE_XSRF_COOKIE,
XSRF_REQUEST_HEADER,
} from 'src/app/core/xsrf/xsrf.constants';
} from '@dspace/core';
import { v4 as uuidv4 } from 'uuid';

// Declare Cypress namespace to help with Intellisense & code completion in IDEs
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './commands';
// https://github.com/component-driven/cypress-axe
import 'cypress-axe';

import { DSPACE_XSRF_COOKIE } from 'src/app/core/xsrf/xsrf.constants';
import { DSPACE_XSRF_COOKIE } from '@dspace/core';

// Runs once before all tests
before(() => {
Expand Down
5 changes: 5 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getJestProjectsAsync } from '@nx/jest';

export default async () => ({
projects: await getJestProjectsAsync(),
});
3 changes: 3 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
7 changes: 7 additions & 0 deletions modules/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# core

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test core` to execute the unit tests.
21 changes: 21 additions & 0 deletions modules/core/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default {
displayName: 'core',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/modules/core',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
Loading