Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

62 changes: 0 additions & 62 deletions .eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions .fatherrc.cjs

This file was deleted.

31 changes: 16 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Before you begin contributing, please:

### Requirements

- Node.js >= 16.0.0
- pnpm@9.15.0 (we use pnpm as the package manager, exact version specified in package.json)
- Node.js ^22.15 || >=24 (Node 23 is not covered by our toolchain)
- pnpm@11.13.1 (we use pnpm as the package manager, exact version specified in package.json)

### Local Development

Expand Down Expand Up @@ -53,17 +53,17 @@ Before you begin contributing, please:

### Development Scripts

- `pnpm run build` - Build all packages using father
- `pnpm run build` - Build package JavaScript with Vite 8 and declarations with `tsc`
- `pnpm test` - Run tests using vitest
- `pnpm run eslint` - Code style check with TypeScript ESLint rules
- `pnpm run eslint` - Check code with the ESLint flat config and typed TypeScript rules
- `pnpm run prettier` - Format code with prettier
- `pnpm run prettier:check` - Check code formatting
- `pnpm run ci` - Complete CI pipeline (build + lint + format check)
- `pnpm run clean` - Clean node_modules and build artifacts
- `pnpm run start:example` - Start example applications (main + react15)
- `pnpm run start:example` - Start all example applications
- `pnpm run docs:dev` - Start documentation development server
- `pnpm run docs:build` - Build documentation
- `pnpm run prepare` - Setup husky git hooks and dumi
- `pnpm run prepare` - Set up Husky git hooks

## Code Contribution Workflow

