<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/npm.bbclass, branch yocto-4.0.7</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.7</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.7'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-09-12T07:41:48+00:00</updated>
<entry>
<title>npm: use npm_registry to cache package</title>
<updated>2022-09-12T07:41:48+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2022-05-19T10:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b53aff215effa6fdb02d3ac90d6ea654bd43e0eb'/>
<id>urn:sha1:b53aff215effa6fdb02d3ac90d6ea654bd43e0eb</id>
<content type='text'>
With nodejs 16, the simple 'npm cache add' approach does not work
anymore because its fetcher implementation downloads also meta
information from the registry.

We have to generate these information and add them to the cache.
There is no direct support in 'npm' for task so we have to implement
it manually.

This implementation consists of a openembedded python module (in
oe-core) and a nodejs version specific helper (in oe-meta).

(From OE-Core rev: bfce90b1260d07f01a8dc2998c9e63ca36d4ebbe)

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 019b9c341d539939098962c228c1fd5c99331312)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: take 'version' directly from 'package.json'</title>
<updated>2022-09-12T07:41:48+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2022-05-19T10:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dcf593b7a6ed865bcb8cd60cf588851c28dfd846'/>
<id>urn:sha1:dcf593b7a6ed865bcb8cd60cf588851c28dfd846</id>
<content type='text'>
We know the content of 'package.json' from earlier patches; there is
no need to parse the tarball name to extract the version.

(From OE-Core rev: 81ad70619017570779adbc1ca928b2412ad9bce7)

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit f553e528e76f7e3925ed1c0950d96e73aec37da9)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: return content of 'package.json' in 'npm_pack'</title>
<updated>2022-09-12T07:41:48+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2022-05-19T10:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=54962ac3a96214daa1d3c84c9b5c02ea4fb1783d'/>
<id>urn:sha1:54962ac3a96214daa1d3c84c9b5c02ea4fb1783d</id>
<content type='text'>
We have to read 'package.json' to calculate the name of the tarball.
This content is interesting for later patches.

(From OE-Core rev: 2f5c53745b4420dac9198ec013c6653b3e339a6b)

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit d67367e389c492ae90f9021066d6a4d5ebcf68e5)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: replace 'npm pack' call by 'tar czf'</title>
<updated>2022-09-12T07:41:48+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2022-05-19T10:05:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c5feaa512036a4c855547c5261c68b0828cf9e16'/>
<id>urn:sha1:c5feaa512036a4c855547c5261c68b0828cf9e16</id>
<content type='text'>
'npm pack' is a maintainer tool which tries to execute 'prepare'
and similar scripts.  This fails usually in OE because it requires
completely installed 'node_modules'.

Earlier nodejs versions supported an undocumented 'ignore-scripts'
option.  This has been removed in nodejs 16.

We could patch 'package.json' and remove the unwanted scripts.  But
this might complicate local workflows (applying patches) and installed
packages will contain the modified 'package.json'.

Instead of, package it manually by 'tar czf'.  As a sideeffect,
'do_configure' is running much faster now.

(From OE-Core rev: 8a83fbca45a74c30265168767a716e1a272df89b)

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 68b480d64ffb6750699cc8fa00d2ac0bc6a2e58a)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: Remove unnecessary configs argument from npm run command</title>
<updated>2021-10-23T16:42:28+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-20T07:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=700202afb1d435bac9ed096e1786bf1bee05b649'/>
<id>urn:sha1:700202afb1d435bac9ed096e1786bf1bee05b649</id>
<content type='text'>
(From OE-Core rev: e5031366ff3519814aff8b95c524659a398e62c1)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: Use configs for npm environment and args for npm run command</title>
<updated>2021-10-14T10:48:45+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-08T07:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fe87ab0a6a6f0c3d3fef4dd24a526dca3f9bde23'/>
<id>urn:sha1:fe87ab0a6a6f0c3d3fef4dd24a526dca3f9bde23</id>
<content type='text'>
Use parameter configs of class NpmEnvironment and parameter args of
function run to support a common npmrc for all run calls of a single
NpmEnvironment.

(From OE-Core rev: 6490de38ba9563181653ef223224de066faf9166)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: Add variable NPM_NODEDIR with default value</title>
<updated>2021-10-14T10:48:45+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-08T07:48:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9f452b48310a28f3471b17cc1085587c48e86c3b'/>
<id>urn:sha1:9f452b48310a28f3471b17cc1085587c48e86c3b</id>
<content type='text'>
Replace the variable NPM_NODEDIR fallback to a default value inside the
code with a variable NPM_NODEDIR with default value.

(From OE-Core rev: f0a47afb43bd63b66c565ba3d084e20d6725495e)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: Add support for EXTRA_OENPM arguments</title>
<updated>2021-10-14T10:48:45+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-08T07:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a4acb5472e8ce50d6d9bf0750bb4773e7a4045e3'/>
<id>urn:sha1:a4acb5472e8ce50d6d9bf0750bb4773e7a4045e3</id>
<content type='text'>
Add support for EXTRA_OENPM arguments to set node-gyp variables for
example. This allows use of shared librariess, avoid download
of external sources or build from source.

(From OE-Core rev: 9b22b50b77a5979934193e9affbe47a05d763777)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Convert to new override syntax</title>
<updated>2021-08-02T14:44:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-07-28T22:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bb6ddc3691ab04162ec5fd69a2d5e7876713fd15'/>
<id>urn:sha1:bb6ddc3691ab04162ec5fd69a2d5e7876713fd15</id>
<content type='text'>
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py &lt;oe-core directory&gt;

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm.bbclass: Allow nodedir to be overridden by NPM_NODEDIR</title>
<updated>2021-05-14T06:57:28+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2021-05-13T14:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bac39de14e1fc52ed0388459a45d586c24a93eac'/>
<id>urn:sha1:bac39de14e1fc52ed0388459a45d586c24a93eac</id>
<content type='text'>
Node modules may need to be built against multiple Node
versions. Setting nodedir in the NPM configuration stops older ways of
doing this, such as setting npm_config_target and npm_config_disturl,
from working.

(From OE-Core rev: 14795ee305f3c11fcc31cc7ca815b8ff1020e29a)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
