Skip to content

Commit

Permalink
Merge pull request #83 from rollup/sync-937d9911
Browse files Browse the repository at this point in the history
docs(en): merge rollup/master into rollup-docs-cn/master @ 937d991
  • Loading branch information
iDestin authored Nov 5, 2023
2 parents 4d00269 + bbb20e6 commit 5e72434
Show file tree
Hide file tree
Showing 18 changed files with 511 additions and 594 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# rollup changelog

## 4.3.0

_2023-11-03_

### Features

- Add `forceExit` CLI flag for situations where the CLI does not exit gracefully (#5195)

### Bug Fixes

- Properly catch errors when removing a temporary config file fails (#5198)

### Pull Requests

- [#5195](https://github.com/rollup/rollup/pull/5195): Add `forceExit` CLI flag (@raphael-theriault-swi)
- [#5198](https://github.com/rollup/rollup/pull/5198): fix: prevent `ENOENT` error on temp config removal (@jzempel)
- [#5237](https://github.com/rollup/rollup/pull/5237): chore: remove unused files and deps (@TrickyPi)
- [#5238](https://github.com/rollup/rollup/pull/5238): chore(deps): update dependency eslint-plugin-unicorn to v49 (@renovate[bot])
- [#5239](https://github.com/rollup/rollup/pull/5239): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])

## 4.2.0

_2023-10-31_
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.2.0",
"version": "4.3.0",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
6 changes: 5 additions & 1 deletion cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ if (command.help || (process.argv.length <= 2 && process.stdin.isTTY)) {
// do nothing
}

run(command);
const promise = run(command);
if (command.forceExit) {
// eslint-disable-next-line unicorn/no-process-exit
promise.then(() => process.exit());
}
}
1 change: 1 addition & 0 deletions cli/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Basic options:
--failAfterWarnings Exit with an error if the build produced warnings
--filterLogs <filter> Filter log messages
--footer <text> Code to insert at end of bundle (outside wrapper)
--forceExit Force exit the process when done
--no-freeze Do not freeze namespace objects
--generatedCode <preset> Which code features to use (es5/es2015)
--generatedCode.arrowFunctions Use arrow functions in generated code
Expand Down
3 changes: 1 addition & 2 deletions cli/run/loadConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ async function loadConfigFromWrittenFile(
try {
return (await import(pathToFileURL(bundledFileName).href)).default;
} finally {
// Not awaiting here saves some ms while potentially hiding a non-critical error
unlink(bundledFileName);
unlink(bundledFileName).catch(error => console.warn(error?.message || error));
}
}

Expand Down
8 changes: 7 additions & 1 deletion docs/command-line-interface/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,13 @@ rollup -c --filterLogs "code:FOO,message:This is the message" --filterLogs code:
只会展示属性 `log.foo.bar` 的值为 `"value"` 的日志。
### `-h`/`--help` {#h-help}
### `--forceExit`
执行完毕后强制退出进程。在某些情况下,插件或其依赖可能无法正确清理并阻止 CLI 进程退出。根本原因可能很难诊断,而此标志提供了一个逃生口,直到找到并解决该问题。
请注意,这可能会破坏某些工作流程,并且不一定始终正常工作。
### `-h`/`--help`
打印帮助文档。
Expand Down
Loading

1 comment on commit 5e72434

@vercel
Copy link

@vercel vercel bot commented on 5e72434 Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.