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: add missing highlight.js dependency #257

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

stavalfi
Copy link
Contributor

@stavalfi stavalfi commented Sep 13, 2021

Add missing highlight.js dependency.

Related issue(s):
None.

@magicmatatjahu
Copy link
Member

magicmatatjahu commented Sep 14, 2021

@stavalfi Hello! Thanks for contribution! As I understand, you probably install this template by yarn and by this it complains, yes? Also highlight.js is installed with @asyncapi/react-component package so it's a deep package, so is it really problem? For me no 🤷🏼 Could you elaborate?

Please also change the PR title to the valid one -> https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md#conventional-commits

@stavalfi
Copy link
Contributor Author

@stavalfi Hello! Thanks for contribution! As I understand, you probably install this template by yarn and by this it complains, yes? Also highlight.js is installed with @asyncapi/react-component package so it's a deep package, so is it really problem? For me no 🤷🏼 Could you elaborate?

Please also change the PR title to the valid one -> https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md#conventional-commits

Hi, yarn>=2 (and also I think pnmp) does not allow to use dep if it is not listed in the deps section.

so this fix is required to run this lib when using yarn>=2.

wdut?

@magicmatatjahu
Copy link
Member

@stavalfi I tested your PR locally and it works :) I know, it sounds crazy, but I always prefer to check, even that "small" change.

However, I get such an errors:

Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/typescript" instead of "highlight.js/lib/languages/typescript.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vala" instead of "highlight.js/lib/languages/vala.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vbnet" instead of "highlight.js/lib/languages/vbnet.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vbscript-html" instead of "highlight.js/lib/languages/vbscript-html.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vbscript" instead of "highlight.js/lib/languages/vbscript.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/verilog" instead of "highlight.js/lib/languages/verilog.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vhdl" instead of "highlight.js/lib/languages/vhdl.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/vim" instead of "highlight.js/lib/languages/vim.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/wasm" instead of "highlight.js/lib/languages/wasm.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/wren" instead of "highlight.js/lib/languages/wren.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/x86asm" instead of "highlight.js/lib/languages/x86asm.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/xl" instead of "highlight.js/lib/languages/xl.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/xml" instead of "highlight.js/lib/languages/xml.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/xquery" instead of "highlight.js/lib/languages/xquery.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/yaml" instead of "highlight.js/lib/languages/yaml.js"
Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/zephir" instead of "highlight.js/lib/languages/zephir.js"

No one has reported problems with this to us so it's probably the result of bumping up the highlight to the latest version. Could you please fix this "bug" by changing this line - https://github.com/asyncapi/html-template/blob/master/filters/all.js#L78

to:

const lang = require(path.resolve(hljsLanguagesPath, langPath.replace('.js', '')));

I would appreciate it and wouldn't have to do another PR.

Also please change the PR's title to the fix: add missing deps highlight.js :)

@magicmatatjahu
Copy link
Member

@stavalfi Hi. Would you like to continue working on this PR in near future? :)

@stavalfi
Copy link
Contributor Author

stavalfi commented Sep 27, 2021

@magicmatatjahu done. sorry for the delay! not sure why build is failing. I changed the commit title.

@magicmatatjahu magicmatatjahu changed the title add missing deps: highlight.js fix: add missing deps highlight.js Sep 27, 2021
@magicmatatjahu magicmatatjahu changed the title fix: add missing deps highlight.js fix: add missing highlight.js dependency Sep 27, 2021
@magicmatatjahu
Copy link
Member

@stavalfi No worries, you should change title of PR, not commit. I made it for you. Everything looks good. Thanks for contribution! :)

@magicmatatjahu magicmatatjahu added the bug Something isn't working label Sep 27, 2021
@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
0.0% 0.0% Duplication

@magicmatatjahu magicmatatjahu merged commit b47ba97 into asyncapi:master Sep 27, 2021
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.23.8 🎉

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
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants