feat: add "clean" (rm temp dir) to compile, fix unskim#424
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the unskim bookmarklet to better handle Safari’s DNS error page text variations, and tweaks the build pipeline to ensure .temp/ is removed before compilation so stale artifacts don’t linger.
Changes:
- Adjust
unskimSafari error-page parsing regex to match straight and typographic apostrophes/quotes. - Add a compile-time cleanup step for
.temp/inbuild:compile. - Bump project/package versions and regenerate related artifacts/docs.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/unskim.ts |
Expands the Safari ErrorPage regex to handle curly punctuation variants. |
package.json |
Adds .temp cleanup to the compile step and bumps package version. |
package-lock.json |
Updates lockfile version fields to match the new package version. |
dist/unskim.bookmarklet |
Regenerated bookmarklet output for the updated unskim logic/version. |
bookmarklets.json |
Bumps unskim bookmarklet version to 2.1.1. |
README.md |
Updates displayed unskim version references and adds a 4.2.3 version-note entry. |
| "build": "npm run build:compile && npm run build:minify && npm run build:bookmarklet", | ||
| "build:bookmarklet": "node scripts/build-bookmarklet.js", | ||
| "build:compile": "tsc && eslint ./.temp/*.js", | ||
| "build:compile": "rm -rf .temp && tsc && eslint ./.temp/*.js", |
There was a problem hiding this comment.
build:compile now uses rm -rf .temp, which relies on a POSIX shell command and will fail on Windows/npm cmd environments. Consider replacing this with a Node-based removal (e.g., via a small script using fs.rmSync(..., { recursive: true, force: true })) or a cross-platform tool so the build works consistently across dev machines and CI runners.
| "build:compile": "rm -rf .temp && tsc && eslint ./.temp/*.js", | |
| "build:compile": "node -e \"require('node:fs').rmSync('.temp', { recursive: true, force: true })\" && tsc && eslint \"./.temp/*.js\"", |
|
|
||
| ## Version Notes | ||
|
|
||
| 4.2.3 Fix unskim regex issue, update dependency integrate a "clean" into compile |
There was a problem hiding this comment.
The new 4.2.3 release note is unclear/grammatically incorrect and appears to claim a dependency update that isn't reflected in this PR. Please reword this entry to accurately describe the changes (unskim Safari error-page regex fix + cleaning .temp during compile) and match the formatting/style of the surrounding version notes.
| 4.2.3 Fix unskim regex issue, update dependency integrate a "clean" into compile | |
| 4.2.3 Fix unskim Safari error-page regex handling. Build update cleans `.temp` | |
| during compile. |
feat: add "clean" (rm temp dir) to compile, fix unskim