Skip to content

Commit 0dca7ca

Browse files
authored
Merge branch 'master' into opt-namespace
2 parents a536d62 + d6a8573 commit 0dca7ca

File tree

22 files changed

+2556
-1415
lines changed

22 files changed

+2556
-1415
lines changed

.github/workflows/build-and-tests.yml

Lines changed: 34 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ jobs:
9595
build: RUSTFLAGS="-C target-feature=+crt-static" npm run build:napi -- --release
9696
target: x86_64-pc-windows-msvc
9797
- host: windows-latest
98-
build: >-
99-
set -e &&
100-
rustup target add i686-pc-windows-msvc &&
101-
npm run build:napi -- --release --target i686-pc-windows-msvc
98+
build: npm run build:napi -- --release --target i686-pc-windows-msvc
10299
target: i686-pc-windows-msvc
103100
- host: windows-latest
104101
target: aarch64-pc-windows-msvc
@@ -107,78 +104,44 @@ jobs:
107104
# MacOS
108105
- host: macos-latest
109106
target: x86_64-apple-darwin
110-
build: >-
111-
set -e &&
112-
npm run build:napi -- --release --target x86_64-apple-darwin
107+
build: npm run build:napi -- --release --target x86_64-apple-darwin
113108
- host: macos-latest
114109
target: aarch64-apple-darwin
115-
build: >-
116-
set -e &&
117-
rustup target add aarch64-apple-darwin &&
118-
npm run build:napi -- --release --target aarch64-apple-darwin
110+
build: npm run build:napi -- --release --target aarch64-apple-darwin
119111

