Skip to content

Commit

Permalink
chore: merge origin main
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Sep 4, 2024
2 parents a424d38 + b702681 commit 1214592
Show file tree
Hide file tree
Showing 2,075 changed files with 69,814 additions and 67,840 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ rustflags = ["-C", "link-args=/FORCE"]
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
rustflags = ["-C", "target-feature=+crt-static"]
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ crates/rspack_plugin_mf
crates/rspack_plugin_extract_css/src/runtime
packages/rspack/compiled
packages/rspack-dev-server/client
packages/rspack-plugin-react-refresh/client
packages/rspack-plugin-preact-refresh/client
packages/playground
packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts
packages/rspack-test-tools/template
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: rspack
2 changes: 1 addition & 1 deletion .github/actions/docker-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
required: true
type: string
options:
description: 'Options for docker'
description: "Options for docker"
default: ""
required: false
type: string
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ description: Download file to local or artifact to quickly share files between j

inputs:
name:
description: 'Artifact name'
default: 'artifact'
description: "Artifact name"
default: "artifact"
path:
description: 'Destination path'
description: "Destination path"
required: true
try-local-cache:
description: 'Try use local cache to save artifact'
description: "Try use local cache to save artifact"
default: false
required: false
type: boolean
link-when-local:
description: 'Link file instead of copy file'
description: "Link file instead of copy file"
default: false
type: boolean
required: false
Expand All @@ -24,7 +24,7 @@ runs:
using: composite
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
if: ${{ startsWith(runner.name, 'GitHub Actions') || inputs.try-local-cache == 'false' }}
with:
name: ${{ inputs.name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/rustup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ inputs:
required: false
type: boolean
shared-key:
default: 'check'
default: "check"
required: false
type: string

Expand Down
12 changes: 6 additions & 6 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ description: Upload file to local or artifact to quickly share files between job

inputs:
name:
description: 'Artifact name'
default: 'artifact'
description: "Artifact name"
default: "artifact"
path:
description: 'A file, directory or wildcard pattern that describes what to upload'
description: "A file, directory or wildcard pattern that describes what to upload"
required: true
try-local-cache:
description: 'Try use local cache to save artifact'
description: "Try use local cache to save artifact"
default: false
required: false
type: boolean
mv-when-local:
description: 'Move file instead of copy file'
description: "Move file instead of copy file"
default: false
type: boolean
required: false
Expand All @@ -29,7 +29,7 @@ runs:
using: composite
steps:
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ startsWith(runner.name, 'GitHub Actions') || inputs.try-local-cache == 'false' }}
with:
name: ${{ inputs.name }}
Expand Down
9 changes: 4 additions & 5 deletions .github/actions/webpack-test-metric-diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ runs:
id: previous-comment
with:
issue-number: ${{ steps.pr-number.outputs.pr }}
body-includes: Test Compatibility Diff
body-includes: Test Compatibility Diff

- name: Update existing comment
if: github.event_name == 'pull_request' && steps.previous-comment.outputs.comment-id
uses: peter-evans/create-or-update-comment@v4
continue-on-error: true
with:
comment-id: ${{ steps.previous-comment.outputs.comment-id }}
body-path: 'output.md'

body-path: "output.md"
# body: |
# ${{ steps.pr-diff.outputs.comment }}
edit-mode: replace
Expand All @@ -52,5 +52,4 @@ runs:
with:
issue-number: ${{ steps.pr-number.outputs.pr }}

body-path: 'output.md'

