Skip to content

Commit

Permalink
docs(en): merging all conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
docschina-bot committed Jan 28, 2025
2 parents 467f961 + abcf4fe commit b289c79
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,11 @@ jobs:
# - arch: armv7
# distro: alpine_latest
# target: armv7-unknown-linux-musleabihf
- arch: ppc64le
distro: ubuntu_latest
target: powerpc64le-unknown-linux-gnu
use-nvm: true
# This one has become very flaky as of late
# - arch: ppc64le
# distro: ubuntu_latest
# target: powerpc64le-unknown-linux-gnu
# use-nvm: true
- arch: s390x
distro: ubuntu_latest
target: s390x-unknown-linux-gnu
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# rollup changelog

## 4.32.1

_2025-01-28_

### Bug Fixes

- Fix possible crash when optimizing logical expressions (#5804)

### Pull Requests

- [#5804](https://github.com/rollup/rollup/pull/5804): fix: set hasDeoptimizedCache to true as early as possible (@TrickyPi)
- [#5813](https://github.com/rollup/rollup/pull/5813): Fix typo (@kantuni)

## 4.32.0

_2025-01-24_
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.32.0",
"version": "4.32.1",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
5 changes: 5 additions & 0 deletions docs/configuration-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,13 @@ import { fileURLToPath } from 'node:url';
export default {
input: Object.fromEntries(
globSync('src/**/*.js').map(file => [
<<<<<<< HEAD
// 这里将删除 `src/` 以及每个文件的扩展名。
// 因此,例如 src/nested/foo.js 会变成 nested/foo
=======
// This removes `src/` as well as the file extension from each
// file, so e.g. src/nested/foo.js becomes nested/foo
>>>>>>> abcf4febe11f3d313fae41ddca35fc60670b9ff8
path.relative(
'src',
file.slice(0, file.length - path.extname(file).length)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup",
"version": "4.32.0",
"version": "4.32.1",
"description": "Next-generation ES module bundler",
"main": "dist/rollup.js",
"module": "dist/es/rollup.js",
Expand Down
2 changes: 1 addition & 1 deletion src/ast/nodes/LogicalExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default class LogicalExpression extends NodeBase implements Deoptimizable

deoptimizeCache(): void {
if (this.hasDeoptimizedCache) return;
this.hasDeoptimizedCache = true;
if (this.usedBranch) {
const unusedBranch = this.usedBranch === this.left ? this.right : this.left;
this.usedBranch = null;
Expand All @@ -85,7 +86,6 @@ export default class LogicalExpression extends NodeBase implements Deoptimizable
// Request another pass because we need to ensure "include" runs again if
// it is rendered
context.requestTreeshakingPass();
this.hasDeoptimizedCache = true;
}

deoptimizePath(path: ObjectPath): void {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = defineTest({
description: 'Successfully built despite the deoptimization of a logical expression'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function foo() {
return bar || 'a';
}
let bar = true;
export default function () {
bar = false;
return foo() !== 'b' || (foo() == 'c' && foo() == 'd');
}

0 comments on commit b289c79

Please sign in to comment.