<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/npm.bbclass, branch uninative-2.10</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.10</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.10'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-01-30T10:41:03+00:00</updated>
<entry>
<title>npm.bbclass: use python3 for npm config</title>
<updated>2021-01-30T10:41:03+00:00</updated>
<author>
<name>Vyacheslav Yurkov</name>
<email>uvv.mail@gmail.com</email>
</author>
<published>2021-01-28T18:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4bb1a003de1b9ec9ad51e7b25fb1c6b84efd6837'/>
<id>urn:sha1:4bb1a003de1b9ec9ad51e7b25fb1c6b84efd6837</id>
<content type='text'>
python2-native executable is not available in sysroot anymore, which
causes compilation of some nodejs modules to fail. Switch to python3 as a
default python version.

(From OE-Core rev: d21f50ecf8e8683a92b7d234fa8225c2c1470595)

Signed-off-by: Vyacheslav Yurkov &lt;uvv.mail@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm.bbclass: make shrinkwrap file optional</title>
<updated>2021-01-16T22:39:36+00:00</updated>
<author>
<name>Kamel Bouhara</name>
<email>kamel.bouhara@bootlin.com</email>
</author>
<published>2021-01-14T07:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8b0884569f09873ca0aefcaeec00e371d7df5909'/>
<id>urn:sha1:8b0884569f09873ca0aefcaeec00e371d7df5909</id>
<content type='text'>
Some packages don't have shrinkwrap file which
means no npmsw uri is provided in the recipe.

(From OE-Core rev: 47760b0d7d66b2b68ee197d359f0b7b17374d742)

Signed-off-by: Kamel Bouhara &lt;kamel.bouhara@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: force to rebuild the prebuild addons</title>
<updated>2020-01-27T16:48:09+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4662963b2c26b1b8008ea591bbbf5840f0695a6a'/>
<id>urn:sha1:4662963b2c26b1b8008ea591bbbf5840f0695a6a</id>
<content type='text'>
This commit forces to rebuild the prebuild addons which are using
node-gyp-build.

  https://www.npmjs.com/package/node-gyp-build

(From OE-Core rev: dc4dda4d459ef66246cb7fb6f7d667c982707544)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: use the native python</title>
<updated>2020-01-27T16:48:09+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fc516a65b343d5fa95b74aabba48f75e6315da14'/>
<id>urn:sha1:fc516a65b343d5fa95b74aabba48f75e6315da14</id>
<content type='text'>
When building addons, the node-gyp build tool is looking for python. It
is available in the native directory but not directly in the PATH.

This commit configures npm to use the native python executable.

(From OE-Core rev: 946fd69cba6f60c531ff34091cda3b7fee8ee594)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: use the local node headers</title>
<updated>2020-01-27T16:48:09+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ba5d030b6240db58c0cdefc46a9ee42f1583b694'/>
<id>urn:sha1:ba5d030b6240db58c0cdefc46a9ee42f1583b694</id>
<content type='text'>
When building addons, the node headers are needed to be able to compile
properly. Usually they are downloaded by npm but network access in the
do_compile task are unauthorized. Hopefully the local node headers are
available in the native sysroot so lets use them.

(From OE-Core rev: e4c111dacc808d8c7883f3a36dd5a9f65e7a44cc)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: restrict the build to be offline</title>
<updated>2020-01-27T16:48:09+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8f39026f1acee0a13c1ebc405a195c2879a0e604'/>
<id>urn:sha1:8f39026f1acee0a13c1ebc405a195c2879a0e604</id>
<content type='text'>
After the do_fetch task, every other tasks must not access the network.
In order to ensure this point every npm command must use the offline
configuration. In addition setting an invalid proxy is used as a safety.

(From OE-Core rev: 1133f3ab485031df6e107f826b7398e5133f9c4d)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: refactor the npm class</title>
<updated>2020-01-27T16:48:09+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=de39f14d24a81d1f042cbcc4be6739e3e8000369'/>
<id>urn:sha1:de39f14d24a81d1f042cbcc4be6739e3e8000369</id>
<content type='text'>
This commit splits the npm build in three steps:

1. With the new npmsw fetcher, the sources and dependencies of the
   package have been fetched and unpacked. As sources can also be
   patched, a local cache must be configured to use these modified
   sources.

2. Next, the installation process is run using the local cache only.
   Some packages may need to be compiled.

3. The final installation filters the previously installed files to
   avoid unnecessary files.

This new version also fixes multiple issues related to npm dependencies
badly handled: package names, scope packages, installation directories

(From OE-Core rev: fb2252ee0777c6d26dea94c7588c323a6b97e961)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: remove some temporary build files</title>
<updated>2019-05-21T11:56:33+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2019-05-17T15:14:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e90cd2ed61b93ee7e290e7e592f1f0242ab5c281'/>
<id>urn:sha1:e90cd2ed61b93ee7e290e7e592f1f0242ab5c281</id>
<content type='text'>
Fixes [YOCTO #11028]

When dealing with node modules which use "node-gyp" [1] to build native
addons to node. Some temporary build files stay in the image: object
files, static library files, dependency files, ...

This commit does not keep only the required files, but remove the files
which can leads to QA issues (staticdev with static library files).

[1]: https://github.com/nodejs/node-gyp

(From OE-Core rev: bac9075f51f6acba2fcfbe9f79f97f5171186d9c)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: fix node and npm default directory conflict</title>
<updated>2019-05-21T11:56:33+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2019-05-17T15:14:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a34d0d539e5fdf341541fb628652d22289e80512'/>
<id>urn:sha1:a34d0d539e5fdf341541fb628652d22289e80512</id>
<content type='text'>
Fixes [YOCTO #13349]

When dealing with node modules which have declared "bin" files [1], npm
will create a link in '/usr/bin' with a relative link to
'../lib/node_modules/&lt;module bin file&gt;'.

The commits e9270af4296ce2af292059617a717e42fc17425c and
2713d9bcc39c712ef34003ce8424416441be558e explicitely use
'/usr/lib/node/' as install directory, but does not care about the "bin"
symbolic linked files.

In order to keep valid links, and to keep it as simple as possible, the
path '/usr/lib/node_modules/' is used as install directory for npm. And
a symbolic link is created to have a valid '/usr/lib/node/' path, needed
for node.

[1]: https://docs.npmjs.com/files/package.json#bin

(From OE-Core rev: 2d72007deea7ed529f82b8a6e67e2715dd0a0dca)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: get npm package name from npm pack</title>
<updated>2019-05-21T11:56:33+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2019-05-17T15:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=eecba41822e86b69ebdb9cbc8fbfd512ad9a47d7'/>
<id>urn:sha1:eecba41822e86b69ebdb9cbc8fbfd512ad9a47d7</id>
<content type='text'>
Fixes [YOCTO #12534]

When using npm packages with exotic names, like "JSONSelect" (with
uppercase) or "@angular/cli" (with at sign and slash), there are three
different names:
  - the recipe name ("jsonselect" or "angular-cli")
  - the npm module name ("JSONSelect" or "@angular/cli")
  - the npm pack name ("JSONSelect" or "angular-cli")

The commit fa9c077068a2acea04389fa2b44eb2e93548fce2 allow to have
different recipe name and npm module name by setting the NPMPN variable.

This commit allows to have yet another npm pack name. The pack filename
is now dynamically retrieved from the 'npm pack' command.

(From OE-Core rev: b6ffa59d03fbf53d1681fce5f8c3c1f163cf9923)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
