← 输入框|github.com|刷新
Skip to content

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

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

Raju Ahmed (raju-opti) wants to merge 2 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 tooling and removes unused dev dependencies. npm audit drops from 26 findings (14 high) to 10 (1 high). Nothing changes for SDK users.

  • ESLint 8 → 10: eslint.config.js replaces .eslintrc.js and .eslintignore. typescript-eslint 8 replaces @typescript-eslint/* 5. The local rules are registered as an inline plugin, so eslint-plugin-local-rules is removed. v8 renamed no-var-requires to no-require-imports, so the disable comments are updated. no-explicit-any and no-unused-vars stay warnings; v8's recommended config made them errors.
  • Lint fixes: two expect(...).not.toHaveBeenCalled lines in decision_service/index.spec.ts were missing (), so they never asserted anything. They now run and pass. Also two prefer-const fixes in optimizely_config.ts and an unknown type in odp_segment_api_manager.ts.
  • Test tooling: mocha 10 → 11.8 and nyc 15 → 17.1, the newest versions that support Node 18 (mocha 12 and nyc 18 need Node 20). Coverage totals are unchanged except the branch count, which nyc 17's instrumenter counts differently (51.77% → 51.46%).
  • Removed, unused:
    • coveralls-next: CI uploads coverage with the Coveralls action. It also pinned js-yaml to 4.2.0, which had high-severity advisories; mocha now gets 4.3.2.
    • mocha-lcov-reporter: coverage/lcov.info comes from nyc's lcov reporter.
    • ts-loader and webpack: the build is tsc + rolldown.
  • Other bumps: @types/node 20, happy-dom 21, minimatch 11, vite 6.4.6, and webdriverio 10 in tests/browser. The remaining dev dependencies move to the newest versions their current ranges allow (npm update --save; e.g. rolldown 1.3.3, typescript 4.9.5), and the lockfile picks up newer transitive versions.

Node 18 risk: eslint 10, @eslint/js 10, happy-dom 21 and minimatch 11 all declare Node 20+ in engines. The unit_tests job runs vitest (happy-dom environment) and lint on Node 18. The Node 18 job on this PR will show whether they still work there. The npm update adds no new Node 20+ packages to that job; the new ones are eslint 10's own dependencies, rolldown's WASM fallback (build only), and react-native, which already needed Node 22.

Test plan

  • Locally on Node 22: npm test passes (815 mocha, 1137 vitest, lint with no errors), and npm run build passes.
  • npm run coveralls writes coverage/lcov.info for the Coveralls step.
  • CI on this PR runs unit tests on Node 18/20/22/24 and the browser tests with webdriverio 10.

Issues

  • FSSDK-13494

🤖 Generated with Claude Code

- 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>
@datadog-optimizely-experimentation

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

Copy link
Copy Markdown

Pipelines

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

Javascript | unit_tests (18) — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Useful? React with 👍 / 👎

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

…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>

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.

1 participant