Restructure example-node into a single calculator app (fixes all Dependabot alerts)#53
Merged
Merged
Conversation
Modernize the repository to mirror example-python: a single calculator app under app/ with runnable tests, using Node's built-in test runner and c8 for coverage. Removes the outdated istanbul-mocha tree and the deprecated codecov uploader (which was the source of all 31 Dependabot alerts), drops Travis CI in favor of GitHub Actions, and adds npm/github-actions Dependabot config. Co-authored-by: Cursor <cursoragent@cursor.com>
62d7870 to
7b67df6
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=======================================
Coverage ? 90.90%
=======================================
Files ? 1
Lines ? 22
Branches ? 0
=======================================
Hits ? 20
Misses ? 2
Partials ? 0 ☔ View full report in Codecov by Harness. |
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
Modernizes
example-nodeto mirror the structure ofexample-python: a single calculator app with runnable tests, wired up to Codecov via GitHub Actions.This also resolves all 31 open Dependabot alerts — not by bumping transitive pins, but by removing their source. Every alert came from the deprecated
codecovnpm uploader (→teeny-request→uuid/js-yaml, →http-proxy-agent→@tootallnate/once) and the abandonedistanbul/oldmochatrees. The new stack has 0 vulnerabilities.Changes
app/calculator.js(add/subtract/multiply/divide) andapp/calculator.test.js, mirroring example-python.node --test, zero deps) plusc8forlcovcoverage and a JUnit report.npm testruns the suite, writescoverage/lcov.info, andjunit.xml..travis.ymlwith.github/workflows/ci.yml(checkout → setup-node → install → test → upload coverage/test-results to Codecov, including OIDC)..github/dependabot.ymlfor thenpmandgithub-actionsecosystems.codecov.yml, rewroteREADME.md, updated.gitignore.istanbul-mocha/tree, the deprecatedcodecovuploader,.travis.yml, and the stray rootpackage-lock.json.Test plan
npm installinstalls cleanly (c8only) with 0 vulnerabilities.npm testpasses (4 tests) and producescoverage/lcov.info+junit.xml.