chore: dependency bump and fixed some edge cases#70
Open
Bert0ns wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the GPX parser project’s tooling and CI to newer Node/GitHub Actions versions while addressing parser edge cases around empty values, empty distance inputs, and missing elevation data.
Changes:
- Migrates tests from Mocha/nyc to Node’s built-in test runner.
- Updates build/documentation tooling from deprecated gulp plugins to maintained alternatives.
- Adds parser edge-case handling and regression tests.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/test.js |
Switches to node:test and adds edge-case regression tests. |
src/GPXParser.js |
Updates element value parsing, direct selector handling, empty distance handling, and empty elevation aggregation. |
package.json |
Updates scripts and dependency/tooling versions. |
gulpfile.js |
Replaces deprecated gulp plugins with gulp-terser, gulp-rename, and CLI-based test/doc tasks. |
.gitignore |
Ignores generated documentation output. |
.github/workflows/master-ci.yml |
Updates CI Node and action versions for master. |
.github/workflows/develop-ci.yml |
Updates CI Node and action versions for develop. |
Files not reviewed (1)
- test/test.js: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| strategy: | ||
| matrix: | ||
| node-version: [8.x, 10.x, 12.x] | ||
| node-version: [18.x, 20.x, 22.x] |
Comment on lines
190
to
+202
| gpxParser.prototype.getElementValue = function(parent, needle){ | ||
| let elem = parent.querySelector(needle); | ||
| if(elem != null){ | ||
| return elem.innerHTML != undefined ? elem.innerHTML : elem.childNodes[0].data; | ||
| if(elem == null){ | ||
| return null; | ||
| } | ||
| return elem; | ||
|
|
||
| let text = elem.textContent; | ||
| if(text == null){ | ||
| return null; | ||
| } | ||
|
|
||
| text = text.trim(); | ||
| return text.length > 0 ? text : null; |
| @@ -24,17 +26,14 @@ | |||
| }, | |||
| "homepage": "https://github.com/Luuka/GPXParser.js#readme", | |||
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Updated build/test tooling to remove vulnerable dependency chains and keep the workflow current.
Switched tests to Node’s built-in runner and simplified the test command.
Updated minification and documentation tasks to maintained tooling.
Fixed edge-case parser bugs (empty tags, empty inputs, missing elevations) and added regression tests.
Updated CI to modern Node versions that support node --test and refreshed GitHub Actions versions.