8000 Fix bookmarklet generation with UglifyJS 3 by ryanchou1994 · Pull Request #3538 · ramda/ramda · GitHub
[go: up one dir, main page]

Skip to content

Fix bookmarklet generation with UglifyJS 3 - #3538

Merged
kedashoe merged 1 commit into
ramda:masterfrom
ryanchou1994:fix/bookmarklet-generation
Sep 15, 2026
Merged

kedashoe merged 1 commit into
ramda:masterfrom
ryanchou1994:fix/bookmarklet-generation

Conversation

@ryanchou1994
@ryanchou1994 ryanchou1994 commented Sep 9, 2026 •
Copy link
Copy Markdown
Contributor

npm run bookmarklet currently succeeds but writes an empty javascript: URL: UglifyJS 3 rejects the old fromString option, and the script renders its missing code as empty text.

Remove that option and stop on a minification error before overwriting the existing output. Add subprocess regressions for usable output, repeated execution, and preservation of the previous file on failure. BOOKMARKLET.md is intentionally left unchanged so the upcoming patch release can regenerate it.

Fixes #3128.

Validation on the current revision, rebased on f54129edee5bd9778c9c96668c0f17708d00f502:

  • Focused generator tests: 2 passing on macOS and Linux.
  • npm test: all 1,217 tests pass, including lint, on macOS with Node 22.23.2 and Linux with Node 24.20.0.
  • npm run build: passes on both platforms.
  • The generated bookmarklet was also exercised in Chrome on an isolated local page: it loads Ramda, preserves the document, and preserves the existing Ramda instance when clicked again.

Copilot AI lite review requested due to automatic review settings September 9, 2026 10:56
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions
github-actions Bot commented Sep 9, 2026 •
Copy link
Copy Markdown
Coverage Summary
> ramda@0.32.0 coverage:summary
> BABEL_ENV=cjs nyc --reporter=text-summary mocha -- --reporter=min --require @babel/register

�[2J�[1;3H
1215 passing (873ms)


=============================== Coverage summary ===============================
Statements   : 94.05% ( 2543/2704 )
Branches     : 85.83% ( 993/1157 )
Functions    : 93.39% ( 565/605 )
Lines        : 94.31% ( 2385/2529 )
================================================================================

@kedashoe
Copy link
Copy Markdown
Contributor

ty for the PR.

Please remove the updated BOOKMARKLET.md, I'll put up a patch release soon and it will get updated then

@ryanchou1994
Copy link
Copy Markdown
Contributor Author

Thanks — I’ll remove the BOOKMARKLET.md change and leave that generated update to the upcoming patch release, then push the revision shortly.

Remove the unsupported fromString option and report minification errors
before replacing the output. Cover successful execution and preservation
of the previous file on failure.
@ryanchou1994
ryanchou1994 force-pushed the fix/bookmarklet-generation branch from b110739 to 2241995 Compare September 14, 2026 15:51
@ryanchou1994
Copy link
Copy Markdown
Contributor Author

Updated in 22419951: removed BOOKMARKLET.md from the PR and left only the generator fix and regression coverage. I also rebased on the latest master; the focused tests, lint, full 1,217-test suite, and build pass on macOS and Linux.

@kedashoe
kedashoe merged commit b646f1b into ramda:master Sep 15, 2026
2 checks passed
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.

Code is gone from the BOOKMARKLET.md readme file

3 participants

0