File: 2013_system_shared_node_modules.patch

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 121,860 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,366; asm: 2,415; lisp: 1,869
file content (40 lines) | stat: -rw-r--r-- 1,623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: use system shared NodeJS modules
 Also, use native wasm2c.
 See also <https://github.com/emscripten-core/emscripten/issues/12688>
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2021-11-19
---
 test/test_sockets.py | 4 ----
 tools/shared.py      | 6 +++---
 2 files changed, 3 insertions(+), 7 deletions(-)

--- a/test/test_sockets.py
+++ b/test/test_sockets.py
@@ -163,10 +163,6 @@
     print('Running the socket tests. Make sure the browser allows popups from localhost.')
     print()
 
-    # Use emscripten root for node module lookup.  This is needed because the unit tests each
-    # run with CWD set to a temporary directory outside the emscripten tree.
-    print('Setting NODE_PATH=' + path_from_root('node_modules'))
-    os.environ['NODE_PATH'] = path_from_root('node_modules')
 
   # Note: in the WebsockifyServerHarness and CompiledServerHarness tests below, explicitly use
   # consecutive server listen ports, because server teardown might not occur deterministically
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -264,11 +264,11 @@
 
 def get_npm_cmd(name):
   if WINDOWS:
-    cmd = [path_from_root('node_modules/.bin', name + '.cmd')]
+    cmd = name + '.cmd'
   else:
-    cmd = config.NODE_JS + [path_from_root('node_modules/.bin', name)]
+    cmd = name
   if not os.path.exists(cmd[-1]):
-    exit_with_error(f'{name} was not found! Please run "npm install" in Emscripten root directory to set up npm dependencies')
+    exit_with_error(f'{name} was not found! Please report this as a bug against emscripten - more info at https://www.debian.org/Bugs/Reporting')
   return cmd