-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
02480d1
to
3c47f5a
Compare
@@ -1,10 +1,6 @@ | |||
#!/bin/sh | |||
. "$(dirname "$0")/_/husky.sh" |
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.
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. |
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.
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
// https://github.com/Stuk/eslint-plugin-header/issues/57 | ||
headerPlugin.rules.header.meta.schema = false; |
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.
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, |
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.
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
[" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.", " SPDX-License-Identifier: Apache-2.0"] | ||
] | ||
}, | ||
"overrides": [ |
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.
is this no longer needed?
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.
Correct. Two changes happened
- 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 - We only needed an override for postcss.js file because of
process
global var. I replaced it with an import, which is cleaner anyway
Issue #, if available:
Notes
Upgrade all dependencies. See comments inline for major changes.
Testing
lib
folder content before and after. No differencesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.