Expand Down Expand Up @@ -99,7 +99,7 @@ Note: The project uses `next` as the main development branch (as configured in c
- Use `unknown` instead of `any` when type is uncertain
- Enable all strict options: `strictNullChecks`, `strictFunctionTypes`, `noImplicitReturns`, etc.
- **Type Import/Export**:
- Use `import type` for type-only imports (enforced by ESLint)
- Use inline type specifiers such as `import { type Foo, bar }` (enforced by ESLint)
- Use consistent type exports with inline type specifiers
- **Naming Conventions**:
- Variables and functions use `camelCase`
Expand All @@ -114,7 +114,7 @@ Note: The project uses `next` as the main development branch (as configured in c

#### Code Style

- Follow the project's ESLint configuration
- Follow the project's flat ESLint configuration in `eslint.config.mjs`
- Use 2-space indentation
- No trailing whitespace
- Keep one empty line at the end of files
Expand All @@ -132,7 +132,7 @@ Note: The project uses `next` as the main development branch (as configured in c
- Ensure existing tests are not broken
- Maintain reasonable test coverage
- Place test files in appropriate `__tests__` directories or alongside source files with `.test.ts` suffix
- Use vitest's global test APIs (no need to import `describe`, `it`, `expect`)
- Import the vitest APIs used by each test (`describe`, `it`, `expect`, and so on)
- Run tests with `pnpm test` or `pnpm -r run test` for all packages

### 5. Commit Code
Expand Down Expand Up @@ -273,7 +273,7 @@ For breaking changes, use one of these approaches:
- All vitest tests pass
- Test coverage meets requirements
- Prettier formatting checks
- Build passes with father bundler
- Vite 8 JavaScript builds and `tsc` declaration builds pass

## Documentation Contributions

Expand All @@ -290,8 +290,8 @@ When submitting bug reports, please include:

- **Clear Title**: Briefly describe the issue
- **Environment Information**:
- Node.js version (>= 16.0.0)
- pnpm version (should be 9.15.0)
- Node.js version (^22.15 || >=24)
- pnpm version (should be 11.13.1)
- qiankun version
- Browser version
- Operating system
Expand Down Expand Up @@ -336,11 +336,12 @@ Do not run `changeset` manually after merging a normal pull request. The latest

### Build System

- **Build Tool**: [father](https://github.com/umijs/father) - A library build tool
- **Build Tool**: [Vite 8](https://vite.dev/) for JavaScript and `tsc` for declarations
- **TypeScript**: TypeScript 7 provides `tsc`; the aliased TypeScript 6 package is retained only for tools that require the compiler API
- **Monorepo**: pnpm workspaces with packages in `packages/` directory
- **Documentation**: [dumi](https://d.umijs.org/) for documentation site
- **Documentation**: [VitePress](https://vitepress.dev/) for the documentation site
- **Testing**: [vitest](https://vitest.dev/) for unit testing
- **Code Quality**: ESLint + Prettier + TypeScript strict mode
- **Code Quality**: ESLint flat config + Prettier + TypeScript strict mode

## Getting Help

Expand Down
5 changes: 1 addition & 4 deletions .github/actions/setup-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v6

- name: Use Node.js lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"

- run: corepack enable # https://nodejs.org/api/corepack.html
shell: bash

- run: pnpm install
shell: bash

Expand Down
151 changes: 151 additions & 0 deletions .github/workflows/benchmark-basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: Basic Performance Gate

on:
pull_request:
branches:
- next
push:
branches:
- next
merge_group:
types:
- checks_requested
workflow_dispatch:

permissions:
contents: read

concurrency:
group: basic-performance-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
benchmark:
name: Basic performance gate
runs-on: ubuntu-24.04
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Detect benchmark-relevant changes
id: changes
env:
EVENT_NAME: ${{ github.event_name }}
MERGE_BASE_SHA: ${{ github.event.merge_group.base_sha }}
MERGE_HEAD_SHA: ${{ github.event.merge_group.head_sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PUSH_BASE_SHA: ${{ github.event.before }}
PUSH_HEAD_SHA: ${{ github.sha }}
shell: bash
run: |
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
echo "run=true" >> "$GITHUB_OUTPUT"
exit 0
fi

case "$EVENT_NAME" in
pull_request)
base_sha="$PR_BASE_SHA"
head_sha="$PR_HEAD_SHA"
;;
merge_group)
base_sha="$MERGE_BASE_SHA"
head_sha="$MERGE_HEAD_SHA"
;;
*)
base_sha="$PUSH_BASE_SHA"
head_sha="$PUSH_HEAD_SHA"
;;
esac

if ! git cat-file -e "${base_sha}^{commit}" 2>/dev/null ||
! git cat-file -e "${head_sha}^{commit}" 2>/dev/null; then
echo "run=true" >> "$GITHUB_OUTPUT"
exit 0
fi

should_run=false
while IFS= read -r file; do
case "$file" in
benchmark/*|\
packages/loader/*|\
packages/qiankun/*|\
packages/sandbox/*|\
packages/shared/*|\
package.json|\
pnpm-lock.yaml|\
pnpm-workspace.yaml|\
tsconfig.build.json|\
tsconfig.json|\
vite.library.config.ts|\
.github/workflows/benchmark-basic.yml)
should_run=true
break
;;
esac
done < <(git diff --name-only "$base_sha" "$head_sha")

echo "run=$should_run" >> "$GITHUB_OUTPUT"

if [[ "$should_run" == "false" ]]; then
echo "No benchmark-relevant changes; performance gate skipped." >> "$GITHUB_STEP_SUMMARY"
fi

- name: Install pnpm
if: ${{ steps.changes.outputs.run == 'true' }}
uses: pnpm/action-setup@v6

- name: Use Node.js 24
if: ${{ steps.changes.outputs.run == 'true' }}
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
if: ${{ steps.changes.outputs.run == 'true' }}
run: pnpm install --frozen-lockfile

- name: Install Chromium
if: ${{ steps.changes.outputs.run == 'true' }}
run: pnpm --filter @qiankunjs/benchmark exec playwright install --with-deps chromium

- name: Run basic performance gate
if: ${{ steps.changes.outputs.run == 'true' }}
env:
CI: "true"
run: pnpm run benchmark:ci-basic

- name: Publish benchmark summary
if: ${{ always() && steps.changes.outputs.run == 'true' }}
shell: bash
run: |
shopt -s nullglob
summaries=(benchmark/results/*/summary.md)

if (( ${#summaries[@]} == 0 )); then
printf '%s\n' \
'## Basic performance gate' \
'No benchmark summary was generated.' \
>> "$GITHUB_STEP_SUMMARY"
exit 0
fi

for summary in "${summaries[@]}"; do
cat "$summary" >> "$GITHUB_STEP_SUMMARY"
printf '\n\n---\n\n' >> "$GITHUB_STEP_SUMMARY"
done

- name: Upload benchmark results
if: ${{ always() && steps.changes.outputs.run == 'true' }}
uses: actions/upload-artifact@v4
with:
name: basic-performance-${{ github.run_id }}-${{ github.run_attempt }}
path: benchmark/results/
if-no-files-found: warn
retention-days: 14
4 changes: 2 additions & 2 deletions .github/workflows/changeset-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0

- name: Setup PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v6

- name: Setup Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
PNPM_CONFIG_PROVENANCE: true

- name: Create Unified GitHub Release
if: steps.changesets.outputs.published == 'true'
Expand Down
Loading
Loading