nodejs18/npm_search_paths.patch
Adam Majer b6349c1613 - Update to NodeJS 18.14.2 LTS:
* deps: upgrade npm to 9.5.0
  * deps: update undici to 5.20.0
- Changes in version 18.14.1:
  * fixes permissions policies can be bypassed via process.mainModule
    (bsc#1208481, CVE-2023-23918)
  * fixes insecure loading of ICU data through ICU_DATA environment
    variable (bsc#1208487, CVE-2023-23920)
  * fixes OpenSSL error handling issues in nodejs crypto library
    (bsc#1208483, CVE-2023-23919)
  * updates undici to v5.19.1
    + Fetch API in Node.js did not protect against CRLF injection in host headers
    + Regular Expression Denial of Service in Headers in Node.js fetch API
    (bsc#1208413, bsc#1208485, CVE-2023-24807, CVE-2023-23936)

- Update to NodeJS 18.14.0 LTS:
  * deps:
    + update npm to 9.2.0
  * http:
    + join authorization headers
    + improved timeout defaults handling
  * stream:
    + implement finished() for ReadableStream and WritableStream
- refreshed patches: linker_lto_jobs.patch, npm_search_paths.patch,
  versioned.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs18?expand=0&rev=47
2023-02-22 14:23:30 +00:00

33 lines
1.1 KiB
Diff

Index: node-v19.5.0/deps/npm/lib/commands/help-search.js
===================================================================
--- node-v19.5.0.orig/deps/npm/lib/commands/help-search.js
+++ node-v19.5.0/deps/npm/lib/commands/help-search.js
@@ -19,7 +19,7 @@ class HelpSearch extends BaseCommand {
throw this.usageError()
}
- const docPath = path.resolve(this.npm.npmRoot, 'docs/content')
+ const docPath = '/usr/share/doc/packages/nodejs'
const files = await glob(`${globify(docPath)}/*/*.md`)
const data = await this.readFiles(files)
const results = await this.searchFiles(args, data, files)
Index: node-v19.5.0/deps/npm/lib/npm.js
===================================================================
--- node-v19.5.0.orig/deps/npm/lib/npm.js
+++ node-v19.5.0/deps/npm/lib/npm.js
@@ -381,7 +381,13 @@ class Npm extends EventEmitter {
}
get globalPrefix () {
- return this.config.globalPrefix
+ let prefix = this.config.globalPrefix
+
+ // don't poop all over distro territory - use /usr/local instead
+ if (prefix === '/usr')
+ return '/usr/local'
+
+ return prefix;
}
set globalPrefix (r) {