Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ jobs:
with:
version: 0.14.1
- name: Install cargo-zigbuild
uses: taiki-e/install-action@920ab1831fbf4fb3ef75c8ead83556c918bb7290 # v2.79.8
uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1
if: ${{ matrix.settings.cross == 'zig' }}
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
uses: ./.github/actions/install-and-cache-node-deps

- name: Build (OpenBSD)
uses: cross-platform-actions/action@0c165ad7eb2d6a7e8552d6af5aad2bbedfc646b0 # v1.1.0
uses: cross-platform-actions/action@be3d7e9ff5c8770b9c51b1a8c8c5446e1cad7cf9 # v1.2.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repl-artefacts-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure AWS credentials via OIDC
if: ${{ steps.check.outputs.has-artefacts == 'true' }}
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1
uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# rollup changelog

## 4.61.1

_2026-06-04_

### Bug Fixes

- Avoid extraneous newlines when adding headers via plugins (#6403)
- Fix a rare issue where starting Rollup would hang on Windows (#6404)

### Pull Requests

- [#6402](https://github.com/rollup/rollup/pull/6402): Improve documentation for manualPureFunctions (@lukastaegert)
- [#6403](https://github.com/rollup/rollup/pull/6403): Does not add an extra leading line feed for addons (@TrickyPi)
- [#6404](https://github.com/rollup/rollup/pull/6404): fix: set report.excludeNetwork=true before getReport() to avoid blocking PTR lookups (@jdz321, @lukastaegert)

## 4.61.0

_2026-06-01_
Expand Down
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollup/browser",
"version": "4.61.0",
"version": "4.61.1",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
26 changes: 26 additions & 0 deletions docs/configuration-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2594,7 +2594,33 @@ styled()(); // 去除
styled().div(); // 去除
```

<<<<<<< HEAD
#### treeshake.moduleSideEffects {#treeshake-modulesideeffects}
=======
::: warning

If you pass arguments to such a pure function, those arguments are still checked for direct side effects like mutating a variable or calling a global function, in which case the call to the pure function is retained. But be aware that we do not check if those arguments are called and whether such a call could have side effects.

```js
// rollup.config.js
export default {
treeshake: {
manualPureFunctions: ['lib.nested']
}
// ...
};

import lib from 'lib';

lib.nested(console.log('effect')); // retained
lib.nested(() => console.log('effect')); // will be removed
lib.nested.forEach(() => console.log('effect')); // will also be removed
```

:::

#### treeshake.moduleSideEffects
>>>>>>> 126e14197838b806b0c1244ad0ef6fc0447b730a

| | |
| --: | :-- |
Expand Down
10 changes: 8 additions & 2 deletions native.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ const { spawnSync } = require('node:child_process');
const getReportHeader = () => {
try {
if (platform !== 'win32') {
return report.getReport().header;
// Avoid blocking reverse DNS (PTR) lookups on open TCP socket handles.
// See: https://github.com/nodejs/node/issues/55576
const previousExcludeNetwork = report.excludeNetwork;
report.excludeNetwork = true;
const header = report.getReport().header;
report.excludeNetwork = previousExcludeNetwork;
return header;
}

// This is needed because report.getReport() crashes the process on Windows sometimes.
const script =
"console.log(JSON.stringify(require('node:process').report.getReport().header));";
"const r=require('node:process').report;r.excludeNetwork=true;console.log(JSON.stringify(r.getReport().header));";
const child = spawnSync(process.execPath, ['-p', script], {
encoding: 'utf8',
timeout: 3000,
Expand Down
Loading
Loading