Skip to content

Commit 3482050

Browse files
authored
Merge branch 'main' into feat/rope-strings
2 parents af923c7 + 817b6ea commit 3482050

Some content is hidden

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

96 files changed

+4170
-1058
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7+
labels:
8+
- "C-Dependencies"
9+
- "C-Actions"
710
groups:
811
ci-dependencies:
912
applies-to: version-updates
@@ -15,6 +18,8 @@ updates:
1518
directory: /
1619
schedule:
1720
interval: weekly
21+
labels:
22+
- "C-Dependencies"
1823
groups:
1924
rust-dependencies:
2025
applies-to: version-updates
@@ -26,6 +31,8 @@ updates:
2631
directory: /tests/fuzz/
2732
schedule:
2833
interval: weekly
34+
labels:
35+
- "C-Dependencies"
2936
groups:
3037
fuzz-dependencies:
3138
applies-to: version-updates

.github/labeler.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ C-Benchmark:
1414
- 'core/engine/benches/**'
1515

1616
C-Builtins:
17-
- changed-files:
18-
- any-glob-to-any-file:
19-
- 'core/engine/src/builtins/**'
20-
- 'core/engine/src/object/builtins/**'
21-
- all-globs-to-all-files:
22-
- '!core/engine/src/object/builtins/intl/**'
17+
- all:
18+
- changed-files:
19+
- any-glob-to-any-file:
20+
- 'core/engine/src/builtins/**'
21+
- 'core/engine/src/object/builtins/**'
22+
- all-globs-to-all-files:
23+
- '!core/engine/src/object/builtins/intl/**'
2324

2425
C-CLI:
2526
- changed-files:

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL SAST Scanning"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * 0' # Run weekly on Sundays
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 60
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'rust' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
29+
with:
30+
persist-credentials: false
31+
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
34+
with:
35+
languages: ${{ matrix.language }}
36+
build-mode: none
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
40+
with:
41+
category: "/language:${{matrix.language}}"

.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: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Nightly Build
22
permissions:
3-
"contents": "write"
3+
contents: read
44

55
# Schedule this workflow to run at midnight every day
66
on:
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
build:
13+
permissions:
14+
contents: write
1315
strategy:
1416
matrix:
1517
include:
@@ -25,31 +27,27 @@ jobs:
2527
os: windows-latest
2628
binary_extension: ".exe"
2729
runs-on: ${{ matrix.os }}
30+
timeout-minutes: 60
2831
steps:
2932
- name: Checkout repository
30-
uses: actions/checkout@v6
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
34+
with:
35+
persist-credentials: false
3136

3237
- name: Install Rust toolchain
33-
uses: dtolnay/rust-toolchain@stable
38+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
3439
with:
3540
toolchain: stable
3641
targets: ${{ matrix.target }}
3742

38-
- name: Restore cache
39-
id: cache
40-
uses: actions/cache@v5
41-
with:
42-
path: |
43-
~/.cargo/registry
44-
~/.cargo/git
45-
target
46-
key: ${{ matrix.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43+
- name: Cache Cargo
44+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
4745

4846
- name: Build
4947
run: cargo build --target ${{ matrix.target }} --release --locked --bin boa
5048

5149
- name: Upload binaries to release
52-
uses: svenstaro/upload-release-action@v2
50+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
5351
with:
5452
repo_token: ${{ secrets.GITHUB_TOKEN }}
5553
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: 10 additions & 11 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,20 @@ 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
27+
persist-credentials: false
2428

2529
- name: Install Rust toolchain
26-
uses: dtolnay/rust-toolchain@stable
30+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
2731
with:
2832
toolchain: stable
2933

30-
- name: Cache cargo
31-
uses: actions/cache@v5
32-
with:
33-
path: |
34-
target
35-
~/.cargo/git
36-
~/.cargo/registry
37-
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38-
- uses: boa-dev/criterion-compare-action@v3.2.4
34+
- name: Cache Cargo
35+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
36+
37+
- uses: boa-dev/criterion-compare-action@adfd3a94634fe2041ce5613eb7df09d247555b87 # v3.2.4
3938
with:
4039
token: ${{ secrets.GITHUB_TOKEN }}
4140
branchName: ${{ github.base_ref }}

.github/workflows/release.yml

Lines changed: 20 additions & 18 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,15 +22,17 @@ 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

2932
- name: Install cargo-workspaces
30-
run: cargo install cargo-workspaces
33+
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
34+
with:
35+
crate: cargo-workspaces
3136

3237
- name: Release
3338
env:
@@ -49,24 +54,24 @@ jobs:
4954
timeout-minutes: 60
5055
steps:
5156
- name: Checkout repository
52-
uses: actions/checkout@v6
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5358

5459
- name: Install Rust toolchain
55-
uses: dtolnay/rust-toolchain@stable
60+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
5661
with:
5762
toolchain: stable
5863
targets: wasm32-unknown-unknown
5964

6065
- name: Install wasm-pack
61-
uses: baptiste0928/cargo-install@v3.4.0
66+
uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
6267
with:
6368
crate: wasm-pack
6469

6570
- name: Build boa_wasm
6671
run: wasm-pack build --scope boa-dev ./ffi/wasm
6772

6873
- name: Set-up Node.js
69-
uses: actions/setup-node@v6
74+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
7075
with:
7176
node-version: "20"
7277

@@ -88,6 +93,8 @@ jobs:
8893

8994
release-binaries:
9095
name: Publish binaries
96+
permissions:
97+
contents: write
9198
needs: publish
9299
strategy:
93100
fail-fast: false
@@ -107,30 +114,25 @@ jobs:
107114
target: x86_64-pc-windows-msvc
108115
binary_extension: ".exe"
109116
runs-on: ${{ matrix.os }}
117+
timeout-minutes: 60
110118
steps:
111119
- name: Checkout repository
112-
uses: actions/checkout@v6
120+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
113121

114122
- name: Install Rust toolchain
115-
uses: dtolnay/rust-toolchain@stable
123+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
116124
with:
117125
toolchain: stable
118126
targets: ${{ matrix.target }}
119127

120-
- name: Cache cargo
121-
uses: actions/cache@v5
122-
with:
123-
path: |
124-
target
125-
~/.cargo/git
126-
~/.cargo/registry
127-
key: ${{ matrix.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
128+
- name: Cache Cargo
129+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
128130

129131
- name: Build
130132
run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
131133

132134
- name: Upload binaries to release
133-
uses: svenstaro/upload-release-action@v2
135+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
134136
with:
135137
repo_token: ${{ secrets.GITHUB_TOKEN }}
136138
file: target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}

0 commit comments

Comments
 (0)