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

RUN-2221: Update webpack 4 to 5 #8968

Merged
merged 20 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
eac6ceb
initial stab
smartinellibenedetti Feb 20, 2024
77e601e
create legacy file and fix logic on index.gsp
smartinellibenedetti Apr 26, 2024
f8c714f
remove duplicated vueloaderplugin as vue-cli-service adds it under th…
smartinellibenedetti Feb 29, 2024
00a2e1a
test
smartinellibenedetti Feb 29, 2024
9d46208
apply tests file
smartinellibenedetti Apr 26, 2024
97539ca
update package-lock after rebase
smartinellibenedetti Apr 26, 2024
d9dd325
undo addition
smartinellibenedetti Apr 26, 2024
d2f2a9a
remove duplicate
smartinellibenedetti Apr 26, 2024
aaeb661
new package lock
smartinellibenedetti Apr 26, 2024
9877dc3
add webpack to overrides (temporary)
smartinellibenedetti Apr 26, 2024
a01ef37
I do not understand how compiler never complained about this file
smartinellibenedetti Apr 28, 2024
e684bea
update vue, jest, typescript and fix jest config
smartinellibenedetti Apr 28, 2024
b1493f8
remove unnecessary css entries and delete uivi18n file
smartinellibenedetti Apr 28, 2024
44d0cf9
remove openssl legacy provider
smartinellibenedetti Apr 28, 2024
9be061e
clean up and fix file import
smartinellibenedetti Apr 29, 2024
756021c
small fix
smartinellibenedetti Apr 30, 2024
0ba5d15
remove compiler-sfc as it is now included as dependency from vue
smartinellibenedetti Apr 30, 2024
a80ec9d
to not lose
smartinellibenedetti Apr 30, 2024
1c4c95e
update package-manager to webpack 5 as well, and add a small fix on p…
smartinellibenedetti Apr 30, 2024
b625369
go back to what devtool originally was
smartinellibenedetti Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"knockout-mapping": "2.6.0",
"perfect-scrollbar": "1.5.0",
"vue": "3.3.2",
"vuex": "^4.1.0"
"vuex": "^4.1.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
},
"overrides": {
"selfsigned": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

<asset:javascript src="framework/editProject.js"/>
<asset:javascript src="static/pages/project-config.js" defer="defer" />
<asset:stylesheet href="static/css/pages/project-config.css" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created, as the respective components do not have any css to be imported.

<g:javascript>

function init(){
Expand Down
2 changes: 1 addition & 1 deletion rundeckapp/grails-app/views/framework/adhoc.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
kind: AuthConstants.TYPE_EVENT
)}"/>

<asset:javascript src="static/css/pages/command.css"/>
<asset:stylesheet src="static/css/pages/command.css"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing a 404 as the generated import had the wrong path and extension

<asset:javascript src="static/pages/command.js"/>
<asset:javascript src="executionState.js"/>
<asset:javascript src="executionControl.js"/>
Expand Down
1 change: 0 additions & 1 deletion rundeckapp/grails-app/views/framework/editProject.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
<asset:javascript src="leavePageConfirm.js"/>
<asset:javascript src="framework/editProject.js"/>
<asset:javascript src="static/pages/project-config.js" defer="defer" />
<asset:stylesheet href="static/css/pages/project-config.css" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created, as the respective components do not have any css to be imported.

<g:jsMessages code="page.unsaved.changes"/>
<g:javascript>

Expand Down
5 changes: 0 additions & 5 deletions rundeckapp/grails-app/views/menu/home.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@

<asset:javascript src="menu/home.js"/>

<!-- VUE CSS MODULES -->
<asset:stylesheet href="static/css/components/version-notification.css"/>
<!-- /VUE CSS MODULES -->
Comment on lines -65 to -67
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created. In fact the components in the folder version-notification do not seem to be used anywhere.

<asset:javascript src="static/pages/login.js"/>
<style type="text/css">
.project_list_item_link {
Expand Down Expand Up @@ -462,9 +459,7 @@
</div>
<!-- VUE JS MODULES -->
<asset:stylesheet href="static/css/pages/home.css"/>
<asset:stylesheet href="static/css/components/first-run.css"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created, but the import isn't needed as the CSS required by its components is included in the chunk-common.css

<asset:javascript src="static/components/first-run.js"/>
<asset:javascript src="static/components/version-notification.js"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created. In fact the components in the folder version-notification do not seem to be used anywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems so, let's do a separate PR to remove that code since it isn't used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, PR for removal: #9135

<!-- /VUE JS MODULES -->
</body>
</html>
4 changes: 1 addition & 3 deletions rundeckapp/grails-app/views/menu/home.next.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<asset:javascript src="menu/home.js"/>

<!-- VUE CSS MODULES -->
<asset:stylesheet href="static/css/components/version-notification.css"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created. In fact the components in the folder version-notification do not seem to be used anywhere.

<!-- /VUE CSS MODULES -->
<asset:javascript src="static/pages/login.js"/>
<style type="text/css">
Expand All @@ -80,7 +79,7 @@
<div id="layoutBody">
<div class="vue-ui-socket">
<g:set var="createProjectAllowed"
value="${auth.resourceAllowedTest(action: AuthConstants.ACTION_CREATE, type: AuthConstants.TYPE_PROJECT, context: AuthConstants.CTX_APPLICATION)}"/>
value="${auth.resourceAllowedTest(action: [AuthConstants.ACTION_CREATE], type: AuthConstants.TYPE_PROJECT, context: AuthConstants.CTX_APPLICATION, has:true)}"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

home.next is behind a feature flag but noticed that this line wasn't 100% its equivalent in home.gsp

<g:set var="roles"
value="${request.subject?.getPrincipals(com.dtolabs.rundeck.core.authentication.Group.class)?.collect { it.name }}"/>
<g:set var="buildIdent" value="${servletContextAttribute(attribute: 'app.ident')}"/>
Expand All @@ -104,7 +103,6 @@
</div>
<!-- VUE JS MODULES -->
<asset:stylesheet href="static/css/pages/home.css"/>
<asset:javascript src="static/components/version-notification.js"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't being created. In fact the components in the folder version-notification do not seem to be used anywhere.

<!-- /VUE JS MODULES -->
</body>
</html>
2 changes: 1 addition & 1 deletion rundeckapp/grails-spa/packages/ui-trellis/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VUE_APP_OUTPUT_DIR=../../../grails-app/assets/provided/static
VUE_APP_DEVTOOL=eval-cheap-module-source-map
VUE_APP_DEVTOOL=eval-cheap-source-map
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eval-cheap-source-map has better performance than eval-cheap-module-source-map. Open to discussion if team would like to try faster modes:

https://webpack.js.org/configuration/devtool/#devtool

VUE_APP_CSS_EXTRACT=true
7 changes: 1 addition & 6 deletions rundeckapp/grails-spa/packages/ui-trellis/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const esModules = ["vue-virtual-scroller", "uuid"].join("|");
module.exports = {
globals: {
"ts-jest": {
tsconfig: "tsconfig.app.json",
},
},
Comment on lines -3 to -7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outdated format

moduleFileExtensions: ["js", "ts", "vue"],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "tsconfig.app.json" }],
"^.+\\.vue$": "@vue/vue3-jest",
"^.+\\.(j|t)s$": "babel-jest",
},
Expand Down