Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: RedHatInsights/frontend-components
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: afd7f35e4429b30db81cc7e56e89eb336360949b
Choose a base ref
...
head repository: RedHatInsights/frontend-components
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d293d28b7428f6b613a12f579e4d87bc1d95022c
Choose a head ref
  • 11 commits
  • 5 files changed
  • 4 contributors

Commits on Apr 19, 2022

  1. parent 6b9c76c

    author Alexander Rivera <xanverapr@gmail.com> 1649367436 -0400
    committer Alexander Rivera <xanverapr@gmail.com> 1649939631 -0400
    
    parent 6b9c76c
    author Alexander Rivera <xanverapr@gmail.com> 1649367436 -0400
    committer Alexander Rivera <xanverapr@gmail.com> 1649939482 -0400
    
    Adding fec documents
    arivepr committed Apr 19, 2022
    Copy the full SHA
    6d0c3bc View commit details
  2. re-adding correct file

    arivepr committed Apr 19, 2022
    Copy the full SHA
    9a03564 View commit details

Commits on Apr 20, 2022

  1. taking arrays out

    arivepr committed Apr 20, 2022
    Copy the full SHA
    1695061 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    93574d1 View commit details

Commits on Apr 21, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fc9cf7c View commit details
  2. Copy the full SHA
    6414af6 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1420761 View commit details
  4. Copy the full SHA
    3494d45 View commit details
  5. Merge pull request #1523 from Hyperkid123/add-missing-template-flag

    Use chrome template default in webpack plugins.
    Hyperkid123 authored Apr 21, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8222c38 View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bad1ff0 View commit details
  7. Merge pull request #1504 from arivepr/adding-fec-docs

    Adding fec docs
    arivepr authored Apr 21, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d293d28 View commit details
Showing with 334 additions and 31 deletions.
  1. +1 −1 packages/config/package.json
  2. +1 −1 packages/config/src/plugins.js
  3. +8 −5 packages/config/src/plugins.test.js
  4. +0 −24 packages/docs/pages/fec/index.js
  5. +324 −0 packages/docs/pages/fec/index.md
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redhat-cloud-services/frontend-components-config",
"version": "4.6.7",
"version": "4.6.9",
"description": "Config plugins and settings for RedHat Cloud Services project.",
"main": "index.js",
"bin": {
2 changes: 1 addition & 1 deletion packages/config/src/plugins.js
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ module.exports = ({
modules,
generateSourceMaps,
plugins,
useChromeTemplate = false,
useChromeTemplate = true,
definePlugin = {},
} = {}) => [
...(generateSourceMaps
13 changes: 8 additions & 5 deletions packages/config/src/plugins.test.js
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ const REPLACE = 3;
const DEFINE_PLUGIN = 4;

describe('plugins generations, no option', () => {
const enabledPlugins = plugins();
const enabledPlugins = plugins({ useChromeTemplate: false });

it('should generate plugins', () => {
expect(enabledPlugins.length).toBe(7);
});

it('should generate plugins with sourceMaps', () => {
const enabledPlugins = plugins({ generateSourceMaps: true });
const enabledPlugins = plugins({ generateSourceMaps: true, useChromeTemplate: false });
expect(enabledPlugins.length).toBe(8);
});

@@ -22,28 +22,29 @@ describe('plugins generations, no option', () => {
});

describe('rootFolder', () => {
const enabledPlugins = plugins({ rootFolder: '/test/folder' });
const enabledPlugins = plugins({ rootFolder: '/test/folder', useChromeTemplate: false });

it('should generate correct template path for HtmlWebpackPlugin', () => {
expect(enabledPlugins[HTML_WEBPACK].userOptions.template).toBe('/test/folder/src/index.html');
});
});

describe('appDeployment', () => {
const enabledPlugins = plugins({ appDeployment: '/test/folder' });
const enabledPlugins = plugins({ appDeployment: '/test/folder', useChromeTemplate: false });

it('should replace correct string', () => {
enabledPlugins[REPLACE].replace({ html: 'string @@env' }, (_, { html }) => expect(html).toBe('string /test/folder'));
});
});

it('htmlPlugin should update', () => {
const enabledPlugins = plugins({ htmlPlugin: { title: 'myTitle' } });
const enabledPlugins = plugins({ htmlPlugin: { title: 'myTitle' }, useChromeTemplate: false });
expect(enabledPlugins[HTML_WEBPACK].userOptions.title).toBe('myTitle');
});

it('replacePlugin should update', () => {
const enabledPlugins = plugins({
useChromeTemplate: false,
replacePlugin: [
{
pattern: '@@another',
@@ -56,13 +57,15 @@ it('replacePlugin should update', () => {

it('definePlugin should have default replace of CRC_APP_NAME', () => {
const enabledPlugins = plugins({
useChromeTemplate: false,
insights: { appname: 'test_app' },
});
expect(enabledPlugins[DEFINE_PLUGIN].definitions.CRC_APP_NAME).toBe('"test_app"');
});

it('definePlugin should update', () => {
const enabledPlugins = plugins({
useChromeTemplate: false,
definePlugin: {
SOME_VAR: JSON.stringify('test_val'),
},
24 changes: 0 additions & 24 deletions packages/docs/pages/fec/index.js

This file was deleted.

Loading