Skip to content

npm vulnerabilities fixes#8511

Merged
aleks-pro merged 25 commits into
DevExpress:masterfrom
aleks-pro:master
May 8, 2026
Merged

npm vulnerabilities fixes#8511
aleks-pro merged 25 commits into
DevExpress:masterfrom
aleks-pro:master

Conversation

@aleks-pro
Copy link
Copy Markdown
Collaborator

@aleks-pro aleks-pro commented Apr 20, 2026

  1. gulp, multer, rollup version updated
  2. markdownlint package removed (didn't find code where we use it)
  3. mocha-reporter-spec-with-retiries package removed
  4. get rid of mocha-simple (execute mocha via cli instead)
  5. replace publish-please with publish action from testcafe-build-system
  6. replicator package removed (included its' code to testcafe repo with tests)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s tooling/dependencies (Node/Gulp/Mocha/etc.), removes unused/obsolete packages, replaces the external replicator dependency with an in-repo implementation, and updates the release publishing workflow to use the shared testcafe-build-system publish action.

Changes:

  • Inlined the replicator package into src/utils/replicator and updated client-side imports accordingly; added server-side tests for the inlined implementation (including a GH-16 security regression test).
  • Migrated server test execution away from gulp-mocha-simple to running Mocha via CLI; removed the custom mocha reporter dependency and adjusted brittle tests.
  • Updated publish automation (removed publish-please and .publishrc, switched to a GitHub Actions-based publish flow) and bumped Node engine / dev tooling versions.

Reviewed changes

Copilot reviewed 22 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/server/runner-test.js Adjusts string-prefix assertions for runner error messages.
test/server/reporter-test.js Adjusts reporter error message assertion to avoid chai-string dependency.
test/server/replicator-test.js Adds coverage for the newly in-repo replicator implementation.
test/server/helpers/gh-16.js Adds a helper for the GH-16 TypedArray deserialization security regression test.
test/server/compiler-test.js Makes stack-frame assertions more robust across Node/Mocha/runtime variations.
test/server/cli-argument-parser-test.js Replaces random long-string generation with deterministic long content.
test/functional/fixtures/api/es-next/iframe-switching/test.js Improves multi-browser error assertions and adds a platform-specific skip.
src/utils/replicator/index.js Introduces the inlined replicator implementation (previously external dependency).
src/utils/replicator/index.d.ts Adds local TypeScript typings for the inlined replicator module.
src/client/driver/command-executors/client-functions/selector-executor/index.ts Switches selector executor to use the in-repo replicator.
src/client/driver/command-executors/client-functions/replicator/transforms/selector-node-transform.ts Updates transform typing import to the in-repo replicator module.
src/client/driver/command-executors/client-functions/replicator/transforms/selector-element-action-transform.ts Updates transform typing import to the in-repo replicator module.
src/client/driver/command-executors/client-functions/replicator/transforms/function-transform.ts Updates transform typing import to the in-repo replicator module.
src/client/driver/command-executors/client-functions/replicator/transforms/client-function-node-transform.ts Updates transform typing import to the in-repo replicator module.
src/client/driver/command-executors/client-functions/replicator/index.ts Switches replicator factory to use the in-repo replicator module.
src/client/driver/command-executors/client-functions/client-function-executor.ts Switches client function executor to use the in-repo replicator module.
src/client-functions/replicator.js Switches client-functions replicator usage to the in-repo replicator module.
package.json Bumps Node engine requirement, updates tooling deps, removes unused packages and publish scripts.
Gulpfile.js Replaces gulp-mocha-based server test runner with Mocha CLI execution; updates lint globs.
gulp/helpers/test-functional.js Removes custom reporter wiring; keeps retry logic via Mocha options.
gulp/helpers/run-shell-commands.js Adds a helper to run shell commands sequentially for Gulp steps.
@types/replicator/index.d.ts Removes the old ambient typings for the external replicator package.
.publishrc Removes publish-please configuration file (publish flow moved to GitHub Actions).
.github/workflows/publish.yml Migrates npm publishing to the testcafe-build-system publish action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish.yml
Comment thread .github/workflows/publish.yml
Comment thread test/server/helpers/replicator-tests-helper.js
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.

Comment thread test/server/cli-argument-parser-test.js
Comment thread package.json
},
"engines": {
"node": ">=16.0.0"
"node": ">=20.0.0"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do this in a separate PR

@aleks-pro aleks-pro changed the title packaje-lock updated + new gulp version installed npm vulnerabilities fixes May 8, 2026
@aleks-pro aleks-pro requested review from Aleksey28 and Bayheck May 8, 2026 08:29
Comment thread test/server/reporter-test.js Outdated

expect(lastErr).instanceOf(ReporterPluginError);
expect(lastErr.message).startsWith(`The "${method}" method of the "customReporter" reporter produced an uncaught error. Error details:\nError: oops`);
expect(lastErr.message.startsWith(`The "${method}" method of the "customReporter" reporter produced an uncaught error. Error details:\nError: oops`)).to.be.true;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify this change? If this test is failed it'll be quite complicated the exact reason, since comparing is hidden under expect(...).to.be.true;. If there's a problem with startsWith, mayby it's better to use match

Copy link
Copy Markdown
Collaborator Author

@aleks-pro aleks-pro May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of dependencies update led to updating chai version. tha new version has no startWith API. so I repaced it with JS startWith method

const opts = {
reporter: 'mocha-reporter-spec-with-retries',
timeout: getTimeout(3 * 60 * 1000),
timeout: getTimeout(3 * 60 * 1000),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But without these retries blinking functional tests we'll be more annoying. I checked that mocha-reporter-spec-with-retries is only used in this repo, so we can move it into testcafe and it's not needed to duplicate it in other repos. What do you think?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but it doesn't look for me that we really use this feature. I can do this if you insist.

@aleks-pro aleks-pro merged commit 2ac4b1d into DevExpress:master May 8, 2026
20 checks passed
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.

4 participants