Skip to content

chore: script clean-up for packages and tokens[swc-808] #5419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Apr 30, 2025

Description

Process-spectrum is a command that runs several scripts that auto-generate and compile stylesheets from @spectrum-css repo and the spectrum-config defined in component directories. This rewrites every stylesheet each time it runs to catch differences in the output. 

Process-spectrum runs in many of our commands in the package.json as a dependency or directly called. We need to remove it and check that yarn build no longer compiles styles.

Related issue(s)

  • SWC-808
  • SWC-809

How has this been tested?

  • I expect the Spectrum CSS assets not to be imported or regenerated by the yarn build command
  • I expect all previously generated CSS files are checked into the repository, where they will become the source for future edits.
  • I expect all commands besides process-spectrum continue to run correctly and produce correct output; all tests still pass.

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • [n/a] I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

Copy link

changeset-bot bot commented Apr 30, 2025

⚠️ No Changeset found

Latest commit: 729d1bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

Tachometer results

Currently, no packages are changed by this PR...

@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch 3 times, most recently from e0f9c5f to 5945a6d Compare May 1, 2025 16:53
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch from 5945a6d to 1045ca1 Compare May 1, 2025 19:52
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch from 1045ca1 to 618cb83 Compare May 5, 2025 13:38
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch 2 times, most recently from 11d4edb to 4f12157 Compare May 6, 2025 17:13
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch from 4f12157 to 8a82d29 Compare May 6, 2025 17:33
package.json Outdated
"docs:production": "yarn workspace documentation build:production",
"docs:review": "alex packages/**/*.md",
"docs:start": "yarn workspace documentation serve --watch",
"find": "test -f custom-elements.json",
"format:css": "yarn lint:css --fix && pretty-quick --pattern \"{packages,tools}/**/*.css\"",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this formatter since we're looking to migrate to lint-staged but we can bring back a forced formatting command if we need it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does lint-staged need to be merged in first?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think it does, the format:css command isn't called by anything so it's really just a question of if anyone is manually using this one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have never used it fwiw

@@ -48,31 +46,20 @@
"lint:packagejson": "pretty-quick --pattern package.json --pattern \"packages/*/package.json\" --pattern \"projects/*/package.json\" --pattern \"tools/*/package.json\" --pattern \"react/*/package.json\"",
"lint:ts": "pretty-quick --pattern \"packages/**/*.ts\" && eslint -f pretty \"packages/**/*.ts\" && pretty-quick --pattern \"tools/**/*.ts\" && eslint -f pretty \"tools/**/*.ts\"",
"lint:versions": "node ./scripts/lint-versions.js",
"new-package": "cd projects/templates && plop",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see this updated below, we don't have to move into the directory to run the command since we can leverage yarn workspaces

@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch 4 times, most recently from 7345b6f to abd561f Compare May 13, 2025 18:29
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch 4 times, most recently from f1bb788 to 8f7dd79 Compare May 14, 2025 17:49
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch from 8f7dd79 to 4059467 Compare May 15, 2025 22:19
blunteshwar and others added 10 commits May 16, 2025 15:42
* chore: remove spectrum-config.js files from various packages
* chore; remove spectrum-css dependencies
* chore: remove unused @spectrum-css dependencies from yarn.lock
* Update packages/icons-ui/package.json
* Update packages/icons-ui/package.json

---------

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>
* chore: add styling guide

* chore: remove spectrum-config and update other docs

* fix: update yarn new-package to not depend on spectrum-css

* chore: update styling guide

* chore: remove formating from plopfile
Co-authored-by: rise-erpelding <54716846+rise-erpelding@users.noreply.github.com>
Co-authored-by: rise-erpelding <54716846+rise-erpelding@users.noreply.github.com>
* chore: move tasks into scripts [swc-854]

* chore: update custom element manifest scripts to simpify
@castastrophe castastrophe force-pushed the castastrophe/swc-808-disable-process-spectrum branch from 4059467 to 729d1bc Compare May 16, 2025 19:57
Base automatically changed from CSS-Cutoff to main May 21, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants