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

feat: install only production dependencies in administration #75

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

shyim
Copy link
Member

@shyim shyim commented Jan 5, 2024

No description provided.

Copy link

github-actions bot commented Jan 5, 2024

Thanks for the PR 😍

How to test these changes in your application

  1. Add the Shopware flex endpoint in your composer.json to https://raw.githubusercontent.com/shopware/recipes/flex/pull-75/index.json.

    # When jq is installed
    jq '.extra.symfony.endpoint |= [ "https://raw.githubusercontent.com/shopware/recipes/flex/pull-75/index.json" ] + .' composer.json > composer.tmp && mv composer.tmp composer.json

    or manually

    "endpoint": [
        "https://raw.githubusercontent.com/shopware/recipes/flex/pull-75/index.json",
        "https://raw.githubusercontent.com/shopware/recipes/flex/main/index.json",
        "flex://defaults"
    ]
  2. Install the package(s) related to this recipe:

    composer req 'shopware/administration:^6.6'

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

shopware/administration

6.4 vs 6.6
diff --git a/shopware/administration/6.4/bin/build-administration.sh b/shopware/administration/6.6/bin/build-administration.sh
index e18f44f..a96c561 100755
--- a/shopware/administration/6.4/bin/build-administration.sh
+++ b/shopware/administration/6.6/bin/build-administration.sh
@@ -4,6 +4,9 @@ CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
 
 export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}"
 export ENV_FILE=${ENV_FILE:-"${PROJECT_ROOT}/.env"}
+export NPM_CONFIG_FUND=false
+export NPM_CONFIG_AUDIT=false
+export NPM_CONFIG_UPDATE_NOTIFIER=false
 
 # shellcheck source=functions.sh
 source "${PROJECT_ROOT}/bin/functions.sh"
@@ -66,7 +69,7 @@ else
     echo "Cannot check extensions for required npm installations as jq is not installed"
 fi
 
-(cd "${ADMIN_ROOT}"/Resources/app/administration && npm install --no-audit --prefer-offline)
+(cd "${ADMIN_ROOT}"/Resources/app/administration && npm install --prefer-offline --production)
 
 # Dump entity schema
 if [[ -z "${SHOPWARE_SKIP_ENTITY_SCHEMA_DUMP-""}" ]] && [[ -f "${ADMIN_ROOT}"/Resources/app/administration/scripts/entitySchemaConverter/entity-schema-converter.ts ]]; then

@shyim shyim merged commit 6d65a25 into main Jan 5, 2024
1 of 2 checks passed
@shyim shyim deleted the admin-6.6-prod-deps branch January 5, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant