-
Notifications
You must be signed in to change notification settings - Fork 236
chore: command orchestration #5791
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
Changes from 9 commits
3cd08a9
ffa43cc
1e00ab5
1f1e69e
c57c437
b5ee171
0107b93
85e914c
1b9f9d0
689ffcc
0ee20d4
fce826e
29f4e28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "env": { | ||
| "browser": true, | ||
| "es6": true, | ||
| "node": true | ||
| }, | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "plugin:prettier/recommended" | ||
| ], | ||
| "overrides": [ | ||
| { | ||
| "extends": ["plugin:jsonc/recommended-with-jsonc"], | ||
| "files": ["*.json"], | ||
| "parser": "jsonc-eslint-parser", | ||
| "rules": { | ||
| "jsonc/sort-keys": ["warn"] | ||
| } | ||
| }, | ||
| { | ||
| "extends": ["plugin:jsonc/recommended-with-jsonc"], | ||
| "files": ["package.json"], | ||
| "parser": "jsonc-eslint-parser", | ||
| "rules": { | ||
| "jsonc/sort-keys": [ | ||
| "warn", | ||
| { | ||
| "hasProperties": ["type"], | ||
| "order": [ | ||
| "$schema", | ||
| "name", | ||
| "version", | ||
| "private", | ||
| "description", | ||
| "license", | ||
| "author", | ||
| "maintainers", | ||
| "contributors", | ||
| "homepage", | ||
| "repository", | ||
| "bugs", | ||
| "type", | ||
| "exports", | ||
| "main", | ||
| "module", | ||
| "browser", | ||
| "man", | ||
| "preferGlobal", | ||
| "bin", | ||
| "files", | ||
| "directories", | ||
| "scripts", | ||
| "config", | ||
| "sideEffects", | ||
| "types", | ||
| "typings", | ||
| "workspaces", | ||
| "resolutions", | ||
| "dependencies", | ||
| "bundleDependencies", | ||
| "bundledDependencies", | ||
| "peerDependencies", | ||
| "peerDependenciesMeta", | ||
| "optionalDependencies", | ||
| "devDependencies", | ||
| "keywords", | ||
| "engines", | ||
| "engineStrict", | ||
| "os", | ||
| "cpu", | ||
| "publishConfig" | ||
| ], | ||
| "pathPattern": "^$" | ||
| }, | ||
| { | ||
| "order": { "type": "asc" }, | ||
| "pathPattern": "^(?!exports\\[).*" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "extends": ["./first-gen/.eslintrc.json"], | ||
| "files": ["first-gen/**/*"] | ||
| }, | ||
| { | ||
| "extends": ["./second-gen/.eslintrc.json"], | ||
| "files": ["second-gen/**/*"] | ||
| } | ||
| ], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": "latest", | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": ["@typescript-eslint"], | ||
| "root": true, | ||
| "rules": { | ||
| "no-console": [ | ||
| "error", | ||
| { | ||
| "allow": ["warn", "error"] | ||
| } | ||
| ], | ||
| "no-debugger": 2 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,11 +15,19 @@ | |
| }, | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "yarn workspace @adobe/spectrum-web-components build", | ||
| "test": "yarn workspace @adobe/spectrum-web-components test", | ||
| "start": "yarn workspace @adobe/spectrum-web-components storybook", | ||
| "lint": "yarn workspace @adobe/spectrum-web-components lint", | ||
| "postinstall": "husky || true && patch-package" | ||
| "build": "yarn build:first-gen && yarn build:second-gen", | ||
| "build:first-gen": "yarn workspace @adobe/spectrum-web-components build", | ||
| "build:second-gen": "yarn workspace @adobe/swc build", | ||
| "lint": "yarn lint:first-gen && yarn lint:second-gen", | ||
| "lint:first-gen": "yarn workspace @adobe/spectrum-web-components lint", | ||
| "lint:second-gen": "yarn workspace @adobe/swc lint", | ||
| "postinstall": "husky || true && patch-package", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great question but this is out of scope for the current PR. will track it on slack maybe? |
||
| "start": "yarn start:first-gen & yarn start:second-gen", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for some reason prestorybook hook was not getting called and thus this error.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i was still getting the same error associated with storybook setup not having dirname correctly defined since we are using modules. i have implemented a fix and will push it up with my review. |
||
| "start:first-gen": "yarn workspace @adobe/spectrum-web-components start", | ||
| "start:second-gen": "yarn workspace @adobe/swc start", | ||
caseyisonit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "test": "yarn test:first-gen & yarn test:second-gen", | ||
| "test:first-gen": "yarn workspace @adobe/spectrum-web-components test", | ||
| "test:second-gen": "yarn workspace @adobe/swc test" | ||
| }, | ||
| "workspaces": [ | ||
| "first-gen", | ||
|
|
@@ -32,6 +40,15 @@ | |
| "resolutions": { | ||
| "playwright": "1.53.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@changesets/cli": "2.29.7", | ||
| "@commitlint/cli": "19.8.1", | ||
| "@commitlint/config-conventional": "^19.8.1", | ||
| "husky": "9.1.7", | ||
| "lint-staged": "^16.1.2", | ||
| "patch-package": "^8.0.0", | ||
| "replace-in-file": "^8.3.0" | ||
| }, | ||
| "keywords": [ | ||
| "design-system", | ||
| "spectrum", | ||
|
|
@@ -42,15 +59,6 @@ | |
| "lit-element", | ||
| "lit-html" | ||
| ], | ||
| "devDependencies": { | ||
| "@changesets/cli": "2.29.7", | ||
| "@commitlint/cli": "19.8.1", | ||
| "@commitlint/config-conventional": "^19.8.1", | ||
| "husky": "9.1.7", | ||
| "lint-staged": "^16.1.2", | ||
| "patch-package": "^8.0.0", | ||
| "replace-in-file": "^8.3.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=20.10.0", | ||
| "yarn": ">=4.6.0" | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make sure to review the linter settings we want in second-gen to ensure they are patterns we want to continue using or add new ones? This is not blocking for this PR but want to make sure we discuss as a team
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What currently is here is just a simple setup to get eslinting up and running. We can and should talk about it :) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,7 +103,7 @@ | |
| ], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 2020, | ||
| "ecmaVersion": "latest", | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": [ | ||
|
|
@@ -143,13 +143,6 @@ | |
| } | ||
| ], | ||
| "no-debugger": 2, | ||
| "notice/notice": [ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to make sure this is still working in second gen, we should still be prepending a copywright to every file.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this removed?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the root level work across the project?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed it cause we don't have a license.js config for second-gen and i don't know if we want to replicate the first-gen or not?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do, yes. License should be project-wide |
||
| "error", | ||
| { | ||
| "mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.", | ||
| "templateFile": "first-gen/config/license.js" | ||
| } | ||
| ], | ||
| "simple-import-sort/imports": [ | ||
| "error", | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "name": "@adobe/spectrum-web-components-2nd-gen", | ||
| "name": "@adobe/swc", | ||
| "version": "0.0.1", | ||
| "private": true, | ||
| "description": "Second generation Spectrum Web Components with modern tooling and architecture", | ||
|
|
@@ -16,17 +16,18 @@ | |
| }, | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "yarn workspaces foreach --from '@swc/*' run build", | ||
| "clean": "yarn workspaces foreach --from '@swc/*' run clean", | ||
| "build": "yarn workspaces foreach --from '@swc/*' --recursive run build", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will force Yarn to traverse downstream dependents, rebuilding or cleaning even when nothing changed. Is this what we need? We can do caching or parallelisation here too. Let me know your setup |
||
| "clean": "yarn workspaces foreach --from '@swc/*' --recursive run clean", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you just want to delete the SWC output you can avoid the cascading clean. You can just run this? yarn workspaces foreach --from '@swc/*' run clean |
||
| "lint": "eslint . --ext .ts,.js,.json", | ||
| "storybook": "yarn workspace @swc/components storybook", | ||
| "start": "yarn workspace @swc/core dev & yarn workspace @swc/components cem:watch & yarn workspace @swc/components storybook", | ||
| "storybook:build": "yarn workspace @swc/components storybook:build", | ||
| "test": "yarn workspace @swc/components test" | ||
| }, | ||
| "workspaces": [ | ||
| "packages/*" | ||
| ], | ||
| "devDependencies": { | ||
| "eslint": "8.57.1", | ||
| "eslint-plugin-simple-import-sort": "^12.1.1" | ||
| }, | ||
| "keywords": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,16 +6,14 @@ | |
| "author": "Adobe", | ||
| "homepage": "https://opensource.adobe.com/spectrum-web-components/", | ||
| "repository": { | ||
| "directory": "second-gen/packages/swc", | ||
| "type": "git", | ||
| "url": "https://github.com/adobe/spectrum-web-components.git", | ||
| "directory": "second-gen/packages/swc" | ||
| "url": "https://github.com/adobe/spectrum-web-components.git" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/adobe/spectrum-web-components/issues" | ||
| }, | ||
| "type": "module", | ||
| "main": "./dist/index.js", | ||
| "types": "./dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
|
|
@@ -30,20 +28,24 @@ | |
| "import": "./dist/components/*/index.js" | ||
| } | ||
| }, | ||
| "main": "./dist/index.js", | ||
| "files": [ | ||
| "dist/" | ||
| ], | ||
| "scripts": { | ||
| "analyze": "cem analyze --config cem.config.js", | ||
| "build": "vite build", | ||
| "cem:watch": "cem analyze --watch", | ||
|
||
| "clean": "rimraf dist", | ||
| "dev": "vite build --watch", | ||
| "storybook": "yarn analyze && storybook dev -p 6006", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yarn cem:watch && storybook dev -p 6006? |
||
| "storybook:build": "yarn analyze && storybook build", | ||
| "test": "vitest", | ||
| "test": "vitest --run", | ||
| "test:coverage": "vitest --coverage", | ||
| "test:ui": "vitest --ui" | ||
| "test:ui": "vitest --ui", | ||
| "test:watch": "yarn workspace @swc/core dev & vitest" | ||
| }, | ||
| "types": "./dist/index.d.ts", | ||
| "dependencies": { | ||
| "@swc/core": "workspace:*", | ||
| "lit": "^2.5.0 || ^3.1.3" | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would
startalso requireyarn run devon core?