Skip to content

Add build tooling, CI and browser tests - #554

Merged
CodeByZach merged 8 commits into
masterfrom
tooling
Nov 1, 2026
Merged

CodeByZach merged 8 commits into
masterfrom
tooling

Conversation

@CodeByZach

Copy link
Copy Markdown
Owner

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

Merging

Use "Create a merge commit". Squash or rebase would change the reformat
commit's ID, which .git-blame-ignore-revs refers to.

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).
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.
@CodeByZach
CodeByZach merged commit c070c21 into master Nov 1, 2026
2 checks passed
@CodeByZach
CodeByZach deleted the tooling branch November 1, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant