<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/npm.bbclass, branch uninative-1.9</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.9</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.9'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2018-02-06T11:06:27+00:00</updated>
<entry>
<title>npm.bbclass: Node module name and recipe name can be different</title>
<updated>2018-02-06T11:06:27+00:00</updated>
<author>
<name>Böszörményi Zoltán</name>
<email>zboszor@pr.hu</email>
</author>
<published>2018-02-01T13:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fa9c077068a2acea04389fa2b44eb2e93548fce2'/>
<id>urn:sha1:fa9c077068a2acea04389fa2b44eb2e93548fce2</id>
<content type='text'>
Some NPM modules have the same name as their low level dependencies.
To prevent recipe naming conflicts, allow node module recipe names
to start with the "node-" prefix.

(From OE-Core rev: 6b417c7c3a38463c64756beae9817fa2a80fd09e)

Signed-off-by: Zoltán Böszörményi &lt;zboszor@pr.hu&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm.bbclass: Fix building node modules with npm@5</title>
<updated>2018-02-06T11:06:27+00:00</updated>
<author>
<name>Böszörményi Zoltán</name>
<email>zboszor@pr.hu</email>
</author>
<published>2018-02-01T13:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d38e1e2c2ea4646b34ea6282d3d7620df5b0374b'/>
<id>urn:sha1:d38e1e2c2ea4646b34ea6282d3d7620df5b0374b</id>
<content type='text'>
npm cache clear throws an error with npm@5 and suggests to
use npm cache verify instead. But our cache is actually empty,
so use npm cache clear --force.

npm install in the source directory creates symlinks with npm@5.

Use a combination of npm pack and npm install module-version.tgz
that works the same way with older and new npm versions and is
guaranteed to create actual copies instead of directory symlinks.

This change allows using nodejs 8.x LTS, tested with 8.9.4.

(From OE-Core rev: 2d7d2a460842c8747df17990970f22f4a11f36f6)

Signed-off-by: Zoltán Böszörményi &lt;zboszor@pr.hu&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: allow installation of devDependencies</title>
<updated>2017-03-22T11:35:20+00:00</updated>
<author>
<name>Anders Darander</name>
<email>anders@chargestorm.se</email>
</author>
<published>2017-03-13T10:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b1f10b18eaf6c8009e86863ca4a26f429de97082'/>
<id>urn:sha1:b1f10b18eaf6c8009e86863ca4a26f429de97082</id>
<content type='text'>
Often, eg when using angular2, there's a need to install also
the devDependencies.

The default is to keep the old behaviour, to not install
devDependencies.

(From OE-Core rev: 9377d16751aeff0a913e754d711bca6e4e4d9df1)

Signed-off-by: Anders Darander &lt;anders@chargestorm.se&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: set HOME during do_install</title>
<updated>2017-02-07T14:50:09+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-02-06T20:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=21ace8b6202e906689619ebdb41e745a6c12975b'/>
<id>urn:sha1:21ace8b6202e906689619ebdb41e745a6c12975b</id>
<content type='text'>
In do_compile we set HOME so that ~/.npm* only get created in the work
directory; we need to do the same in do_install as well or they'll go
into the user's home directory which we do not want.

(From OE-Core rev: a667cb9ed2dceb804b85d1a024e2619bc34d2681)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: remove True option to getVar calls</title>
<updated>2016-12-16T10:23:23+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c4e2c59088765d1f1de7ec57cde91980f887c2ff'/>
<id>urn:sha1:c4e2c59088765d1f1de7ec57cde91980f887c2ff</id>
<content type='text'>
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/npm: use npm install to do installation</title>
<updated>2016-11-06T23:35:32+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-10-31T04:02:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ebe531b38bea54bd29ed7b3d2ea6c533b9331953'/>
<id>urn:sha1:ebe531b38bea54bd29ed7b3d2ea6c533b9331953</id>
<content type='text'>
Using "npm install" instead of "cp -a" is the more correct thing to be
doing here, and ensures that symlinks for executable scripts are put
into ${prefix}/bin. (I'd prefer ${bindir}, but npm does not allow
specifying paths at that level - only a prefix.)

Fixes [YOCTO #10460].

(From OE-Core rev: 90cb980a1c49de99a0aec00c0cd5fc1e165490a7)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: create: support node.js code outside of npm</title>
<updated>2016-09-07T23:36:49+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-09-05T03:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ff259b095d1a84d1dc9b004c669c8f35659c3c2b'/>
<id>urn:sha1:ff259b095d1a84d1dc9b004c669c8f35659c3c2b</id>
<content type='text'>
If you have your own node.js application you may not publish it (or at
least not immediately) in an npm registry - it might just be in a
repository on github or on your local machine. Add support to recipetool
create for creating recipes to build such applications - extract their
dependencies, fetch them, and add corresponding npm:// URLs to SRC_URI,
and ensure that LICENSE / LIC_FILES_CHKSUM are updated to match. For
example, you can now run:

  recipetool create https://github.com/diversario/node-ssdp

(I had to borrow some code from bitbake/lib/bb/fetch2/npm.py to
implement this functionality; this should be refactored out but now
isn't the time to do that refactoring.)

Part of the fix for [YOCTO #9537].

(From OE-Core rev: 4fb8b399c05a1b66986fc76e13525f6c5e0d9b58)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: npm.bbclass now adds nodejs to RDEPENDS</title>
<updated>2016-08-17T09:35:41+00:00</updated>
<author>
<name>Henry Bruce</name>
<email>henry.bruce@intel.com</email>
</author>
<published>2016-08-10T23:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=caaff71f97ff7595d256d6b63f3400eee90f3a7b'/>
<id>urn:sha1:caaff71f97ff7595d256d6b63f3400eee90f3a7b</id>
<content type='text'>
We expect that any package that uses the npm bbclass
will have a runtime dependency on node.js

(From OE-Core rev: 769fae0b74d7c7992aa593907f446fab98ef5128)

Signed-off-by: Henry Bruce &lt;henry.bruce@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm.bbclass: avoid str/byte conversion problems for PKGV and SUMMARY</title>
<updated>2016-06-12T22:47:17+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2016-06-10T08:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=21343ac500395e13b9b2e5ccab95543ca2a9cd8b'/>
<id>urn:sha1:21343ac500395e13b9b2e5ccab95543ca2a9cd8b</id>
<content type='text'>
In Python3, str.encode() returns byte strings, which later are not
converted back to strings automatically, leading to "TypeError: Can't
convert 'bytes' object to str implicitly" in code which reads PKGV and
SUMMARY and expects to find strings there.

The npm.bbclass must use values for d.setVar() that meet that
expectation, and thus the redundant (and in Python3, harmful)
.encode() gets removed.

(From OE-Core rev: 241e094bcd9212204350f9855257474908f82a3c)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>npm: add target_arch flag to npm</title>
<updated>2016-05-30T14:58:10+00:00</updated>
<author>
<name>Brendan Le Foll</name>
<email>brendan.le.foll@intel.com</email>
</author>
<published>2016-05-24T11:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=899358a586f03daee8568c5d6906a5d992859264'/>
<id>urn:sha1:899358a586f03daee8568c5d6906a5d992859264</id>
<content type='text'>
npm takes a target_arch flag which needs to be set to do some gyp compilations
correctly. It also doesn't use the same mapping as OE for target arch so a
small function is required to make the mapping work. Function is taken from
meta-nodejs

(From OE-Core rev: f402225311e4bbb62ba9781ab274420abaac0fb4)

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
