Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b9faa5d
Fix Jest environment/runner TypeScript errors when building in Windows
gnbm Oct 19, 2025
c7e2830
Update node-sys.ts
gnbm Oct 19, 2025
dba304a
chore(test): migrate bundler test from Karma to Jest; add sub-config …
gnbm Oct 20, 2025
7ac96b1
test(jest): align env ctor and runner signature with installed Jest t…
gnbm Oct 20, 2025
d0754d8
Fix prettier and other ci issues
gnbm Oct 20, 2025
d447dde
Update ci.yml
gnbm Oct 20, 2025
6b0b59d
ci(test): build before jest; align env/runner signatures for TS types…
gnbm Oct 20, 2025
335fee3
test(jest): match installed CI types env ctor 2-arg; runner 3-arg
gnbm Oct 20, 2025
a035490
test(jest): env uses single-arg super; runner uses 6-arg signature an…
gnbm Oct 20, 2025
433b1e4
test(jest): make env ctor and runner signature version-agnostic via r…
gnbm Oct 20, 2025
2506a46
test(jest): fix TS types explicit super overloads, no const reassign…
gnbm Oct 20, 2025
5b7c693
test(jest): call super(config, context) as first statement in env ctors
gnbm Oct 20, 2025
8439734
test(jest): widen env base type to allow super(config, context) acros…
gnbm Oct 20, 2025
8ef9648
test(jest): drop override modifiers due to widened base type in envs …
gnbm Oct 20, 2025
ca90c71
test(jest): normalize runner args across Jest versions; forward 3 or …
gnbm Oct 20, 2025
dc5d374
ci: build core before bundler artifacts to provide bin/cli for test/b…
gnbm Oct 20, 2025
c630d1b
Fix more CI issues
gnbm Oct 20, 2025
06abb62
Update ci.yml
gnbm Oct 20, 2025
87c4d96
Update setup-node and checkout actions version
gnbm Oct 20, 2025
50a038c
Merge branch 'main' into chore/jest-migrate-bundler-and-ci
gnbm Oct 21, 2025
16f034b
Update test/bundler/jest-dom-utils.ts
gnbm Oct 22, 2025
9d365e1
Merge branch 'main' into chore/jest-migrate-bundler-and-ci
gnbm Oct 22, 2025
5583cbd
fix(test): prevent setTimeout race condition in appload event handler
gnbm Oct 22, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/actions/get-core-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ runs:
# this overrides previous versions of the node runtime that was set.
# jobs that need a different version of the Node runtime should explicitly
# set their node version after running this step
- name: Use Node Version from Volta
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- name: 🟢 Use Node Version from Volta
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: './package.json'
cache: 'npm'

- name: Install Dependencies
- name: 🕸️ Install Dependencies
run: |
npm ci \
&& npm run install.jest
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/actions/publish-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ inputs:
runs:
using: 'composite'
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Download Build Archive
- name: 📥 Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
path: .
filename: stencil-core-build.zip

- name: Set Version
- name: 🏷️ Set Version
run: npm version --no-git-tag-version ${{ inputs.version }}
shell: bash

- name: Prepare NPM Token
- name: 📦 Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
shell: bash
env:
NPM_TOKEN: ${{ inputs.token }}