120112
# Linux
121113
- host: ubuntu-latest
122114
target: x86_64-unknown-linux-gnu
123-
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
124-
build: >-
125-
set -e &&
126-
rustup target add x86_64-unknown-linux-gnu &&
127-
npm run build:napi -- --release --target x86_64-unknown-linux-gnu
115+
build: TARGET_CC=clang npm run build:napi -- --release --target x86_64-unknown-linux-gnu --use-napi-cross
128116
- host: ubuntu-latest
129117
target: x86_64-unknown-linux-musl
130-
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
131-
build: >-
132-
set -e &&
133-
npm run build:napi -- --release
118+
build: npm run build:napi -- --release --target x86_64-unknown-linux-musl -x
134119
- host: ubuntu-latest
135120
target: armv7-unknown-linux-gnueabihf
136-
zig: true
137121
setup: |
138122
sudo apt-get update
139-
sudo apt-get install gcc-arm-linux-gnueabihf -y
140-
build: >-
141-
set -e &&
142-
npm run build:napi -- --release --target armv7-unknown-linux-gnueabihf
123+
sudo apt-get install libatomic1-armhf-cross -y
124+
build: TARGET_CC=clang npm run build:napi -- --release --target armv7-unknown-linux-gnueabihf --use-napi-cross
143125
- host: ubuntu-latest
144126
target: armv7-unknown-linux-musleabihf
145-
zig: true
146-
build: >-
147-
set -e &&
148-
npm run build:napi -- --release --target armv7-unknown-linux-musleabihf
127+
build: npm run build:napi -- --release --target armv7-unknown-linux-musleabihf -x
149128
- host: ubuntu-latest
150129
target: aarch64-unknown-linux-gnu
151-
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
152-
build: >-
153-
set -e &&
154-
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
155-
rustup default stable &&
156-
rustup target add aarch64-unknown-linux-gnu &&
157-
npm run build:napi -- --release --target aarch64-unknown-linux-gnu
130+
build: TARGET_CC=clang npm run build:napi -- --release --target aarch64-unknown-linux-gnu --use-napi-cross
158131
- host: ubuntu-latest
159132
target: aarch64-unknown-linux-musl
160-
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
161-
build: >-
162-
set -e &&
163-
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
164-
rustup default stable &&
165-
rustup target add aarch64-unknown-linux-musl &&
166-
RUSTFLAGS='-C target-feature=-crt-static -C linker=aarch64-linux-musl-gcc' npm run build:napi -- --release --target aarch64-unknown-linux-musl
133+
build: npm run build:napi -- --release --target aarch64-unknown-linux-musl -x
167134
- host: ubuntu-latest
168135
target: armv7-linux-androideabi
169-
build: >-
170-
set -e &&
171-
npm run build:napi -- --release --target armv7-linux-androideabi
136+
build: npm run build:napi -- --release --target armv7-linux-androideabi --use-napi-cross
172137
- host: ubuntu-latest
173138
target: aarch64-linux-android
174-
build: >-
175-
set -e &&
176-
npm run build:napi -- --release --target aarch64-linux-android
139+
build: npm run build:napi -- --release --target aarch64-linux-android --use-napi-cross
177140
- host: ubuntu-latest
178141
target: riscv64gc-unknown-linux-gnu
179142
setup: |
180143
sudo apt-get update
181-
sudo apt-get install gcc-riscv64-linux-gnu -y
144+
sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu -y
182145
build: >-
183146
set -e &&
184147
rustup target add riscv64gc-unknown-linux-gnu &&
@@ -188,6 +151,8 @@ jobs:
188151
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
189152
build: >-
190153
set -e &&
154+
unset CC &&
155+
export TARGET_CC=clang &&
191156
apk add binutils-riscv64 &&
192157
mkdir -p /sysroot-riscv64/etc/apk &&
193158
echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' > /sysroot-riscv64/etc/apk/repositories &&
@@ -201,23 +166,14 @@ jobs:
201166
npm run build:napi -- --release --target riscv64gc-unknown-linux-musl
202167
- host: ubuntu-latest
203168
target: powerpc64le-unknown-linux-gnu
204-
setup: |
205-
sudo apt-get update
206-
sudo apt-get install gcc-powerpc64le-linux-gnu -y
207-
build: >-
208-
set -e &&
209-
export CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc && rustup target add powerpc64le-unknown-linux-gnu &&
210-
npm run build:napi -- --release --target powerpc64le-unknown-linux-gnu
169+
build: CC=clang TARGET_CC=clang npm run build:napi -- --release --target powerpc64le-unknown-linux-gnu --use-napi-cross
211170
- host: ubuntu-latest
212171
target: s390x-unknown-linux-gnu
213-
setup: |
214-
sudo apt-get update
215-
sudo apt-get install gcc-s390x-linux-gnu -y
216-
build: >-
217-
set -e &&
218-
export CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc &&
219-
rustup target add s390x-unknown-linux-gnu &&
220-
npm run build:napi -- --release --target s390x-unknown-linux-gnu
172+
build: |
173+
export TARGET_CC=clang
174+
export CC=clang
175+
export CFLAGS="-fuse-ld=lld"
176+
npm run build:napi -- --release --target s390x-unknown-linux-gnu --use-napi-cross
221177
- host: ubuntu-latest
222178
target: loongarch64-unknown-linux-gnu
223179
docker: ghcr.io/darkyzhou/napi-rs-nodejs-rust:trixie-loongarch64
@@ -253,9 +209,16 @@ jobs:
253209
key: ${{ matrix.settings.name || matrix.settings.target }}-cargo-${{ matrix.settings.host }}-${{ hashFiles('rust/Cargo.lock') }}
254210
restore-keys: ${{ matrix.settings.name || matrix.settings.target }}-cargo-${{ matrix.settings.host }}
255211
- uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
256-
if: ${{ matrix.settings.zig }}
212+
if: ${{ contains(matrix.settings.target, 'musl') }}
213+
with:
214+
version: 0.14.1
215+
- name: Install cargo-zigbuild
216+
uses: taiki-e/install-action@d188da0a65bc6c80011567688127bddc8be0ca24 # v2.56.21
217+
if: ${{ contains(matrix.settings.target, 'musl') }}
218+
env:
219+
GITHUB_TOKEN: ${{ github.token }}
257220
with:
258-
version: 0.10.1
221+
tool: cargo-zigbuild
259222
- name: Setup toolchain
260223
run: ${{ matrix.settings.setup }}
261224
if: ${{ matrix.settings.setup }}
@@ -324,11 +287,11 @@ jobs:
324287
settings:
325288
- name: freebsd
326289
architecture: x86-64
327-
version: '13.3'
290+
version: '14.2'
328291
target: x86_64-unknown-freebsd
329292
- name: freebsd
330293
architecture: arm64
331-
version: '13.3'
294+
version: '14.2'
332295
target: aarch64-unknown-freebsd
333296
name: Build ${{ matrix.settings.name }} ${{ matrix.settings.architecture }}
334297
runs-on: ubuntu-latest
@@ -357,14 +320,14 @@ jobs:
357320
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
358321
restore-keys: node-modules-${{ runner.os }}
359322
- name: Build
360-
uses: cross-platform-actions/action@97419d18f6470332677e345e9df97cdc71244ead # v0.28.0
323+
uses: cross-platform-actions/action@e8a7b572196ff79ded1979dc2bb9ee67d1ddb252 # v0.29.0
361324
with:
362325
operating_system: ${{ matrix.settings.name }}
363326
architecture: ${{ matrix.settings.architecture }}
364327
version: ${{ matrix.settings.version }}
365328
memory: 8G
366329
run: |
367-
sudo pkg install -y node npm rust
330+
sudo pkg install -y node npm rust cmake
368331
${{ steps.cache-node-modules.outputs.cache-hit != 'true' && 'npm install --ignore-scripts' || 'echo Cache hit' }}
369332
npm run build:napi -- --release --target ${{ matrix.settings.target }}
370333
- name: Save Cargo cache

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# rollup changelog
22

