Repository navigation
fixes and tests - #66
Merged
Merged
Conversation
crawler v2 ships its own types and requires node >=18, so drop @types/crawler and bump engines
bin/dev.js needed a global ts-node, unused screenshot asset, .eslintignore duplicated ignorePatterns, workflows ran node 16
--tests containers was advertised but never ran. Also moves the sitemap reader to util.ts
Mostly autofix. Also: typed package info instead of @ts-ignore, drop shelljs (only used for exit), lint TS unused vars with the TS rule, read style properties in parallel
Default styles are opacity,transform, so a plain fade could never pass
Ignore README.md, its commands section is generated by oclif readme
Member
|
|
daun
approved these changes
Nov 9, 2026
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 #65
Related: swup/docs#255
Quite a few issues found while tackling #65. This PR is a fix for all of them in one go:
Fixes
validate --sitemap: implement the sitemap reader (was a stub returning[]). Handles entities and CDATA and follows sitemap indexesvalidate --sitemap: support absolute local paths (join→resolve)validate --crawl: migrate to the crawler v2 API (the v1 callback crashed at runtime)transition-duration: await the animation duration (missingawait)transition-styles: wait long enough (duration was in seconds, used as ms)transition-styles: pass if any expected style changes (the defaultopacity,transformmade a plain fade always fail)--animationand--parallelflags were ignored (read nonexistent flag names)--tests containersis now wired up (advertised but never ran): each container selector must exist exactly oncereadSitemapUrlsthrows on non-OK HTTP responses (e.g. 404) instead of silently returning[]validatefails with "No pages found inCleanup
bin/dev.js/dev.cmd(needed a global ts-node), the unused screenshot and.eslintignore(duplicatedignorePatterns).gitignoreentries andpackage-lock.jsonfromfiles@types/crawler(crawler v2 ships its own types),@oclif/test,@types/shelljsand the directshelljsusageenginesto Node >= 18 and CI workflows from Node 16 tolts/*create --from=ocliftest with a sitemap reader testTooling
tsconfig: target es2022. The test tsconfig now type-checks
Fix all ESLint problems (113 → 0), including proper types instead of
@ts-ignoreFormat the repo with its own
swup package:format. Add.prettierignorefor README.md (generated byoclif readme)The PR is submitted to the
mainbranchThe code was linted before pushing (
npm run lint)All tests are passing (
npm run test)New or updated tests are included