-
Notifications
You must be signed in to change notification settings - Fork 4
DEPRECATION: add deprecation warning to this package #304
DEPRECATION: add deprecation warning to this package #304
Conversation
As part of the new formkit release, all old form element repositories are being deprecated.
Reviewer's Guide by SourceryThis pull request adds a deprecation warning to the auro-datepicker component and updates the documentation generation process to handle deprecated components. It introduces a new documentation template and a custom script to generate documentation that includes the deprecation notice. Updated class diagram for deprecatedDocsProcessorclassDiagram
class processDocFiles{
+config
}
class fileConfigs{
+identifier
+input
+output
+mdMagicConfig
+preProcessors
}
class templateFiller{
+formatApiTable()
+extractNames()
}
class Logger{
+log(message)
+error(message)
}
processDocFiles -- fileConfigs : uses
processDocFiles -- templateFiller : uses
processDocFiles -- Logger : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Surge demo deployment failed! 😭 |
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.
Hey @DukeFerdinand - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a script to automatically update the year in the deprecation warning message in
README.md
anddocTemplates/README.md
. - It might be helpful to include the date of deprecation in the deprecation warning.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
processDocFiles({ overwriteLocalCopies: false }) | ||
.then(() => { | ||
throw new Error("TESTING ERROR"); | ||
Logger.log("Docs processed successfully"); | ||
}) |
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.
suggestion (bug_risk): Revisit the intentional throwing of a testing error in production code.
The explicit throw of "TESTING ERROR" will always trigger the catch block and may be left over from debugging. Confirm if this behavior is intended or if it should be removed or conditioned on a debug flag.
processDocFiles({ overwriteLocalCopies: false }) | |
.then(() => { | |
throw new Error("TESTING ERROR"); | |
Logger.log("Docs processed successfully"); | |
}) | |
processDocFiles({ overwriteLocalCopies: false }) | |
.then(() => { | |
if (process.env.NODE_ENV !== 'production') { | |
throw new Error("TESTING ERROR"); | |
} | |
Logger.log("Docs processed successfully"); | |
}) |
throw new Error("TESTING ERROR"); | ||
Logger.log("Docs processed successfully"); |
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.
suggestion (code-quality): Remove unreachable code. (remove-unreachable-code
)
throw new Error("TESTING ERROR"); | |
Logger.log("Docs processed successfully"); | |
throw new Error("TESTING ERROR"); | |
Explanation
Statements after areturn
, break
, continue
or throw
will never be executed.Leaving them in the code confuses the reader, who may believe that these
statements have some effect. They should therefore be removed.
Resolves AlaskaAirlines/auro-formkit#394, adding deprecation warning to old form element repositories.
Summary by Sourcery
Adds a deprecation warning to the auro-datepicker component and updates the documentation to reflect its deprecated status. This change informs users that the component is no longer supported and encourages migration to the new Auro Formkit.
Documentation: