Skip to content

Allow install scripts and fix clipped search titles - #217

Merged
eric-schneider merged 2 commits into
mainfrom
allow-install-scripts
Nov 12, 2026
Merged

eric-schneider merged 2 commits into
mainfrom
allow-install-scripts

Conversation

@eric-schneider

@eric-schneider eric-schneider commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Two small changes:

  • npm 12 skips dependencies' install scripts unless package.json allows them, and that breaks gulp bundle: gifsicle, jpegtran-bin and optipng-bin never download the image optimizers that gulp-imagemin runs. This adds an allowScripts field that allows those three scripts, pinned to the current versions, and denies the scripts of es5-ext and fsevents, which the build doesn't need. It also clears the install-scripts warning that npm 11.19 prints in the workflows. Older versions of npm ignore the field.
  • In the search dialog, result titles too long for their row, mostly on phones, were cut off mid-letter. They now end with an ellipsis, like the text snippet under them. Nothing else in the dialog changes.

npm 12 skips dependencies' install scripts unless package.json allows
them in an allowScripts field, and newer npm 11 releases, such as the
11.19 that the workflows use, warn about every install script the
field doesn't cover. Without their scripts, gifsicle, jpegtran-bin and
optipng-bin never download the programs that gulp-imagemin runs, so
with npm 12, gulp bundle fails at the image step.

The field, written with npm install-scripts approve and deny, allows
those three packages' scripts, pinned to the installed versions, which
are the newest that the imagemin plugins here accept. It denies the
scripts of es5-ext, which only prints a message when it's installed in
a Russian time zone, and of fsevents, which is installed only on macOS
and which the build doesn't use: without it, gulp's file watcher falls
back to Node's own.

Older versions of npm ignore the field. Installed with npm 11.12,
11.19 and 12, the bundle comes out the same as before.
@eric-schneider eric-schneider self-assigned this Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying bundle preview.
Deploy successful! View preview

@plpesvc-ds

This comment has been minimized.

In the search dialog, a result title too long for its row was cut off
mid-letter, which happens mostly on phones. DocSearch's styles set
text-overflow on the row, but the title and the snippet under it are
flex items, which that setting doesn't reach. The snippet already has
its own overflow rules, and the title now gets the same ones, so it
ends with an ellipsis instead.

Nothing else changes. With the rule added to the dialog on
docs.datastax.com, screenshots of a search on a desktop are identical,
and on a phone only the ends of the long titles change.
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying bundle preview.
Deploy successful! View preview

@plpesvc-ds

plpesvc-ds commented Nov 12, 2026 •

Copy link
Copy Markdown

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@eric-schneider eric-schneider changed the title Record which dependencies may run install scripts Allow install scripts and fix clipped search titles Nov 12, 2026
@eric-schneider
eric-schneider merged commit cbeb945 into main Nov 12, 2026
2 checks passed
@eric-schneider
eric-schneider deleted the allow-install-scripts branch November 12, 2026 22:25
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.

2 participants