Skip to content

Commit 4059467

Browse files
committed
chore: script clean-up for packages and tokens[swc-808]
1 parent 64ac0df commit 4059467

File tree

117 files changed

+1332
-1269
lines changed

Some content is hidden

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

117 files changed

+1332
-1269
lines changed

.changeset/config.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
"repo": "adobe/spectrum-web-components"
77
}
88
],
9-
"commit": false,
9+
"commit": [
10+
"@changesets/cli/commit",
11+
{
12+
"message": "chore: release new versions #publish"
13+
}
14+
],
1015
"fixed": [["@spectrum-web-components/*"]],
1116
"linked": [],
1217
"access": "public",

.changeset/happy-cycles-check.md

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

.circleci/config.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ commands:
2222
downstream:
2323
steps:
2424
- checkout
25-
# - restore_cache:
26-
# keys:
27-
# - v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
28-
# - restore_cache:
29-
# keys:
30-
# - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
25+
- restore_cache:
26+
keys:
27+
- v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
28+
- restore_cache:
29+
keys:
30+
- v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
3131
- run:
32-
name: Installing Dependencies
32+
name: Installing dependencies
3333
command: |
3434
corepack enable
3535
yarn --immutable
@@ -225,18 +225,9 @@ jobs:
225225
executor: node
226226
steps:
227227
- downstream
228-
- run:
229-
name: Generate Custom Elements Manifest
230-
command: yarn docs:analyze
231-
- run:
232-
name: Move CEM to Storybook directory
233-
command: cp projects/documentation/custom-elements.json storybook/
234228
- run:
235229
name: Build documentation
236-
command: yarn docs:build
237-
- run:
238-
name: Build Storybook
239-
command: yarn storybook:build
230+
command: yarn docs:preview
240231
- run: echo '/* /index.html 200' > projects/documentation/dist/_redirects
241232
- run: |
242233
branch=$(git symbolic-ref --short HEAD)
@@ -248,18 +239,9 @@ jobs:
248239

249240
steps:
250241
- downstream
251-
- run:
252-
name: Generate Custom Elements Manifest
253-
command: yarn docs:analyze
254-
- run:
255-
name: Move CEM to Storybook directory
256-
command: cp projects/documentation/custom-elements.json storybook/
257242
- run:
258243
name: Build documentation
259-
command: yarn docs:build
260-
- run:
261-
name: Build Storybook
262-
command: yarn storybook:build
244+
command: yarn docs:ci
263245
- run: echo '/* /index.html 200' > projects/documentation/dist/_redirects
264246
- run: |
265247
branch=$(git symbolic-ref --short HEAD)
@@ -372,7 +354,6 @@ jobs:
372354
regression_dir: << parameters.dir >>
373355

374356
workflows:
375-
version: 2
376357
commitlint:
377358
jobs:
378359
- commitlint

.eslintrc.cjs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
2+
/*
3+
Copyright 2025 Adobe. All rights reserved.
4+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License. You may obtain a copy
6+
of the License at http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under
9+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
10+
OF ANY KIND, either express or implied. See the License for the specific language
11+
governing permissions and limitations under the License.
12+
*/
13+
14+
const path = require('path');
15+
16+
module.exports = {
17+
root: true,
18+
plugins: [
19+
'@typescript-eslint',
20+
'notice',
21+
'@spectrum-web-components',
22+
'import',
23+
'require-extensions',
24+
],
25+
env: {
26+
browser: true,
27+
node: true,
28+
es6: true,
29+
},
30+
parser: '@typescript-eslint/parser',
31+
parserOptions: {
32+
ecmaVersion: 2020,
33+
sourceType: 'module',
34+
},
35+
rules: {
36+
curly: ['error', 'all'],
37+
'no-debugger': 2,
38+
'no-console': [
39+
'error',
40+
{
41+
allow: ['warn', 'error'],
42+
},
43+
],
44+
'import/extensions': [
45+
'error',
46+
'ignorePackages',
47+
{
48+
ts: 'never',
49+
},
50+
],
51+
'import/prefer-default-export': 'off',
52+
'@spectrum-web-components/prevent-argument-names': [
53+
'error',
54+
['e', 'ev', 'evt', 'err'],
55+
],
56+
'notice/notice': [
57+
'error',
58+
{
59+
mustMatch: 'Copyright [0-9]{0,4} Adobe. All rights reserved.',
60+
templateFile: path.join(__dirname, 'config/license.js'),
61+
},
62+
],
63+
'sort-imports': [
64+
'error',
65+
{
66+
ignoreCase: true,
67+
ignoreDeclarationSort: true,
68+
ignoreMemberSort: false,
69+
allowSeparatedGroups: false,
70+
},
71+
],
72+
'lit-a11y/click-events-have-key-events': [
73+
'error',
74+
{
75+
allowList: [
76+
'sp-button',
77+
'sp-action-button',
78+
'sp-checkbox',
79+
'sp-radio',
80+
'sp-switch',
81+
'sp-menu-item',
82+
'sp-clear-button',
83+
'sp-underlay',
84+
],
85+
},
86+
],
87+
},
88+
extends: [
89+
'eslint:recommended',
90+
'plugin:@typescript-eslint/recommended',
91+
'plugin:prettier/recommended',
92+
'plugin:lit-a11y/recommended',
93+
'plugin:require-extensions/recommended',
94+
],
95+
overrides: [
96+
{
97+
files: ['scripts/*'],
98+
rules: {
99+
'no-console': ['off'],
100+
},
101+
},
102+
],
103+
};

