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

Development: Update to Angular 16 and speedup the build process #6546

Merged
merged 92 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
75493b0
remove SERVER_API_URL
pal03377 May 7, 2023
1ad11ac
remove trailing slash from api url
pal03377 May 7, 2023
2b66448
Merge branch 'develop' into chore/remove-server-api-url
pal03377 May 7, 2023
d25b836
remove more occurrences of SERVER_API_URL
pal03377 May 7, 2023
7bd79b6
adapt tests to removed slash
pal03377 May 7, 2023
6eec5e0
transfer useful changes from #6538
pal03377 May 7, 2023
c5327ca
update package-lock.json
pal03377 May 7, 2023
694201f
slight improvements
pal03377 May 7, 2023
859e6f2
fix jest test packages
pal03377 May 8, 2023
e8002c6
update more angular dependencies
pal03377 May 8, 2023
e652dcc
run prebuild before ts compile scripts
pal03377 May 8, 2023
88f4886
add environment ts (don't gitignore it)
pal03377 May 8, 2023
5a2241f
remove old angular function which does not do anything and is now rem…
pal03377 May 8, 2023
1bbaac9
re-add overrideModules in general
pal03377 May 8, 2023
ca52518
fix test about same component IDs
pal03377 May 8, 2023
470f0b4
remove reference to webpack in gradle config
pal03377 May 8, 2023
fce2c80
correct debug prebuild depending on flag
pal03377 May 8, 2023
bfead97
fix navbar links, which apparently broke with Angular 16
pal03377 May 8, 2023
cc7c009
prebuild: prevent prototype pollution
pal03377 May 8, 2023
f290bbc
mock version change to not interfere
pal03377 May 8, 2023
4d81dae
rewrite scss import to be compatible
pal03377 May 8, 2023
6efd1e6
remove comments about BrowserSync
pal03377 May 8, 2023
ba1372d
remove hat from dependencies in package.json
pal03377 May 8, 2023
bb360e4
add source map explorer to build
pal03377 May 8, 2023
c5b03f8
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 8, 2023
6e078cd
downgrade jest-preset-angular because of a bug with the newest version
pal03377 May 8, 2023
f61ccc2
Revert "downgrade jest-preset-angular because of a bug with the newes…
pal03377 May 8, 2023
9169ac4
text fixes: detailed-grading-system.component.spec.ts
pal03377 May 8, 2023
5e3e365
text fixes: exam-participation.service.spec.ts
pal03377 May 8, 2023
f9777e1
text fixes: statistics-average-score-graph.component.spec.ts
pal03377 May 9, 2023
5165ae3
text fixes: example-text-submission.component.spec.ts
pal03377 May 9, 2023
dc2df5d
text fixes: test-case-distribution-chart.component.ts
terlan98 May 9, 2023
8490cfd
Fix user-import-dialog.component.spec.ts
julian-christl May 9, 2023
e40f475
Fix participant-scores-distribution.component.spec.ts
julian-christl May 9, 2023
e8f0bce
Fix navigation-util.service.spec.ts
julian-christl May 9, 2023
306af30
Fix modeling-submission.service.spec.ts
julian-christl May 9, 2023
6fd8c10
improve prototype pollution prevention in prebuild.mjs
pal03377 May 9, 2023
95b7f44
small prebuild deepMerge fix for working translation again
pal03377 May 9, 2023
3970719
fix file-upload-exercise.service.spec.ts
tobias-lippert May 9, 2023
41cb147
Merge remote-tracking branch 'origin/development/fast-angular-16-buil…
tobias-lippert May 9, 2023
5c31a04
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 9, 2023
d4fbd3e
test fixes: exercise-import.component.spec.ts
pal03377 May 9, 2023
a560337
fix compile error
tobias-lippert May 9, 2023
ca79607
test fixes: participation.service.spec.ts
pal03377 May 9, 2023
94a951d
Merge remote-tracking branch 'origin/development/fast-angular-16-buil…
pal03377 May 9, 2023
f1d3110
test fixes: textblock-feedback-editor.component.spec.ts
pal03377 May 9, 2023
b92e530
test fixes: course-group.component.spec.ts
pal03377 May 9, 2023
6f79948
test fixes: tutorial-groups-registration-import-dialog.component.spec.ts
pal03377 May 9, 2023
6981fbb
more remaining test fixes
pal03377 May 9, 2023
9af0fa8
fix some text-submission-assessment.component.spec.ts tests (not all …
pal03377 May 9, 2023
ac19888
fix text-submission-assessment.component.spec.ts tests
pal03377 May 10, 2023
d728837
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 10, 2023
e4576f0
use webpack-bundle-analyzer instead of source-map-explorer again for …
pal03377 May 10, 2023
4b6241f
test run error fixes
pal03377 May 10, 2023
afab318
Merge branch 'develop' into development/fast-angular-16-build
maximiliansoelch May 10, 2023
c2f041c
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 11, 2023
99a5720
add essentially empty commit for github to recognize my commit
pal03377 May 11, 2023
96a03f9
undo last test commit
pal03377 May 11, 2023
91641bd
remove test change that's apparently not needed?
pal03377 May 11, 2023
ea14308
unify jest mock for export-to-csv
pal03377 May 11, 2023
2df812d
adapt gitignore comment to be more clear
pal03377 May 12, 2023
f7d4fae
better constructor variables for statistics-average-score-graph.compo…
pal03377 May 12, 2023
0e0c112
remove one change because it tests work without it
pal03377 May 12, 2023
24d76a8
change the way to fix one test in text-submission-assessment.componen…
pal03377 May 12, 2023
0c9e5df
remove `async` where not needed
pal03377 May 12, 2023
6418e74
proper route mocking in text-submission-assessment.component.spec.ts
pal03377 May 12, 2023
13d08bd
use better default value instead of test patches
pal03377 May 12, 2023
377ff96
remove SERVER_API_URL from prebuild.mjs
pal03377 May 12, 2023
0ba0164
proper way of fixing assessment-locks.component.ts: take(1) from the …
pal03377 May 12, 2023
efcb207
proper way of fixing test-case-distribution-chart.component.ts: re-ap…
pal03377 May 12, 2023
6bdf08c
proper way of fixing text-feedback-conflicts.component.ts: proper moc…
pal03377 May 12, 2023
94c91b3
proper way of fixing navbar.component.ts typing: use `Event` type ins…
pal03377 May 12, 2023
49f65b1
test improvements on text-submission-assessment.component.spec.ts
pal03377 May 12, 2023
99e8449
add comment explaining somewhat weird tutorial-groups-registration-im…
pal03377 May 12, 2023
a7bb8d9
exam-participation.service.spec.ts: remove an unnecessary copy
pal03377 May 12, 2023
58dabf8
slight adaptions to modeling-submission.service.spec.ts tests
pal03377 May 12, 2023
ee58c8a
undo changes to navigation-util.service.spec.ts because they seem not…
pal03377 May 12, 2023
9e28699
remove now unnecessary additional properties from check
pal03377 May 12, 2023
add6a68
fix navigation-util.service.spec.ts: actually add mock value to mocke…
pal03377 May 12, 2023
e5b704f
fix navigation-util.service.spec.ts: ensure no accidental mixups betw…
pal03377 May 12, 2023
c3afd70
text-submission-assessment.component.spec.ts: fix "should display err…
pal03377 May 13, 2023
f0c2cf9
fix text-submission-assessment.component.spec.ts url test again, now …
pal03377 May 13, 2023
a5c3f1f
remove `.pipe(take(1))` from assessment-locks.component.ts, which is …
pal03377 May 13, 2023
7be4bf9
update jest-preset-angular to 13.1.1 to fix test issues on Windows
pal03377 May 15, 2023
3f26d2b
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 17, 2023
100f3fb
move proxy.conf.mjs to root
pal03377 May 17, 2023
8434302
participation model adaption that doesn't require 200 more changes fo…
pal03377 May 18, 2023
a68cbdc
better participation.service.spec.ts fix with better understanding of…
pal03377 May 18, 2023
6c57384
update Angular to 16.0.2 where possible
pal03377 May 18, 2023
962dff1
remove unused imports
pal03377 May 18, 2023
0ca5ce1
remove unused imports
pal03377 May 18, 2023
38894a0
Merge branch 'develop' into development/fast-angular-16-build
pal03377 May 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ docker/
src/main/generated/
src/main/resources/
uploads/
webpack/
target/
node/
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projects/**/*"
],
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.app.json", "./tsconfig.spec.json", "./tsconfig.webpack.json", "src/test/cypress/tsconfig.json"]
"project": ["./tsconfig.json", "./tsconfig.app.json", "./tsconfig.spec.json", "src/test/cypress/tsconfig.json"]
},
"extends": [
"plugin:prettier/recommended"
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ repos-download/
/src/test/cypress/videos/
/src/test/cypress/build

#################################
# Files generated by prebuild.mjs
#################################
/src/main/webapp/app/environments/environment.*.ts
/src/main/webapp/i18n/*.json

######################
# Artemis configs
######################
Expand Down
32 changes: 24 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
"prefix": "jhi",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"builder": "@angular-devkit/build-angular:browser",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.custom.js"
},
"allowedCommonJsDependencies": [
"sockjs-client",
"hoist-non-react-statics",
Expand Down Expand Up @@ -59,6 +56,11 @@
"polyfills": "src/main/webapp/app/polyfills.ts",
"tsConfig": "tsconfig.json",
"inlineStyleLanguage": "scss",
"stylePreprocessorOptions": {
"includePaths": [
"."
]
},
"assets": [
"src/main/webapp/content",
"src/main/webapp/logo/favicon.svg",
Expand All @@ -77,6 +79,7 @@
"src/main/webapp/logo/mstile-310x150.png",
"src/main/webapp/logo/mstile-310x310.png",
"src/main/webapp/logo/safari-pinned-tab.svg",
"src/main/webapp/i18n",
{
"glob": "*.{js,css,html,png}",
"input": "./node_modules/swagger-ui-dist",
Expand Down Expand Up @@ -123,7 +126,7 @@
"hidden": false,
"vendor": false
},
"namedChunks": false,
"namedChunks": true,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -141,6 +144,12 @@
"maximumWarning": "1mb",
"maximumError": "1.6mb"
}
],
"fileReplacements": [
{
"replace": "src/main/webapp/app/environments/environment.ts",
"with": "src/main/webapp/app/environments/environment.override.ts"
}
]
},
"development": {
Expand All @@ -149,16 +158,23 @@
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"namedChunks": true,
"fileReplacements": [
{
"replace": "src/main/webapp/app/environments/environment.ts",
"with": "src/main/webapp/app/environments/environment.override.ts"
}
]
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "artemis:build:development",
"port": 4200
"proxyConfig": "proxy.conf.mjs",
"port": 9000
},
"configurations": {
"production": {
Expand Down
7 changes: 3 additions & 4 deletions docs/dev/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Artemis. Artemis is based on `JHipster <https://jhipster.github.io>`__,
i.e. \ `Spring Boot <http://projects.spring.io/spring-boot>`__
development on the application server using Java 17, and TypeScript
development on the application client in the browser using
`Angular <https://angular.io>`__ and Webpack. To get an overview of the
`Angular <https://angular.io>`__. To get an overview of the
used technology, have a look at the `JHipster Technology stack <https://jhipster.github.io/tech-stack>`__
and other tutorials on the JHipster homepage.

Expand Down Expand Up @@ -527,9 +527,8 @@ command:

npm run serve

This compiles TypeScript code to JavaScript code, starts the hot module
replacement feature in Webpack (i.e. whenever you change a TypeScript
file and save, the client is automatically reloaded with the new code)
This compiles TypeScript code to JavaScript code, starts the live reloading feature
(i.e. whenever you change a TypeScript file and save, the client is automatically reloaded with the new code)
and will start the client application in your browser on
``http://localhost:9000``. If you have activated the JIRA profile (see
above in `Server Setup <#server-setup>`__) and if you have configured
Expand Down
3 changes: 0 additions & 3 deletions gradle/profile_dev.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ task webapp(type: NpmTask) {
inputs.files("tsconfig.json", "tsconfig.app.json")
.withPropertyName("tsconfig")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("webpack/")
.withPropertyName("webpack/")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("src/main/webapp/")
.withPropertyName("webapp-source-dir")
.withPathSensitivity(PathSensitivity.RELATIVE)
Expand Down
2 changes: 0 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ const esModules = ['lodash-es', 'franc-min', 'trigram-utils', 'n-gram', 'collaps
const {
compilerOptions: { baseUrl = './' },
} = require('./tsconfig.json');
const environment = require('./webpack/environment');

module.exports = {
globalSetup: 'jest-preset-angular/global-setup',
globals: {
...environment,
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.html$',
Expand Down
Loading