diff options
| author | Archana Polampalli <archana.polampalli@windriver.com> | 2023-01-24 15:52:39 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-01-25 08:57:42 -0800 |
| commit | 75a836190adb7822da1ae71de076ddeb91b60db9 (patch) | |
| tree | 1c8ead33ca49d987538431e3a8fa0d8267bde11b /meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18 | |
| parent | c3e6365aead260638f21231782209aea41509c00 (diff) | |
| download | meta-openembedded-75a836190adb7822da1ae71de076ddeb91b60db9.tar.gz | |
Nodejs: Upgrade to 18.12.1
Node-18 is the current LTS release, node-19 is a development release and
node-20 is scheduled to be released until 2023-04-18 which is too late for YP-4.2
https://github.com/nodejs/release
* Refresh below two patches
- 0001-Using-native-binaries.patch
- 0001-liftoff-Correct-function-signatures.patch
* Copy openssl.cnf from sysroot_native to nodejs-openssl.cnf
otherwise do_compile failed:
make[1]: *** No rule to make target '../deps/openssl/nodejs-openssl.cnf',
needed by 'Release/obj.target/deps/openssl/openssl.cnf'. Stop.
* Add initial ptest support using ctest only, it covered 20% of the nodejs tests.
There are some more tests exist to add but will require additional work.
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18')
| -rwxr-xr-x | meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18/oe-npm-cache | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18/oe-npm-cache deleted file mode 100755 index f596207648..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.18/oe-npm-cache +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | #!/usr/bin/env node | ||
| 2 | |||
| 3 | /// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name> | ||
| 4 | /// <type> ... meta - metainformation about package | ||
| 5 | /// tgz - tarball | ||
| 6 | |||
| 7 | const process = require("node:process"); | ||
| 8 | |||
| 9 | module.paths.unshift("@@libdir@@/node_modules/npm/node_modules"); | ||
| 10 | |||
| 11 | const cacache = require('cacache') | ||
| 12 | const fs = require('fs') | ||
| 13 | |||
| 14 | // argv[0] is 'node', argv[1] is this script | ||
| 15 | const cache_dir = process.argv[2] | ||
| 16 | const type = process.argv[3] | ||
| 17 | const key = process.argv[4] | ||
| 18 | const file = process.argv[5] | ||
| 19 | |||
| 20 | const data = fs.readFileSync(file) | ||
| 21 | |||
| 22 | // metadata content is highly nodejs dependent; when cache entries are not | ||
| 23 | // found, place debug statements in 'make-fetch-happen/lib/cache/policy.js' | ||
| 24 | // (CachePolicy::satisfies()) | ||
| 25 | const xlate = { | ||
| 26 | 'meta': { | ||
| 27 | 'key_prefix': 'make-fetch-happen:request-cache:', | ||
| 28 | 'metadata': function() { | ||
| 29 | return { | ||
| 30 | time: Date.now(), | ||
| 31 | url: key, | ||
| 32 | reqHeaders: { | ||
| 33 | 'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*', | ||
| 34 | }, | ||
| 35 | resHeaders: { | ||
| 36 | "content-type": "application/json", | ||
| 37 | "status": 200, | ||
| 38 | }, | ||
| 39 | options: { | ||
| 40 | compress: true, | ||
| 41 | } | ||
| 42 | }; | ||
| 43 | }, | ||
| 44 | }, | ||
| 45 | |||
| 46 | 'tgz': { | ||
| 47 | 'key_prefix': 'make-fetch-happen:request-cache:', | ||
| 48 | 'metadata': function() { | ||
| 49 | return { | ||
| 50 | time: Date.now(), | ||
| 51 | url: key, | ||
| 52 | reqHeaders: { | ||
| 53 | 'accept': '*/*', | ||
| 54 | }, | ||
| 55 | resHeaders: { | ||
| 56 | "content-type": "application/octet-stream", | ||
| 57 | "status": 200, | ||
| 58 | }, | ||
| 59 | options: { | ||
| 60 | compress: true, | ||
| 61 | }, | ||
| 62 | }; | ||
| 63 | }, | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | |||
| 67 | const info = xlate[type]; | ||
| 68 | let opts = {} | ||
| 69 | |||
| 70 | if (info.metadata) { | ||
| 71 | opts['metadata'] = info.metadata(); | ||
| 72 | } | ||
| 73 | |||
| 74 | cacache.put(cache_dir, info.key_prefix + key, data, opts) | ||
| 75 | .then(integrity => { | ||
| 76 | console.log(`Saved content of ${key} (${file}).`); | ||
| 77 | }) | ||
