Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Changesets are a way to manage versions and changelogs for monorepos. Each chang

The command will create a new markdown file in the `.changeset` directory with your changes.

## Important: @swc/core and component updates
## Important: @spectrum-web-components/core and component updates

When making changes to `@swc/core`, you **must** also include the corresponding `@spectrum-web-components` component in the same changeset to ensure the changes appear in the component's changelog. This is because `@swc/core` changes are internal and don't automatically propagate to the component changelogs.
When making changes to `@spectrum-web-components/core`, you **must** also include the corresponding `@spectrum-web-components` component in the same changeset to ensure the changes appear in the component's changelog. This is because `@spectrum-web-components/core` changes are internal and don't automatically propagate to the component changelogs.

**Best practice**: Create a single changeset that includes both packages when updating core functionality that affects a specific component.

Expand All @@ -41,7 +41,7 @@ A typical changeset file looks like this:

```markdown
---
'@swc/core': patch
'@spectrum-web-components/core': patch
'@spectrum-web-components/button': minor
'@spectrum-web-components/theme': patch
---
Expand Down
16 changes: 13 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@
}
],
"commit": false,
"fixed": [["@spectrum-web-components/*"]],
"linked": [["@swc/components", "@swc/core"]],
"fixed": [
[
"@spectrum-web-components/*",
"!@spectrum-web-components/core",
"!@spectrum-web-components/1st-gen",
"!@spectrum-web-components/2nd-gen"
]
],
"linked": [["@adobe/swc", "@spectrum-web-components/core"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"ignore": [
"@spectrum-web-components/1st-gen",
"@spectrum-web-components/2nd-gen"
],
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}.{datetime}"
Expand Down
96 changes: 48 additions & 48 deletions .circleci/config.yml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
}
},
{
"extends": ["./first-gen/.eslintrc.json"],
"files": ["first-gen/**/*"],
"extends": ["./1st-gen/.eslintrc.json"],
"files": ["1st-gen/**/*"],
"rules": {
"notice/notice": [
"error",
Expand All @@ -94,8 +94,8 @@
}
},
{
"extends": ["./second-gen/.eslintrc.json"],
"files": ["second-gen/**/*"],
"extends": ["./2nd-gen/.eslintrc.json"],
"files": ["2nd-gen/**/*"],
"rules": {
"notice/notice": [
"error",
Expand Down
184 changes: 92 additions & 92 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: Browser Performance Tests

on:
pull_request:
types: [opened, synchronize, reopened]
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write
contents: read
pull-requests: write

jobs:
test-changed-packages:
strategy:
matrix:
browser: [firefox, chrome]
name: Compare performance to latest release on ${{ matrix.browser }}

# The job will only run if the pull request is from the same repository.
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main

- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0 # Get full history

- name: Fetch main branch
run: |
git fetch origin main:main

- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- name: Check ChromeDriver Version
if: matrix.browser == 'chrome'
run: |
echo "Checking ChromeDriver version..."
npx chromedriver --version
echo "Checking Chrome version..."
google-chrome --version
echo "Checking tachometer chromedriver version..."
cd first-gen && yarn tachometer --version

- name: Tachometer the changed packages
run: cd first-gen && yarn test:changed --browser=${{ matrix.browser }}

- name: Create a dummy file to ensure at least one results file exists
run: touch first-gen/tachometer.${{ matrix.browser }}-ran.txt

- name: Archive ${{ matrix.browser }} tachometer results
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: tachometer-results-${{ matrix.browser }}
path: |
first-gen/tach-results.${{ matrix.browser }}.*.json
first-gen/tachometer.${{ matrix.browser }}-ran.txt

comment-performance:
name: Comment tachometer performance results
needs: [test-changed-packages]

# The job will only run if the pull request is from the same repository.
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main

- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- uses: actions/download-artifact@v4
with:
pattern: tachometer-results-*
merge-multiple: true

- name: Post Tachometer Performance Comment
uses: actions/github-script@v7
with:
script: |
const { buildTachometerComment } = await import('${{ github.workspace }}/.github/scripts/build-tachometer-comment.js');
const { commentOrUpdate } = await import('${{ github.workspace }}/.github/scripts/comment-or-update.js');
const body = buildTachometerComment();
commentOrUpdate(github, context, '## Tachometer results', body);
test-changed-packages:
strategy:
matrix:
browser: [firefox, chrome]
name: Compare performance to latest release on ${{ matrix.browser }}

# The job will only run if the pull request is from the same repository.
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main

- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0 # Get full history

- name: Fetch main branch
run: |
git fetch origin main:main

- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- name: Check ChromeDriver Version
if: matrix.browser == 'chrome'
run: |
echo "Checking ChromeDriver version..."
npx chromedriver --version
echo "Checking Chrome version..."
google-chrome --version
echo "Checking tachometer chromedriver version..."
cd 1st-gen && yarn tachometer --version

- name: Tachometer the changed packages
run: cd 1st-gen && yarn test:changed --browser=${{ matrix.browser }}

- name: Create a dummy file to ensure at least one results file exists
run: touch 1st-gen/tachometer.${{ matrix.browser }}-ran.txt

- name: Archive ${{ matrix.browser }} tachometer results
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: tachometer-results-${{ matrix.browser }}
path: |
1st-gen/tach-results.${{ matrix.browser }}.*.json
1st-gen/tachometer.${{ matrix.browser }}-ran.txt

comment-performance:
name: Comment tachometer performance results
needs: [test-changed-packages]

# The job will only run if the pull request is from the same repository.
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main

- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- uses: actions/download-artifact@v4
with:
pattern: tachometer-results-*
merge-multiple: true

- name: Post Tachometer Performance Comment
uses: actions/github-script@v7
with:
script: |
const { buildTachometerComment } = await import('${{ github.workspace }}/.github/scripts/build-tachometer-comment.js');
const { commentOrUpdate } = await import('${{ github.workspace }}/.github/scripts/comment-or-update.js');
const body = buildTachometerComment();
commentOrUpdate(github, context, '## Tachometer results', body);
46 changes: 23 additions & 23 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Coveralls Code Coverage

on:
push:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
pull_request:
branches:
- main

jobs:
code-coverage-report:
name: Generate and upload coverage report
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
code-coverage-report:
name: Generate and upload coverage report
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job
- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- name: Install Playwright
run: cd first-gen && yarn playwright install --with-deps
- name: Install Playwright
run: cd 1st-gen && yarn playwright install --with-deps

- name: Run unit tests with coverage
run: cd first-gen && yarn test:ci --config web-test-runner.config.ci-chromium.js --group coveralls-ci --coverage
continue-on-error: true
- name: Run unit tests with coverage
run: cd 1st-gen && yarn test:ci --config web-test-runner.config.ci-chromium.js --group coveralls-ci --coverage
continue-on-error: true

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
allow-empty: true
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
allow-empty: true
Loading
Loading