Skip to content

Commit

Permalink
chore(deps): Updating FEC and related packages (#1206)
Browse files Browse the repository at this point in the history
* chore(deps): Updating FEC and related packages

* Feedback from review

---------

Co-authored-by: Egor Shamardin <[email protected]>
  • Loading branch information
Andrewgdewar and LightOfHeaven1994 authored Oct 25, 2024
1 parent d87c000 commit 8cf53a8
Show file tree
Hide file tree
Showing 12 changed files with 4,197 additions and 8,426 deletions.
26 changes: 0 additions & 26 deletions babel.config.js

This file was deleted.

18 changes: 18 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": ["@babel/preset-react", "@babel/preset-env"],
"plugins": [
[
"transform-inline-environment-variables",
{
"include": ["NODE_ENV"]
}
],
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import"
],
"env": {
"componentTest": {
"plugins": ["istanbul"]
}
}
}
12 changes: 7 additions & 5 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { defineConfig } = require('cypress');
const { devServer } = require('@cypress/webpack-dev-server');
const webpackConfig = require('./config/cypress.webpack.config.js');
const codeCoverageTask = require('@cypress/code-coverage/task');

Expand All @@ -7,11 +8,12 @@ module.exports = defineConfig({
viewportHeight: 660,
video: false,
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig
},
devServer: (devServerConfig) =>
devServer({
...devServerConfig,
framework: 'react',
webpackConfig,
}),
specPattern: 'src/**/*.cy.{js,ts,jsx,tsx}',
setupNodeEvents(on, config) {
codeCoverageTask(on, config);
Expand Down
22 changes: 10 additions & 12 deletions fec.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
const { resolve } = require('path');
const path = require('path');
const { dependencies, insights } = require('./package.json');

module.exports = {
appName: insights.appname,
appUrl: '/insights/patch',
debug: true,
useProxy: process.env.PROXY === 'true',
proxyVerbose: true,
plugins: [],
...(process.env.HOT ? { hotReload: process.env.HOT === 'true' } : { hotReload: true }),
...(process.env.port ? { port: parseInt(process.env.port) } : {}),
moduleFederation: {
moduleName: insights.appname,
exposes: {
'./RootApp': path.resolve(__dirname, './src/AppEntry'),
'./SystemDetail': path.resolve(__dirname, './src/index.js')
},
shared: [
{
'react-router-dom': {
singleton: true,
import: false,
version: '^6.8.1',
version: dependencies['react-router-dom'],
requiredVersion: '>=6.0.0 <7.0.0'
}
}
],
exposes: {
'./RootApp': resolve(__dirname, './src/AppEntry'),
'./SystemDetail': resolve(__dirname, './src/index.js')
}
]
}
};
21 changes: 21 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
coverageDirectory: "./codecov-jest/",
testEnvironment: "jsdom",
transform: {
"^.+\\.(js|jsx)$": "babel-jest",
},
collectCoverage: true,
collectCoverageFrom: ["src/**/*.js", "!src/**/stories/*"],
setupFiles: ["<rootDir>/config/setupTests.js"],
roots: ["<rootDir>/src/"],
moduleNameMapper: {
"\\.(css|scss)$": "identity-obj-proxy",
},
testPathIgnorePatterns: [
"src/SmartComponents/SystemDetail/InventoryDetail.test.js",
"src/SmartComponents/PatchSet/PatchSet.test.js",
],
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!(@patternfly/react-core/|@patternfly/react-icons/|@redhat-cloud-services|@openshift|lodash-es|@patternfly/react-table|@patternfly/react-tokens|p-all)).*$",
],
};
Loading

0 comments on commit 8cf53a8

Please sign in to comment.