Skip to content

fix(webapps): recognize more license file names - #3094

Merged
kthoms merged 1 commit into
mainfrom
backport/cibseven-635-663-license-header-filenames
Jun 11, 2026
Merged

kthoms merged 1 commit into
mainfrom
backport/cibseven-635-663-license-header-filenames

Conversation

@hauptmedia

Copy link
Copy Markdown
Collaborator

Description

This backports two small CIBSeven fixes for the frontend license-header-loader.

The loader adds license headers for bundled npm dependencies by reading a license file from the package directory. Until now, Operaton only checked a small set of filenames through nested try/catch blocks:

  • LICENSE
  • LICENSE.md
  • LICENSE-MIT.txt
  • LICENSE.txt

Some npm packages use other common variants, for example LICENCE, LICENCE.md, LICENSE-MIT, or lowercase license. In those cases the loader could miss an existing license file and fall back to the package.json license field or log that no license file exists.

What This Fixes

The backport replaces the nested lookup with an explicit list of known license filenames and checks them in order. This makes the build-time license header generation more robust without changing runtime behavior.

The Operaton-specific package fallback remains unchanged:

  • node_modules/<pkg>
  • node_modules/operaton-bpm-webapp/node_modules/<pkg>

Reviewer Notes

This is a build/compliance helper change only. It does not affect shipped application logic except for improving which license text can be embedded during frontend bundling.

The two CIBSeven commits are kept together because the second commit only extends the filename list introduced by the first one.

Attribution

Backported from CIBSeven:

Backport tracking:

  • Change units: 635, 663
  • Branch: backport/cibseven-635-663-license-header-filenames

Testing

  • git diff --check
  • node --check webapps/frontend/scripts/license-header-loader.js
  • npx --yes [email protected] --check scripts/license-header-loader.js
  • Node smoke test with temporary packages using LICENCE, license, and LICENSE-MIT files

Backported commits 7a1eab0dda73c89533ca4cf4f63057fa5510f04b and 411012a5ef95e4415cb120d2221a786eb58fb2c9 from the cibseven repository.

Original author: Serge Krot <[email protected]>

Backport change units: 635, 663
@github-actions github-actions Bot added lang:javascript Pull requests that update Javascript code scope:webapp Changes affecting the legacy webapps. labels Jun 9, 2026
@hauptmedia hauptmedia added the backport:cibseven Changes backported from cibseven label Jun 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@kthoms kthoms added this to the 2.1.2 milestone Jun 11, 2026
@kthoms kthoms added the backport:patch-release Should be ported back to the latest feature release branch. label Jun 11, 2026
@kthoms
kthoms merged commit a7890cf into main Jun 11, 2026
21 checks passed
kthoms pushed a commit that referenced this pull request Jun 11, 2026
Backported commits 7a1eab0dda73c89533ca4cf4f63057fa5510f04b and 411012a5ef95e4415cb120d2221a786eb58fb2c9 from the cibseven repository.

Original author: Serge Krot <[email protected]>

Backport change units: 635, 663

(cherry picked from commit a7890cf)
@kthoms

kthoms commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked for 2.1.2

@kthoms
kthoms deleted the backport/cibseven-635-663-license-header-filenames branch June 11, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:cibseven Changes backported from cibseven backport:patch-release Should be ported back to the latest feature release branch. lang:javascript Pull requests that update Javascript code scope:webapp Changes affecting the legacy webapps.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants