Bug #95216
closedrunTests.sh behaves different than the package.json "script" commands
0%
Description
In the contribution workflow we promote using `yarn build-...` which is a shorthand for using the defined commands in package.json "script" section (https://github.com/TYPO3/typo3/blob/master/Build/package.json#L72-L80).
runTests.sh provides the commands `buildJavascript`/`buildCss`, too.
In the case of `buildJavascript` this produces slightly differently minified output to `yarn build-js` (for example a `;` somewhere instead of a `,`).
The called commands are:
./node_modules/.bin/grunt scripts # cd Build && yarn install && yarn build-js ./node_modules/grunt/bin/grunt scripts # Build/Scripts/runTests.sh -s buildJavascript
I'd propose to use the commands from the package.json via yarn in runTests.sh, too.
I would also take the opportunity to coerce them into one command/"suite" with arguments, too if technically possible. (E.g. `Build/Scripts/runTests.sh -s yarn build-css`). That should make it less complex to understand where they come from and what they do.
It appears that the `Build/Scripts/runTests.sh -s build*` commands are currently not part of the CI https://github.com/TYPO3/typo3/tree/master/Build/gitlab-ci - I would suggest to add them to check for correct builds.
Updated by Jonas Eberle about 3 years ago
Hm, `./node_modules/.bin/grunt scripts` is just a symlink... Still it produces reproducibly the same, but different output than the other command.
Updated by Gerrit Code Review about 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71086
Updated by Jonas Eberle about 3 years ago
There are other commands in runTests.sh that use the node stack. It would make sense IMHO to get them all under the "yarn" umbrella.
checkGruntclean -> check_grunt_clean -> node_modules/grunt/bin/grunt build lintScss -> lint_scss -> node_modules/grunt/bin/grunt stylelint lintHtml -> lint_html -> node_modules/grunt/bin/grunt lintspaces lintTypescript -> lint_typescript -> node_modules/grunt/bin/grunt eslint unitJavascript -> unit_javascript -> Build/node_modules/karma/bin/karma start vendor/typo3/testing-framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.ci.js --single-run
Updated by Jonas Eberle about 3 years ago
- Status changed from Under Review to Closed