Skip to content

Commit b8491c0

Browse files
authored
Upgrade to angular 18 (#237)
* Upgrade to angular 18 * Update package json and workflows * Fixe linting * Remove type cypress to make it work again
1 parent 19aee83 commit b8491c0

File tree

38 files changed

+9843
-10552
lines changed

38 files changed

+9843
-10552
lines changed

.github/workflows/push_request_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
cache-dependency-path: '**/package-lock.json'
4444

4545
- name: Install node modules (Dev)
46-
run: npm install
46+
run: npm install --legacy-peer-deps # When @nx/angular plugin is updated, this flag can be removed
4747
working-directory: core
4848

4949
- name: Identifying and reporting lint patterns

.github/workflows/tagged_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
shell: pwsh
167167

168168
- name: Install node modules
169-
run: npm install
169+
run: npm install --legacy-peer-deps # When @nx/angular plugin is updated, this flag can be removed
170170
working-directory: core
171171

172172
- name: Set app version (Unix)

core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.nx/cache

core/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
/.vscode
66
/assembly
77
/.angular
8+
9+
/.nx/cache

core/apps/ame-e2e/project.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
}
1919
},
2020
"lint": {
21-
"executor": "@nx/linter:eslint",
22-
"outputs": ["{options.outputFile}"],
23-
"options": {
24-
"lintFilePatterns": ["apps/ame-e2e/**/*.{js,ts}"]
25-
}
21+
"executor": "@nx/eslint:lint",
22+
"outputs": ["{options.outputFile}"]
2623
}
2724
}
2825
}

core/apps/ame-e2e/tsconfig.cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"allowJs": true,
33
"extends": "../../tsconfig.json",
44
"include": ["src/integration/**/*.ts", "src/support/*.ts", "../../node_modules/cypress"],
5-
"types": ["cypress", "mocha", "cypress-real-events"],
5+
"types": ["mocha", "cypress-real-events"],
66
"resolve": {
77
"extensions": [".js", ".jsx", ".ts", ".tsx"]
88
}

core/apps/ame/project.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@
7878
"executor": "@angular-devkit/build-angular:dev-server",
7979
"configurations": {
8080
"production": {
81-
"browserTarget": "ame:build:production"
81+
"buildTarget": "ame:build:production"
8282
},
8383
"development": {
84-
"browserTarget": "ame:build:development"
84+
"buildTarget": "ame:build:development"
8585
}
8686
},
8787
"defaultConfiguration": "development"
@@ -90,32 +90,28 @@
9090
"executor": "ngx-build-plus:dev-server",
9191
"configurations": {
9292
"production": {
93-
"browserTarget": "ame:build:production"
93+
"buildTarget": "ame:build:production"
9494
},
9595
"development": {
96-
"browserTarget": "ame:build:development"
96+
"buildTarget": "ame:build:development"
9797
}
9898
},
9999
"defaultConfiguration": "development"
100100
},
101101
"extract-i18n": {
102102
"executor": "@angular-devkit/build-angular:extract-i18n",
103103
"options": {
104-
"browserTarget": "ame:build"
104+
"buildTarget": "ame:build"
105105
}
106106
},
107107
"lint": {
108-
"executor": "@nx/linter:eslint",
109-
"options": {
110-
"lintFilePatterns": ["apps/ame/src/**/*.ts", "apps/ame/src/**/*.html"]
111-
}
108+
"executor": "@nx/eslint:lint"
112109
},
113110
"test": {
114111
"executor": "@nx/jest:jest",
115112
"outputs": ["{workspaceRoot}/coverage/apps/ame"],
116113
"options": {
117-
"jestConfig": "apps/ame/jest.config.js",
118-
"passWithNoTests": true
114+
"jestConfig": "apps/ame/jest.config.js"
119115
}
120116
}
121117
}

core/apps/ame/src/assets/samm-units.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SPDX-License-Identifier: MPL-2.0
1212
*/
1313

14-
var sammUDefinition = {
14+
const sammUDefinition = {
1515
quantityKinds: {
1616
absoluteActivity: {name: 'absoluteActivity', label: 'absolute activity'},
1717
absorbance: {name: 'absorbance', label: 'absorbance'},

core/apps/ame/src/assets/styles/theme.scss

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,34 @@ $ame-warn-light: (
121121
),
122122
);
123123

124-
$ame-light-theme: mat.define-light-theme(
124+
$ame-primary-light: mat.m2-define-palette(mat.$m2-indigo-palette);
125+
$ame-accent-light: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
126+
$ame-warn-light: mat.m2-define-palette(mat.$m2-red-palette);
127+
128+
$ame-light-theme: mat.m2-define-light-theme(
125129
(
126130
color: (
127-
primary: mat.define-palette($ame-primary-light),
128-
accent: mat.define-palette($ame-accent-light),
129-
warn: mat.define-palette($ame-warn-light),
131+
primary: $ame-primary-light,
132+
accent: $ame-accent-light,
133+
warn: $ame-warn-light,
130134
),
131135
)
132136
);
133137

138+
.mat-mdc-mini-fab.mat-accent {
139+
--mat-fab-small-foreground-color: var(--ame-font) !important;
140+
}
141+
142+
.mat-badge-medium .mat-badge-content {
143+
position: absolute;
144+
width: 22px !important;
145+
height: 22px !important;
146+
line-height: 22px !important;
147+
font-size: 14px !important;
148+
font-family: sans-serif;
149+
background: var(--ame-blue-500);
150+
color: white;
151+
right: -13px !important;
152+
}
153+
134154
@include mat.all-component-themes($ame-light-theme);

core/apps/ame/src/styles.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* SPDX-License-Identifier: MPL-2.0
1212
*/
1313

14-
@import './assets/styles/colors.scss';
15-
@import './assets/styles/theme.scss';
16-
@import './assets/styles/shape-label.scss';
14+
@use './assets/styles/colors';
15+
@use './assets/styles/theme';
16+
@use './assets/styles/shape-label';
1717
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
1818

1919
* {
@@ -134,46 +134,46 @@ mat-icon {
134134
}
135135

136136
.characteristic {
137-
background-color: $characteristic-color;
137+
background-color: colors.$characteristic-color;
138138
}
139139

140140
.constraint {
141-
background-color: $constraint-color;
141+
background-color: colors.$constraint-color;
142142
}
143143

144144
.entity,
145145
.entityValue,
146146
.abstractentity,
147147
.abstractEntity,
148148
.abstract-entity {
149-
background-color: $entity-color;
149+
background-color: colors.$entity-color;
150150
}
151151

152152
.unit {
153-
background-color: $unit-color;
153+
background-color: colors.$unit-color;
154154
}
155155

156156
.property,
157157
.abstractproperty,
158158
.abstractProperty,
159159
.abstract-property {
160-
background-color: $property-color;
160+
background-color: colors.$property-color;
161161
}
162162

163163
.operation {
164-
background-color: $operation-color;
164+
background-color: colors.$operation-color;
165165
}
166166

167167
.aspect {
168-
background-color: $aspect-color;
168+
background-color: colors.$aspect-color;
169169
}
170170

171171
.trait {
172-
background-color: $trait-color;
172+
background-color: colors.$trait-color;
173173
}
174174

175175
.event {
176-
background-color: $event-color;
176+
background-color: colors.$event-color;
177177
}
178178

179179
.mxTooltip {

0 commit comments

Comments
 (0)