Repository navigation
chore(core): drop unused and replaceable grunt plugins, upgrade vulnerable dev dependencies - #3559
Merged
Merged
Conversation
kumilingus
marked this pull request as ready for review
October 25, 2026 16:59
zbynekstara
approved these changes
Oct 26, 2026
kumilingus
force-pushed
the
chore/core-grunt-cleanup
branch
from
October 26, 2026 12:16
0f3a19d to
9b07f5c
Compare
…rable dev dependencies
Remove grunt plugins and dev dependencies of `@joint/core` that pull in
old, vulnerable transitive packages, and upgrade the parents that pin
vulnerable versions elsewhere:
- `load-grunt-config` + `jit-grunt`: replaced by a small loader in
`Gruntfile.js` that loads every `grunt-*` devDependency
- `grunt-ts`: `ts:test` / `ts:test-exports` are now `shell:ts-test` /
`shell:ts-test-exports` (`tsc --noEmit`)
- `grunt-mocha-test` (no mocha 12 support): `shell:mocha-server`
- `grunt-browserify`, `grunt-webpack`, `webpack`: the browserify test
page and the untested webpack bundle are removed; `test:bundles` keeps
the requirejs pages
- `grunt-contrib-watch`: only used by the `default` alias
- `es-module-shims`, `should`, `webpack-dev-server`: not referenced
- `grunt` 1.6.1 -> 1.6.3 (`minimatch ^3.1.5`, `js-yaml ^3.15.0`),
`mocha` 11.1.0 -> 12.0.3, `lodash` ~4.17.21 -> ^4.18.1
- `@rollup/plugin-terser` ^0.4.4 -> ^1.0.2 in the layout packages and
`@joint/router-avoid` (`serialize-javascript` ^7)
- `mocha` 11.1.0 -> 12.0.3 in `@joint/layout-directed-graph`
- `copy-webpack-plugin` 5.1.1 -> 14.0.0 in three examples (the plugin
now takes `{ patterns }`)
- `grunt-legacy-log` / `grunt-legacy-util` and `terser-webpack-plugin`
refreshed within their ranges
The example already uses the esbuild `application` builder; take it from `@angular/build` instead of `@angular-devkit/build-angular`, which pulls in the webpack toolchain (`copy-webpack-plugin` 12 and the vulnerable `serialize-javascript` 6).
2.5 depends on js-beautify 2, whose editorconfig 3 no longer pins the vulnerable minimatch 9.0.1.
kumilingus
force-pushed
the
chore/core-grunt-cleanup
branch
from
October 26, 2026 12:18
9b07f5c to
2c56ceb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several dev dependencies of the joint workspaces pull in old, vulnerable transitive packages (browserify 16 →
elliptic, chokidar 2 →braces2 /micromatch3 /decode-uri-component,xml2js, pinnedlodash/minimatch/js-yaml/serialize-javascript). This removes the grunt plugins that do little or nothing, and upgrades the parents that pin vulnerable versions instead of overriding them withresolutions.@joint/coregrunt setupload-grunt-config,jit-gruntGruntfile.js:grunt/config/<name>.js→ task config,aliases.js→registerTask, everygrunt-*devDependency loaded withloadNpmTasks;pkgstays in the configgrunt-tsshell:ts-test/shell:ts-test-exports→tsc --noEmit -p test/ts{,-exports}/tsconfig.jsongrunt-mocha-testshell:mocha-server→mocha --reporter spec "test/*-nodejs/*"(grunt-mocha-testdoes not support mocha 12)grunt-browserify,grunt-webpack,webpacktest/jointjs/browserify.htmland the webpack bundle are removed (no test loaded the webpack bundle).test:bundleskeeps the requirejs pages forjoint,geometryandvectorizergrunt-contrib-watchdefaultalias used ites-module-shims,should,webpack-dev-serverThe root
build-bundlesscript (only@joint/coredefined it) is removed, together with itsCLAUDE.mdmention.Upgrades
grunt(@joint/core)minimatch ^3.1.5,js-yaml ^3.15.0mocha(@joint/core,@joint/layout-directed-graph)serialize-javascript ^7lodash(@joint/core)lodash@rollup/plugin-terser(layout-directed-graph, layout-elk, layout-msagl, router-avoid)serialize-javascript ^7copy-webpack-plugin(examples avoid-router-ts, layout-directed-graph, libavoid)serialize-javascript ^7; the config now takes{ patterns: [...] }@angular-devkit/build-angular→@angular/build(example angular-element-view-ts)serialize-javascript6 (viacopy-webpack-plugin12); the example already used the esbuildapplicationbuilder, now taken from@angular/build@vue/test-utils(@joint/vitest-plugin-mock-svg,^2.4.6)minimatch9.0.1: 2.5 moves tojs-beautify2 →editorconfig3grunt-legacy-log/-util,terser-webpack-pluginlodash ^4.18,serialize-javascriptNot included
eslint-plugin-sonarjs4 (would fixminimatch9.0.5): 4.2.2, the latest, crashes onpackages/joint-react/src/__tests__/internal.test.ts(sonarjs/assertions-in-tests:Cannot read properties of undefined (reading 'declarations')). Left for a follow-up.Note: while trying sonarjs 4, re-resolving the lockfile moved sonarjs 3's
typescript: ">=5"dependency to TypeScript 7.0.2, which lacks the JS API sonarjs uses (SyntaxKind), andyarn lintcrashed. The lockfile here is regenerated frommasterso that range stays on 5.9.3 - worth knowing for any futureyarn upthat touches it.Testing
yarn install --immutable: clean.master(diff -rofdist/): byte-identical for@joint/core(yarn dist, 10 files) and for layout-directed-graph, layout-elk, layout-msagl and router-avoid (113 files, including the terser.min.js).@joint/coreyarn test: mocha 4 passing (as onmaster), karma geometry 350 / vectorizer 453 / joint 2179, QUnit requirejs pages 3 + 2 + 2, bothtscchecks pass.shell:ts-test-exportsfails on an injected type error.@joint/layout-directed-graphyarn test(mocha 12): 8 passing, karma 22.yarn lint: passes.copy-webpack-plugin14;index.htmlandlibavoid.wasmare copied intodist/.@joint/vitest-plugin-mock-svgyarn test(after building@joint/mock-svgand the plugin): React and Vue typechecks pass, 2 / 2 tests.@angular/build(same output size as onmaster; the existing initial-bundle budget warning is unchanged).