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 359 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
5f59594
Merge branch 'main' into refactor/node
ErKeLost Aug 28, 2024
1c883df
Merge branch 'main' into refactor/node
ErKeLost Aug 28, 2024
af404a9
chore: update old-watcher
ErKeLost Aug 29, 2024
834aae2
refactor(core): node watcher (#1735)
fu050409 Aug 29, 2024
37379d0
chore: update demo
ErKeLost Aug 29, 2024
5d70cf2
Merge branch 'main' into refactor/node
ErKeLost Aug 30, 2024
38a613b
feat: add debug
ErKeLost Aug 30, 2024
b74e69c
chore: update all logic
ErKeLost Sep 2, 2024
f08a256
feat: add createInlineCompiler
ErKeLost Sep 3, 2024
1296ea7
Merge branch 'main' into refactor/node
ErKeLost Sep 3, 2024
d222b64
chore: update types
ErKeLost Sep 3, 2024
010b564
chore: add visualizer example refactor configureServer
ErKeLost Sep 3, 2024
60459ab
Merge branch 'main' into refactor/node
ErKeLost Sep 3, 2024
8a2b13c
fix: configureServer execution order
ErKeLost Sep 3, 2024
f161c06
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 3, 2024
a9e57ed
chore: remove unless file prepare refactor stage: 1
ErKeLost Sep 4, 2024
a705d4b
chore: remove unless file prepare refactor stage: 1
ErKeLost Sep 4, 2024
4c8f08d
chore: prepare refactor vite adapter
ErKeLost Sep 4, 2024
6603646
chore: prepare write restartServer logic
ErKeLost Sep 4, 2024
76632e2
chore: pre restartServer full create new Server and full reload page
ErKeLost Sep 5, 2024
db0463a
chore: optimize server code
ErKeLost Sep 5, 2024
3d8ef39
chore: optimize server code
ErKeLost Sep 5, 2024
a951b7f
chore: optimize server code
ErKeLost Sep 5, 2024
082130e
chore: add commit release
ErKeLost Sep 6, 2024
1e3ae13
Merge branch 'main' into refactor/node
ErKeLost Sep 6, 2024
751a69d
chore: remove unless ci
ErKeLost Sep 6, 2024
3de967e
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 6, 2024
404842f
chore: remove unless ci
ErKeLost Sep 6, 2024
792a332
chore: remove unless ci
ErKeLost Sep 6, 2024
d85f9e0
chore: update preview-commit ci
ErKeLost Sep 6, 2024
27bd09b
chore: update preview-commit ci
ErKeLost Sep 6, 2024
0727a95
chore: update preview-commit ci
ErKeLost Sep 6, 2024
61f1dfb
chore: update preview-commit ci
ErKeLost Sep 6, 2024
c872a44
Merge branch 'main' into refactor/node
ErKeLost Sep 10, 2024
a783c3e
Merge branch 'main' into refactor/node
ErKeLost Sep 11, 2024
9d61308
chore: do not exit when first compilation failed (#1764)
wre232114 Sep 11, 2024
8e8ae7a
chore: test compile() not exit
ErKeLost Sep 11, 2024
72c57c8
refactor: clearScreen logic
ErKeLost Sep 11, 2024
becfb3d
chore: add customLogger
ErKeLost Sep 11, 2024
018e6cc
chore: add clearScreen
ErKeLost Sep 11, 2024
b017156
chore: add clearScreen
ErKeLost Sep 11, 2024
36cab61
refactor: logger
ErKeLost Sep 11, 2024
2fb37d0
refactor: logger
ErKeLost Sep 11, 2024
2eb8dd7
chore: update server config refactor
ErKeLost Sep 12, 2024
2073477
chore: test server restart
ErKeLost Sep 12, 2024
3c11441
chore: prepare server resolve error
ErKeLost Sep 12, 2024
1d62649
chore: test config
ErKeLost Sep 12, 2024
2f3e0b9
Merge branch 'main' into refactor/node
ErKeLost Sep 13, 2024
e3bd699
Merge branch 'main' into refactor/node
ErKeLost Sep 13, 2024
c94b757
chore: pending restart server finish
ErKeLost Sep 15, 2024
d65aaa8
Merge branch 'main' into refactor/node
ErKeLost Sep 15, 2024
3ba6908
chore: pending restart server finish
ErKeLost Sep 15, 2024
93e0de6
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 15, 2024
89df495
chore: pending restart server finish
ErKeLost Sep 15, 2024
0d2d57c
Merge branch 'main' into refactor/node
ErKeLost Sep 16, 2024
fff853f
chore: support vite env config
ErKeLost Sep 16, 2024
98cf06e
chore: support vite env config
ErKeLost Sep 16, 2024
e27b3ab
chore: preview overlay page
ErKeLost Sep 16, 2024
eda4401
chore: preview overlay page
ErKeLost Sep 16, 2024
277b4dc
Merge branch 'main' into refactor/node
ErKeLost Sep 16, 2024
294cccb
chore: rewrite overlay page
ErKeLost Sep 17, 2024
a0c7ddd
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 17, 2024
0d2d49f
chore: rewrite overlay page
ErKeLost Sep 17, 2024
8ca3fd3
chore: update overlay
ErKeLost Sep 18, 2024
740d61d
chore: update overlay page
ErKeLost Sep 18, 2024
29bdc07
chore: resolve all error type
ErKeLost Sep 18, 2024
91bc853
chore: update error logic
ErKeLost Sep 18, 2024
36fb5c6
chore: update watcher unlink
ErKeLost Sep 18, 2024
ad3d3df
fix: resource generate compile pending error
ErKeLost Sep 19, 2024
7a3c7ff
Merge branch 'main' into refactor/node
ErKeLost Sep 19, 2024
6d852e1
fix: support env ant type
ErKeLost Sep 20, 2024
629514b
feat: add configureCompiler hooks
ErKeLost Sep 20, 2024
8aa315f
feat: add configureCompiler hooks finish remove sort only filter plugins
ErKeLost Sep 20, 2024
d7ae9d5
chore: remove unless code
ErKeLost Sep 20, 2024
817a5b9
chore: test preview versions
ErKeLost Sep 20, 2024
ca3f890
feat: update docs
ErKeLost Sep 21, 2024
8d554c2
feat: update docs workspace
ErKeLost Sep 21, 2024
b9f1957
chore: remove koa
ErKeLost Sep 21, 2024
42ce309
chore: remove unless 0.x and 1.0.0 version docs
ErKeLost Sep 21, 2024
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
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
  •  
  •  
  •  
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: 0 additions & 5 deletions .changeset/heavy-rabbits-smile.md

This file was deleted.

232 changes: 72 additions & 160 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,146 +1,18 @@
name: E2E Tests
name: Nightly Release CI
on:
pull_request:
push:
branches:
- main
- v2-dev

permissions:
contents: write
pull-requests: write
packages: write

jobs:
call-rust-build:
uses: ./.github/workflows/rust-build.yaml

examples-test:
name: Examples Test
runs-on: ${{ matrix.settings.os }}
needs: [call-rust-build]
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
- os: macos-latest
abi: darwin-arm64
- os: macos-13
abi: darwin-x64
- os: windows-latest
abi: win32-x64-msvc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile

- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding

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

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

- uses: actions/download-artifact@v4
id: download-create-farm-rust
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/create-farm

- name: Build Examples - ${{ matrix.settings.abi }}
run: node scripts/test-examples.mjs

- name: E2E Test Examples - ${{ matrix.settings.abi }}
run: npm run test-e2e

# test create farm
- name: Build Create Farm
run: cd packages/create-farm && npm run build
- name: Test Create Farm React - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-react --template react && cd my-test-app-react && pnpm i && pnpm build
- name: Test Create Farm Vue - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue --template vue3 && cd my-test-app-vue && pnpm i && pnpm build
- name: Test Create Farm Solid - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-solid --template solid && cd my-test-app-solid && pnpm i && pnpm build
- name: Test Create Farm Svelte - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-svelte --template svelte && cd my-test-app-svelte && pnpm i && pnpm build
- name: Test Create Farm Lit - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-lit --template lit && cd my-test-app-lit && pnpm i && pnpm build
- name: Test Create Farm Vanilla - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vanilla --template vanilla && cd my-test-app-vanilla && pnpm i && pnpm build
- name: Test Create Farm Preact - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-preact --template preact && cd my-test-app-preact && pnpm i && pnpm build
- name: Test Create Farm Vue2 - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue2 --template vue2 && cd my-test-app-vue2 && pnpm i && pnpm build

type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
- name: Type Check With Tsc
run: pnpm run --filter "@farmfe/*" type-check
- name: Changesets Check
run: npx changeset status --since=origin/main

ts-test:
name: Typescript Test
runs-on: ${{ matrix.settings.os }}
needs: call-rust-build
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
- os: ubuntu-20.04
abi: linux-x64-gnu
- os: macos-13
abi: darwin-x64
- os: macos-latest
abi: darwin-arm64
- os: windows-latest
abi: win32-x64-msvc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@9.1.0 && 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 Core CJS
run: cd packages/core && pnpm run build:cjs
- name: Test - ${{ matrix.settings.abi }}
run: npm run test
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

check-core-artifacts:
name: Check Core Artifacts
runs-on: ubuntu-latest
Expand Down Expand Up @@ -182,6 +54,7 @@ jobs:
settings:
- name: plugin-sass
- name: plugin-react
- name: plugin-replace-dirname
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -193,33 +66,72 @@ jobs:
test -f /tmp/artifacts/${{ github.sha }}-${abi}-${{ matrix.settings.name }}/index.farm
done

benchmarks:
nightly-release:
name: Nightly Release
needs: [call-rust-build]
runs-on: ${{ matrix.settings.os }}
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- uses: actions/setup-node@v3
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
node-version: 18.x

# batch download artifacts
- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding
- name: Build Core CJS
run: cd packages/core && pnpm run build:cjs
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
path: /tmp/artifacts
- name: Copy Farm Core Binary
run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding
- name: Move Artifacts
run: |
for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc
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
do
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi}
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node
done

- name: Install Dependencies
run: npm install -g pnpm@9.4.0 && pnpm i --frozen-lockfile
- name: Build Plugin Tools
run: pnpm --filter @farmfe/plugin-tools run build

- name: Create Nightly Release Pull Request or Publish Nightly Version to npm
id: changesets
uses: changesets/action@v1
with:
run: npm exec vitest bench
token: ${{ secrets.CODSPEED_TOKEN }}
version: pnpm run bump:nightly
publish: npm run release:nightly
branch: v2-dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# - name: Comment PR
# uses: actions/github-script@v6
# if: success()
# with:
# github-token: ${{secrets.GITHUB_TOKEN}}
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: '🎉 Nightly version has been published to npm!'
# })
12 changes: 0 additions & 12 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,3 @@ jobs:
run: cargo fmt
- name: Run cargo clippy
run: cargo clippy
lint:
name: TS Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile
- name: Run lint
run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 18.x

Expand Down
11 changes: 11 additions & 0 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 @@ -149,6 +153,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 @@ -175,6 +180,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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ build
!crates/**/build
.swc
.DS_Store


# docs
.docusaurus
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
Loading
Loading