Liferay environment: how to get current senna version?
caneta opened this issue · 8 comments
Hello everyone!
I have a simple question: having a Liferay 7 environment up and run, is there a way to get the version of senna used by the portal?
Maybe with some function call in the JavaScript console of the browser, or looking inside the OSGi module that contains the library?
Thank you
hey @caneta ,
You should be able to access senna via the Liferay object.
In the javascript console try to access senna via:
Liferay.SPA.app
Ok, I know that, but I want to get senna version.
Something like jQuery, if possible:
> jQuery.fn.jquery
2.1.4
Otherwise tell me where to look inside the portal to get that string.
Hey @caneta, I don't think we have a runtime way to get it right now... the closest way is the frontend-js-spa-web/package.json
where we specify the version of Senna.js
that will get bundled.
It is semver-like, but we're always updating to the correct version and shrinkwrapping, so the one seen there should be the one in your portal installation.
Hi @jbalsas, my problem is that I have a Liferay 7 CE GA3 without sources.
So I'm going to my Liferay Workspace and then bundles/osgi/marketplace/, I decompress Liferay CE Foundation.lpkg, I get com.liferay.frontend.js.web-1.0.10.jar, decompress it too and the package.json included in it is the following:
{
"name": "frontend-js-spa-web",
"version": "1.0.10"
}
Probably this is not the correct place to look for...Have I to download sources of GA3 in order to get that information?
---- Edit ----
In the GA3 sources I get the same package.json as reported above.
Mmm... in GA3 that info might be in the build.gradle
file, as a sennaVersion
?
In any case, we can try to do something similar to what we did in liferay-loader-amd
as well...
Yes, @jbalsas you're right: in sources of GA3, inside modules/apps/foundation/frontend-js/frontend-js-spa-web/build.gradle, we have String sennaVersion = "1.2.0"
.
A feature like the one for the AMD loader would be great!
In my opinion such a feature is fundamental for every frontend tool, not only for the AMD loader or senna.js but it could be very helpful for Lexicon and metal.js as well, for example.
This because I'm always struggling on different Liferay instances, CE and DXP, wondering wich tool I'm working with: knowing it in a simple manner like the one implemented for the Loader will be a great improvement to my daily work.
For example, uderstanding that a bug is due to an older version of a tool could lead me to patch the portal with the latest version until the next fixpack/CE release which includes it.
Thank you
On Liferay 7.1, you can use Liferay.SPA.version
. Any questions, reopen, please.