Fix all 123 npm security vulnerabilities by upgrading devDependencies#73
Fix all 123 npm security vulnerabilities by upgrading devDependencies#73
Conversation
Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
|
@copilot please fix the merge conflicts. |
Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
Resolved in commit ffea051. The
All 191 tests still pass and |
|
@copilot can you fix these merge conflicts for me? |
…ch style Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
…velop style Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
…abilities-and-verify
Done in commit The root cause was that both branches modified the same lines in lib files — develop fixed typos in error messages, while our branch changed arrow-parens style on the same lines. Fixed by:
|
|
@copilot can you accept all current changes in the merge conflicts? |
The merge conflicts are already fully resolved — commit The PR's |
There was a problem hiding this comment.
Pull request overview
Updates the project’s JavaScript tooling to address npm audit findings (Babel/ESLint/nyc/Jasmine upgrades, removal of vulnerable dev deps) and aligns the code/tests/configuration with the updated toolchain.
Changes:
- Upgrade devDependencies (Babel 7, ESLint 8, nyc 15, jasmine 6) and remove unused/vulnerable packages (e.g., coveralls, cross-env).
- Update Babel/ESLint configuration to match new versions and project style.
- Apply small correctness/maintenance fixes in specs and library files (typos, lint-driven refactors, precision-related test updates).
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Upgrades/removes devDependencies and updates npm scripts accordingly. |
| .babelrc | Switches to Babel 7 preset naming (@babel/preset-env). |
| .eslintrc | Adjusts ESLint rules for airbnb-base v15 compatibility and project needs. |
| index.js | Refactors top-level exports assembly to object spread over module exports. |
| lib/sampleVariance.js | Replaces Math.pow usage with exponentiation operator for squaring. |
| lib/populationVariance.js | Replaces Math.pow usage with exponentiation operator for squaring. |
| lib/populationStandardDeviation.js | Removes trailing whitespace-only line (lint/style cleanup). |
| lib/mode.js | Removes trailing whitespace-only line (lint/style cleanup). |
| lib/maximum.js | Fixes error-message typo (“parameterss” → “parameters”). |
| lib/isPositiveNumber.js | Simplifies control flow by removing redundant else. |
| lib/isOdd.js | Simplifies control flow by removing redundant else. |
| lib/isNegativeNumber.js | Simplifies control flow by removing redundant else. |
| lib/isEven.js | Simplifies control flow by removing redundant else. |
| lib/isPositiveInteger.js | Reformats multi-line condition (lint/style alignment). |
| lib/isNegativeInteger.js | Reformats multi-line condition (lint/style alignment). |
| lib/isEqual.js | Removes leading whitespace-only line (lint/style cleanup). |
| lib/isDecimal.js | Removes leading whitespace-only line (lint/style cleanup). |
| lib/isComposit.js | Removes leading whitespace-only line (lint/style cleanup). |
| lib/average.js | Removes trailing whitespace-only line (lint/style cleanup). |
| lib/absoluteValue.js | Removes leading whitespace-only line (lint/style cleanup). |
| spec/isPrimeSpec.js | Updates MAX_SAFE_INTEGER overflow test to avoid numeric precision linting issues. |
| spec/isCompositSpec.js | Updates MAX_SAFE_INTEGER overflow test to avoid numeric precision linting issues. |
| spec/IsDescendingSpec.js | Fixes spec description typo (“parameterss” → “parameters”). |
| spec/IsAscendingSpec.js | Fixes duplicate/incorrect describe block name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "scripts": { | ||
| "test": "nyc jasmine", | ||
| "lint": "eslint index.js lib/**/*.js spec/**/*.js", | ||
| "fix": "eslint index.js lib/**/*.js spec/**/*.js --fix", | ||
| "coveralls": "nyc jasmine && nyc report --reporter=text-lcov | coveralls", | ||
| "build": "BABEL_ENV=production babel index.js -d dist && BABEL_ENV=production babel lib/ -d dist/lib", | ||
| "docs": "documentation readme --readme-file DOCUMENTATION.md -s Variadic.js index.js lib/**" | ||
| }, |
There was a problem hiding this comment.
coveralls script was removed from scripts, but .travis.yml still runs npm run coveralls (line 20). This will break CI; either restore an equivalent coveralls script or update the CI configuration to stop calling it.
There was a problem hiding this comment.
Fixed in commit a45c488 — removed npm run coveralls from .travis.yml since the coveralls package and script were removed in this PR.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jhowardjr <1757435+jhowardjr@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
All three review suggestions are already applied in the branch:
|
.babelrcfor Babel 7.eslintrcfor airbnb-base@15 compatibility (arrow-parens: as-needed with requireForBlockBody)spec/IsAscendingSpec.jsno-loss-of-precisionin spec filesnpm audit fix→ 0 vulnerabilitiesnpm run coverallsfrom.travis.yml(coveralls package removed)🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.