Skip to content

[FSSDK-13494] Update dev dependencies and move to ESLint flat config - #1194

Open
Raju Ahmed (raju-opti) wants to merge 7 commits into
masterfrom
raju/dep
Open

Raju Ahmed (raju-opti) wants to merge 7 commits into
masterfrom
raju/dep

Conversation

@raju-opti

@raju-opti Raju Ahmed (raju-opti) commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Updates dev dependencies to clear npm audit findings (28 → 9, no high or critical left) and moves to ESLint flat config. Nothing changes for SDK users.

  • ESLint 8 → 10: ESLint 8 is end-of-life. eslint.config.js replaces .eslintrc.js and .eslintignore, typescript-eslint 8 replaces @typescript-eslint/* 5, and the local rules are an inline plugin, so eslint-plugin-local-rules is removed.
  • No lint after npm test: removed the posttest hook. ESLint 10 needs Node 20, so it crashed the Node 18 unit test job, and the lint job already runs lint.
  • Lint fixes: two expect(...).not.toHaveBeenCalled calls in decision_service/index.spec.ts were missing (), so they never asserted. Plus small prefer-const and unknown fixes.
  • mocha 10 → 11.8, nyc 15 → 17.1: the newest versions that still support Node 18. mocha 11 also brings js-yaml 4.3.2, which fixes a high advisory.
  • Removed ts-loader and webpack: unused; the build is tsc + rolldown.
  • Other bumps: @types/node 20, happy-dom 21, minimatch 11, vite 6.4.6 and webdriverio 10 (tests/browser). The remaining dev dependencies update within their ranges.
  • cross-spawn 7.1.1 (lockfile only): fixes a critical Windows command-injection advisory (CVE-2026-137199). It's younger than the 7-day min-release-age, so it's pinned in the lockfile, and npm update would revert it until 5 Dec.
  • serialize-javascript override → 7.1.4: mocha 11 requires ^6.0.2, which has high advisories. Only mocha's parallel mode loads it, and we don't use that. Remove the override when moving to mocha 12.

Issues

  • FSSDK-13494

🤖 Generated with Claude Code

@datadog-optimizely-experimentation

datadog-optimizely-experimentation Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f9cdabd | Docs | View more details | Give us feedback!

- ESLint 8 -> 10 with eslint.config.js (replaces .eslintrc.js and
  .eslintignore); typescript-eslint 8 replaces @typescript-eslint/* 5.
  Local rules are registered as an inline plugin, so
  eslint-plugin-local-rules is removed.
- mocha 10 -> 11.8 and nyc 15 -> 17.1, the newest versions that still
  support Node 18.
- Remove unused coveralls-next, ts-loader and webpack. coveralls-next
  pinned js-yaml 4.2.0; mocha now gets 4.3.2.
- Bump @types/node, happy-dom, minimatch, vite, and webdriverio in
  tests/browser.
- Fix code flagged by the new lint rules, including two
  `not.toHaveBeenCalled` assertions in the decision service spec that
  never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mocha-lcov-reporter

- Run `npm update --save`: dev dependencies move to the newest versions
  their current ranges allow (e.g. rolldown 1.3.3, netinfo 11.5.2,
  nise 6.1.5, tslib 2.9.1, typescript 4.9.5), and the lockfile picks up
  newer transitive versions.
- Remove mocha-lcov-reporter. Nothing uses it; coverage/lcov.info comes
  from nyc's lcov reporter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Node 18 compatibility remains unverified for ESLint 10 and happy-dom 21, which require Node 20+, and the WebdriverIO 10 browser matrix still needs confirmation.

No open issues 🎉

1 file not reviewed
  • tests/browser/package-lock.json: Generated file
What changed in this PR

Modernizes the SDK’s development tooling and migrates ESLint to flat configuration, with no intended SDK behavior changes.

Changes:

  • Updates development and browser-test dependencies and removes unused tooling.
  • Replaces legacy ESLint configuration with flat config and inline local rules.
  • Fixes two inactive test assertions and makes small lint-driven cleanups.
File Description
tests/​browser/​package.json Upgrades WebdriverIO to version 10.
tests/​browser/​package-lock.json Locks updated browser-test dependencies.
package.json Updates and trims development dependencies.
lib/​tests/​uuid_cjs_shim.js Updates lint suppression comments.
lib/​project_config/​optimizely_config.ts Uses constant map bindings.
lib/​odp/​segment_manager/​odp_segment_api_manager.ts Types parsed JSON as unknown.
lib/​import.react_native/​react-native-get-random-values.ts Updates a lint suppression comment.
lib/​import.react_native/​fast-text-encoding.ts Updates a lint suppression comment.
lib/​import.react_native/​@react-native-async-storage/​async-storage.ts Updates a lint suppression comment.
lib/​core/​decision_service/​index.spec.ts Invokes two previously inactive assertions.
eslint.config.js Adds flat configuration and inline local rules.
eslint-local-rules/​require-platform-declaration.js Updates configuration guidance and lint comments.
eslint-local-rules/​README.md Documents inline rule registration.
eslint-local-rules/​index.js Updates the plugin registration comment.
CONTRIBUTING.md Links to the new ESLint configuration.
.eslintrc.js Removes legacy ESLint configuration.
.eslintignore Moves ignore patterns into flat configuration.

Review effort: Balanced

The posttest hook ran lint in every unit_tests matrix job. ESLint 10 needs
Node 20+, so the Node 18 job crashed in the lint step. The lint job already
runs npm run lint, so the unit_tests jobs don't need to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

Coveralls (coveralls) commented Dec 2, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 79.157% (+1.7%) from 77.435% — raju/dep into master

cross-spawn 7.0.6 has a critical advisory (GHSA-ghv9-86vm-4v8m): command
injection on Windows when spawning batch files, fixed in 7.1.0. It's a dev
dependency of eslint, nyc and react-native's tooling.

7.1.1 is younger than min-release-age, so it's pinned in the lockfile
directly. npm ci installs locked versions without the age check, but npm
update would move it back to 7.0.6 until 7.1.1 is 7 days old (5 Dec).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mocha 11 requires serialize-javascript ^6.0.2, which has high-severity
advisories fixed only in 7.1.3+. mocha 12 accepts 7.x but needs Node 20,
and we still test on Node 18.

serialize-javascript 7's only breaking change is requiring Node 20; its API
is the same. mocha only loads it in parallel mode, which our test scripts
don't use, so the Node 18 jobs never load it. Remove this override when
moving to mocha 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the development-tooling updates and ESLint configuration migration.

No open issues 🎉

1 file not reviewed
  • tests/browser/package-lock.json: Generated file

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants