Skip to content
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

chore: Upgrade dependencies #55

Merged
merged 1 commit into from
Feb 20, 2025
Merged

chore: Upgrade dependencies #55

merged 1 commit into from
Feb 20, 2025

Conversation

just-boris
Copy link
Member

@just-boris just-boris commented Feb 18, 2025

Issue #, if available:

Notes

Upgrade all dependencies. See comments inline for major changes.

Testing

  • PR build
  • Compared lib folder content before and after. No differences

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.00%. Comparing base (4e3536e) to head (3c47f5a).
Report is 1 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (4e3536e) and HEAD (3c47f5a). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (4e3536e) HEAD (3c47f5a)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   97.75%   92.00%   -5.76%     
==========================================
  Files           3        1       -2     
  Lines          89       25      -64     
  Branches        9        9              
==========================================
- Hits           87       23      -64     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1,10 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
Copy link
Member Author

Choose a reason for hiding this comment

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

Deprecation from Husky

husky - DEPRECATED

Please remove the following two lines from .husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

They WILL FAIL in v10.0.0

Tested the hook after the change, all works

@@ -0,0 +1,47 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Member Author

Choose a reason for hiding this comment

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

Eslint changed their config syntax completely. It is pure JS now instead of JSON. Followed this guide: https://eslint.org/docs/latest/use/configure/migration-guide

Comment on lines +11 to +12
// https://github.com/Stuk/eslint-plugin-header/issues/57
headerPlugin.rules.header.meta.schema = false;
Copy link
Member Author

Choose a reason for hiding this comment

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

See here: Stuk/eslint-plugin-header#57

We depend on an unmaintained plugin. It has compatibility issues with the latest eslint, but still works with this patch.

Works for now, but we need to think about replacement. Maybe it is time to write our own plugin and drop it here: https://github.com/cloudscape-design/build-tools

files: ['**/*.{js,mjs,ts}'],
languageOptions: {
globals: {
console: true,
Copy link
Member Author

@just-boris just-boris Feb 18, 2025

Choose a reason for hiding this comment

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

New syntax for globals. Instead of "browser": true preset, they now require listing all globals one-by-one. They recommend pulling an extra dependency for a reusable list of globals, but since we only have one, I decided to keep it simple

@just-boris just-boris marked this pull request as ready for review February 18, 2025 16:06
@just-boris just-boris requested a review from a team as a code owner February 18, 2025 16:06
@just-boris just-boris requested review from gethinwebster and removed request for a team February 18, 2025 16:06
[" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.", " SPDX-License-Identifier: Apache-2.0"]
]
},
"overrides": [
Copy link
Member

Choose a reason for hiding this comment

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

is this no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. Two changes happened

  1. They changed root+overrides structure to a flat array of configs, each operates as an override for the given files. More details here: https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
  2. We only needed an override for postcss.js file because of process global var. I replaced it with an import, which is cleaner anyway

@just-boris just-boris added this pull request to the merge queue Feb 20, 2025
Merged via the queue into main with commit d76dee5 Feb 20, 2025
37 checks passed
@just-boris just-boris deleted the upgrade-deps branch February 20, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants