Skip to content

Commit 1acc683

Browse files
authored
Merge branch 'main' into optimize-array-unshift
2 parents a75a11d + 26271b7 commit 1acc683

File tree

107 files changed

+3830
-1527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3830
-1527
lines changed

.github/workflows/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ name: "Pull Request Labeler"
22
on:
33
- pull_request_target
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
labeler:
710
permissions:
811
contents: read
912
pull-requests: write
1013
runs-on: ubuntu-latest
14+
timeout-minutes: 10
1115
steps:
12-
- uses: actions/labeler@v6
16+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6

.github/workflows/nightly_build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@ jobs:
2525
os: windows-latest
2626
binary_extension: ".exe"
2727
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 60
2829
steps:
2930
- name: Checkout repository
30-
uses: actions/checkout@v6
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3132

3233
- name: Install Rust toolchain
33-
uses: dtolnay/rust-toolchain@stable
34+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
3435
with:
3536
toolchain: stable
3637
targets: ${{ matrix.target }}
3738

3839
- name: Restore cache
3940
id: cache
40-
uses: actions/cache@v5
41+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
4142
with:
4243
path: |
4344
~/.cargo/registry
@@ -49,7 +50,7 @@ jobs:
4950
run: cargo build --target ${{ matrix.target }} --release --locked --bin boa
5051

5152
- name: Upload binaries to release
52-
uses: svenstaro/upload-release-action@v2
53+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
5354
with:
5455
repo_token: ${{ secrets.GITHUB_TOKEN }}
5556
file: target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}

.github/workflows/pr_management.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,41 @@ on:
44
pull_request_target:
55
types: [opened, reopened, synchronize, closed]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
manage_pr:
912
runs-on: ubuntu-latest
13+
timeout-minutes: 10
1014
permissions:
1115
pull-requests: write
1216
issues: write
1317
steps:
1418
- name: Auto Add Label
1519
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize'
16-
uses: actions/github-script@v8
20+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
1721
with:
1822
script: |
19-
github.rest.issues.addLabels({
20-
issue_number: context.issue.number,
23+
const labels = await github.rest.issues.listLabelsOnIssue({
2124
owner: context.repo.owner,
2225
repo: context.repo.repo,
23-
labels: ['Waiting On Review']
24-
})
26+
issue_number: context.issue.number
27+
});
28+
29+
if (labels.data.every(label => label.name != "Waiting On Author")) {
30+
github.rest.issues.addLabels({
31+
issue_number: context.issue.number,
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
labels: ['Waiting On Review']
35+
})
36+
}
37+
2538
2639
- name: Auto Remove Label
2740
if: github.event.action == 'closed'
28-
uses: actions/github-script@v8
41+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
2942
continue-on-error: true
3043
with:
3144
script: |
@@ -42,7 +55,7 @@ jobs:
4255
4356
- name: Auto Assign Milestone
4457
if: github.event.action == 'opened'
45-
uses: actions/github-script@v8
58+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
4659
with:
4760
script: |
4861
// Fetch open milestones and assign the closest one

.github/workflows/pull_request.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
- releases/**
88

9+
permissions:
10+
contents: read
11+
912
concurrency:
1013
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1114
cancel-in-progress: true
@@ -18,24 +21,24 @@ jobs:
1821
timeout-minutes: 120
1922
steps:
2023
- name: Checkout repository
21-
uses: actions/checkout@v6
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2225
with:
2326
fetch-depth: 0
2427

2528
- name: Install Rust toolchain
26-
uses: dtolnay/rust-toolchain@stable
29+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
2730
with:
2831
toolchain: stable
2932

3033
- name: Cache cargo
31-
uses: actions/cache@v5
34+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
3235
with:
3336
path: |
3437
target
3538
~/.cargo/git
3639
~/.cargo/registry
3740
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38-
- uses: boa-dev/criterion-compare-action@v3.2.4
41+
- uses: boa-dev/criterion-compare-action@adfd3a94634fe2041ce5613eb7df09d247555b87 # v3.2.4
3942
with:
4043
token: ${{ secrets.GITHUB_TOKEN }}
4144
branchName: ${{ github.base_ref }}

.github/workflows/release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
release:
44
types: [published]
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
publish:
811
name: Publish crates
@@ -19,10 +22,10 @@ jobs:
1922
target=$(rustc -vV | awk '/^host/ { print $2 }' | tr [:lower:] [:upper:] | tr '-' '_')
2023
echo "CARGO_TARGET_${target}_RUSTFLAGS=$W_FLAGS" >> $GITHUB_ENV
2124
- name: Checkout repository
22-
uses: actions/checkout@v6
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2326

2427
- name: Install Rust toolchain
25-
uses: dtolnay/rust-toolchain@stable
28+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
2629
with:
2730
toolchain: stable
2831

@@ -49,24 +52,24 @@ jobs:
4952
timeout-minutes: 60
5053
steps:
5154
- name: Checkout repository
52-
uses: actions/checkout@v6
55+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5356

5457
- name: Install Rust toolchain
55-
uses: dtolnay/rust-toolchain@stable
58+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
5659
with:
5760
toolchain: stable
5861
targets: wasm32-unknown-unknown
5962

6063
- name: Install wasm-pack
61-
uses: baptiste0928/cargo-install@v3.4.0
64+
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
6265
with:
6366
crate: wasm-pack
6467

6568
- name: Build boa_wasm
6669
run: wasm-pack build --scope boa-dev ./ffi/wasm
6770

6871
- name: Set-up Node.js
69-
uses: actions/setup-node@v6
72+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
7073
with:
7174
node-version: "20"
7275

@@ -88,6 +91,8 @@ jobs:
8891

8992
release-binaries:
9093
name: Publish binaries
94+
permissions:
95+
contents: write
9196
needs: publish
9297
strategy:
9398
fail-fast: false
@@ -107,18 +112,19 @@ jobs:
107112
target: x86_64-pc-windows-msvc
108113
binary_extension: ".exe"
109114
runs-on: ${{ matrix.os }}
115+
timeout-minutes: 60
110116
steps:
111117
- name: Checkout repository
112-
uses: actions/checkout@v6
118+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
113119

114120
- name: Install Rust toolchain
115-
uses: dtolnay/rust-toolchain@stable
121+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
116122
with:
117123
toolchain: stable
118124
targets: ${{ matrix.target }}
119125

120126
- name: Cache cargo
121-
uses: actions/cache@v5
127+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
122128
with:
123129
path: |
124130
target
@@ -130,7 +136,7 @@ jobs:
130136
run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
131137

132138
- name: Upload binaries to release
133-
uses: svenstaro/upload-release-action@v2
139+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
134140
with:
135141
repo_token: ${{ secrets.GITHUB_TOKEN }}
136142
file: target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}

0 commit comments

Comments
 (0)