Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(en): merge rollup/master into rollup-docs-cn/master @ 91352494 #135

Merged
merged 46 commits into from
Apr 29, 2024

Conversation

docschina-bot
Copy link
Collaborator

此 PR 自动生成。

合并 rollup/rollup 的修改至本仓库(@ 9135249

以下文件存在冲突,可能需要重新翻译:

请解决所有冲突后提交到此 pull request,可直接在 Github 修改、切换到 sync-91352494 分支进行修改或者使用 Github Desktop 拉取此 pr 修改并提交。

禁止使用 Squash Merge 来合并此 Pull Request!

使用该操作会导致上游仓库的内容丢失,并致使下一次合并产生冲突。

sapphi-red and others added 30 commits April 3, 2024 04:08
* docs: add `@shikiji/vitepress-twoslash`

* docs: add prettier-ignore where needed

* docs: fix output.format

Co-authored-by: Lukas Taegert-Atkinson <[email protected]>

* docs: fix format

---------

Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
* feat: support using keyword

* Tweak test, update swc_ecma_parser version

* Detect 'using' in VariableDeclaration
* feat: show all cause in Error

* test: sample to test stderr cause

* Add indentation

---------

Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore(deps): lock file maintenance minor/patch updates

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Do not inline attributes to reduce complexity

* If the reference of a list is 0, treat it as an empty list

* Extend zero logic to stateful lists

* Inline reference position update into string conversions

* Unify how flags are added

* Lint imports
* Start working on architecture docs

* Extend documentation

* Extend documentation

* Extend documentation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore(deps): lock file maintenance minor/patch updates

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency eslint-plugin-unicorn to v52

* Fix linting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
…t helpers (#5466)

* Add test

* Use better variable name

* Ensure reexported namespaces do not prevent creation of default export helpers
* Add linux arm musl build

* Use strip = true in Cargo.toml instead
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Try adding initial config for ppc64le

* Comment out any parts of the pipeline we are not working on

* Try to install NodeJS and attempt a bootstrap build

* Move smoke test to separate step with longer timeout

* Add additional targets to smoke tests

Also install latest node version

* Try wget over curl

* Separate build for Alpine

* Add logging

* Fix Rollup installation

* Use correct path for native artifact

* Install plugin

* Correctly hand over js artifact

* Make binary executable

* Enable caching

* Add missing types

* Also install rollup

* Display versions after nvm

* Add more logging

* Install all dependencies after all

* Fix bashrc path

* Run nvm during run script

* Also add git

* Try apt-get again

* Re-introduce optional nvm

* Fix nvm install

* Go back to previous way of installing nvm

* Unskip most things and add test that hopefully fails

* Add safe directory to silence warning

* Install dependencies in smoke tests and build JS locally
* Add ImportAttributesKey to choose keyword ("with" | "assert")

* Revert settings.json change

* Added documentation for importAttributesKey

* Revert wasm bindings

* Fix lint issue

* Remove space

* Revert bindings_wasm_bg.wasm.d.ts

* Revert test/form/index.js

---------

Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
* feat: improve tree-shaking by propagate const parameter

* fix: update old tests (for tree-shaking const param)

* test: add test for tree-shaking by propagate const parameter

* feat&perf: support object param

* style: update coverage

* test: update tree-shake-literal-parameter

* test: update tree-shake top export

* refactor: tree-shaking-literal

* fix: test indent

* perf: remove same object SPJ
getObjectEntity is private, so we can't judge if two object are the same

* refactor: support iife

* test: tree-shake literal iife

* fix: args but not callee should not be optimized

* refactor: some logic to function base with comment

* feat&perf: support implicitly undefined

* test: tree-shake literal conditional

* feat: integrate with optimizeCache

* test: fix

* feat: function argument side effect

* style: revert export default change since deoptimizePath will detect

* feat: support foo(bar);foo(bar);

* test: add more side-effect and top-level test

* 4.13.2

* test: add export default test

* refactor FunctionParameterState and remove initalization

* refactor IIFE

* feat: support export default anonymous

* fix: nested namespace tracking

* feat: support define then export default

* performance

* refactor: UNKNOWN_EXPRESSION

* refactor: reduce complexity

* fix: export default function foo and foo called from same mod

* style: NodeType

* style: remove counter

* perf: cache onlyfunctioncall result

* style&perf: remove args slice

* perf: export default variable

* perf: export default variable

* style: small updates: naming, private...

* perf: LogicalExpression deoptimize cache

* style: remove a condition which is always true

* style: add protected

* style: remove a condition which is always true

* style: remove a condition

* refactor: lazy bind variable

* fix: refresh cache if isReassigned change for ParameterVariable

* fix: make sure deoptimize give a final state

* style: make coverage more happy

---------

Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
… (#5481)

* fix: conditional/logical expression should request a new tree-shaking

* perf: rarely expressionsToBeDeoptimized.length > 0, so move it outside
lukastaegert and others added 14 commits April 22, 2024 17:09
* fix: only optimize annoymous iife

* fix typo

Co-authored-by: Adam Freidin <[email protected]>

* fix typo

* support functions having a name but not used

---------

Co-authored-by: Adam Freidin <[email protected]>
OSC claiming rollup on Drips network.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: re-init function parameter tracking

Revert "Revert function parameter tracking logic for now (#5487)"

This reverts commit 74da135.

* refactor: see #5483 comments. squashed with some style commits

style: move deoptimizeCache logic

style: naming

style: naming

remove useless comment

style: small update

* make sure every addUsedPlace has a requestTreeshakingPass

This is to make sure if onlyFunctionCallUsed becomes false,
there is a new tree-shaking pass to deoptimize it

* fix: missing reassigned guard
* Report performance in CI

* Include the report of executing perf-report/index.js

* Remove all ANSI styles

* Report added or removed tree-shaking stages
Copy link

vercel bot commented Apr 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup-docs-cn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 8:20am

Copy link

netlify bot commented Apr 27, 2024

Deploy Preview for relaxed-alfajores-47dd1b failed.

Name Link
🔨 Latest commit 01ab861
🔍 Latest deploy log https://app.netlify.com/sites/relaxed-alfajores-47dd1b/deploys/662f581eb2dfa50008df38b9

Copy link
Contributor

github-actions bot commented Apr 27, 2024

Performance report!

Rough benchmark

Command Mean [s] Min [s] Max [s] Relative
node _benchmark/previous/bin/rollup -i ./perf/entry.js -o _benchmark/result/previous.js 9.513 ± 0.156 9.333 9.615 1.00
node _benchmark/current/bin/rollup -i ./perf/entry.js -o _benchmark/result/current.js 9.519 ± 0.064 9.454 9.583 1.00 ± 0.02

Internal benchmark

BUILD: 8448ms (+205ms, +2.5%), 748 MB

initialize: 0ms, 24.5 MB (+8%)

generate module graph: 3252ms (+19ms, +0.6%), 573 MB

generate ast: 1536ms (+53ms, +3.5%), 566 MB

sort and bind modules: 453ms (+24ms, +5.6%), 615 MB

mark included statements: 4727ms (+148ms, +3.2%), 748 MB

treeshaking pass 1: 1599ms (+23ms, +1.4%), 714 MB
treeshaking pass 2: 775ms (+30ms, +4.1%), 736 MB
treeshaking pass 3: 303ms (+13ms, +4.4%), 745 MB
treeshaking pass 4: 280ms, 740 MB
treeshaking pass 5: 324ms (+13ms, +4.1%), 746 MB
treeshaking pass 6: 266ms, 746 MB
treeshaking pass 7: 250ms (+13ms, +5.6%), 745 MB
treeshaking pass 8: 240ms, 750 MB
treeshaking pass 9: 219ms (+11ms, +5.2%), 754 MB
treeshaking pass 10: 223ms (+14ms, +6.5%), 752 MB
treeshaking pass 11: 220ms (+13ms, +6.4%), 748 MB

GENERATE: 906ms, 1.02 GB

initialize render: 0ms, 912 MB

generate chunks: 86ms, 924 MB

optimize chunks: 0ms, 914 MB

render chunks: 802ms (+10ms, +1.3%), 1000 MB

transform chunks: 17ms, 1.02 GB

generate bundle: 0ms, 1.02 GB

@waynzh waynzh merged commit aed5919 into master Apr 29, 2024
36 of 40 checks passed
@waynzh waynzh deleted the sync-91352494 branch April 29, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants