visaljs 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +6 -3
  2. package/THIRD_PARTY_LICENSES +1 -1
  3. package/cli.js +2782 -770
  4. package/node/include/js_node.h +1 -0
  5. package/node/prelude/_http_agent.js +5 -0
  6. package/node/prelude/_http_server.js +7 -0
  7. package/node/prelude/dns.js +7 -1
  8. package/node/prelude/events.js +7 -3
  9. package/node/prelude/http.js +693 -285
  10. package/node/prelude/https.js +14 -3
  11. package/node/prelude/internal/events_extras.js +2 -5
  12. package/node/prelude/internal/features.js +17 -0
  13. package/node/prelude/internal/http_agent.js +88 -2
  14. package/node/prelude/internal/http_chars.ts +22 -0
  15. package/node/prelude/internal/http_symbols.js +3 -0
  16. package/node/prelude/internal/net_bound.js +123 -0
  17. package/node/prelude/internal/net_onread.js +73 -0
  18. package/node/prelude/internal/net_tos.js +54 -0
  19. package/node/prelude/internal/perf_observe.js +7 -1
  20. package/node/prelude/internal/tls/wrap.js +2 -1
  21. package/node/prelude/module.js +42 -18
  22. package/node/prelude/net.js +212 -61
  23. package/node/prelude/perf_hooks.js +4 -0
  24. package/node/src/host_http.c +151 -21
  25. package/node/src/host_net.c +75 -9
  26. package/node/src/host_sys.c +9 -0
  27. package/package.json +1 -1
  28. package/prebuilt/win32-x64/boringssl-ce573858472b7fc9.a +0 -0
  29. package/prebuilt/win32-x64/brotli-20d86a61f30baeb3.a +0 -0
  30. package/prebuilt/win32-x64/uv-b11bae65d7fced82.a +0 -0
  31. package/prebuilt/win32-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
  32. package/prebuilt/win32-x64/zstd-015315ac7c784c73.a +0 -0
  33. package/runtime/include/js_atoms.h +4 -0
  34. package/runtime/include/js_buffer.h +185 -0
  35. package/runtime/include/js_builtins.h +53 -0
  36. package/runtime/include/js_exception.h +3 -0
  37. package/runtime/include/js_function.h +1 -1
  38. package/runtime/include/js_object.h +21 -3
  39. package/runtime/include/js_ops.h +27 -0
  40. package/runtime/include/js_runtime.h +1 -0
  41. package/runtime/include/js_web.h +3 -3
  42. package/runtime/include/jscontext.h +15 -0
  43. package/runtime/src/atoms.c +37 -3
  44. package/runtime/src/builtins.c +17 -4
  45. package/runtime/src/events.c +19 -0
  46. package/runtime/src/function.c +37 -10
  47. package/runtime/src/gc.c +7 -5
  48. package/runtime/src/internal.h +4 -4
  49. package/runtime/src/iterator.c +5 -1
  50. package/runtime/src/object.c +42 -6
  51. package/runtime/src/regexp.c +569 -12
  52. package/runtime/src/shape.c +68 -1
  53. package/runtime/src/typedarray.c +23 -0
  54. package/runtime/src/weak.c +95 -24
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # visaljs
2
2
 
3
- An ahead-of-time JavaScript to C compiler: `visaljs build` turns a JavaScript program (ES modules,
4
- CommonJS, `node_modules`) into a native binary.
3
+ An ahead-of-time JavaScript to C compiler: `visaljs build` turns a JavaScript or TypeScript program
4
+ (ES modules, CommonJS, `node_modules`) into a native binary.
5
5
 
6
6
  ```sh
7
7
  npm install -g visaljs
@@ -63,7 +63,7 @@ takes a minute. `VISALJS_PREBUILT=0` builds them anyway.
63
63
  ```
64
64
 
65
65
  ```
66
- usage: visaljs build [entry.js | project directory] [options]
66
+ usage: visaljs build [entry.js | entry.ts | project directory] [options]
67
67
  visaljs licenses print the licenses to ship with a binary you distribute
68
68
 
69
69
  A project (the current directory when none is given) builds its framework's production server: a
@@ -71,6 +71,9 @@ vinext app is built with its own `vite build` first, then its server is compiled
71
71
  project builds the file its package.json starts: its one "bin" command, the file "scripts.start"
72
72
  runs with node, or "main"; else index.js. The binary is named after the command or the project.
73
73
 
74
+ TypeScript (.ts, .mts, .cts, .tsx) is compiled too: its types are stripped, not checked (run tsc
75
+ for that), with the nearest tsconfig.json's settings (paths, decorators).
76
+
74
77
  options:
75
78
  -o <file> output binary
76
79
  --emit-c <dir> stop after C emission
@@ -1,4 +1,4 @@
1
- A program built by visaljs 0.0.8 holds visaljs's runtime and, of the third-party code
1
+ A program built by visaljs 0.0.10 holds visaljs's runtime and, of the third-party code
2
2
  below, the parts the program uses. Their licenses require these notices to go with copies of the
3
3
  code: ship this text with a binary you distribute, in its documentation or a file beside it.
4
4