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

Fixes #37819 - Remove @theforeman/builder usage #10319

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MariaAga
Copy link
Member

@MariaAga MariaAga commented Sep 13, 2024

Moving it into foreman from foreman-js.
I saw it being used in some plugins and I think it can be removed from them, if they run npm test and webpack compilation goes without errors for them (for example: REX).
Other plugins can stop using builder as well and import from core directly, for example, in Katello:

const { foremanLocation } = require('@theforeman/find-foreman');

module.exports = {
  presets: [foremanLocation()+'/webpack/babel'],
};

Also updated babel & babal-preset-env, all the plugins that are in the babel config are already in preset-env new version so no need to move them
('@babel/plugin-proposal-class-properties'
'@babel/plugin-proposal-object-rest-spread'
'@babel/plugin-proposal-optional-chaining'
'@babel/plugin-transform-object-assign'
'@babel/plugin-syntax-dynamic-import'
'@babel/plugin-syntax-optional-chaining')

@MariaAga MariaAga requested a review from a team as a code owner September 13, 2024 13:09
@github-actions github-actions bot added the UI label Sep 13, 2024
@MariaAga MariaAga force-pushed the remove-foreman-builder branch from da895e1 to ca27926 Compare September 13, 2024 15:24
@@ -97,7 +97,7 @@ const commonConfig = function() {
exclude: /node_modules(?!\/(@novnc|unidiff))/,
loader: 'babel-loader',
options: {
presets: [require.resolve('@theforeman/builder/babel')],
presets: [require.resolve('../webpack/babel')],
Copy link
Member

Choose a reason for hiding this comment

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

In other places we always use __dirname. I'd prefer it if we were consistent and didn't rely on the current working directory too much. Perhaps we need a new const project_root = path.join(__dirname, '..') that can then be used everywhere.

.babelrc.js Outdated Show resolved Hide resolved
@MariaAga
Copy link
Member Author

Need to fix the imports yeah, thanks!

@MariaAga MariaAga force-pushed the remove-foreman-builder branch from 3d299f7 to 370d14e Compare September 17, 2024 13:37
package.json Outdated Show resolved Hide resolved
@MariaAga
Copy link
Member Author

@theforeman/packaging I'm assuming theforeman/foreman-packaging#11257 will make rpm-build happy?

@MariaAga MariaAga force-pushed the remove-foreman-builder branch from d65c93a to 979acb9 Compare September 17, 2024 15:43
.babelrc.js Outdated Show resolved Hide resolved
.babelrc.js Show resolved Hide resolved
@MariaAga MariaAga force-pushed the remove-foreman-builder branch from 979acb9 to fa8205c Compare October 29, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants