Repository navigation
Add build tooling, CI and browser tests - #554
Merged
Merged
Conversation
Whitespace only (`git diff -w` is empty): pace.js, pace-theme-default.css and templates/ switch from tabs to 2 spaces, and 40 compiled themes in themes/ get the indentation and final newline their templates produce.
- npm run build: esbuild minifies pace.js and the default theme (ES5, as before); templates compile into themes/ using a dependency-free port of the color functions they use, reproducing the original Grunt build. - npm test: acorn checks that pace.js and pace.min.js are ES5. - Node 26.13.0 (.tool-versions), guarded by devEngines. - "files" allowlist: the npm package keeps the same 172 files as 1.2.4. - .gitignore and .editorconfig. pace.min.js and pace-theme-default.min.css are regenerated by esbuild; behavior is unchanged.
GitHub (and `git blame --ignore-revs-file`) skips the whitespace-only reformat commit, so blame shows each line's real history.
Add build tooling and project configuration
Runs on every pull request and on pushes to master: installs with npm ci, checks that the generated files are up to date (npm run build, then git diff --exit-code), runs npm test and lists the package contents. The job has read-only access to the repository. Its actions are locked to exact commits in .github/workflows/actions.lock (gh actions-lock).
Add checks workflow
They lock in today's behavior before pace.js is rewritten, so the rewrite can be checked against them. Playwright runs pace.js and pace.min.js in Chromium, Firefox and WebKit (Chromium only locally). The tests cover what sites and themes rely on and what the README documents: the public methods, the bar's markup, body classes, events, options, XHR tracking (Pace.ignore, Pace.track, trackMethods, ignoreURLs, restartOnRequestAfter) and restarts on history.pushState. - npm test runs both test:syntax (acorn) and test:browsers (Playwright). - The checks workflow gets a browser-tests job; the build job runs test:syntax.
Add browser tests
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
Brings the build, the checks workflow and the browser tests to master. pace's
behavior is unchanged; the required checks run on this pull request.
Changes
npm run build: esbuild minification, themecompilation),
filesallowlist, Node 26.13.0,.editorconfig, 2-spaceindentation.
build), actions locked inactions.lock.browser-tests) for pace.js and pace.min.js inChromium, Firefox and WebKit.
Merging
Use "Create a merge commit". Squash or rebase would change the reformat
commit's ID, which
.git-blame-ignore-revsrefers to.