- name: Publish to NPM
- name: 📤 Publish to NPM
run: npm publish --tag ${{ inputs.tag }} --provenance
shell: bash
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
os: ['ubuntu-22.04', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Core Build
- name: 🏗️ Core Build
run: npm run build -- --ci
shell: bash

- name: Validate Build
- name: 🧪 Validate Build
run: npm run test.dist
shell: bash

- name: Validate Testing
- name: 🧪 Validate Testing
run: npm run test.testing
shell: bash

- name: Upload Build Artifacts
- name: 📤 Upload Build Artifacts
if: ${{ matrix.os == 'ubuntu-22.04' }}
uses: ./.github/workflows/actions/upload-archive
with:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
pull_request:
push:

jobs:
test-core:
name: Core Jest
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: 🟢 Use Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 20
cache: 'npm'
- name: 🕸️ Install
run: npm ci
- name: 🏗️ Build (generate testing artifacts)
run: npm run build -- --ci
- name: 🧪 Run Jest (core)
run: npm run test.jest

test-bundler:
name: Bundler Jest
runs-on: ubuntu-latest
needs: test-core
steps:
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: 🟢 Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 20
cache: 'npm'
- name: 🕸️ Install
run: npm ci
- name: 🏗️ Build core (required by bundler job)
run: npm run build -- --ci
- name: 🏗️ Build bundler artifacts
run: npm run --prefix test/bundler build
- name: 🧪 Run Bundler tests
run: npm run test.bundler
18 changes: 9 additions & 9 deletions .github/workflows/create-production-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,47 +32,47 @@ jobs:
pull-requests: write
steps:
# Log the input from GitHub Actions for easy traceability
- name: Log GitHub Input
- name: 🔏Log GitHub Input
run: |
echo "Version: ${{ inputs.version }}"
shell: bash

- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# A depth of 0 gets the entire git history, which we'll want for things like checking all git history/tags.
# We need git history to generate the changelog; however, we don't know how deep to go.
# Since publishing is a one-off activity, just get everything.
fetch-depth: 0
ref: ${{ inputs.base }}

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

# TODO(STENCIL-927): Backport changes to the v3 branch
- name: Run Publish Preparation Script
- name: 📦 Run Publish Preparation Script
run: npm run release.ci.prepare -- --version ${{ inputs.version }}
shell: bash

- name: Log Generated Changes
- name: 📝 Log Generated Changes
run: git --no-pager diff
shell: bash

- name: Generate Version String and Branch Name
- name: 🏷️ Generate Version String and Branch Name
id: name_gen
run: |
VERSION_STR=$(jq '.version' package.json | sed s/\"//g)
echo "VERSION_STR=$VERSION_STR" >> "$GITHUB_OUTPUT"
echo "BRANCH_NAME=release/$VERSION_STR-run-${{ github.run_number }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Print Version String and Branch Name
- name: 🖨️ Print Version String and Branch Name
run: |
echo Version: ${{ steps.name_gen.outputs.VERSION_STR }}
echo Branch Name: ${{ steps.name_gen.outputs.BRANCH_NAME }}
shell: bash

- name: Create the Pull Request
- name: 📤 Create the Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
# create a new pull request using the specified base branch
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
name: Check
runs-on: 'ubuntu-22.04'
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: ESLint
- name: 🖌️ ESLint
run: npm run lint

- name: Prettier Check
- name: 🖌️ Prettier Check
run: npm run prettier.dry-run
shell: bash

- name: Spellcheck
- name: 📚 Spellcheck
run: npm run spellcheck
16 changes: 8 additions & 8 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ jobs:
outputs:
dev-version: ${{ steps.get-dev-version.outputs.DEV_VERSION }}
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Download Build Archive
- name: 📥 Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
path: .
filename: stencil-core-build.zip

- name: Get Version
- name: 🏷️ Get Version
id: get-dev-version
run: |
# A unique string to publish Stencil under
Expand All @@ -56,15 +56,15 @@ jobs:
shell: bash

release-stencil-dev-build:
name: Publish Dev Build
name: 📤 Publish Dev Build
needs: [get-dev-version, build_core]
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/workflows/actions/publish-npm
with:
tag: dev
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
outputs:
nightly-version: ${{ steps.get-nightly-version.outputs.NIGHTLY_VERSION }}
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Download Build Archive
- name: 📥 Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
path: .
filename: stencil-core-build.zip

- name: Get Version
- name: 🏷️ Get Version
id: get-nightly-version
run: |
# A unique string to publish Stencil under
Expand All @@ -58,15 +58,15 @@ jobs:
shell: bash

release-stencil-nightly-build:
name: Publish Nightly Build
name: 📤 Publish Nightly Build
needs: [get-nightly-version, build_core]
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/workflows/actions/publish-npm
with:
tag: nightly
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ jobs:
shell: bash
if: ${{ inputs.base != 'main' && inputs.tag == 'latest' }}

- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# A depth of 0 gets the entire git history, which we'll want for things like checking all git history/tags.
# We need git history to generate the changelog; however, we don't know how deep to go.
# Since publishing is a one-off activity, just get everything.
fetch-depth: 0
ref: ${{ inputs.base }}

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Prepare NPM Token
- name: 📦 Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run Publish Scripts
- name: 📦 Run Publish Scripts
# pass the generated version number instead of the input, since we've already incremented it in the prerelease
# step
run: npm run release.ci -- --tag ${{ inputs.tag }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ jobs:
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 📥 Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Get Core Dependencies
- name: 🕸️ Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- name: 🟢 Use Node ${{ matrix.node }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Download Build Archive
- name: 📥 Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
path: .
filename: stencil-core-build.zip

- name: Analysis Tests
- name: 🧪 Analysis Tests
run: npm run test.analysis
shell: bash

- name: Check Git Context
- name: 📦 Check Git Context
uses: ./.github/workflows/actions/check-git-context
Loading