nodejs: upgrade 18.16.1 -> 18.17.1

Update to latest release of latest LTS 18 release

License-Update: [1] [2] [3]

The following CVEs are fixed in this release:
    CVE-2023-32002
    CVE-2023-32006
    CVE-2023-32559

[1] https://github.com/nodejs/node/commit/0cfdb3affa518bf55cfd8120f0286099fabfb22a
[2] https://github.com/nodejs/node/commit/2ea6e030038d86376dea748f702ed14018f99aba
[3] https://github.com/nodejs/node/commit/261e1d23d11053b373ea51745f6c1187440c2b08

https://github.com/nodejs/node/releases/tag/v18.17.1

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Polampalli, Archana
2023-08-29 11:35:12 +00:00
committed by Armin Kuster
parent 32e47b26e9
commit a01d5db9c3
3 changed files with 2 additions and 2 deletions
@@ -0,0 +1,77 @@
#!/usr/bin/env node
/// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name>
/// <type> ... meta - metainformation about package
/// tgz - tarball
const process = require("node:process");
module.paths.unshift("@@libdir@@/node_modules/npm/node_modules");
const cacache = require('cacache')
const fs = require('fs')
// argv[0] is 'node', argv[1] is this script
const cache_dir = process.argv[2]
const type = process.argv[3]
const key = process.argv[4]
const file = process.argv[5]
const data = fs.readFileSync(file)
// metadata content is highly nodejs dependent; when cache entries are not
// found, place debug statements in 'make-fetch-happen/lib/cache/policy.js'
// (CachePolicy::satisfies())
const xlate = {
'meta': {
'key_prefix': 'make-fetch-happen:request-cache:',
'metadata': function() {
return {
time: Date.now(),
url: key,
reqHeaders: {
'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
},
resHeaders: {
"content-type": "application/json",
"status": 200,
},
options: {
compress: true,
}
};
},
},
'tgz': {
'key_prefix': 'make-fetch-happen:request-cache:',
'metadata': function() {
return {
time: Date.now(),
url: key,
reqHeaders: {
'accept': '*/*',
},
resHeaders: {
"content-type": "application/octet-stream",
"status": 200,
},
options: {
compress: true,
},
};
},
},
};
const info = xlate[type];
let opts = {}
if (info.metadata) {
opts['metadata'] = info.metadata();
}
cacache.put(cache_dir, info.key_prefix + key, data, opts)
.then(integrity => {
console.log(`Saved content of ${key} (${file}).`);
})