diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 28caacb3b..be17a0cc9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -36,10 +36,12 @@ List any relevant issue numbers: diff --git a/.github/workflows/build-and-tests.yml b/.github/workflows/build-and-tests.yml index 25310fd32..c723626ac 100644 --- a/.github/workflows/build-and-tests.yml +++ b/.github/workflows/build-and-tests.yml @@ -59,6 +59,7 @@ jobs: fail-fast: false matrix: settings: + # WASM - host: windows-latest target: x86_64-pc-windows-msvc name: wasm @@ -81,12 +82,8 @@ jobs: path: | wasm-node/ .empty - - host: macos-latest - target: x86_64-apple-darwin - build: >- - set -e && - npm run build:napi -- --release && - strip -x *.node + + # Windows - host: windows-latest build: npm run build:napi -- --release target: x86_64-pc-windows-msvc @@ -96,6 +93,26 @@ jobs: rustup target add i686-pc-windows-msvc && npm run build:napi -- --release --target i686-pc-windows-msvc target: i686-pc-windows-msvc + - host: windows-latest + target: aarch64-pc-windows-msvc + build: npm run build:napi -- --release --target aarch64-pc-windows-msvc + + # MacOS + - host: macos-latest + target: x86_64-apple-darwin + build: >- + set -e && + npm run build:napi -- --release && + strip -x *.node + - host: macos-latest + target: aarch64-apple-darwin + build: >- + set -e && + rustup target add aarch64-apple-darwin && + npm run build:napi -- --release --target aarch64-apple-darwin && + strip -x *.node + + # Linux - host: ubuntu-latest target: x86_64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian @@ -110,13 +127,16 @@ jobs: build: >- set -e && npm run build:napi -- --release && strip *.node - - host: macos-latest - target: aarch64-apple-darwin + - host: ubuntu-latest + target: armv7-unknown-linux-gnueabihf + zig: true + setup: | + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf -y build: >- set -e && - rustup target add aarch64-apple-darwin && - npm run build:napi -- --release --target aarch64-apple-darwin && - strip -x *.node + npm run build:napi -- --release --target armv7-unknown-linux-gnueabihf && + arm-linux-gnueabihf-strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 @@ -128,21 +148,15 @@ jobs: npm run build:napi -- --release --target aarch64-unknown-linux-gnu && aarch64-unknown-linux-gnu-strip *.node - host: ubuntu-latest - target: armv7-unknown-linux-gnueabihf - zig: true - setup: | - sudo apt-get update - sudo apt-get install gcc-arm-linux-gnueabihf -y - build: >- - set -e && - npm run build:napi -- --release --target armv7-unknown-linux-gnueabihf && - arm-linux-gnueabihf-strip *.node - - host: ubuntu-latest - target: aarch64-linux-android + target: aarch64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine build: >- set -e && - npm run build:napi -- --release --target aarch64-linux-android && - ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node + export JEMALLOC_SYS_WITH_LG_PAGE=16 && + rustup default nightly-2023-10-05 && + rustup target add aarch64-unknown-linux-musl && + RUSTFLAGS='-C target-feature=-crt-static -C linker=aarch64-linux-musl-gcc' npm run build:napi -- --release --target aarch64-unknown-linux-musl && + /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node - host: ubuntu-latest target: armv7-linux-androideabi build: >- @@ -150,18 +164,11 @@ jobs: npm run build:napi -- --release --target armv7-linux-androideabi && ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node - host: ubuntu-latest - target: aarch64-unknown-linux-musl - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + target: aarch64-linux-android build: >- set -e && - export JEMALLOC_SYS_WITH_LG_PAGE=16 && - rustup default nightly-2023-10-05 && - rustup target add aarch64-unknown-linux-musl && - RUSTFLAGS='-C target-feature=-crt-static -C linker=aarch64-linux-musl-gcc' npm run build:napi -- --release --target aarch64-unknown-linux-musl && - /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node - - host: windows-latest - target: aarch64-pc-windows-msvc - build: npm run build:napi -- --release --target aarch64-pc-windows-msvc + npm run build:napi -- --release --target aarch64-linux-android && + ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node name: Build ${{ matrix.settings.name || matrix.settings.target }} runs-on: ${{ matrix.settings.host }} timeout-minutes: 30 diff --git a/.github/workflows/repl-artefacts.yml b/.github/workflows/repl-artefacts.yml index bff6ac64f..38a100902 100644 --- a/.github/workflows/repl-artefacts.yml +++ b/.github/workflows/repl-artefacts.yml @@ -8,6 +8,10 @@ on: - reopened - labeled +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/CHANGELOG.md b/CHANGELOG.md index d36543f63..24c979ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,64 @@ # rollup changelog +## 4.6.0 + +_2023-11-26_ + +### Features + +- Allow `this.addWatchFile` in all plugin hooks (#5270) + +### Bug Fixes + +- Show helpful error when native binaries are not installed due to an `npm` issue (#5267) +- Do not access `this` context in `this.addWatchFile` so it does not need to be bound when passed around (#5270) + +### Pull Requests + +- [#5267](https://github.com/rollup/rollup/pull/5267): Add friendly error for npm bug (@sapphi-red) +- [#5270](https://github.com/rollup/rollup/pull/5270): Allow this.addWatchFile in all hooks (@lukastaegert) +- [#5272](https://github.com/rollup/rollup/pull/5272): Debug deployed graphs (@lukastaegert) + +## 4.5.2 + +_2023-11-24_ + +### Bug Fixes + +- Handle files with UTF-8 BOM when using the commonjs plugin (#5268) + +### Pull Requests + +- [#5268](https://github.com/rollup/rollup/pull/5268): fix: strip BOM before calling transform hook (@TrickyPi) +- [#5269](https://github.com/rollup/rollup/pull/5269): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) + +## 4.5.1 + +_2023-11-21_ + +### Bug Fixes + +- Do not error when a function expression uses the same name for a parameter and its id (#5262) + +### Pull Requests + +- [#5257](https://github.com/rollup/rollup/pull/5257): Fix graphs in docs, improve REPL colors (@lukastaegert) +- [#5262](https://github.com/rollup/rollup/pull/5262): Allow function expression parameters to shadow the function id (@lukastaegert) + +## 4.5.0 + +_2023-11-18_ + +### Bug Fixes + +- Show a proper error when using native Rollup on armv7 musl Linux (#5255) + +### Pull Requests + +- [#5251](https://github.com/rollup/rollup/pull/5251): doc fix import assertions to attributes in API plugin development page (@lhapaipai) +- [#5253](https://github.com/rollup/rollup/pull/5253): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5255](https://github.com/rollup/rollup/pull/5255): Error for armv7 musl build (@lukastaegert) + ## 4.4.1 _2023-11-14_ diff --git a/browser/package.json b/browser/package.json index 50359112d..1bf338aea 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@rollup/browser", - "version": "4.4.1", + "version": "4.6.0", "description": "Next-generation ES module bundler browser build", "main": "dist/rollup.browser.js", "module": "dist/es/rollup.browser.js", diff --git a/docs/.vitepress/mermaid.ts b/docs/.vitepress/mermaid.ts index 4dcfd2db5..9a0ed9676 100644 --- a/docs/.vitepress/mermaid.ts +++ b/docs/.vitepress/mermaid.ts @@ -12,6 +12,7 @@ const graphsDirectory = new URL('graphs/', import.meta.url); const mermaidRegExp = /^```mermaid\n([\S\s]*?)\n```/gm; const greaterThanRegExp = />/g; +const svgIdRegExp = /my-svg/g; const styleTagRegExp = /