Skip to content

0.4.6

Choose a tag to compare

@shyim shyim released this 14 Jan 13:52
· 2160 commits to main since this release
7e194f5

NPM strict mode for faster npm installs

It is now possible to opt-in to run all npm install commands of the extension with --production to emit the development dependencies and make the ci build faster.

# .shopware-extension.yml
build:
    zip:
        assets:
            npm_strict: true

Alpine Support / Musl

Dart-sass with esbuild now supports musl libc, therefore, it works finally in Docker images with Alpine

Disabling SaaS loader in ESBuild

The modern CSS is capable of css nesting, variables and so one. So it's not required anymore to use SaaS. Therefore we added a flag to the .shopware-extension.yml to disable it. This makes the pipeline faster and avoids that still scss files being imported.

# .shopware-extension.yml
build:
    zip:
        assets:
            enable_es_build_for_admin: true
            enable_es_build_for_storefront: true
            es_build_disable_sass: true

Snippet Validator

shopware-cli extension validate now checks that the snippets are translated correctly to all languages. It checks that the translation keys exist in all languages, or when a translation key exists only in one language, but not in the main language.

real-world example of validating snippets:

+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|  TYPE   |                                                                                                  MESSAGE                                                                                                  |
+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error   | Snippet file: Resources/app/administration/src/module/sw-flow/snippet/de-DE.json, key: /global/businessEvents/state_enter_b2b_components_pending_order_state_ordered, is not defined in the main language |
| Error   | Snippet file: Resources/app/administration/src/module/sw-quote/snippet/de-DE.json, key: /sw-quote/detail/commentMerchantSent, is not defined in the main language                                         |
| Error   | Snippet file: Resources/app/administration/src/module/sw-quote/snippet/de-DE.json, missing key "/sw-quote/detail/noDocumentFound" in this snippet file, but defined in the main language                  |
| Error   | Snippet file: Resources/app/administration/src/module/sw-quote/snippet/de-DE.json, missing key "/sw-quote/detail/noDocumentYet" in this snippet file, but defined in the main language                    |
| Error   | Snippet file: Resources/app/administration/src/module/sw-quote/snippet/de-DE.json, missing key "/sw-quote/list/gridHeaderOriginalPrice" in this snippet file, but defined in the main language            |

ESBuild Storefront dist files are differently emitted

Changed the output location from dist/js/[name].js to dist/js/[name]/[name].js. At this file location, the JS file works in 6.6 and in previous versions of Shopware. Additionally, it now cleans up the output folder before exporting the files.

npm install --production

With Shopware 6.6 the Administration and Storefront have proper configuration for package.json, so we can use npm install --production to install the modules faster. This works also with the upcoming Shopware 6.5.8.0 for the Storefront

Excluding building assets of extensions

You can now exclude extensions from building in shopware-cli project admin-build, the storefront and the ci command with

# .shopware-project.yml
build:
  exclude_extensions:
    - FroshPlatformShareBasket

Other small changes:

  • Updated bundled dart-sass to 1.69.7
  • shopware-cli project dump does not require a .shopware-project.yml anymore
  • shopware-cli project admin-build, project storefront-build now work also with shopware without a template aka flex
  • shopware-cli extension build now works with SHOPWARE_PROJECT_ROOT environment variable