Skip to content

Commit

Permalink
refactor!: migrate to Lumina (#10482)
Browse files Browse the repository at this point in the history
**Related Issue:** #10310, #10481, #10399, #10405, #10491, #10434,
#10495, #9260

## Noteworthy changes

* components are now Lit-based
* removed `@storybook/test` and `@storybook/addon-interactions` as these
were not being actively used
* React deps bumped to v18
* Added default `scale` value to:
  * `action-bar`
  * `action-group`
  * `action-menu`
  * `action-pad`
* Path of extras will change to the following:
* `/dist/extras/vscode-data.json` ➡️
`/dist/docs/vscode.html-custom-data.json`
* backwards-compatible version is preserved to not break Intellisense
[described in the
doc](https://developers.arcgis.com/calcite-design-system/resources/frameworks/#visual-studio-intellisense)
	* `/dist/extras/docs-json.json` ➡️ `/dist/docs/docs.json` (internal)
* `/dist/extras/translations-json.json` ➡️
`/dist/docs/translations.json` (internal)
	* `/dist/extras/docs-json.d.ts` ❌ (removed, internal)

BREAKING CHANGE: 

* for a consistent development experience, components now convert `null`
to `undefined`, so developers will need to update code with strict null
checks
* removed the following `@esri/eslint-plugin-calcite-components` rules
as they are no longer valid:
	* `ban-props-on-host`
	* `enforce-ref-last-prop`
	* `require-event-emitter-type`

---------

Co-authored-by: JC Franco <[email protected]>
Co-authored-by: Ben Elan <[email protected]>
Co-authored-by: Calcite Admin <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Nov 15, 2024
1 parent bcc19be commit b2c9762
Show file tree
Hide file tree
Showing 2,546 changed files with 35,344 additions and 47,657 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/deploy-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ jobs:
npm install
npm run build
# These git commands can be removed once we stop tracking components.d.ts
# For more info, see: https://github.com/Esri/calcite-design-system/pull/9011
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
release_commit="$(git rev-parse HEAD)"
# The "|| true" prevents failure if there are no changes
git add packages/calcite-components/src/components.d.ts package-lock.json || true
git add package-lock.json || true
# The release-please PR only updates when there are new deployable
# commits, e.g., fixes, features, or breaking changes. This is fine
Expand All @@ -88,7 +86,7 @@ jobs:
# will be up to date in the dists. The commit will be discarded once
# the container is destroyed, and then the autogenerated files will be
# updated in a subsequent PR.
git commit -m "build: update types and package-lock" || true
git commit -m "build(deps): update package-lock" || true
npm run publish:latest
npm run util:upload-release-assets -- "${{toJSON(steps.release.outputs.paths_released)}}"
Expand Down
12 changes: 1 addition & 11 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
#!/usr/bin/env sh

ensure_types_are_up_to_date() {
types_path="packages/calcite-components/src/components.d.ts"

if [ -n "$(git diff --name-only -- "$types_path")" ]; then
echo "Automatically staging changes to \"$types_path\""
git add "$types_path" >/dev/null 2>&1 || true
fi
}

update_stylelint_config_if_sass_file_edited() {
staged_files="$(
git diff --cached --name-only --diff-filter=ACM -- packages/**/*.scss
)"
)"

if [ -n "$staged_files" ]; then
npm run util:update-stylelint-custom-sass-functions
Expand Down Expand Up @@ -61,7 +52,6 @@ check_ui_icon_name_consistency() {

lint-staged
check_ui_icon_name_consistency
ensure_types_are_up_to_date
update_stylelint_config_if_sass_file_edited

exit 0
63 changes: 26 additions & 37 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,65 +15,54 @@
{
"type": "node",
"request": "launch",
"name": "Stencil Prerender",
"args": [
"${workspaceFolder}/node_modules/@stencil/core/bin/stencil",
"prerender",
"${workspaceFolder}/dist/hydrate/index.js",
"--max-workers=0",
"--config=${workspaceFolder}/stencil.config.ts"
]
"name": "Components E2E test {currentFile} (headful)",
"cwd": "${workspaceFolder}/packages/calcite-components",
"sourceMaps": true,
"args": ["${workspaceFolder}/node_modules/.bin/vitest", "run", "--no-file-parallelism", "${file}"],
"env": {
"DEVTOOLS": "true"
},
"internalConsoleOptions": "neverOpen",
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Debug Stencil --e2e {currentFile}",
"name": "Components E2E test {currentFile} (headless)",
"cwd": "${workspaceFolder}/packages/calcite-components",
"sourceMaps": true,
"args": [
"${workspaceFolder}/node_modules/@stencil/core/bin/stencil",
"test",
"--no-docs",
"--no-build",
"--no-cache",
"--e2e",
"--devtools",
"--",
"--max-workers=0",
"${file}"
],
"args": ["${workspaceFolder}/node_modules/.bin/vitest", "run", "--no-file-parallelism", "${file}"],
"internalConsoleOptions": "neverOpen",
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Debug Stencil --spec {currentFile}",
"name": "Components Spec test {currentFile}",
"cwd": "${workspaceFolder}/packages/calcite-components",
"sourceMaps": true,
"args": [
"${workspaceFolder}/node_modules/@stencil/core/bin/stencil",
"test",
"--no-docs",
"--no-build",
"--no-cache",
"--spec",
"--devtools",
"--",
"--max-workers=0",
"${file}"
],
"skipFiles": ["<node_internals>/**"],
"args": ["${workspaceFolder}/node_modules/.bin/vitest", "run", "--no-file-parallelism", "${file}"],
"internalConsoleOptions": "neverOpen",
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Debug Tokens --spec {currentFile}",
"name": "Components Prerender build",
"cwd": "${workspaceFolder}/packages/calcite-components",
"args": ["${workspaceFolder}/node_modules/.bin/vite", "build", "--ssr"],
"internalConsoleOptions": "neverOpen",
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Design Tokens Spec Test {currentFile}",
"cwd": "${workspaceFolder}/packages/calcite-design-tokens",
"sourceMaps": true,
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/jest/bin/jest.js", "--runInBand", "${file}"],
"env": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"skipFiles": ["<node_internals>/**"],
"internalConsoleOptions": "neverOpen",
"console": "integratedTerminal"
Expand Down
2 changes: 1 addition & 1 deletion documentation/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following are some troubleshooting steps you can take if a release is unsucc

1. Find the workflow run for the release [here](https://github.com/Esri/calcite-design-system/actions/workflows/deploy-latest.yml), and view the logs to find the error message.
1. Fix the error:
- In some cases you can resolve the issue with a temporary solution, and then fix the CI after the release is completed. For example, if the `components.d.ts` file is outdated and breaks releases due to an unclean working tree, the [temporary solution](https://github.com/Esri/calcite-design-system/pull/9008) would be to build locally and submit a PR with the updated file. That way you won't be so time crunched when determining an [actual fix](https://github.com/Esri/calcite-design-system/pull/9011) to prevent the same error from occurring in the future. Reach out to Ben or Franco if a solution to the error isn't clear.
- In some cases you can resolve the issue with a temporary solution, and then fix the CI after the release is completed. Reach out to Ben or Franco if a solution to the error isn't clear.
- If the `dev`->`main` sync failed, you may have to resolve merge conflicts locally. See the "Sync dev to main" step in the `deploy-latest.yml` workflow for the process.
- If the release succeeded, but the cherry-pick PR wasn't created, you may need to fix merge conflicts locally.
1. Once the PR with the fix is installed, make sure the new workflow run is passing.
Expand Down
Loading

0 comments on commit b2c9762

Please sign in to comment.