Skip to content

Commit 7bcc6b0

Browse files
committed
refactor(ci): expand submodule update workflow to handle all 6 conformance test repos (#14990)
- Rename workflow: update_compat_table.yml → update_submodules.yml - Extract hardcoded SHAs in clone-parallel.sh into variables at the top - Expand workflow to automatically update all 6 submodules: - test262 (tc39/test262) - babel (babel/babel) - TypeScript (microsoft/TypeScript) - prettier (prettier/prettier) - acorn-test262 (oxc-project/acorn-test262) - node-compat-table (williamkapke/node-compat-table) - Workflow now fetches latest SHAs from all repos, compares with current, and updates clone-parallel.sh - Creates single PR with summary of all updated submodules 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 384ea3c commit 7bcc6b0

File tree

4 files changed

+255
-124
lines changed

4 files changed

+255
-124
lines changed

.github/actions/clone-submodules/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ inputs:
3333
type: boolean
3434
description: Whether to clone acorn-test262 submodule
3535

36+
node-compat-table:
37+
default: true
38+
required: false
39+
type: boolean
40+
description: Whether to clone node-compat-table submodule
41+
3642
runs:
3743
using: composite
3844
steps:
@@ -45,10 +51,12 @@ runs:
4551
TYPESCRIPT: ${{ inputs.typescript }}
4652
PRETTIER: ${{ inputs.prettier }}
4753
ACORN_TEST262: ${{ inputs.acorn-test262 }}
54+
NODE_COMPAT_TABLE: ${{ inputs.node-compat-table }}
4855
run: |
4956
${GITHUB_WORKSPACE}/.github/scripts/clone-parallel.sh \
5057
"${TEST_262}" \
5158
"${BABEL}" \
5259
"${TYPESCRIPT}" \
5360
"${PRETTIER}" \
54-
"${ACORN_TEST262}"
61+
"${ACORN_TEST262}" \
62+
"${NODE_COMPAT_TABLE}"

.github/scripts/clone-parallel.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/bin/bash
22

33
# Clone submodules in parallel for faster setup
4-
# Usage: ./clone-parallel.sh [test262] [babel] [typescript] [prettier] [acorn-test262]
4+
# Usage: ./clone-parallel.sh [test262] [babel] [typescript] [prettier] [acorn-test262] [node-compat-table]
55
# Arguments: "true" or "false" for each submodule
66

77
set -euo pipefail
88

9-
# Default values
9+
# Submodule commit SHAs - updated automatically by .github/workflows/update_submodules.yml
10+
TEST262_SHA="baa48a416c9e9abd698a9010378eccf3d1f4ed1e"
11+
BABEL_SHA="41d96516130ff48f16eca9f387996c0272125f16"
12+
TYPESCRIPT_SHA="261630d650c0c961860187bebc86e25c3707c05d"
13+
PRETTIER_SHA="7584432401a47a26943dd7a9ca9a8e032ead7285"
14+
ACORN_TEST262_SHA="090bba4ab63458850b294f55b17f2ca0ee982062"
15+
NODE_COMPAT_TABLE_SHA="ed0d6ba55790519d9ad3f6f776ca2cd303cc1e0b"
16+
17+
# Default values for which submodules to clone
1018
TEST262=${1:-true}
1119
BABEL=${2:-true}
1220
TYPESCRIPT=${3:-true}
@@ -69,12 +77,12 @@ clone_repo() {
6977
echo "Cloning submodules in parallel..."
7078

7179
# Start all clone operations in parallel
72-
clone_repo "$TEST262" "tc39/test262" "tasks/coverage/test262" "baa48a416c9e9abd698a9010378eccf3d1f4ed1e" "test262"
73-
clone_repo "$BABEL" "babel/babel" "tasks/coverage/babel" "41d96516130ff48f16eca9f387996c0272125f16" "babel"
74-
clone_repo "$TYPESCRIPT" "microsoft/TypeScript" "tasks/coverage/typescript" "261630d650c0c961860187bebc86e25c3707c05d" "typescript"
75-
clone_repo "$PRETTIER" "prettier/prettier" "tasks/prettier_conformance/prettier" "7584432401a47a26943dd7a9ca9a8e032ead7285" "prettier"
76-
clone_repo "$ACORN_TEST262" "oxc-project/acorn-test262" "tasks/coverage/acorn-test262" "090bba4ab63458850b294f55b17f2ca0ee982062" "acorn-test262"
77-
clone_repo "$NODE_COMPAT_TABLE" "williamkapke/node-compat-table" "tasks/coverage/node-compat-table" "ed0d6ba55790519d9ad3f6f776ca2cd303cc1e0b" "node-compat-table"
80+
clone_repo "$TEST262" "tc39/test262" "tasks/coverage/test262" "$TEST262_SHA" "test262"
81+
clone_repo "$BABEL" "babel/babel" "tasks/coverage/babel" "$BABEL_SHA" "babel"
82+
clone_repo "$TYPESCRIPT" "microsoft/TypeScript" "tasks/coverage/typescript" "$TYPESCRIPT_SHA" "typescript"
83+
clone_repo "$PRETTIER" "prettier/prettier" "tasks/prettier_conformance/prettier" "$PRETTIER_SHA" "prettier"
84+
clone_repo "$ACORN_TEST262" "oxc-project/acorn-test262" "tasks/coverage/acorn-test262" "$ACORN_TEST262_SHA" "acorn-test262"
85+
clone_repo "$NODE_COMPAT_TABLE" "williamkapke/node-compat-table" "tasks/coverage/node-compat-table" "$NODE_COMPAT_TABLE_SHA" "node-compat-table"
7886

7987
# Wait for all background processes to complete
8088
echo "Waiting for all clone operations to complete..."

.github/workflows/update_compat_table.yml

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)