body-path: "output.md"
31 changes: 9 additions & 22 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"timezone": "Asia/Shanghai",
"extends": [":dependencyDashboard"],
"schedule": [
"before 8am on wednesday"
],
Expand Down Expand Up @@ -115,16 +116,15 @@
"devDependencies"
],
"excludePackagePrefixes": [
"webpack",
"sass"
"webpack"
],
"excludePackageNames": [
"@playwright/test",
"react",
"react-dom",
"typescript",
"pnpm"
]
],
"rangeStrategy": "bump",
// bump major in a separate PR
"matchUpdateTypes": ["patch", "minor"]
},
{
"groupName": "npm dependencies",
Expand All @@ -134,22 +134,9 @@
"matchDepTypes": [
"dependencies"
],
"enabled": false
},
{
"groupName": "npm ignored dependencies",
"matchManagers": [
"npm"
],
"matchPackageNames": [
"@playwright/test",
"react",
"react-dom",
"typescript",
"pnpm",
"sass"
],
"enabled": false
"rangeStrategy": "bump",
// bump major in a separate PR
"matchUpdateTypes": ["patch", "minor"]
},
{
"groupName": "webpack",
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ jobs:
- 'Cargo.lock'
- name: Install cargo-deny
if: steps.filter.outputs.src == 'true'
uses: taiki-e/install-action@cargo-deny
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Check licenses
if: steps.filter.outputs.src == 'true'
run: cargo deny check license
Expand All @@ -157,7 +159,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
- uses: crate-ci/typos@v1.23.6
with:
files: .

Expand Down Expand Up @@ -190,7 +192,6 @@ jobs:
- name: Check Dependency Version
if: steps.changes.outputs.src == 'true'
run: pnpm run check-dependency-version


lint-website:
name: Lint and format website
Expand Down Expand Up @@ -287,7 +288,7 @@ jobs:
- uses: ./.github/actions/rustup
with:
shared-key: check
- uses: cargo-bins/cargo-binstall@main
- uses: cargo-bins/cargo-binstall@v1.10.2
- run: cargo binstall --no-confirm cargo-shear
- run: cargo shear

Expand Down Expand Up @@ -316,7 +317,8 @@ jobs:
echo 'debug = false' >> Cargo.toml
- name: Run test
run: cargo test --workspace -- --nocapture
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
run: cargo test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture

run_benchmark:
name: Run benchmark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-issue-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Sync issues
uses: paritytech/github-issue-sync@master
uses: paritytech/github-issue-sync@v0.3.2
with:
# This token is autogenerated by GitHub
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-mark-assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- name: mark assignee
uses: actions-cool/issues-helper@v3
with:
actions: 'mark-assignees'
actions: "mark-assignees"
token: ${{ secrets.GITHUB_TOKEN }}
require-permission: "none"
require-permission: "none"
3 changes: 1 addition & 2 deletions .github/workflows/issue-pr-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"
- name: Check if triggered by project member
id: check_member
if: github.event.sender.type == 'User' && github.actor != 'renovate'
Expand Down Expand Up @@ -47,4 +47,3 @@ jobs:
URL: ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}
run: |
SHORT_BODY=$(echo "$BODY" | head -n 3) TITLE="New PR Opened: $PR_TITLE" DESCRIPTION="PR by @$AUTHOR_ID: $SHORT_BODY. Check it out at $URL" TPL_COLOR="blue" TPL_BTN_TYPE="primary" ./scripts/alert/lark.js
2 changes: 1 addition & 1 deletion .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uses: ./.github/actions/pnpm-cache

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: artifacts

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
uses: ./.github/actions/pnpm-cache

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: artifacts

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
uses: ./.github/actions/pnpm-cache

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: artifacts

Expand Down
35 changes: 25 additions & 10 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ jobs:

- name: Clean
if: ${{ !inputs.skipable && !startsWith(runner.name, 'GitHub Actions') }}
uses: ./.github/actions/clean
with:
target: ${{ inputs.target }}
shell: bash
run: |
git config --system core.longpaths true
echo "rm -rf node_modules"
rm -rf node_modules
echo "git clean -ffdx -e target"
git clean -ffdx -e target
git reset --hard HEAD
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -141,7 +146,7 @@ jobs:
target: ${{ inputs.target }}
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
profile: ${{ inputs.profile }}
pre: export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc # for jemallocator to compile
pre: export CC_aarch64_unknown_linux_gnu=clang

- name: Build x86_64-unknown-linux-musl in Docker
if: ${{ inputs.target == 'x86_64-unknown-linux-musl' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
Expand Down Expand Up @@ -222,9 +227,14 @@ jobs:

- name: Clean
if: ${{ !startsWith(runner.name, 'GitHub Actions') }}
uses: ./.github/actions/clean
with:
target: ${{ inputs.target }}
shell: bash
run: |
git config --system core.longpaths true
echo "rm -rf node_modules"
rm -rf node_modules
echo "git clean -ffdx -e target"
git clean -ffdx -e target
git reset --hard HEAD
- name: Download bindings
uses: ./.github/actions/download-artifact
Expand Down Expand Up @@ -274,9 +284,14 @@ jobs:

- name: Clean
if: ${{ !inputs.skipable && !startsWith(runner.name, 'GitHub Actions') }}
uses: ./.github/actions/clean
with:
target: ${{ inputs.target }}
shell: bash
run: |
git config --system core.longpaths true
echo "rm -rf node_modules"
rm -rf node_modules
echo "git clean -ffdx -e target"
git clean -ffdx -e target
git reset --hard HEAD
- name: Download bindings
if: ${{ !inputs.skipable }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ npm/**/*.node

# Precompiled config schema
packages/rspack/src/config/schema.check.js
justfile

## Angular Incremental Build Cache
**/.angular/
Expand All @@ -214,13 +213,16 @@ tests/webpack-test/browsertest/js
tests/webpack-test/fixtures/temp-*
tests/webpack-test/temp
tests/webpack-test/ChangesAndRemovals
tests/webpack-test/__snapshots__/*.snap.*
tests/webpack-test/**/dev-defaults.webpack.lock
!tests/webpack-test/**/target
!tests/webpack-test/cases/**/node_modules

tests/plugin-test/css-extract/js
!tests/plugin-test/css-extract/**/node_modules

tests/plugin-test/html-plugin/js

/webpack-examples/**/dist

smoke-example
Expand Down
5 changes: 2 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ packages/rspack/src/config/schema.check.js

packages/**/etc/**/*
packages/rspack-test-tools/template/**/*
packages/rspack-test-tools/src/helper/legacy/**/*
packages/rspack-test-tools/tests/**/*
packages/rspack-test-preact-refresh/tests/**/*
packages/rspack-plugin-mini-css-extract/test/cases/**/*

crates/**/*
target/**/*
tests/**/*.*
tests/**/*
!tests/**/test.filter.js
Loading

0 comments on commit 1214592

Please sign in to comment.