3+
## 4.45.2
4+
5+
_2025-07-26_
6+
7+
### Bug Fixes
8+
9+
- Do not fail build if a const is reassigned but warn instead (#6020)
10+
- Fail with a helpful error message if an exported binding is not defined (#6023)
11+
12+
### Pull Requests
13+
14+
- [#6014](https://github.com/rollup/rollup/pull/6014): chore(deps): update dependency @vue/language-server to v3 (@renovate[bot])
15+
- [#6015](https://github.com/rollup/rollup/pull/6015): chore(deps): update dependency vue-tsc to v3 (@renovate[bot], @lukastaegert)
16+
- [#6016](https://github.com/rollup/rollup/pull/6016): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
17+
- [#6017](https://github.com/rollup/rollup/pull/6017): fix(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert)
18+
- [#6020](https://github.com/rollup/rollup/pull/6020): Make const reassignments only a warning (@lukastaegert)
19+
- [#6023](https://github.com/rollup/rollup/pull/6023): Throw descriptive error message for used export is not defined (@TrickyPi)
20+
- [#6027](https://github.com/rollup/rollup/pull/6027): feat: upgrade to NAPI-RS 3 stable (@Brooooooklyn)
21+
- [#6028](https://github.com/rollup/rollup/pull/6028): Update eslint-plugin-unicorn to resolve vulnerability (@lukastaegert)
22+
- [#6034](https://github.com/rollup/rollup/pull/6034): fix(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert)
23+
324
## 4.45.1
425

526
_2025-07-15_

browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rollup/browser",
3-
"version": "4.45.1",
3+
"version": "4.45.2",
44
"description": "Next-generation ES module bundler browser build",
55
"main": "dist/rollup.browser.js",
66
"module": "dist/es/rollup.browser.js",

native.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/* tslint:disable */
2-
/* eslint-disable */
3-
41
/* auto-generated by NAPI-RS */
5-
2+
/* eslint-disable */
63
export declare function parse(code: string, allowReturnOutsideFunction: boolean, jsx: boolean): Buffer
4+
75
export declare function parseAsync(code: string, allowReturnOutsideFunction: boolean, jsx: boolean, signal?: AbortSignal | undefined | null): Promise<Buffer>
8-
export declare function xxhashBase64Url(input: Uint8Array): string
9-
export declare function xxhashBase36(input: Uint8Array): string
6+
107
export declare function xxhashBase16(input: Uint8Array): string
8+
9+
export declare function xxhashBase36(input: Uint8Array): string
10+
11+
export declare function xxhashBase64Url(input: Uint8Array): string

0 commit comments

Comments
 (0)