Skip to content

Commit 2074807

Browse files
chore: standardize package and workspace naming conventions (#5838)
1 parent 502ffc8 commit 2074807

File tree

2,146 files changed

+2339
-2035
lines changed

Some content is hidden

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

2,146 files changed

+2339
-2035
lines changed

.changeset/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Changesets are a way to manage versions and changelogs for monorepos. Each chang
2929

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

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

34-
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.
34+
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.
3535

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

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

4242
```markdown
4343
---
44-
'@swc/core': patch
44+
'@spectrum-web-components/core': patch
4545
'@spectrum-web-components/button': minor
4646
'@spectrum-web-components/theme': patch
4747
---

.changeset/config.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@
77
}
88
],
99
"commit": false,
10-
"fixed": [["@spectrum-web-components/*"]],
11-
"linked": [["@swc/components", "@swc/core"]],
10+
"fixed": [
11+
[
12+
"@spectrum-web-components/*",
13+
"!@spectrum-web-components/core",
14+
"!@spectrum-web-components/1st-gen",
15+
"!@spectrum-web-components/2nd-gen"
16+
]
17+
],
18+
"linked": [["@adobe/swc", "@spectrum-web-components/core"]],
1219
"access": "public",
1320
"baseBranch": "main",
1421
"updateInternalDependencies": "patch",
15-
"ignore": [],
22+
"ignore": [
23+
"@spectrum-web-components/1st-gen",
24+
"@spectrum-web-components/2nd-gen"
25+
],
1626
"snapshot": {
1727
"useCalculatedVersion": true,
1828
"prereleaseTemplate": "{tag}.{datetime}"

.circleci/config.yml

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
}
8282
},
8383
{
84-
"extends": ["./first-gen/.eslintrc.json"],
85-
"files": ["first-gen/**/*"],
84+
"extends": ["./1st-gen/.eslintrc.json"],
85+
"files": ["1st-gen/**/*"],
8686
"rules": {
8787
"notice/notice": [
8888
"error",
@@ -94,8 +94,8 @@
9494
}
9595
},
9696
{
97-
"extends": ["./second-gen/.eslintrc.json"],
98-
"files": ["second-gen/**/*"],
97+
"extends": ["./2nd-gen/.eslintrc.json"],
98+
"files": ["2nd-gen/**/*"],
9999
"rules": {
100100
"notice/notice": [
101101
"error",
Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,99 @@
11
name: Browser Performance Tests
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
4+
pull_request:
5+
types: [opened, synchronize, reopened]
66

77
permissions:
8-
contents: read
9-
pull-requests: write
8+
contents: read
9+
pull-requests: write
1010

1111
jobs:
12-
test-changed-packages:
13-
strategy:
14-
matrix:
15-
browser: [firefox, chrome]
16-
name: Compare performance to latest release on ${{ matrix.browser }}
17-
18-
# The job will only run if the pull request is from the same repository.
19-
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
20-
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
21-
runs-on: ubuntu-22.04
22-
steps:
23-
- name: Checkout main
24-
uses: actions/checkout@v4
25-
with:
26-
ref: main
27-
28-
- name: Checkout PR branch
29-
uses: actions/checkout@v4
30-
with:
31-
fetch-depth: 0 # Get full history
32-
33-
- name: Fetch main branch
34-
run: |
35-
git fetch origin main:main
36-
37-
- name: Setup Job and Install Dependencies
38-
uses: ./.github/actions/setup-job
39-
40-
- name: Check ChromeDriver Version
41-
if: matrix.browser == 'chrome'
42-
run: |
43-
echo "Checking ChromeDriver version..."
44-
npx chromedriver --version
45-
echo "Checking Chrome version..."
46-
google-chrome --version
47-
echo "Checking tachometer chromedriver version..."
48-
cd first-gen && yarn tachometer --version
49-
50-
- name: Tachometer the changed packages
51-
run: cd first-gen && yarn test:changed --browser=${{ matrix.browser }}
52-
53-
- name: Create a dummy file to ensure at least one results file exists
54-
run: touch first-gen/tachometer.${{ matrix.browser }}-ran.txt
55-
56-
- name: Archive ${{ matrix.browser }} tachometer results
57-
id: upload-artifact
58-
uses: actions/upload-artifact@v4
59-
with:
60-
name: tachometer-results-${{ matrix.browser }}
61-
path: |
62-
first-gen/tach-results.${{ matrix.browser }}.*.json
63-
first-gen/tachometer.${{ matrix.browser }}-ran.txt
64-
65-
comment-performance:
66-
name: Comment tachometer performance results
67-
needs: [test-changed-packages]
68-
69-
# The job will only run if the pull request is from the same repository.
70-
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
71-
if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }}
72-
runs-on: ubuntu-latest
73-
steps:
74-
- name: Checkout main
75-
uses: actions/checkout@v4
76-
with:
77-
ref: main
78-
79-
- name: Checkout PR branch
80-
uses: actions/checkout@v4
81-
with:
82-
fetch-depth: 2
83-
84-
- name: Setup Job and Install Dependencies
85-
uses: ./.github/actions/setup-job
86-
87-
- uses: actions/download-artifact@v4
88-
with:
89-
pattern: tachometer-results-*
90-
merge-multiple: true
91-
92-
- name: Post Tachometer Performance Comment
93-
uses: actions/github-script@v7
94-
with:
95-
script: |
96-
const { buildTachometerComment } = await import('${{ github.workspace }}/.github/scripts/build-tachometer-comment.js');
97-
const { commentOrUpdate } = await import('${{ github.workspace }}/.github/scripts/comment-or-update.js');
98-
const body = buildTachometerComment();
99-
commentOrUpdate(github, context, '## Tachometer results', body);
12+
test-changed-packages:
13+
strategy:
14+
matrix:
15+
browser: [firefox, chrome]
16+
name: Compare performance to latest release on ${{ matrix.browser }}
17+
18+
# The job will only run if the pull request is from the same repository.
19+
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
20+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
21+
runs-on: ubuntu-22.04
22+
steps:
23+
- name: Checkout main
24+
uses: actions/checkout@v4
25+
with:
26+
ref: main
27+
28+
- name: Checkout PR branch
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0 # Get full history
32+
33+
- name: Fetch main branch
34+
run: |
35+
git fetch origin main:main
36+
37+
- name: Setup Job and Install Dependencies
38+
uses: ./.github/actions/setup-job
39+
40+
- name: Check ChromeDriver Version
41+
if: matrix.browser == 'chrome'
42+
run: |
43+
echo "Checking ChromeDriver version..."
44+
npx chromedriver --version
45+
echo "Checking Chrome version..."
46+
google-chrome --version
47+
echo "Checking tachometer chromedriver version..."
48+
cd 1st-gen && yarn tachometer --version
49+
50+
- name: Tachometer the changed packages
51+
run: cd 1st-gen && yarn test:changed --browser=${{ matrix.browser }}
52+
53+
- name: Create a dummy file to ensure at least one results file exists
54+
run: touch 1st-gen/tachometer.${{ matrix.browser }}-ran.txt
55+
56+
- name: Archive ${{ matrix.browser }} tachometer results
57+
id: upload-artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: tachometer-results-${{ matrix.browser }}
61+
path: |
62+
1st-gen/tach-results.${{ matrix.browser }}.*.json
63+
1st-gen/tachometer.${{ matrix.browser }}-ran.txt
64+
65+
comment-performance:
66+
name: Comment tachometer performance results
67+
needs: [test-changed-packages]
68+
69+
# The job will only run if the pull request is from the same repository.
70+
# Benchmarks can't run on PRs from forked repos due to comment posting restrictions without a GitHub token.
71+
if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }}
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout main
75+
uses: actions/checkout@v4
76+
with:
77+
ref: main
78+
79+
- name: Checkout PR branch
80+
uses: actions/checkout@v4
81+
with:
82+
fetch-depth: 2
83+
84+
- name: Setup Job and Install Dependencies
85+
uses: ./.github/actions/setup-job
86+
87+
- uses: actions/download-artifact@v4
88+
with:
89+
pattern: tachometer-results-*
90+
merge-multiple: true
91+
92+
- name: Post Tachometer Performance Comment
93+
uses: actions/github-script@v7
94+
with:
95+
script: |
96+
const { buildTachometerComment } = await import('${{ github.workspace }}/.github/scripts/build-tachometer-comment.js');
97+
const { commentOrUpdate } = await import('${{ github.workspace }}/.github/scripts/comment-or-update.js');
98+
const body = buildTachometerComment();
99+
commentOrUpdate(github, context, '## Tachometer results', body);

.github/workflows/coveralls.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
name: Coveralls Code Coverage
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
1010

1111
jobs:
12-
code-coverage-report:
13-
name: Generate and upload coverage report
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout PR branch
17-
uses: actions/checkout@v4
12+
code-coverage-report:
13+
name: Generate and upload coverage report
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout PR branch
17+
uses: actions/checkout@v4
1818

19-
- name: Setup Job and Install Dependencies
20-
uses: ./.github/actions/setup-job
19+
- name: Setup Job and Install Dependencies
20+
uses: ./.github/actions/setup-job
2121

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

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

29-
- name: Upload coverage to Coveralls
30-
uses: coverallsapp/github-action@v2
31-
with:
32-
allow-empty: true
29+
- name: Upload coverage to Coveralls
30+
uses: coverallsapp/github-action@v2
31+
with:
32+
allow-empty: true

0 commit comments

Comments
 (0)