<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 04:46:31 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[NPMCLI-98] Get a light-module package from npm repository</title>
                <link>https://jira.magnolia-cms.com/browse/NPMCLI-98</link>
                <project id="13983" key="NPMCLI">Magnolia CLI</project>
                    <description>&lt;p&gt;Provide a command to get packages by supplying their names as arguments.&lt;br/&gt;
&lt;tt&gt;mgnl install &lt;span class=&quot;error&quot;&gt;&amp;#91;package-name-1 package-name-2&amp;#93;&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;The name &lt;tt&gt;install&lt;/tt&gt; connotates that it will be ready to use (as in the npm command), so it should attempt to install them to the current magnolia.resources.dir.&lt;br/&gt;
If successful it should output where it installed the module.&lt;/p&gt;

&lt;p&gt;It should offer an option to install to the current location or another location, with  --path.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Rationale&lt;/b&gt;&lt;br/&gt;
Magnolia is promoting npm as the place to share light-modules. It should be easy and clean to get those modules. There are other more sophisticated approaches - such as via the &quot;build&quot; command. But there should be a way to just easily get a specific modules.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;npm install&lt;/tt&gt; command does this, but has the downside of downloading it into a node_modules directory, this is clunky and could be confusing.&lt;/p&gt;

&lt;p&gt;Additional notes and rationale:&lt;br/&gt;
&lt;a href=&quot;https://wiki.magnolia-cms.com/display/PMTEAM/Getting+LM+packages+from+npm&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.magnolia-cms.com/display/PMTEAM/Getting+LM+packages+from+npm&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="57798">NPMCLI-98</key>
            <summary>Get a light-module package from npm repository</summary>
                <type id="2" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10891&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="rkowalski">Robert Kowalski</assignee>
                                    <reporter username="czimmermann">Christopher Zimmermann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Feb 2017 15:57:03 +0100</created>
                <updated>Thu, 16 Mar 2017 11:00:20 +0100</updated>
                            <resolved>Tue, 14 Mar 2017 13:57:10 +0100</resolved>
                                                    <fixVersion>2.1.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="138809" author="rkowalski" created="Thu, 9 Feb 2017 16:06:56 +0100"  >&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;

&lt;p&gt;presented it last friday: &lt;a href=&quot;https://git.magnolia-cms.com/projects/BUILD/repos/npm-cli/commits/d7e4557f48e02f1592034565d8207c570226f0b7#lib/installLightModule.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.magnolia-cms.com/projects/BUILD/repos/npm-cli/commits/d7e4557f48e02f1592034565d8207c570226f0b7#lib/installLightModule.js&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="138810" author="rkowalski" created="Thu, 9 Feb 2017 16:07:18 +0100"  >&lt;p&gt;still needs proper error handling etc though&lt;/p&gt;</comment>
                            <comment id="139187" author="rkowalski" created="Thu, 16 Feb 2017 19:40:53 +0100"  >&lt;p&gt;I&apos;m just running into this as part of &lt;a href=&quot;https://jira.magnolia-cms.com/browse/NPMCLI-79&quot; title=&quot;Light Project support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NPMCLI-79&quot;&gt;&lt;del&gt;NPMCLI-79&lt;/del&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Right now we have: &lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mgnl get (untars directly from the registry CDN) &amp;#8211; downside: custom command that party reimplements npm&lt;/li&gt;
	&lt;li&gt;mgnl build (based on npm install and a copy based on a keyword) &amp;#8211; downside: based on implicit property / keyword&lt;/li&gt;
	&lt;li&gt;a proposal for magnoliaDependencies in a package.json which i like because it is both explicit AND easy to piggyback on npm&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Would propose to switch to `magnoliaDependencies` and name the command mgnl install. `mgnl build` stays, but gets deprecated.&lt;/p&gt;

&lt;p&gt;Example CLI:&lt;/p&gt;




&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# installs `magnoliaDependencies`
mgnl install      
# gets the lightmodule with name furbie, puts it in local directory                  
mgnl install furbie
# as `install furbie`, but adds it to `magnoliaDependencies`              
mgnl install furbie --save   
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="139210" author="fgrilli" created="Fri, 17 Feb 2017 13:05:42 +0100"  >&lt;p&gt;&quot;local directory&quot;: would that be &lt;tt&gt;node_modules&lt;/tt&gt; or some ad-hoc dir?&lt;/p&gt;</comment>
                            <comment id="139211" author="fgrilli" created="Fri, 17 Feb 2017 13:17:06 +0100"  >&lt;p&gt;&lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=rkowalski&quot; class=&quot;user-hover&quot; rel=&quot;rkowalski&quot;&gt;rkowalski&lt;/a&gt; At any rate, I&apos;d propose we have a meeting next week about your proposal, possibly with &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=czimmermann&quot; class=&quot;user-hover&quot; rel=&quot;czimmermann&quot;&gt;czimmermann&lt;/a&gt;  and other interested parties. I see  &lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=ejervidalo&quot; class=&quot;user-hover&quot; rel=&quot;ejervidalo&quot;&gt;ejervidalo&lt;/a&gt; already mentioned &lt;tt&gt;magnoliaDependencies&lt;/tt&gt; here &lt;a href=&quot;https://wiki.magnolia-cms.com/display/DEV/Light+modules+packaging#Lightmodulespackaging-Caveats&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.magnolia-cms.com/display/DEV/Light+modules+packaging#Lightmodulespackaging-Caveats&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="139243" author="tgregovsky" created="Mon, 20 Feb 2017 09:51:45 +0100"  >&lt;p&gt;sweet idea! like it... I mean to be able to get external light module (from npm) without having it in &apos;node_modules&apos; directory ...&lt;/p&gt;

