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

feat: Farm v2.0 dev #1835

Open
wants to merge 438 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
3118d2e
chore(docs): custom code block
ErKeLost Sep 22, 2024
14ceef6
chore(docs): custom code block
ErKeLost Sep 22, 2024
92b849b
chore(docs): custom code block
ErKeLost Sep 22, 2024
14cd962
chore: update code
ErKeLost Sep 22, 2024
dd8f1ab
chore: update code
ErKeLost Sep 22, 2024
878c9b7
chore: Manually merge codes
ErKeLost Sep 24, 2024
6af8a8d
chore: merge main branch
ErKeLost Sep 24, 2024
5a232d6
chore: test post configureServer hook error
ErKeLost Sep 24, 2024
a379051
fix: post configure server hook return undefined
ErKeLost Sep 25, 2024
0436688
Merge branch 'main' into refactor/node
ErKeLost Sep 25, 2024
5735fcd
fix: configureCompiler hook execute error
ErKeLost Sep 25, 2024
08c0cdd
chore: remove createCompiler in createServer
ErKeLost Sep 25, 2024
2102954
chore: remove watch command
ErKeLost Sep 26, 2024
4de5979
fix: cspell word
ErKeLost Sep 26, 2024
683d0ac
fix: cspell word
ErKeLost Sep 26, 2024
8984c3e
chore: remove TODO log
ErKeLost Sep 26, 2024
389ae5c
chore: remove unless code
ErKeLost Sep 27, 2024
f91e6c6
chore: update code block style
ErKeLost Sep 27, 2024
df5dfa8
chore: update doc style
ErKeLost Sep 27, 2024
3ba2c92
feat(cli): support the configuration of `timeUnit` (#1798)
RSS1102 Sep 29, 2024
f9db758
chore: update docs
ErKeLost Sep 29, 2024
cd2e298
chore: update ci
ErKeLost Sep 29, 2024
216255e
Merge branch 'main' into refactor/node
ErKeLost Sep 29, 2024
543f367
chore: disabled benchmark ci
ErKeLost Sep 29, 2024
6e15d00
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 29, 2024
7d8db56
feat: lazy compilation middleware compilation
ErKeLost Sep 29, 2024
a61a8c7
chore: update middleware types
ErKeLost Sep 29, 2024
d6cc0f0
chore: update cli options timeUnit
ErKeLost Sep 29, 2024
9eb4190
fix: word cspell
ErKeLost Sep 29, 2024
60f825f
chore: add node build lib config file tips
ErKeLost Sep 29, 2024
13358b1
Merge branch 'main' into refactor/node
ErKeLost Oct 3, 2024
b270870
chore: test watch mode remove unless code
ErKeLost Oct 3, 2024
6a5a092
chore: optimize code
ErKeLost Oct 3, 2024
dd43f56
chore: lint error
ErKeLost Oct 3, 2024
881b76b
chore: update homepage
ErKeLost Oct 3, 2024
45bf260
chore: update homepage
ErKeLost Oct 3, 2024
b6c08dc
chore: update docs deps
ErKeLost Oct 3, 2024
aa44096
fix: config file load process.env.NODE_ENV
ErKeLost Oct 4, 2024
3811a40
chore: update browser list version
ErKeLost Oct 4, 2024
16cf2d3
chore: update browser list version
ErKeLost Oct 5, 2024
2558e33
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 5, 2024
f87e4c7
chore: update new vite-server-adapter
ErKeLost Oct 5, 2024
fcec298
chore: finish proxy vite server adapter
ErKeLost Oct 5, 2024
9e9592f
chore: update example
ErKeLost Oct 6, 2024
ac82e05
chore: update browser list version
ErKeLost Oct 6, 2024
449fc4b
feat: array to alias config
ErKeLost Oct 7, 2024
288b238
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 7, 2024
3d7013d
chore: update error/mod lint error
ErKeLost Oct 7, 2024
2648325
chore: update error/mod lint error
ErKeLost Oct 7, 2024
f31203a
chore: update server logic
ErKeLost Oct 8, 2024
e8a06f3
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 8, 2024
202aed4
chore: update resolve compiler config
ErKeLost Oct 8, 2024
f510fbf
chore: optimize compiler define
ErKeLost Oct 8, 2024
46cd419
Merge branch 'main' into refactor/node
ErKeLost Oct 8, 2024
af5a9f6
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 11, 2024
6525932
chore: finish clean methods
ErKeLost Oct 11, 2024
590fd82
chore: finish index.ts with core functions `start`, `build`, `clean`
ErKeLost Oct 11, 2024
4d37ee9
chore: optimize compiler code set
ErKeLost Oct 11, 2024
3853f59
refactor: change moduleResolution and module type remove all js type
ErKeLost Oct 11, 2024
4273ff3
chore: remove unless code
ErKeLost Oct 11, 2024
08e14b7
chore: remove js suffix name
ErKeLost Oct 12, 2024
9dc4f7a
Merge branch 'main' into refactor/node
ErKeLost Oct 12, 2024
7eee344
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 12, 2024
1c8e772
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 12, 2024
9b6d209
Merge branch 'main' into refactor/node
ErKeLost Oct 13, 2024
66c6e96
chore: add workflow
ErKeLost Oct 13, 2024
936a259
chore: Withdraw tsc logic code
ErKeLost Oct 13, 2024
df511c3
chore: update lock json
ErKeLost Oct 14, 2024
d7ae33a
Merge branch 'main' of github.com:farm-fe/farm into refactor/node
ErKeLost Oct 14, 2024
2eb7bc3
chore: update lock json
ErKeLost Oct 14, 2024
3ff6758
chore: skip some tasks
ErKeLost Oct 14, 2024
5e02941
chore: update rust test error
ErKeLost Oct 14, 2024
18cfb5b
chore: update rust test error
ErKeLost Oct 14, 2024
16ae372
chore: update rust test error
ErKeLost Oct 14, 2024
8a4ff25
chore: update rust test error
ErKeLost Oct 14, 2024
6e757f5
chore: update rust test error
ErKeLost Oct 14, 2024
4bd2bcb
chore: update rust test error
ErKeLost Oct 14, 2024
02d0284
chore: update biome lint rules
ErKeLost Oct 14, 2024
5525dab
Merge branch 'main' of github.com:farm-fe/farm into refactor/node
ErKeLost Oct 14, 2024
66ebe80
fix: cargo test
ErKeLost Oct 14, 2024
a476e49
chore: update ts lint
ErKeLost Oct 14, 2024
f107a4e
chore: update ts lint
ErKeLost Oct 14, 2024
2a0ad60
Merge branch 'main' into refactor/node
ErKeLost Oct 18, 2024
8a69321
chore: update ts lint and ci
ErKeLost Oct 18, 2024
9508572
chore: update ci
ErKeLost Oct 18, 2024
7aa7c68
chore: update ci
ErKeLost Oct 18, 2024
ec58244
chore: update ci
ErKeLost Oct 18, 2024
93170e0
chore: update ci
ErKeLost Oct 18, 2024
fcee171
chore: update ci
ErKeLost Oct 18, 2024
707c639
chore: update ci
ErKeLost Oct 18, 2024
96f9844
chore: update ci
ErKeLost Oct 18, 2024
ca1c5c4
chore: update ci
ErKeLost Oct 18, 2024
d428b3c
chore: update ci
ErKeLost Oct 18, 2024
5bd02c0
chore: update ci
ErKeLost Oct 18, 2024
212ac10
chore: update ci
ErKeLost Oct 19, 2024
061af9d
chore: update ci
ErKeLost Oct 19, 2024
4b293fc
chore: update private ci
ErKeLost Oct 19, 2024
b547391
chore: update private ci
ErKeLost Oct 19, 2024
4ffcb9d
chore: update private ci
ErKeLost Oct 19, 2024
274ae2d
chore: update private ci
ErKeLost Oct 19, 2024
77b3995
chore: update private ci
ErKeLost Oct 19, 2024
a82a5b2
chore: bump nightly version
ErKeLost Oct 20, 2024
72180e5
chore: bump nightly version
ErKeLost Oct 20, 2024
1a727ca
chore: bump nightly version
ErKeLost Oct 20, 2024
8d6f357
chore: update deps
ErKeLost Oct 20, 2024
e49bf71
chore: update base branch in changeset config
ErKeLost Oct 20, 2024
571b37f
chore: update swc v1 (#1836)
wre232114 Oct 20, 2024
f25d66d
chore: improve partial bundle group named (#1629)
shulandmimi Oct 20, 2024
a4d3dc9
chore: dynamic bind transform html plugin order
ErKeLost Oct 20, 2024
7255d7a
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 20, 2024
c8539ea
chore: dynamic bind transform html plugin order
ErKeLost Oct 20, 2024
9177b40
chore: dynamic bind transform html plugin order
ErKeLost Oct 20, 2024
02474a4
chore: update ci
ErKeLost Oct 20, 2024
3e027f1
chore: update ci permissions
ErKeLost Oct 20, 2024
1ab2d24
chore: change base branch
ErKeLost Oct 20, 2024
947024c
chore: remove bench packages
ErKeLost Oct 21, 2024
357e11e
chore: remove bench packages
ErKeLost Oct 21, 2024
a94f7ad
chore: add the baseBranch for release
Nirvana-Jie Oct 21, 2024
e580c7a
chore: update workspace versions
ErKeLost Oct 21, 2024
d7dfd74
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 21, 2024
b0f0603
chore: change solid and vue plugin to private
ErKeLost Oct 21, 2024
59f85a1
chore: update workspace version
ErKeLost Oct 21, 2024
2b50de0
chore: update version
ErKeLost Oct 21, 2024
dcfb1e5
chore: update v2 changeset base version
ErKeLost Oct 21, 2024
7e94653
chore: update changeset ignore
ErKeLost Oct 21, 2024
122227d
chore: update branch with changeset
ErKeLost Oct 21, 2024
3489aef
chore: optimize the example for arco-pro
Nirvana-Jie Oct 21, 2024
55f3cce
chore: add '-no-git-tag' flag
ErKeLost Oct 22, 2024
961708a
chore: add '-no-git-tag' flag
ErKeLost Oct 22, 2024
16788d7
Version Packages (#1849)
github-actions[bot] Oct 22, 2024
e09b8c4
chore: private example
ErKeLost Oct 22, 2024
1543584
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 22, 2024
afbb50d
chore: update deps
ErKeLost Oct 22, 2024
1842137
chore: update deps
ErKeLost Oct 22, 2024
76de763
chore: update ci
ErKeLost Oct 22, 2024
6667953
chore: update nightly cli version
ErKeLost Oct 22, 2024
24347c9
chore: update deps
ErKeLost Oct 22, 2024
9f91fc3
Version Packages (#1851)
github-actions[bot] Oct 22, 2024
e7920ed
chore: release cli
ErKeLost Oct 22, 2024
cd4d789
chore: update deps
ErKeLost Oct 22, 2024
bd5f09b
chore: update lock file
Nirvana-Jie Oct 22, 2024
8ba7469
Version Packages (#1853)
github-actions[bot] Oct 22, 2024
edc7c63
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 22, 2024
46883f3
chore: bump version with cli remove @farmfe/core deps
ErKeLost Oct 22, 2024
ca95977
Version Packages (#1855)
github-actions[bot] Oct 22, 2024
6a1038c
chore: update deps
ErKeLost Oct 22, 2024
36dc41d
Version Packages (#1857)
github-actions[bot] Oct 22, 2024
b1bef2c
chore: update bump version
ErKeLost Oct 22, 2024
83838bd
chore: remove lightCyan colors
ErKeLost Oct 22, 2024
52c4c6f
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 22, 2024
30c3f0b
Version Packages (#1861)
github-actions[bot] Oct 22, 2024
4ed00c9
Merge branch 'main' into v2-dev
ErKeLost Oct 23, 2024
cab79e8
chore: bump runtime nightly version
ErKeLost Oct 23, 2024
9028592
Version Packages (#1863)
github-actions[bot] Oct 23, 2024
9e349c0
chore: update code
ErKeLost Oct 23, 2024
550da00
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 23, 2024
666c364
chore: update ci workflow base branch on pull request
ErKeLost Oct 23, 2024
9ef367d
chore: update ci when push v2-dev
ErKeLost Oct 23, 2024
d7c5ffb
fix(nightly): support node 16 downgraded execa version (#1866)
ErKeLost Oct 23, 2024
59209ee
feat: add replace-dirname plugin
ErKeLost Oct 23, 2024
6819f5f
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 23, 2024
9a1b2b9
chore: bump replace dirname plugin version
ErKeLost Oct 23, 2024
740b4cf
Version Packages (#1870)
github-actions[bot] Oct 23, 2024
359035e
chore(nightly): fix targetEnv schema (#1868)
fu050409 Oct 23, 2024
2140272
fix(nightly): temporarily resolve spa reload issues (#1876)
ErKeLost Oct 24, 2024
6bbf6c5
feat(nightly): add `@farmfe/plugin-relace-dirname` rust plugin (#1874)
ErKeLost Oct 24, 2024
a3617db
Version Packages (#1878)
github-actions[bot] Oct 24, 2024
f460eb1
fix: 404 spa reload error
ErKeLost Oct 24, 2024
6e66daa
Version Packages (#1879)
github-actions[bot] Oct 24, 2024
7d89c7d
chore(nightly): update docs with nightly warning (#1882)
ErKeLost Oct 25, 2024
21bdb61
chore(nightly): optimize scripts when start project (#1886)
ErKeLost Oct 27, 2024
0062df5
Merge remote-tracking branch 'upstream/main' into v2-dev
ErKeLost Oct 28, 2024
aa50f68
fix(v2): build js plugins scirpts error (#1896)
ErKeLost Oct 29, 2024
669e2b8
perf(v2): use `prismjs` instead of `highlightjs` to improve runtime c…
ErKeLost Oct 29, 2024
b327dd1
chore(v2): Integrate middleware and htmlfallback middlewear usage (#1…
ErKeLost Oct 29, 2024
77f45b9
Version Packages (#1894)
github-actions[bot] Oct 29, 2024
80f64a6
Version Packages (#1899)
github-actions[bot] Oct 30, 2024
389c2de
Merge branch 'main' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 30, 2024
97bf4d6
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
ErKeLost Oct 30, 2024
f91c260
refactor(v2): optimize scripts code (#1892)
ErKeLost Nov 1, 2024
4956f27
Merge branch 'main' of github.com:farm-fe/farm into v2-dev
ErKeLost Nov 2, 2024
6d3f728
chore: fix server restart not display resolveUrls
ErKeLost Nov 2, 2024
ad42e40
chore: upgrade swc and setup ci (#1913)
wre232114 Nov 3, 2024
615eec8
chore: v2 branch opens biome (#1907)
ErKeLost Nov 4, 2024
ce93432
chore: optimize overlay page (#1908)
ErKeLost Nov 4, 2024
20ab467
fix(test): e2e issues (#1914)
wre232114 Nov 5, 2024
ed6a95b
fix: server restart not display resolveUrls (#1911) (#1915)
JobinJia Nov 5, 2024
cb730fe
chore(doc): add new Contribution Guide page (#1909)
ErKeLost Nov 5, 2024
790d018
chore: remove timeUnit option in config
ErKeLost Nov 6, 2024
57d8898
Merge branch 'main' of github.com:farm-fe/farm into v2-dev
ErKeLost Nov 6, 2024
0092ca5
chore: update cspell
ErKeLost Nov 6, 2024
69710c9
chore: ts lint (#1924)
Nirvana-Jie Nov 7, 2024
21ac2ac
chore: export loadenv api (#1920)
ErKeLost Nov 7, 2024
1e42476
fix: Should show resolveUrls at the end of the service readiness (#1922)
JobinJia Nov 7, 2024
b8f7fc5
chore: withdrawal buidl cjs scripts (#1925)
ErKeLost Nov 8, 2024
d133cca
chore: redefine watch options (#1927)
ErKeLost Nov 9, 2024
3cceff0
feat(wip): Optimize library bundle to support multiple bundle (#1740)
wre232114 Nov 10, 2024
d61762a
fix: short name display on windows (#1944)
K0nnyaku Nov 18, 2024
9508598
feat: improve module import compress (#1953)
shulandmimi Nov 21, 2024
f0ddab5
fix: bootstrap sort rust plugins error (#1955)
ErKeLost Nov 21, 2024
7875f8e
Merge branch 'main' into chore/syncMain
shulandmimi Nov 21, 2024
473d4fb
chore: fix format error
shulandmimi Nov 21, 2024
b164fac
Merge branch 'v2-dev' into chore/syncMain
ErKeLost Nov 21, 2024
e958da5
chore: plugin-tools should be built before core. And add an ignore f…
JobinJia Nov 22, 2024
c7af216
refactor: Using zod to reconstruct the js plugin parsing process (#1906)
ErKeLost Nov 22, 2024
5dba0bd
chore: sync main
wre232114 Nov 23, 2024
60d5b9f
chore: redefine server options (#1930)
ErKeLost Nov 24, 2024
d2c3b53
Merge branch 'main' into v2-dev
ErKeLost Nov 25, 2024
da6aebb
Merge branch 'main' into v2-dev
ErKeLost Nov 25, 2024
dd90b19
refactor(v2): rewrite preview-server (#1773)
fu050409 Nov 25, 2024
5b04f5c
chore(bootstrap): optimize bootstrap script (#1968)
fu050409 Nov 26, 2024
ad09476
chore: normalize cache logic (#1967)
ErKeLost Nov 27, 2024
674e5ed
refactor(v2): use faster hasher to optimize (#1941)
fu050409 Nov 27, 2024
4773d92
chore: optimize server SIGTERM listener (#1969)
ErKeLost Dec 4, 2024
eeeb886
Merge branch 'main' into chore/syncMain
shulandmimi Dec 10, 2024
05324c1
fix: some bugs (#1991)
ErKeLost Dec 12, 2024
6ab05be
chore: v2 normalize config logic (#1993)
ErKeLost Dec 13, 2024
d197a5b
chore: add two new mode (#1998)
ErKeLost Dec 16, 2024
61e0f89
chore: optimize node side code (#2004)
ErKeLost Dec 17, 2024
8815555
chore: optimize proxy middleware (#2010)
ErKeLost Dec 20, 2024
9c162ad
chore: optimize server middlewares
ErKeLost Dec 20, 2024
b44452e
chore: update TODO
ErKeLost Dec 20, 2024
e9d6d07
chore: update TODO
ErKeLost Dec 20, 2024
fa293b2
chore: optimize server middleware
ErKeLost Dec 22, 2024
d98885a
chore: remove unless code
ErKeLost Dec 22, 2024
4cc6496
chore: optimize server middlewares (#2011)
ErKeLost Dec 22, 2024
3643f58
Merge branch 'optimize/middleware' of github.com:ErKeLost/farm; branc…
ErKeLost Dec 23, 2024
9b020de
chore: update test code
ErKeLost Dec 23, 2024
3451eb9
chore: merge main
Dec 23, 2024
7642c9c
Merge branch 'v2-dev' of github.com:farm-fe/farm into v2-dev
Dec 23, 2024
d6b0549
refactor: v2 watcher (#2020)
ErKeLost Dec 24, 2024
14a50ed
feat: add command and isProduction options (#2018)
ErKeLost Dec 24, 2024
0945a78
refactor: server.origin add type (#2021)
ErKeLost Dec 24, 2024
8f291a9
chore: update lock
ErKeLost Dec 24, 2024
0a96f75
Merge branch 'learn_all' of github.com:ErKeLost/farm; branch 'v2-dev'…
ErKeLost Dec 24, 2024
61fb016
chore: update lock
ErKeLost Dec 24, 2024
ef06763
chore: update code
ErKeLost Dec 24, 2024
a009fc3
chore: Add origin schema and optimize server resolvedUserconfig renam…
ErKeLost Dec 25, 2024
40222a9
Merge branch 'v2-dev' of github.com:farm-fe/farm into learn_all
ErKeLost Dec 25, 2024
fb7c901
chore: update example
ErKeLost Dec 25, 2024
4497ea6
chore: add context parameters to updateModules hook (#2026)
ErKeLost Dec 27, 2024
4c04834
chore: split resource middlewares (#2031)
ErKeLost Dec 31, 2024
d7eaeff
chore: optimize code (#2043)
ErKeLost Jan 5, 2025
67f305f
chore: add command type in resolvedUserConfig (#2042)
ErKeLost Jan 6, 2025
a30ba66
chore: docs update block component (#2047)
ErKeLost Jan 8, 2025
92c2a72
fix: fix panic on irrelevant file deletion (#2055)
fu050409 Jan 10, 2025
ce7bc64
fix: #2062 (#2063)
ErKeLost Jan 14, 2025
b7a651a
chore: optimize `replace_dirname plugin` enhance code robustness (#2072)
ErKeLost Jan 21, 2025
23ccb16
feat: add `@farmfe/plugin-dts` (#1933)
ErKeLost Jan 26, 2025
fef8727
chore: format time unit (#2077)
ErKeLost Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/clever-wasps-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/core": major
---

export loadenv api
7 changes: 5 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"baseBranch": "v2-dev",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["@farmfe-examples/*", "farm-docs"],
"snapshot": {
"useCalculatedVersion": true
}
}
5 changes: 5 additions & 0 deletions .changeset/dull-apes-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/plugin-dts": patch
---

feat: add farm dts generate rust plugin
5 changes: 5 additions & 0 deletions .changeset/sharp-pugs-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/runtime-plugin-hmr": major
---

optimize runtime-hmr size
5 changes: 5 additions & 0 deletions .changeset/shiny-guests-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/core": major
---

build cjs script
5 changes: 5 additions & 0 deletions .changeset/ten-dolls-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/core": major
---

bump version
49 changes: 13 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- main
- v2-dev

jobs:
call-rust-build:
Expand Down Expand Up @@ -50,6 +51,12 @@ jobs:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react
path: ./rust-plugins/react/npm/${{ matrix.settings.abi }}

- uses: actions/download-artifact@v4
id: download-plugin-replace-dirname
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-replace-dirname
path: ./rust-plugins/replace-dirname/npm/${{ matrix.settings.abi }}

- uses: actions/download-artifact@v4
id: download-create-farm-rust
with:
Expand Down Expand Up @@ -126,6 +133,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/download-artifact@v4
id: download-plugin-replace-dirname
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-replace-dirname
path: ./rust-plugins/replace-dirname/npm/${{ matrix.settings.abi }}
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build CLI and Core
Expand Down Expand Up @@ -189,6 +201,7 @@ jobs:
settings:
- name: plugin-sass
- name: plugin-react
- name: plugin-replace-dirname
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -199,39 +212,3 @@ jobs:
do
test -f /tmp/artifacts/${{ github.sha }}-${abi}-${{ matrix.settings.name }}/index.farm
done

benchmarks:
needs: [call-rust-build]
runs-on: ${{ matrix.settings.os }}
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
steps:
- uses: "actions/checkout@v3"
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding
- name: Build Runtime
run: |
pnpm --filter "@farmfe/runtime" build
pnpm --filter "@farmfe/runtime-plugin-hmr" build
pnpm --filter "@farmfe/runtime-plugin-import-meta" build
- name: Build Core CJS
run: cd packages/core && pnpm run build:cjs
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
run: npm exec vitest bench
token: ${{ secrets.CODSPEED_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/code-spell-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: "18"
- name: Install pnpm
run: npm install -g [email protected]
- name: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ jobs:
do
mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-replace-dirname/* ./rust-plugins/replace-dirname/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi}

test -f ./packages/core/npm/${abi}/farm.${abi}.node
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node
test -f ./rust-plugins/react/npm/${abi}/index.farm
test -f ./rust-plugins/replace-dirname/npm/${abi}/index.farm
test -f ./rust-plugins/sass/npm/${abi}/index.farm
done
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 freebsd-x64
Expand All @@ -58,8 +60,9 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: pnpm bump
publish: pnpm release
version: ${{ github.ref_name == 'v2-dev' && 'pnpm run bump:nightly' || 'pnpm run bump' }}
publish: ${{ github.ref_name == 'v2-dev' && 'npm run release:nightly' || 'npm run release' }}
branch: ${{ github.ref_name == 'v2-dev' && 'v2-dev' || 'main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/rust-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
cd ../create-farm &&
npm run build -- --target x86_64-unknown-linux-gnu &&
cd ../../rust-plugins/react && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu &&
cd ../replace-dirname && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu &&
apt install -y protobuf-compiler &&
cd ../sass && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu

Expand All @@ -36,6 +37,7 @@ jobs:
cd ../create-farm &&
npm run build -- --target x86_64-unknown-linux-musl &&
cd ../../rust-plugins/react && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl &&
cd ../replace-dirname && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl &&
apk add protobuf &&
cd ../sass && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl

Expand All @@ -60,6 +62,7 @@ jobs:
cd packages/core && npm run build:rs -- --target i686-pc-windows-msvc --cargo-flags="--no-default-features"
cd ../create-farm && npm run build -- --target i686-pc-windows-msvc
cd ../../rust-plugins/react && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc
cd ../replace-dirname && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc
cd ../sass && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc
- os: windows-latest
abi: win32-arm64-msvc
Expand All @@ -71,6 +74,7 @@ jobs:
cd packages/core && npm run build:rs -- --target aarch64-pc-windows-msvc --cargo-flags="--no-default-features"
cd ../create-farm && npm run build -- --target aarch64-pc-windows-msvc
cd ../../rust-plugins/react && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc
cd ../replace-dirname && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc
cd ../sass && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc
# linux
- os: ubuntu-latest
Expand Down Expand Up @@ -117,7 +121,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache: "pnpm"
- name: Install Dependencies
run: pnpm i --frozen-lockfile

Expand All @@ -133,7 +137,7 @@ jobs:
if: ${{ matrix.settings.osxcross }}
# This builds executables & sets env variables for rust to consume.
with:
osx-version: '12.3'
osx-version: "12.3"
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.zig }}
with:
Expand All @@ -151,6 +155,7 @@ jobs:
cd packages/core && npm run build:rs:publish -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} &&
cd ../create-farm && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} &&
cd ../../rust-plugins/react && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }} &&
cd ../replace-dirname && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }} &&
cd ../sass && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }}
shell: bash
- name: Build
Expand All @@ -177,6 +182,12 @@ jobs:
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react
path: rust-plugins/react/npm/${{ matrix.settings.abi }}/index.farm
- name: Upload Plugin Replace Dirname
if: ${{ !matrix.settings.cli_only }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-replace-dirname
path: rust-plugins/replace-dirname/npm/${{ matrix.settings.abi }}/index.farm
- name: Upload Plugin Sass
if: ${{ !matrix.settings.cli_only }}
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rust-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- main
- v2-dev

jobs:
cargo-check:
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,10 @@ build
!crates/**/build
.swc
.DS_Store


# docs
.docusaurus

# idea
.idea
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ registry = "https://registry.npmjs.org/"
auto-install-peers = false
electron-mirror="https://npmmirror.com/mirrors/electron/"
link-workspace-packages=true
fetch-retries=0
tag-version-prefix=""
git-tag-version=false
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@ Please feel free to open an issue using the [feature request template](https://g
## Pull Request Guidelines

- Please adhere to the code style that you see around the location you are working on.

- Setup Your Development Environment.

- Checkout a topic branch from a base branch, e.g. `main` .

- Run `cargo test` and make sure that it passes.

- If you've changed some packages And prepare for an updated version, you should output `npx changeset` in the root directory. we should try our best to keep releasing the `patch version`. If there are no major changes, please choose to update the `patch version`.

- When you are done with your work, verify that it works locally with `pnpm run ready`
Expand All @@ -46,7 +42,6 @@ Please feel free to open an issue using the [feature request template](https://g
git branch --set-upstream-to=upstream/main main
```


## Development Environment Setup

### Dependencies
Expand All @@ -57,7 +52,6 @@ Please feel free to open an issue using the [feature request template](https://g

- [Pnpm](https://pnpm.io) **version 8+**


### IDE

We recommend that you use vscode for development and recommend two necessary plugins that you need to install
Expand Down Expand Up @@ -112,6 +106,12 @@ We also need to test two parts, a set of `Rust` tests and a set of `Node` tests.
cargo test
```

If you want to update snapshot, you can use `INSTA_UPDATE=always cargo test`

```sh
INSTA_UPDATE=always cargo test
```

### Node Testing

- Input `pnpm test` in the root directory to run all test cases based on `vitest`.
Expand All @@ -137,6 +137,5 @@ Farm is divided into two parts: the `JavaScript side` and the `Rust side`:

- **the JavaScript side**:
see code in the `packages` directory. contains core (dev server, file watcher, and compiler wrapper), CLI, runtime, and runtime plugins (module system, HMR).

- **the Rust side**:
see code in the `crates` and `rust-plugins` directory. contains core (compilation context, plugin drivers, etc.), compiler (compile process, HMR update, etc.), and plugins.
7 changes: 2 additions & 5 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
## 提交代码指南

- 编写代码的时候, 请遵循代码编写规范。

- 设置您的本地开发环境。

- 在您的本地从 `main` 分支切出一个新的功能特性分支。

- 使用 `cargo test` 确保所有测试均能通过。

- 如果您已经更改了一些包并准备更新版本,则您应该在根目录中输出`npx changeset` 用来发布新版本并且提交。 我们应该尽量保持发布 `patch` 版本, 如果没有重大更改的情况下,请选择 更新 `patch` 版本
Expand All @@ -42,7 +39,6 @@
git branch --set-upstream-to=upstream/main main
```


## 设置您的本地开发环境

### 依赖
Expand Down Expand Up @@ -107,6 +103,8 @@ pnpm start:rs
cargo test
```

如果需要更新测试快照,你可以使用 `INSTA_UPDATE=always cargo test`

### Node 测试

- 在根目录下输入 `pnpm test` 基于 `vitest` 运行所有的 `Node` 代码测试用例。
Expand All @@ -131,5 +129,4 @@ $ farm plugin create <plugin-name> # create a plugin support js or rust
Farm 整个项目分为两个部分, JavaScript 和 Rust。

- **JavaScript** 部分: 查看 packages 文件夹中的代码, 包含核心包(开发服务, 文件监听, 编译器包装), 脚手架, 运行时和运行时插件 (模块系统, HMR 热更新)。

- **Rust** 部分: 查看 crates 以及 rust-plugin 文件夹中的代码, 包含核心包 (编译上下文, 插件驱动等), 编译器 (编译进程、HMR 更新等), Rust 插件。
Loading