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

fix: remove deprecated import #775

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Conversation

pavlikm
Copy link
Contributor

@pavlikm pavlikm commented Apr 19, 2022

Resolves #770

changed simple-git/promise with just simple-git
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@magicmatatjahu
Copy link
Member

@pavlikm Hello! Thanks for contribution! Please follow by PR title rules: https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md#conventional-commits

@pavlikm pavlikm changed the title Update generator.js fix: remove deprecated import Apr 19, 2022
@derberg
Copy link
Member

derberg commented Apr 19, 2022

hmmm... I do not think we have an integration test that covers the functionality provided by simple-git. Did you try it on local if after your changes it still works as expected?

@pavlikm
Copy link
Contributor Author

pavlikm commented Apr 19, 2022

@derberg it is based on error showed on start of application using this generator:

=============================================
simple-git has supported promises / async await since version 2.6.0.
 Importing from 'simple-git/promise' has been deprecated and will be
 removed by July 2022.

To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
=============================================

@derberg
Copy link
Member

derberg commented Apr 19, 2022

@pavlikm I'm not questioning if it is needed, just want to make sure it still works 😄 just run generation on local and point output to folder with .git directory and confirm you get a proper error message

@pavlikm
Copy link
Contributor Author

pavlikm commented Apr 19, 2022

@derberg yes, if it should show me error about unstaged changes, then it works well:

C:\Users\pavlik\Documents\workspace\platform\message-service>ag -o . async.json https://github.com/asyncapi/html-template
Something went wrong:
Error: "C:\Users\pavlik\Documents\workspace\platform\message-service" is in a git repository with unstaged changes. Please commit your changes before proceeding or add proper directory to .gitignore file. You can also use the --forc
e-write flag to skip this rule (not recommended).
    at Generator.verifyTargetDir (C:\Users\pavlik\AppData\Roaming\npm\node_modules\@asyncapi\generator\lib\generator.js:846:71)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Generator.generate (C:\Users\pavlik\AppData\Roaming\npm\node_modules\@asyncapi\generator\lib\generator.js:173:29)
    at C:\Users\pavlik\AppData\Roaming\npm\node_modules\@asyncapi\generator\cli.js:154:9

the only difference against master is, that info pasted in my previous comment is missing

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

LGTM, @magicmatatjahu anything from you?

@magicmatatjahu
Copy link
Member

@derberg It's ok.

@derberg
Copy link
Member

derberg commented Apr 19, 2022

/rtm

@asyncapi-bot asyncapi-bot merged commit 4837934 into asyncapi:master Apr 19, 2022
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.9.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simple-git/promise import warning
4 participants