Skip to content

chore(root): add allowScripts config#4550

Open
evenstensberg wants to merge 1 commit into
mi6:developfrom
evenstensberg:chore/allow-scripts
Open

chore(root): add allowScripts config#4550
evenstensberg wants to merge 1 commit into
mi6:developfrom
evenstensberg:chore/allow-scripts

Conversation

@evenstensberg

Copy link
Copy Markdown
Contributor

Summary of the changes

As npm (npm/cli#9172) is updated they're introducing new configuration around disallowing post-install scripts from executing. At the moment, these dis-allowed scripts are outputting a warning if the dependencies aren't specified in packageJson.allowScripts and in the future, npm release it will emit an error.

Because of this, we can later add cypress and husky to the allowScripts configuration and go back to blocking all other dependencies via the ignore-scriptsflag.

Related issue

See above.

Checklist

General

  • Changes to docs package checked and committed.
  • All acceptance criteria reviewed and met.

Testing

  • Relevant unit tests and visual regression tests added.
  • Visual testing against Figma component specification completed.
  • Playground stories in React Storybook up to date, with any prop changes and additions addressed.
  • Compare performance of modified components against develop using Performance addon in React Storybook.

Accessibility

  • Accessibility Insights FastPass performed.
  • A11y unit test added and yields no issues.
  • A11y plug-in on Storybook yields no issues.
  • Manual screen reader testing performed using NVDA and VoiceOver.
  • Manual keyboard testing for keyboard controls and logical focus order.
  • Correct roles used and ARIA attributes used correctly where required.
  • Logical heading structure is maintained, and the HTML elements used for headings can be changed to fit within the wider page structure.

Resize/zoom behaviour

  • Page can be zoomed to 400% with no loss of content.
  • Screen magnifier used with no issues.
  • Text resized to 200% with no loss of content.
  • Text spacing increased as per the WCAG 1.4.12 success criterion with no loss of content.

System modes

  • Browser setting 'prefers reduced motion' tested. No animations or motion visible whilst this setting is on.
  • Windows High Contrast mode tested with no loss of content.
  • System light and dark mode tested with no loss of content.
  • Browser support tested (Chrome, Safari, Firefox and Edge).

Testing content extremes

  • Min/max content examples tested with no loss of content or overflow.
  • All prop combinations work without issue.
  • Tested for FOUC (Flash of Unstyled Content) in both SSR (Server-Side Rendering) and SSG (Static Site Generation) settings.
  • Controlled and uncontrolled input components tested.
  • Props/slots can be updated after initial render.

@GCHQ-Developer-530

Copy link
Copy Markdown
Contributor

Hi @evenstensberg, where is the warning being outputted? I can't see it currently so when I added this change in locally I didn't notice a difference. Is there anything else we need to add into the config to make this change work?

@GCHQ-Developer-112
GCHQ-Developer-112 force-pushed the develop branch 2 times, most recently from bc8e8f9 to a01c50b Compare July 3, 2026 14:11
@evenstensberg

Copy link
Copy Markdown
Contributor Author

Did the following on the develop branch at the top level:

  1. nvm install
  2. npm install

followed up by added the missing `allowScripts´ packages based on the terminal output. Later I suspect we need to add the same at each monorepo package.json.

@evenstensberg
evenstensberg force-pushed the chore/allow-scripts branch from e7f434e to cf7044f Compare July 9, 2026 21:33
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