Skip to content

Remove the root node_modules symlink and point badges at 1.14.x - #96

Merged
loevgaard merged 2 commits into
1.14.xfrom
remove-node-modules-symlink-1.14.x
Oct 19, 2026
Merged

loevgaard merged 2 commits into
1.14.xfrom
remove-node-modules-symlink-1.14.x

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Fixes #91. This is the last maintained branch: 2.2.x was done in #93, and 1.12.x and 2.0.x have been deleted.

Remove the root node_modules symlink

The 1.x approach from #91:

  • tests/Application/webpack.config.js sets resolve.modules on both the shop and the admin config: ['node_modules', path.resolve(__dirname, 'node_modules')], with a comment explaining why.
    • The entries live in vendor/sylius/sylius/…, so walking up from them never reaches tests/Application/node_modules.
    • The relative node_modules keeps the normal lookup; the absolute path is the fallback the symlink used to provide.
  • The root node_modules symlink is deleted.
  • .gitignore: /node_modules/ → /node_modules, so a recreated symlink stays ignored (checked with git check-ignore).
  • .gitattributes: dropped /node_modules.

Verified

The 1.14.x CI doesn't build assets, so I checked by hand. I used a fresh clone in a directory with no node_modules in any parent: PHP 8.1, composer install, Node 20 (.nvmrc), Yarn 1.22.22, then yarn install && yarn build in tests/Application.

Setup Result
With the symlink (before) Compiled with 10 and 12 warnings (Sass deprecations from Sylius), 56 files in public/build
Without the symlink, no fallback Failed to compile with 42 and 46 errors: "../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private/entry.js" contains a reference to the file "semantic-ui-css/semantic.css"
Without the symlink, with the fallback (this PR) Compiled with the same 10 and 12 warnings, 56 files. Byte-identical to the build with the symlink (SHA-256 over all files: 7f00c2c2…)

Point the badges at 1.14.x

The README's Codecov and Stryker badges, and logs.stryker.badge in infection.json.dist, still used 1.12.x. That branch is deleted, so the badges showed stale data, and 1.14.x reported its mutation score to Stryker under the 1.12.x name. They now use 1.14.x; Codecov already serves a badge for that branch.

The Stryker badge for 1.14.x fills in after the first mutation-test run on the branch.

The shop and admin entries live in vendor/sylius/sylius, outside the test
application, so webpack resolves the packages they import by walking up from
vendor/ and never reaches tests/Application/node_modules. The root symlink put a
node_modules on that path without the build configuration saying so. Tell
webpack instead: resolve.modules keeps the normal lookup and falls back to the
test application's node_modules, on both the shop and the admin config.

Also ignore /node_modules without the trailing slash, so a recreated symlink is
not committed again, and drop it from .gitattributes.

Fixes #91
The README's Codecov and Stryker badges, and the Stryker badge Infection reports
to, still used 1.12.x. That branch has been deleted, so the badges showed stale
data, and 1.14.x reported its mutation score under the 1.12.x name.
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (cc91068) to head (06abb20).

Additional details and impacted files
@@             Coverage Diff             @@
##              1.14.x       #96   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity         2         2           
===========================================
  Files              2         2           
  Lines             16        16           
===========================================
  Hits              16        16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loevgaard
loevgaard merged commit a528ac1 into 1.14.x Oct 19, 2026
30 checks passed
@loevgaard
loevgaard deleted the remove-node-modules-symlink-1.14.x branch October 19, 2026 11:37
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