Commit Graph

7 Commits

Author SHA1 Message Date
BELOUARGA Mohamed
186f1ee88d classe-recipes: npm: Add support for dependencies and devDependencies
Adapt the npm classe for the shrinkwrap of Nodejs 18, and seperate
dependencies and dev dependencies.

(From OE-Core rev: f8365c0216b24742b4ec456b5d35ea1c1647faa2)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
BELOUARGA Mohamed
17732f9cb4 classes: npm: Add support for the new format of the shrinkwrap file
1 - Adapt do_configure to the new format of the shrinkwrap

2 - Remove useless function _npmsw_dependency_dict because the dictionnary
    is already given by npmsw:foreach_dependencies

3 - Rename arguments of callback functions

(From OE-Core rev: 89e02fa47e8e4f77b7d7c552c07f8dc05f6e42ad)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
BELOUARGA Mohamed
ee8b906a83 classes: npm: Handle peer dependencies for npm packages
NPM changed its manner to handle peer dependencies over its versions.
Before NPM 3: NPM installs automatically peer dependencies
between NPM 3 and 7: NPM shows a warning about peer dependencies
After NPM 3: NPM reworked its manner how to handle peer dependencies

The shrinkwrap doesn't have the parameters of the peer dependencies, so we cannot
fetch them. in the same time peer dependencies are not direct dependencies, they should
be installed as run time dependencies.

(From OE-Core rev: a5734148649be93529e5d5172cb47928957a6536)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
Martin Jansa
ac5c42477b npm.bbclass: avoid DeprecationWarning with new python
meta/classes-recipe/npm.bbclass:85: DeprecationWarning: invalid escape sequence '\.'
  '--transform', 's,^\./,package/,',

(From OE-Core rev: 47f102cfbbaa83d17999747233a81f1b570f448e)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-14 17:13:10 +00:00
Enrico Scholz
cf6648d437 npm.bbclass: fix architecture mapping
Use the same code as the 'nodejs_16.4.bb recipe' for mapping the OE
arch to the NPM arch.

A noticeable change (and fix for exiting problems) is the move from
'arm' to 'arm64' for 'aarch64'.

(From OE-Core rev: cd773722cb66eea487c6004a006e1b88f0b07a5a)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-25 11:08:06 +01:00
Enrico Scholz
b6caff521a npm.bbclass: fix typo in 'fund' config option
Configuration option is named 'fund', not 'funds'.

(From OE-Core rev: a28cde6defe9aefc3df02f321cc293f0b562304a)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-25 11:08:06 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00