-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactor/node' into refactor/watch-node-logic
- Loading branch information
Showing
133 changed files
with
5,064 additions
and
1,292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@farmfe/core": patch | ||
--- | ||
|
||
import.meta.url and require compatible esm and cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@farmfe/core": patch | ||
--- | ||
|
||
chore: Improve binary performance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: codspeed-benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
# `workflow_dispatch` allows CodSpeed to trigger backtest | ||
# performance analysis in order to generate initial data. | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-rust-build: | ||
uses: ./.github/workflows/rust-build.yaml | ||
|
||
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@v3 | ||
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 | ||
with: | ||
run: npm exec vitest bench | ||
token: ${{ secrets.CODSPEED_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
[workspace] | ||
members = [ | ||
"crates/*", | ||
"packages/create-farm", | ||
"rust-plugins/*", | ||
] | ||
members = ["crates/*", "packages/create-farm", "rust-plugins/*"] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
edition = "2021" | ||
homepage = "https://farmfe.org" | ||
license = "MIT" | ||
repository = "https://github.com/farm-fe/farm" | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
lto = "fat" | ||
opt-level = 3 | ||
strip = true | ||
panic = "abort" | ||
|
||
[profile.ci-test] | ||
inherits = "release" | ||
opt-level = 0 | ||
debug = 2 | ||
lto = false | ||
codegen-units = 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import path from 'node:path'; | ||
import { bench, describe } from 'vitest'; | ||
import { build } from '@farmfe/core'; | ||
|
||
async function build_react_example() { | ||
await build({ | ||
root: path.resolve(process.cwd(), './examples/react'), | ||
configPath: path.resolve('./examples/react'), | ||
compilation: { input: {}, output: {} } | ||
}); | ||
} | ||
|
||
describe('react_example_bench', () => { | ||
let hasRun = false; | ||
bench( | ||
'build_react_example', | ||
async () => { | ||
if (!hasRun) { | ||
await build_react_example(); | ||
hasRun = true; | ||
} | ||
}, | ||
{ warmupIterations: 0 } | ||
); | ||
}); |
Oops, something went wrong.