<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/fetch2/npm.py, branch mickledore-4.2.2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-4.2.2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-4.2.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-09-01T09:07:00+00:00</updated>
<entry>
<title>bitbake: Fix npm to use https rather than http</title>
<updated>2022-09-01T09:07:00+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@gmail.com</email>
</author>
<published>2022-08-30T11:44:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9e22a3cccf69a54384767c8d2f22b4badcdab36c'/>
<id>urn:sha1:9e22a3cccf69a54384767c8d2f22b4badcdab36c</id>
<content type='text'>
Hit this error while building nlf-native recently:
{
  "error": {
    "summary": "URI malformed",
    "detail": ""
  }
}

Some poking about led me to discover that:
1) The npm.py tool replaces npm:// with http://, not https://
2) Some versions of the npm tool don't handle 301 redirects properly,
   choosing to display the above error instead when using the default
   nodejs registry

It would be good to go fix npm to handle the redirect properly, but it
seems like it would also be good to assume secure http when contacting a
registry, hence, this patch

(Bitbake rev: 2cd76e8aabe4e803c760e60f06cfe1f470714ec7)

Signed-off-by: Neil Horman &lt;nhorman@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: npm: Put all downloaded files in the npm2 directory</title>
<updated>2022-02-05T17:46:44+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T02:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bef3fe496969e79c8c44d3b1c41f60273a182104'/>
<id>urn:sha1:bef3fe496969e79c8c44d3b1c41f60273a182104</id>
<content type='text'>
Previously npm files that specify downloadfilename= in the SRC_URI
would be downloaded to the root of ${DL_DIR} rather than in the
${DL_DIR}/npm2 directory where all other npm files are downloaded.
This should make it simpler when setting up and configuring a
premirror with the downloaded npm packages.

(Bitbake rev: 73fa376d6502ab6f2cccfb25a1193d9b1c3c3bc8)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch: npm: Use temporary file for empty user config</title>
<updated>2021-12-14T22:47:04+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-12-13T11:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=31bc9cab25692fd0b07dbd994afd93802e93d6bf'/>
<id>urn:sha1:31bc9cab25692fd0b07dbd994afd93802e93d6bf</id>
<content type='text'>
Always use a temporary file for the user config 'NPM_CONFIG_USERCONFIG'
because npm otherwise failed if configs and npmrc aren't set:

double-loading config "/dev/null" as "global", previously loaded as "user"

(Bitbake rev: 9f272ad7f76c1559e745e9af686d0a529f917659)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch: npm: Quote destdir in run chmod command</title>
<updated>2021-12-14T22:47:04+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-12-13T11:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bb42e4b35601a2fe94c93b4c35c6d59a3e439606'/>
<id>urn:sha1:bb42e4b35601a2fe94c93b4c35c6d59a3e439606</id>
<content type='text'>
Quote destdir in run chmod command to support special characters in
package name and to avoid syntax error for packages like
'@(._.)/execute'.

(Bitbake rev: a701dfce3f0e74b4d7c687eeda83fe9c8e7240b1)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: npm: Create config npmrc in environment instantiation</title>
<updated>2021-10-08T15:45:05+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-06T14:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=00f2b6d0b70a067e88957585a50183548a0d92a4'/>
<id>urn:sha1:00f2b6d0b70a067e88957585a50183548a0d92a4</id>
<content type='text'>
Create a configuration npmrc per npm environment to avoid repeated
creation of the same configuration file. Create the file via python to
avoid multiple npm config calls and add the ability to pass a file
path instead of a temporary file.

Deprecate the npm configs argument of the run function. The configs
should be passed to npm environment or as command specific arguments.

(Bitbake rev: 2c2df49b06a2bad7a5b8872a9998338a4660498f)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: npm: Support npm archives with missing search directory mode</title>
<updated>2021-10-08T15:45:05+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-06T14:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d2d40e733248b94b28a1cb5a0f69dc8cb5860fd9'/>
<id>urn:sha1:d2d40e733248b94b28a1cb5a0f69dc8cb5860fd9</id>
<content type='text'>
Delay directory restore and set execute/search directory mode bits in
unpack to support npm archives with a missing search directory mode.

(Bitbake rev: 60cbd34d3da8f0f523281aad7eec93eec9cd4db8)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/npm: refactor the npm fetcher</title>
<updated>2020-01-27T16:48:10+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d842e9e738e14fc54c21434755033d6eb6b6f3f2'/>
<id>urn:sha1:d842e9e738e14fc54c21434755033d6eb6b6f3f2</id>
<content type='text'>
This commit refactors the npm fetcher to improve some points and fix
others:

 - The big change is that the fetcher is only fetching the package
   source and no more the dependencies. Thus the npm fetcher act as the
   other fetchers e.g git, wget. The dependencies will be handled later.

 - The fetcher only resolves the url of the package using 'npm view' and
   then forwards it to a proxy fetcher.

 - This commit also fixes a lot of issues with the package names (exotic
   characters, scoped packages) which were badly handled.

 - The validation files - lockdown.json and npm-shrinkwrap.json - are no
   longer used by the fetcher. Instead, the downloaded tarball is
   verified with the 'integrity' and 'shasum' provided in the 'npm view'
   of the package [1][2].

1: https://docs.npmjs.com/files/package-lock.json#integrity
2: https://www.w3.org/TR/SRI

(Bitbake rev: 0f451cdc43130d503ada53ed1b4fc5a24943f6ef)

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>bitbake: lib: remove unused imports</title>
<updated>2020-01-19T13:31:05+00:00</updated>
<author>
<name>Frazer Clews</name>
<email>frazer.clews@codethink.co.uk</email>
</author>
<published>2020-01-16T16:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0ac5174c7d39a3e49893df0d517d47bec1935555'/>
<id>urn:sha1:0ac5174c7d39a3e49893df0d517d47bec1935555</id>
<content type='text'>
removed unused imports which made the code harder to read, and slightly
but less efficient

(Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697)

Signed-off-by: Frazer Clews &lt;frazer.clews@codethink.co.uk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/npm: Use npm pack to download node modules instead of wget</title>
<updated>2019-07-27T21:46:09+00:00</updated>
<author>
<name>Mads Andreasen</name>
<email>mads@andreasen.cc</email>
</author>
<published>2019-07-25T19:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bebeed310bfea80eea3e25481ae246fdc9052eb6'/>
<id>urn:sha1:bebeed310bfea80eea3e25481ae246fdc9052eb6</id>
<content type='text'>
Using npm pack to download the main node module and its dependencies
allow for the use of private npm modules and access to them via .npmrc

(Bitbake rev: e5eda3871893e4eadeb311aeb997e183675598f4)

Signed-off-by: Mads Andreasen &lt;mads@andreasen.cc&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: fetch2/npm: fix npw view parsing</title>
<updated>2019-05-21T11:56:34+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2019-05-17T15:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a35abe31dc23916fd06afdb3a5e22a81ef3df579'/>
<id>urn:sha1:a35abe31dc23916fd06afdb3a5e22a81ef3df579</id>
<content type='text'>
Fixes [YOCTO #13344]

When parsing manually the 'npm view --json' ouput, an extra closing
brackets in a JSON string can leads the fetcher to fail with a
JSONDecodeError exception.

This commit use the JSON parser to extract:
 - The last object in the returned array if there are multiple results.
 - The returned object if there is only one result.

(Bitbake rev: 3d319c79981811d3cfd4732885057db4fd5afcc2)

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>
