Repository navigation
Fix and correct details from the modernize review - #567
Merged
Merged
Conversation
"Replace CoffeeScript helpers with built-in features" replaced the indexOf
polyfill with trackMethods.includes() and said nothing else changed. That
holds for arrays, but a misconfigured string now matched substrings ('GET'
matched GET), and a number made the page's own xhr.open() throw. Calling
Array.prototype.includes on the value restores the old result: a string or
number matches nothing.
Corrections to earlier commits: - "Build for the 2.0 browser targets": the build.mjs comment said the esbuild target and .browserslistrc "can't drift apart unnoticed", but lowering the target goes unnoticed. The comment now says what the test checks. Its message gave Array.prototype.at as an example es-check catches; es-check detects it only in some code patterns (Object.hasOwn or findLast are reliable examples). - "Remove code for browsers 2.0 doesn't support" said no behavior changes. In jsdom without its pretendToBeVisual option, which has no requestAnimationFrame, pace now throws once it starts. Jest and Vitest turn the option on; the README now says to. - "Update the README's browser support and size": "browsers built on the same engines" was too loose (Samsung Internet 16 is Chromium-based but not supported). The README now names Opera 82+, Samsung Internet 17+ and Chromium 96 or later.
Brings in the event handler changes. pace.min.js is rebuilt from the merged pace.js.
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.
Fixes and corrections found in a review of the commits from "Modernize pace.js":
ajax.trackMethodsthat isn't an array behaves as before again: a string or number matches nothing. Since the modernize PR, a string matched substrings and a number made the page's ownxhr.open()throw. Two tests cover it, and both fail on the previous code.build.mjscomment now says what the es-check test catches, and the README names the supported Opera and Samsung Internet versions and says jsdom needs itspretendToBeVisualoption (Jest and Vitest turn it on).