.eslintrc.json

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

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @adobe/swc-maintainers
1+
* @adobe/swc-maintainers

.github/workflows/browser-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
fetch-depth: 0 # Get full history
3232

3333
- name: Fetch main branch
34-
run: |
35-
git fetch origin main:main
34+
run: git fetch origin main:main
3635

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

.github/workflows/chromatic-vrt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: ./.github/actions/setup-job
3737

3838
- name: Generate Custom Elements Manifest
39-
run: yarn docs:analyze
39+
run: yarn docs:cem
4040

4141
- name: Move CEM to Storybook directory
4242
run: cp projects/documentation/custom-elements.json storybook/
@@ -51,7 +51,7 @@ jobs:
5151
exitOnceUploaded: true
5252
onlyChanged: true
5353
traceChanged: true
54-
untraced: '.github/actions/*/package.json'
54+
untraced: 'projects/*/package.json'
5555
diagnostics: true
5656
# Lets VRT pass without running so as not to waste snapshots
5757
skip: ${{ inputs.skip }}

.github/workflows/preview-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
run: |
2929
yarn changeset version --snapshot preview-${GITHUB_SHA::8}
30-
yarn update-version
30+
genversion --esm --semi tools/base/src/version.js
31+
yarn constraints --fix
32+
yarn install --refresh-lockfile
3133
3234
- name: Configure NPM for changeset publish
3335
env:
@@ -41,6 +43,4 @@ jobs:
4143
run: |
4244
git add .
4345
git commit -am "chore: publish preview snapshot version"
44-
yarn prepublishOnly
4546
yarn changeset publish --no-git-tag --tag preview
46-
git reset --hard HEAD^

.github/workflows/publish-docs-site.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,8 @@ jobs:
1919
- name: Setup Job and Install Dependencies
2020
uses: ./.github/actions/setup-job
2121

22-
- name: Generate Custom Elements Manifest
23-
run: yarn docs:analyze
24-
25-
- name: Move CEM to Storybook directory
26-
run: cp projects/documentation/custom-elements.json storybook/
27-
28-
- name: Build documentation
29-
run: yarn docs:production
30-
31-
- name: Build Storybook
32-
run: yarn storybook:build
22+
- name: Build production documentation
23+
run: yarn docs:ci
3324

3425
- name: Add redirects to documentation
3526
run: echo '/* /index.html 200' > projects/documentation/dist/_redirects

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ lib
2525
# build artifacts
2626
custom-elements.json
2727

28+
!packages/icons/bin/build.js
29+
!packages/icons-ui/bin/build.js
2830
!packages/icons-workflow/bin/build.js
31+
2932
!packages/icons-workflow/src/DefaultIcon.ts
3033

3134
packages/*/src/**/*.css.js

.vscode/settings.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
{
22
"files.exclude": {
33
"**/*.css.ts": { "when": "$(basename)" },
4-
"packages/**/*.js.map": true,
5-
"packages/**/*.js": { "when": "$(basename).ts" },
6-
"packages/**/*.dev.js": { "when": "$(basename).js" },
7-
"packages/**/*.d.ts": { "when": "$(basename).ts" },
8-
"tools/**/*.js.map": true,
9-
"tools/**/*.js": { "when": "$(basename).ts" },
10-
"tools/**/*.dev.js": { "when": "$(basename).js" },
11-
"tools/**/*.d.ts": { "when": "$(basename).ts" },
4+
"**/*.js.map": true,
5+
"**/*.js": { "when": "$(basename).ts" },
6+
"**/*.dev.js": { "when": "$(basename).js" },
7+
"**/*.d.ts": { "when": "$(basename).ts" },
128
"**/*.test-vrt.ts": true
139
},
1410
"typescript.tsdk": "node_modules/typescript/lib",

0 commit comments

Comments
 (0)