&lt;p&gt;yeah dependency is another topic :/ (I am not really sure about)&lt;/p&gt;</comment>
                            <comment id="139289" author="czimmermann" created="Mon, 20 Feb 2017 17:37:41 +0100"  >&lt;p&gt;I&apos;m open to the command name &quot;mgnl install&quot;. &lt;br/&gt;
Regarding magnoliaDependencies- so then you would not include magnoila modules that are on npm in the regular dependencies any more? So running &quot;npm install&quot; would not get those. But you would run &quot;mgnl install&quot; instead? &lt;/p&gt;

&lt;p&gt;What if &quot;mgnl install&quot; did what &quot;mgnl build&quot; does now - ie still using regular &quot;dependencies&quot; property and copying based on the keyword in the module?&lt;/p&gt;</comment>
                            <comment id="139612" author="czimmermann" created="Fri, 24 Feb 2017 12:02:49 +0100"  >&lt;p&gt;Count on every light module on npm having the &apos;magnolia-light-module&apos; keyword.&lt;br/&gt;
We&apos;re making that very clear in documentation, and people will get that.&lt;/p&gt;

&lt;p&gt;So again, I thnk an approach based on that metadata would be appropriate. (though acknowldege there maybe other tings that speak against it.)&lt;/p&gt;</comment>
                            <comment id="139640" author="czimmermann" created="Fri, 24 Feb 2017 17:30:49 +0100"  >&lt;p&gt;Another benefit of having an mgnl command to grab an npm light module is npm&apos;s behavirou when you try to install a package in a directory where you have no package.json - which will frequently be the case.&lt;br/&gt;
It gives these errors which will be confusing to users:&lt;/p&gt;

&lt;p&gt;&#8220;&lt;br/&gt;
npm WARN enoent ENOENT: no such file or directory, open &apos;/Users/czimmermann/Documents/a-projects/lightdev-lab/a-module-workshop/package.json&apos;&lt;br/&gt;
npm WARN a-module-workshop No description&lt;br/&gt;
npm WARN a-module-workshop No repository field.&lt;br/&gt;
npm WARN a-module-workshop No README data&lt;br/&gt;
npm WARN a-module-workshop No license field.&lt;br/&gt;
&#8220;&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/npm/npm/issues/9161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/npm/npm/issues/9161&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="139770" author="rkowalski" created="Tue, 28 Feb 2017 10:39:03 +0100"  >&lt;p&gt;update: &lt;/p&gt;

&lt;p&gt;1. The problem with the &apos;magnolia-light-module&apos; keyword based approach is that it depends on the author and that they set the right property in the package.json.&lt;/p&gt;

&lt;p&gt;2. Local dependencies / npmignore bundling:&lt;/p&gt;

&lt;p&gt;There was a Q regarding local dependencies and how to ignore the files we ignore on a publish with npmignore.&lt;/p&gt;

&lt;p&gt;local dependencies to a node_module can be defined this way:&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
&quot;dependencies&quot;: &lt;/p&gt;
{
&#8194;&#8194;&#8194;&#8194;&quot;calculator-magnolia&quot;: &quot;../calculator-magnolia&quot;
}
&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;npm will then build the project (if a prepublish hook is defined) and takes the .npmignore into account. Pretty neat &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="139782" author="rkowalski" created="Tue, 28 Feb 2017 11:58:33 +0100"  >&lt;p&gt;Ok let me just write up what we need:&lt;/p&gt;

&lt;p&gt;1. We need a place to store a list of dependencies for light-module-projects.&lt;br/&gt;
2. We need a command to get those dependencies / install them.&lt;br/&gt;
3. We need a command to easily install a package &quot;on-the-fly&quot;.&lt;/p&gt;

&lt;p&gt;What we have right now:&lt;/p&gt;

&lt;p&gt;1. mgnl build - takes all modules with a specific keyword in their package.json and moves them into another folder. Those can be devDependencies or dependencies in the package.json of a project&lt;br/&gt;
2. Magnolia dependencies defined in a module.yaml which prevents the Magnolia Server from starting if a dependency isn&apos;t installed&lt;/p&gt;</comment>
                            <comment id="139815" author="rkowalski" created="Tue, 28 Feb 2017 15:54:19 +0100"  >&lt;p&gt;it seems yarn (&lt;a href=&quot;https://yarnpkg.com/en/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://yarnpkg.com/en/&lt;/a&gt;) can handle those needs, without the obligatory node_modules folder.&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
$ npm i -g yarn&lt;br/&gt;
$ yarn add mgnl-calculator --modules-folder=. --no-lockfile&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;So we could wrap yarn which is maintained by facebook and twitter folks, get reliable caching and fast dependency resolution and don&apos;t have to write our own.&lt;/p&gt;

&lt;p&gt;Or we could advise people to use yarn, but maybe they get confused from installing yet another package manager.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What is yarn?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Yarn was started as a project by facebook engineers who have to deal with large engineering teams and a lot of npm dependencies (thus resulting in a lot of daily installs). Its meant as an alternative to the npm client, still compatible with the whole npm ecosystem. Its optimized for speed and has some nice features for frontend devs.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>magnolia-cms.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 9 Feb 2017 16:06:56 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12130" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Documentation update required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="13300"><![CDATA[Yes]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10246" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>NPMCLI-80</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>fgrilli</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 50 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>czimmermann</customfieldvalue>
            <customfieldvalue>fgrilli</customfieldvalue>
            <customfieldvalue>rkowalski</customfieldvalue>
            <customfieldvalue>tgregovsky</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzzzq1:zr520ezxz8idzy0003wlad</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10245" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="446">Basel 87</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10242" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>