typenative 0.1.3 → 0.2.0
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.
- package/.gitattributes +1 -0
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/npm-publish-github-packages.yml +1 -1
- package/CHANGELOG.md +247 -0
- package/CONTRIBUTION.md +1 -1
- package/README.md +4 -4
- package/bin/cli.js +3 -1
- package/bin/go/bridge.js +919 -0
- package/bin/go/convert.js +238 -0
- package/bin/go/metadata.js +211 -0
- package/bin/go/overrides.js +68 -0
- package/bin/go/stdlib.generated.js +175 -0
- package/bin/index.js +294 -240
- package/bin/main.js +4 -1
- package/bin/node/assert.js +344 -0
- package/bin/node/async_hooks.js +273 -0
- package/bin/node/buffer.js +765 -0
- package/bin/node/child_process.js +600 -0
- package/bin/node/cluster.js +1002 -0
- package/bin/node/console.js +121 -0
- package/bin/node/core.js +111 -0
- package/bin/node/crypto.js +414 -0
- package/bin/node/crypto_keys.js +2685 -0
- package/bin/node/dgram.js +388 -0
- package/bin/node/diagnostics_channel.js +534 -0
- package/bin/node/dns.js +635 -0
- package/bin/node/events.js +743 -0
- package/bin/node/fetch.js +737 -0
- package/bin/node/fs.js +998 -0
- package/bin/node/http.js +1500 -0
- package/bin/node/http2.js +688 -0
- package/bin/node/net.js +1143 -0
- package/bin/node/os.js +257 -0
- package/bin/node/path.js +758 -0
- package/bin/node/process.js +316 -0
- package/bin/node/punycode.js +195 -0
- package/bin/node/querystring.js +143 -0
- package/bin/node/readline.js +299 -0
- package/bin/node/registry.js +161 -0
- package/bin/node/sqlite.js +1142 -0
- package/bin/node/stream.js +1221 -0
- package/bin/node/stream_web.js +2259 -0
- package/bin/node/string_decoder.js +101 -0
- package/bin/node/system_extra.js +661 -0
- package/bin/node/test.js +1068 -0
- package/bin/node/timers.js +250 -0
- package/bin/node/tls.js +719 -0
- package/bin/node/url.js +861 -0
- package/bin/node/util.js +1311 -0
- package/bin/node/util_extra.js +599 -0
- package/bin/node/worker_threads.js +745 -0
- package/bin/node/zlib.js +263 -0
- package/bin/transpiler.js +2650 -575
- package/bin/version.js +2 -0
- package/conformance.md +707 -241
- package/govendor/github.com/ncruces/go-sqlite3/LICENSE +21 -0
- package/govendor/github.com/ncruces/go-sqlite3/README.md +121 -0
- package/govendor/github.com/ncruces/go-sqlite3/backup.go +132 -0
- package/govendor/github.com/ncruces/go-sqlite3/blob.go +266 -0
- package/govendor/github.com/ncruces/go-sqlite3/config.go +397 -0
- package/govendor/github.com/ncruces/go-sqlite3/conn.go +540 -0
- package/govendor/github.com/ncruces/go-sqlite3/conn_127.go +93 -0
- package/govendor/github.com/ncruces/go-sqlite3/const.go +436 -0
- package/govendor/github.com/ncruces/go-sqlite3/context.go +222 -0
- package/govendor/github.com/ncruces/go-sqlite3/error.go +182 -0
- package/govendor/github.com/ncruces/go-sqlite3/ext.go +153 -0
- package/govendor/github.com/ncruces/go-sqlite3/func.go +309 -0
- package/govendor/github.com/ncruces/go-sqlite3/go.mod +3 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk.go +29 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_other.go +13 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_unix.go +57 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/errutil/error.go +41 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/alloc.go +128 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/const.go +122 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/error.go +77 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem.go +116 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_other.go +34 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_unix.go +87 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_windows.go +149 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mmap_unix.go +80 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mmap_windows.go +129 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/sys_windows.go +60 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap.go +82 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap_sys.go +113 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap_vfs.go +181 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/testenv/env.go +55 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/json.go +54 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/json_v2.go +54 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/math.go +29 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/page.go +5 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/parse.go +142 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go +3 -0
- package/govendor/github.com/ncruces/go-sqlite3/internal/util/reflect.go +10 -0
- package/govendor/github.com/ncruces/go-sqlite3/json.go +100 -0
- package/govendor/github.com/ncruces/go-sqlite3/json_v2.go +116 -0
- package/govendor/github.com/ncruces/go-sqlite3/pointer.go +13 -0
- package/govendor/github.com/ncruces/go-sqlite3/quote.go +140 -0
- package/govendor/github.com/ncruces/go-sqlite3/stmt.go +692 -0
- package/govendor/github.com/ncruces/go-sqlite3/time.go +360 -0
- package/govendor/github.com/ncruces/go-sqlite3/txn.go +374 -0
- package/govendor/github.com/ncruces/go-sqlite3/value.go +212 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/README.md +133 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/api.go +239 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/cksm.go +143 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/const.go +256 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/file.go +260 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/filename.go +187 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/lock.go +128 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/lock_other.go +23 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/map.go +63 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/map_other.go +13 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_bsd.go +110 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_darwin.go +131 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_dotlk.go +140 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_f2fs_linux.go +56 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go +117 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_ofd.go +59 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std.go +50 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_alloc.go +19 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_atomic.go +9 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_rw.go +13 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_sync.go +9 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_temp.go +16 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go +108 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go +180 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/registry.go +48 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm.go +26 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_bsd.go +258 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_copy.go +90 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_dotlk.go +168 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_memlk.go +52 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_ofd.go +185 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_other.go +21 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_windows.go +124 -0
- package/govendor/github.com/ncruces/go-sqlite3/vfs/vfs.go +455 -0
- package/govendor/github.com/ncruces/go-sqlite3/vtab.go +677 -0
- package/govendor/github.com/ncruces/go-sqlite3/wrap.go +48 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/LICENSE +18 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/README.md +11 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/go.mod +3 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/libc.go +215 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/sqlite3.dat +0 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/sqlite3.go +157903 -0
- package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/tools.sh +38 -0
- package/govendor/github.com/ncruces/julianday/LICENSE +21 -0
- package/govendor/github.com/ncruces/julianday/README.md +9 -0
- package/govendor/github.com/ncruces/julianday/go.mod +3 -0
- package/govendor/github.com/ncruces/julianday/julianday.go +124 -0
- package/govendor/golang.org/x/sys/LICENSE +27 -0
- package/govendor/golang.org/x/sys/PATENTS +22 -0
- package/govendor/golang.org/x/sys/go.mod +3 -0
- package/govendor/golang.org/x/sys/unix/README.md +184 -0
- package/govendor/golang.org/x/sys/unix/affinity_linux.go +189 -0
- package/govendor/golang.org/x/sys/unix/aliases.go +13 -0
- package/govendor/golang.org/x/sys/unix/asm_aix_ppc64.s +17 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_386.s +27 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_amd64.s +27 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_arm.s +27 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_arm64.s +27 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_ppc64.s +29 -0
- package/govendor/golang.org/x/sys/unix/asm_bsd_riscv64.s +27 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_386.s +65 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_amd64.s +57 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_arm.s +56 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_arm64.s +50 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_loong64.s +51 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_mips64x.s +54 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_mipsx.s +52 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_ppc64x.s +42 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_riscv64.s +47 -0
- package/govendor/golang.org/x/sys/unix/asm_linux_s390x.s +54 -0
- package/govendor/golang.org/x/sys/unix/asm_openbsd_mips64.s +29 -0
- package/govendor/golang.org/x/sys/unix/asm_solaris_amd64.s +17 -0
- package/govendor/golang.org/x/sys/unix/asm_zos_s390x.s +382 -0
- package/govendor/golang.org/x/sys/unix/auxv.go +36 -0
- package/govendor/golang.org/x/sys/unix/auxv_unsupported.go +13 -0
- package/govendor/golang.org/x/sys/unix/bluetooth_linux.go +36 -0
- package/govendor/golang.org/x/sys/unix/bpxsvc_zos.go +657 -0
- package/govendor/golang.org/x/sys/unix/bpxsvc_zos.s +192 -0
- package/govendor/golang.org/x/sys/unix/cap_freebsd.go +195 -0
- package/govendor/golang.org/x/sys/unix/constants.go +13 -0
- package/govendor/golang.org/x/sys/unix/dev_aix_ppc.go +26 -0
- package/govendor/golang.org/x/sys/unix/dev_aix_ppc64.go +28 -0
- package/govendor/golang.org/x/sys/unix/dev_darwin.go +24 -0
- package/govendor/golang.org/x/sys/unix/dev_dragonfly.go +30 -0
- package/govendor/golang.org/x/sys/unix/dev_freebsd.go +30 -0
- package/govendor/golang.org/x/sys/unix/dev_linux.go +42 -0
- package/govendor/golang.org/x/sys/unix/dev_netbsd.go +29 -0
- package/govendor/golang.org/x/sys/unix/dev_openbsd.go +29 -0
- package/govendor/golang.org/x/sys/unix/dev_zos.go +28 -0
- package/govendor/golang.org/x/sys/unix/dirent.go +102 -0
- package/govendor/golang.org/x/sys/unix/endian_big.go +9 -0
- package/govendor/golang.org/x/sys/unix/endian_little.go +9 -0
- package/govendor/golang.org/x/sys/unix/env_unix.go +31 -0
- package/govendor/golang.org/x/sys/unix/fcntl.go +36 -0
- package/govendor/golang.org/x/sys/unix/fcntl_darwin.go +24 -0
- package/govendor/golang.org/x/sys/unix/fcntl_linux_32bit.go +13 -0
- package/govendor/golang.org/x/sys/unix/fdset.go +27 -0
- package/govendor/golang.org/x/sys/unix/gccgo.go +59 -0
- package/govendor/golang.org/x/sys/unix/gccgo_c.c +44 -0
- package/govendor/golang.org/x/sys/unix/gccgo_linux_amd64.go +20 -0
- package/govendor/golang.org/x/sys/unix/ifreq_linux.go +145 -0
- package/govendor/golang.org/x/sys/unix/ioctl_linux.go +341 -0
- package/govendor/golang.org/x/sys/unix/ioctl_signed.go +74 -0
- package/govendor/golang.org/x/sys/unix/ioctl_unsigned.go +74 -0
- package/govendor/golang.org/x/sys/unix/ioctl_zos.go +71 -0
- package/govendor/golang.org/x/sys/unix/mkall.sh +250 -0
- package/govendor/golang.org/x/sys/unix/mkerrors.sh +807 -0
- package/govendor/golang.org/x/sys/unix/mmap_nomremap.go +13 -0
- package/govendor/golang.org/x/sys/unix/mremap.go +57 -0
- package/govendor/golang.org/x/sys/unix/pagesize_unix.go +15 -0
- package/govendor/golang.org/x/sys/unix/pledge_openbsd.go +111 -0
- package/govendor/golang.org/x/sys/unix/ptrace_darwin.go +11 -0
- package/govendor/golang.org/x/sys/unix/ptrace_ios.go +11 -0
- package/govendor/golang.org/x/sys/unix/race.go +30 -0
- package/govendor/golang.org/x/sys/unix/race0.go +25 -0
- package/govendor/golang.org/x/sys/unix/readdirent_getdents.go +12 -0
- package/govendor/golang.org/x/sys/unix/readdirent_getdirentries.go +19 -0
- package/govendor/golang.org/x/sys/unix/readv_unix.go +103 -0
- package/govendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go +16 -0
- package/govendor/golang.org/x/sys/unix/sockcmsg_linux.go +85 -0
- package/govendor/golang.org/x/sys/unix/sockcmsg_unix.go +106 -0
- package/govendor/golang.org/x/sys/unix/sockcmsg_unix_other.go +46 -0
- package/govendor/golang.org/x/sys/unix/sockcmsg_zos.go +58 -0
- package/govendor/golang.org/x/sys/unix/symaddr_zos_s390x.s +75 -0
- package/govendor/golang.org/x/sys/unix/syscall.go +86 -0
- package/govendor/golang.org/x/sys/unix/syscall_aix.go +582 -0
- package/govendor/golang.org/x/sys/unix/syscall_aix_ppc.go +52 -0
- package/govendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +83 -0
- package/govendor/golang.org/x/sys/unix/syscall_bsd.go +609 -0
- package/govendor/golang.org/x/sys/unix/syscall_darwin.go +711 -0
- package/govendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +50 -0
- package/govendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +50 -0
- package/govendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +26 -0
- package/govendor/golang.org/x/sys/unix/syscall_dragonfly.go +359 -0
- package/govendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +56 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd.go +455 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd_386.go +64 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +64 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +60 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go +60 -0
- package/govendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go +60 -0
- package/govendor/golang.org/x/sys/unix/syscall_hurd.go +30 -0
- package/govendor/golang.org/x/sys/unix/syscall_hurd_386.go +28 -0
- package/govendor/golang.org/x/sys/unix/syscall_illumos.go +78 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux.go +2574 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_386.go +313 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_alarm.go +12 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_amd64.go +144 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go +12 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_arm.go +218 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_arm64.go +188 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_gc.go +14 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_gc_386.go +16 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go +13 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go +30 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go +20 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_loong64.go +220 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +187 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +173 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_ppc.go +203 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +114 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +193 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_s390x.go +295 -0
- package/govendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +111 -0
- package/govendor/golang.org/x/sys/unix/syscall_netbsd.go +388 -0
- package/govendor/golang.org/x/sys/unix/syscall_netbsd_386.go +37 -0
- package/govendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +37 -0
- package/govendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +37 -0
- package/govendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go +37 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd.go +346 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_386.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_arm.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_libc.go +26 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go +39 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go +41 -0
- package/govendor/golang.org/x/sys/unix/syscall_solaris.go +1183 -0
- package/govendor/golang.org/x/sys/unix/syscall_solaris_amd64.go +27 -0
- package/govendor/golang.org/x/sys/unix/syscall_unix.go +619 -0
- package/govendor/golang.org/x/sys/unix/syscall_unix_gc.go +14 -0
- package/govendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go +22 -0
- package/govendor/golang.org/x/sys/unix/syscall_zos_s390x.go +3213 -0
- package/govendor/golang.org/x/sys/unix/sysvshm_linux.go +20 -0
- package/govendor/golang.org/x/sys/unix/sysvshm_unix.go +51 -0
- package/govendor/golang.org/x/sys/unix/sysvshm_unix_other.go +13 -0
- package/govendor/golang.org/x/sys/unix/timestruct.go +76 -0
- package/govendor/golang.org/x/sys/unix/unveil_openbsd.go +51 -0
- package/govendor/golang.org/x/sys/unix/vgetrandom_linux.go +13 -0
- package/govendor/golang.org/x/sys/unix/vgetrandom_unsupported.go +11 -0
- package/govendor/golang.org/x/sys/unix/xattr_bsd.go +280 -0
- package/govendor/golang.org/x/sys/unix/zerrors_aix_ppc.go +1384 -0
- package/govendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go +1385 -0
- package/govendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +1922 -0
- package/govendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +1922 -0
- package/govendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +1737 -0
- package/govendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +2042 -0
- package/govendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +2039 -0
- package/govendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +2033 -0
- package/govendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go +2033 -0
- package/govendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go +2147 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux.go +4209 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_386.go +882 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +882 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_arm.go +887 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +884 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +874 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_mips.go +888 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +888 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +888 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +888 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +940 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +944 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +944 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +884 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +943 -0
- package/govendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +992 -0
- package/govendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +1779 -0
- package/govendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +1769 -0
- package/govendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +1758 -0
- package/govendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go +1769 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +1905 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +1905 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +1905 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +1905 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +1905 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go +1904 -0
- package/govendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go +1903 -0
- package/govendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +1556 -0
- package/govendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +990 -0
- package/govendor/golang.org/x/sys/unix/zptrace_armnn_linux.go +40 -0
- package/govendor/golang.org/x/sys/unix/zptrace_linux_arm64.go +17 -0
- package/govendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go +49 -0
- package/govendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go +49 -0
- package/govendor/golang.org/x/sys/unix/zptrace_x86_linux.go +79 -0
- package/govendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s +364 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +1461 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +1420 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +1188 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +1069 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +2728 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +799 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +2728 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +799 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +1666 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +1886 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +1886 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +1886 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +1886 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +1886 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go +101 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux.go +2267 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_386.go +469 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +636 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +584 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +535 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go +469 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +636 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +630 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +619 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +636 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +641 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +687 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +687 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +531 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +478 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +631 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +1848 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +1848 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +1848 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +1848 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +862 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +2407 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +719 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +2217 -0
- package/govendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +3458 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go +280 -0
- package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go +281 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go +439 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +437 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go +316 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go +393 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go +393 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go +393 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go +393 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go +393 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_386.go +470 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +394 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +434 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +337 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +334 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +454 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +384 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +384 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +454 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +461 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +433 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +433 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +338 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +399 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +413 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go +274 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go +274 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go +274 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go +274 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go +219 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go +219 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go +219 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go +218 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +221 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go +217 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go +218 -0
- package/govendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +2852 -0
- package/govendor/golang.org/x/sys/unix/ztypes_aix_ppc.go +353 -0
- package/govendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go +357 -0
- package/govendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +878 -0
- package/govendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +878 -0
- package/govendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +473 -0
- package/govendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +651 -0
- package/govendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +656 -0
- package/govendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +642 -0
- package/govendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +636 -0
- package/govendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +638 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux.go +6547 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_386.go +747 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +761 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_arm.go +741 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +740 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +741 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_mips.go +746 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +743 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +743 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +746 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +754 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +749 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +749 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +828 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +763 -0
- package/govendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +744 -0
- package/govendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +585 -0
- package/govendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +593 -0
- package/govendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +590 -0
- package/govendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +593 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +568 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +568 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +575 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +568 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +568 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go +570 -0
- package/govendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go +570 -0
- package/govendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +516 -0
- package/govendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +552 -0
- package/govendor/golang.org/x/sys/windows/aliases.go +13 -0
- package/govendor/golang.org/x/sys/windows/dll_windows.go +380 -0
- package/govendor/golang.org/x/sys/windows/env_windows.go +57 -0
- package/govendor/golang.org/x/sys/windows/eventlog.go +20 -0
- package/govendor/golang.org/x/sys/windows/exec_windows.go +248 -0
- package/govendor/golang.org/x/sys/windows/memory_windows.go +48 -0
- package/govendor/golang.org/x/sys/windows/mkerrors.bash +70 -0
- package/govendor/golang.org/x/sys/windows/mkknownfolderids.bash +27 -0
- package/govendor/golang.org/x/sys/windows/mksyscall.go +9 -0
- package/govendor/golang.org/x/sys/windows/race.go +30 -0
- package/govendor/golang.org/x/sys/windows/race0.go +25 -0
- package/govendor/golang.org/x/sys/windows/security_windows.go +1537 -0
- package/govendor/golang.org/x/sys/windows/service.go +257 -0
- package/govendor/golang.org/x/sys/windows/setupapi_windows.go +1425 -0
- package/govendor/golang.org/x/sys/windows/str.go +22 -0
- package/govendor/golang.org/x/sys/windows/syscall.go +104 -0
- package/govendor/golang.org/x/sys/windows/syscall_windows.go +1952 -0
- package/govendor/golang.org/x/sys/windows/types_windows.go +4058 -0
- package/govendor/golang.org/x/sys/windows/types_windows_386.go +35 -0
- package/govendor/golang.org/x/sys/windows/types_windows_amd64.go +34 -0
- package/govendor/golang.org/x/sys/windows/types_windows_arm.go +35 -0
- package/govendor/golang.org/x/sys/windows/types_windows_arm64.go +34 -0
- package/govendor/golang.org/x/sys/windows/zerrors_windows.go +9468 -0
- package/govendor/golang.org/x/sys/windows/zknownfolderids_windows.go +149 -0
- package/govendor/golang.org/x/sys/windows/zsyscall_windows.go +4828 -0
- package/govendor/manifest.txt +7 -0
- package/package.json +6 -1
- package/types/typenative-go.d.ts +15159 -5
- package/types/typenative-npm.d.ts +2637 -34
- package/types/typenative.d.ts +651 -8
package/conformance.md
CHANGED
|
@@ -28,7 +28,7 @@ self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
|
28
28
|
| --------------------------------------- | :----: | -------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
29
29
|
| Variable declarations (`let` / `const`) | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
|
|
30
30
|
| Array destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
|
|
31
|
-
| Object destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads
|
|
31
|
+
| Object destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads; the initializer is evaluated once ([lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts)) |
|
|
32
32
|
| Destructuring with defaults | ✅ | [syntax-destructuring-defaults.ts](conformance/syntax-destructuring-defaults.ts) | Missing elements/properties take defaults (nil- and bounds-checked) |
|
|
33
33
|
| Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
|
|
34
34
|
| Object shorthand | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
|
|
@@ -36,7 +36,7 @@ self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
|
36
36
|
| Array spread | ✅ | [syntax-array-spread.ts](conformance/syntax-array-spread.ts) | `[...arr]`, `fn(...args)` |
|
|
37
37
|
| `delete` operator | ✅ | [syntax-delete.ts](conformance/syntax-delete.ts) | `delete o.key` on records |
|
|
38
38
|
| Computed keys | ✅ | [syntax-computed-keys.ts](conformance/syntax-computed-keys.ts) | Computed keys become map entries; `o.name` reads lower to `.Get("name")` |
|
|
39
|
-
| Records / dictionaries | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `Record<K, V>` and objects indexed by key → Go maps
|
|
39
|
+
| Records / dictionaries | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `Record<K, V>` and objects indexed by key → Go maps; so are literals with keys that aren't identifiers (`{ 'Content-Type': … }`, [lib-node-http-server.ts](conformance/lib-node-http-server.ts)) |
|
|
40
40
|
| Tuples | ✅ | [syntax-tuples.ts](conformance/syntax-tuples.ts) | `[string, number]` fixed-length arrays |
|
|
41
41
|
| Top-level / module-scope variables | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Functions see main-file top-level variables |
|
|
42
42
|
| Numeric separators | ✅ | [syntax-numeric-separators.ts](conformance/syntax-numeric-separators.ts) | `1_000_000` |
|
|
@@ -90,6 +90,7 @@ self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
|
90
90
|
| Optional catch binding (`catch {}`) | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | |
|
|
91
91
|
| Custom error classes | ✅ | [syntax-custom-errors.ts](conformance/syntax-custom-errors.ts) | `extends Error` → embedded `TnError`; constructors take the message |
|
|
92
92
|
| `Error.message` | ✅ | [syntax-error-message.ts](conformance/syntax-error-message.ts) | `throw new Error` panics with a `*TnError`; `.message` on caught values |
|
|
93
|
+
| `Error` `cause` (`new Error(message, { cause })`, `err.cause`) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | Built-in error classes too |
|
|
93
94
|
| Narrowing | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `T \| undefined` narrowed after `if (x)`, `x !== undefined`, early returns |
|
|
94
95
|
|
|
95
96
|
## Functions
|
|
@@ -202,7 +203,7 @@ self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
|
202
203
|
| Namespace imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import * as x from 'pkg'` |
|
|
203
204
|
| Local file imports | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Relative paths transpiled to a separate Go file (helper: [import-local-helper.ts](conformance/import-local-helper.ts)) |
|
|
204
205
|
| Default export | ✅ | [syntax-default-export.ts](conformance/syntax-default-export.ts) | `export default function` |
|
|
205
|
-
| Node.js built-in imports | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | `
|
|
206
|
+
| Node.js built-in imports | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | `node:x` or bare (`'fs'`), named / default / namespace imports, subpaths (`fs/promises`) (see [Node builtins](#node-builtins-node)) |
|
|
206
207
|
| Go package imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from 'go:pkg'` |
|
|
207
208
|
| npm package imports | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | `import { x } from 'pkg'` mapped to Go module imports |
|
|
208
209
|
| Re-exports (`export { x } from`, `export *`) | ✅ | [syntax-re-exports.ts](conformance/syntax-re-exports.ts) | Re-exported files are included (one Go package) |
|
|
@@ -214,16 +215,17 @@ self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
|
214
215
|
|
|
215
216
|
| Feature | Status | Probe | Notes |
|
|
216
217
|
| ---------------------------------------------------- | :----: | ------------------------------------------------------------ | -------------------------------------- |
|
|
217
|
-
| `async` / `await` | ✅ | [syntax-async-await.ts](conformance/syntax-async-await.ts) |
|
|
218
|
-
| `
|
|
218
|
+
| `async` / `await` | ✅ | [syntax-async-await.ts](conformance/syntax-async-await.ts) | The body runs synchronously until its first `await`; `await` runs pending event-loop tasks while it waits; the loop drains before exit |
|
|
219
|
+
| Async arrow callbacks (`emitter.on('x', async () => { await … })`, `test('t', async () => …)`) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Run to completion when called (their awaits keep the event loop running), so the caller sees them finish before it continues |
|
|
220
|
+
| `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | The executor runs synchronously; promises are buffered channels; `.then` callbacks run on the event loop |
|
|
219
221
|
| `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | `TnPromiseAll` drains every promise channel into a slice |
|
|
220
222
|
| `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
|
|
221
223
|
| `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
|
|
222
224
|
| `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
|
|
223
225
|
| `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
|
|
224
|
-
| `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker
|
|
225
|
-
| `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or
|
|
226
|
-
| `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | `time.AfterFunc`
|
|
226
|
+
| `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker` posting to the event loop; the process lives until cleared |
|
|
227
|
+
| `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or of an event-loop task) |
|
|
228
|
+
| `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | `time.AfterFunc` posting the callback to the event loop, which keeps the process alive |
|
|
227
229
|
|
|
228
230
|
## Semantics (JS behaviour preserved)
|
|
229
231
|
|
|
@@ -254,10 +256,12 @@ Every standard-library API TypeNative ports, split by module. Per
|
|
|
254
256
|
|
|
255
257
|
| API | Status | Probe | Notes |
|
|
256
258
|
| ---------------------------------- | :----: | ------------------------------------------------------ | ------------------------------------------------------ |
|
|
257
|
-
| `console.log` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) |
|
|
259
|
+
| `console.log` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | `fmt.Println`; non-string arguments print like Node (`util.inspect`), format strings like `util.format` |
|
|
258
260
|
| `console.error` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | `fmt.Fprintln(os.Stderr, ...)` |
|
|
259
261
|
| `console.warn` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | Mapped to stderr like `console.error` |
|
|
260
|
-
| `console.time` / `console.timeEnd` | ✅ | [lib-console-time.ts](conformance/lib-console-time.ts) |
|
|
262
|
+
| `console.time` / `console.timeEnd` / `console.timeLog` | ✅ | [lib-console-time.ts](conformance/lib-console-time.ts) | Node's format: `label: 1.234ms` |
|
|
263
|
+
| `console.info` / `debug` / `dir` / `count` / `countReset` / `group` / `groupEnd` / `assert` / `trace` | ✅ | [lib-console-more.ts](conformance/lib-console-more.ts) | `group` indents every later console line; `assert` prints `Assertion failed` |
|
|
264
|
+
| `console.table` (arrays, objects, `Map`, `Set`, a `properties` filter) | ✅ | [lib-node-console-table.ts](conformance/lib-node-console-table.ts) | Node's box-drawn layout (left-aligned cells); other values are logged as is |
|
|
261
265
|
|
|
262
266
|
### `Math`
|
|
263
267
|
|
|
@@ -278,7 +282,7 @@ Every standard-library API TypeNative ports, split by module. Per
|
|
|
278
282
|
|
|
279
283
|
| API | Status | Probe | Notes |
|
|
280
284
|
| ---------------- | :----: | ---------------------------------------------------------- | ------------------------------------- |
|
|
281
|
-
| `JSON.parse` | ✅ | [lib-json-parse.ts](conformance/lib-json-parse.ts) | Mapped to `encoding/json` `Unmarshal
|
|
285
|
+
| `JSON.parse` | ✅ | [lib-json-parse.ts](conformance/lib-json-parse.ts) | Mapped to `encoding/json` `Unmarshal`; assigned to an interface type, the result converts into its struct |
|
|
282
286
|
| `JSON.stringify` | ✅ | [lib-json-stringify.ts](conformance/lib-json-stringify.ts) | Reflection serializer includes unexported struct fields |
|
|
283
287
|
|
|
284
288
|
### `Object`
|
|
@@ -300,7 +304,7 @@ Every standard-library API TypeNative ports, split by module. Per
|
|
|
300
304
|
| `toUpperCase` / `toLowerCase` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
|
|
301
305
|
| `trim` / `trimStart` / `trimEnd` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
|
|
302
306
|
| `split` / `join` | ✅ | [lib-string-split-join.ts](conformance/lib-string-split-join.ts) | Via `strings` package |
|
|
303
|
-
| `includes` / `startsWith` / `endsWith` / `indexOf` | ✅ | [lib-string-search.ts](conformance/lib-string-search.ts) | Via `strings` package |
|
|
307
|
+
| `includes` / `startsWith` / `endsWith` / `indexOf` (with `fromIndex`) | ✅ | [lib-string-search.ts](conformance/lib-string-search.ts) | Via `strings` package |
|
|
304
308
|
| `replace` / `replaceAll` (string pattern) | ✅ | [lib-string-replace.ts](conformance/lib-string-replace.ts) | Via `strings` package |
|
|
305
309
|
| `replace` / `replaceAll` (RegExp, `$1`/`$&`, fn replacer) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `/g` vs first match, `$1`/`$&` patterns, function replacers |
|
|
306
310
|
| `charAt` / `substring` / `slice` | ✅ | [lib-string-slice.ts](conformance/lib-string-slice.ts) | Direct Go string indexing/slicing |
|
|
@@ -396,6 +400,7 @@ Every standard-library API TypeNative ports, split by module. Per
|
|
|
396
400
|
| API | Status | Probe | Notes |
|
|
397
401
|
| ---------------------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------------------------------- |
|
|
398
402
|
| `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
|
|
403
|
+
| `resolve` / `reject` passed as values | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | `new Promise((resolve) => setTimeout(resolve, ms))` |
|
|
399
404
|
| `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
|
|
400
405
|
| `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
|
|
401
406
|
| `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
|
|
@@ -410,248 +415,709 @@ Every standard-library API TypeNative ports, split by module. Per
|
|
|
410
415
|
| API | Status | Probe | Notes |
|
|
411
416
|
| ------------------------------------------- | :----: | ------------------------------------------------------------------ | ---------------------------------------- |
|
|
412
417
|
| `assert` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | Transpiled to `panic` on failure |
|
|
413
|
-
| `process.argv` / `process.platform` | ✅ | [lib-process.ts](conformance/lib-process.ts) |
|
|
418
|
+
| `process.argv` / `process.platform` | ✅ | [lib-process.ts](conformance/lib-process.ts) | Node's shapes (`[execPath, script, ...args]`, `win32`); the rest of `process` is in [node:process](#nodeprocess) |
|
|
414
419
|
| `process.env` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Environment variable access |
|
|
415
|
-
| `process.exit` | ✅ | [lib-process-exit.ts](conformance/lib-process-exit.ts) | `os.Exit`
|
|
420
|
+
| `process.exit` | ✅ | [lib-process-exit.ts](conformance/lib-process-exit.ts) | `os.Exit`, after `process.on('exit')` listeners |
|
|
416
421
|
| `process.cwd()` | ✅ | [lib-process-cwd.ts](conformance/lib-process-cwd.ts) | `os.Getwd()` |
|
|
422
|
+
| `Buffer` / `Uint8Array` / `TextEncoder` / `TextDecoder` / `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | See [node:buffer](#nodebuffer) |
|
|
423
|
+
| `URL` / `URLSearchParams` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | See [node:url](#nodeurl) |
|
|
424
|
+
| `EventTarget` / `Event` / `AbortController` / `AbortSignal` | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | See [node:events](#nodeevents) |
|
|
425
|
+
| `performance` / `setImmediate` / `crypto` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | See [perf_hooks](#nodeperf_hooks), [timers](#nodetimers), [crypto](#nodecrypto) |
|
|
426
|
+
| `TypeError` / `RangeError` / `SyntaxError` & co. | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | `TnError`s carrying their `name`; `instanceof` checks the name |
|
|
417
427
|
| `Infinity` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.Inf(1)` |
|
|
418
428
|
| Global `isNaN` / `isFinite` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.IsNaN` / `math.IsInf` |
|
|
419
429
|
| `encodeURIComponent` / `decodeURIComponent` | ✅ | [lib-uri.ts](conformance/lib-uri.ts) | `TnEncodeURIComponent` / `url.PathUnescape` |
|
|
420
430
|
| `structuredClone` | ✅ | [lib-structured-clone.ts](conformance/lib-structured-clone.ts) | Reflection deep copy |
|
|
431
|
+
| `fetch` / `Headers` / `Request` / `Response` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | See [fetch](#fetch) |
|
|
432
|
+
| `ReadableStream` / `WritableStream` / `TransformStream` & co., `TextEncoderStream` / `TextDecoderStream`, `CompressionStream` / `DecompressionStream` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | See [stream/web](#nodestreamweb) |
|
|
433
|
+
| `Blob` / `File` / `FormData` | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | See [buffer](#nodebuffer) and [fetch](#fetch) |
|
|
434
|
+
| `MessageChannel` / `MessagePort` / `BroadcastChannel` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | See [worker_threads](#nodeworker_threads) |
|
|
435
|
+
| `__filename` / `__dirname` | ✅ | — | The running executable (a native binary has no script file) |
|
|
421
436
|
| `globalThis` | ✅ | [lib-global-this.ts](conformance/lib-global-this.ts) | `globalThis.x` is the global `x`; `(globalThis as any)` is a dynamic object |
|
|
422
437
|
|
|
423
438
|
### Node builtins (`node:*`)
|
|
424
439
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
|
433
|
-
|
|
|
434
|
-
| `node:
|
|
435
|
-
| `node:
|
|
436
|
-
| `node:
|
|
437
|
-
| `node:
|
|
438
|
-
| `node:
|
|
439
|
-
| `node:
|
|
440
|
-
| `node:
|
|
441
|
-
| `node:
|
|
442
|
-
| `node:
|
|
443
|
-
| `node:
|
|
444
|
-
| `node:
|
|
445
|
-
| `node:
|
|
446
|
-
| `node:
|
|
447
|
-
| `node:
|
|
448
|
-
| `node:https`
|
|
449
|
-
| `node:
|
|
450
|
-
| `node:
|
|
451
|
-
| `node:
|
|
452
|
-
| `node:
|
|
453
|
-
| `node:
|
|
454
|
-
| `node:
|
|
455
|
-
| `node:
|
|
456
|
-
| `node:
|
|
457
|
-
| `node:
|
|
458
|
-
| `node:
|
|
459
|
-
| `node:
|
|
460
|
-
| `node:
|
|
461
|
-
| `node:
|
|
462
|
-
| `node:
|
|
463
|
-
| `node:
|
|
464
|
-
| `node:
|
|
465
|
-
| `node:
|
|
466
|
-
| `node:
|
|
467
|
-
| `node:
|
|
468
|
-
| `node:
|
|
469
|
-
| `node:
|
|
470
|
-
| `node:
|
|
471
|
-
| `node:
|
|
472
|
-
| `node:
|
|
473
|
-
| `node:
|
|
474
|
-
| `node:
|
|
440
|
+
Every module can be imported as `node:x` or by its bare name (`fs`), with
|
|
441
|
+
named, default or namespace imports; subpaths (`fs/promises`, `path/posix`,
|
|
442
|
+
`stream/promises`, …) work too. Signatures follow `@types/node`
|
|
443
|
+
([types/typenative-npm.d.ts](types/typenative-npm.d.ts)). Callbacks, timers, I/O
|
|
444
|
+
completions and events run on one event loop, one at a time, as in Node; an
|
|
445
|
+
async function runs synchronously until its first `await`.
|
|
446
|
+
|
|
447
|
+
| Module | Status | Section |
|
|
448
|
+
| ------------------------------------------- | :----: | ---------------------------------------------------------- |
|
|
449
|
+
| `node:assert` / `node:assert/strict` | ✅ | [assert](#nodeassert) |
|
|
450
|
+
| `node:async_hooks` | ✅ | [async_hooks](#nodeasync_hooks) |
|
|
451
|
+
| `node:buffer` (+ globals `Buffer`, `Uint8Array`, `atob`, `btoa`, `Blob`, `File`) | ✅ | [buffer](#nodebuffer) |
|
|
452
|
+
| `node:child_process` | ✅ | [child_process](#nodechild_process) |
|
|
453
|
+
| `node:cluster` | ✅ | [cluster](#nodecluster) |
|
|
454
|
+
| `node:console` | ✅ | [console](#nodeconsole) |
|
|
455
|
+
| `node:constants` | ✅ | [constants](#nodeconstants--nodesys) |
|
|
456
|
+
| `node:crypto` (+ global `crypto`) | ✅ | [crypto](#nodecrypto) |
|
|
457
|
+
| `node:dgram` | ✅ | [dgram](#nodedgram) |
|
|
458
|
+
| `node:diagnostics_channel` | ✅ | [diagnostics_channel](#nodediagnostics_channel) |
|
|
459
|
+
| `node:dns` / `node:dns/promises` | ✅ | [dns](#nodedns) |
|
|
460
|
+
| `node:domain` | ❌ | [domain](#nodedomain) |
|
|
461
|
+
| `node:events` (+ `EventTarget`, `AbortController`) | ✅ | [events](#nodeevents) |
|
|
462
|
+
| `node:fs` / `node:fs/promises` | ✅ | [fs](#nodefs) |
|
|
463
|
+
| `node:http` / `node:https` | ✅ | [http / https](#nodehttp--nodehttps) |
|
|
464
|
+
| `node:http2` | ✅ | [http2](#nodehttp2) |
|
|
465
|
+
| `node:inspector` | ❌ | [inspector](#nodeinspector) |
|
|
466
|
+
| `node:module` | ❌ | [module](#nodemodule) |
|
|
467
|
+
| `node:net` | ✅ | [net](#nodenet) |
|
|
468
|
+
| `node:os` | ✅ | [os](#nodeos) |
|
|
469
|
+
| `node:path` / `path/posix` / `path/win32` | ✅ | [path](#nodepath) |
|
|
470
|
+
| `node:perf_hooks` (+ global `performance`) | ✅ | [perf_hooks](#nodeperf_hooks) |
|
|
471
|
+
| `node:process` (+ global `process`) | ✅ | [process](#nodeprocess) |
|
|
472
|
+
| `node:punycode` | ✅ | [punycode](#nodepunycode) |
|
|
473
|
+
| `node:querystring` | ✅ | [querystring](#nodequerystring) |
|
|
474
|
+
| `node:readline` / `node:readline/promises` | ✅ | [readline](#nodereadline) |
|
|
475
|
+
| `node:repl` | ❌ | [repl](#noderepl) |
|
|
476
|
+
| `node:sea` | ❌ | [sea](#nodesea) |
|
|
477
|
+
| `node:sqlite` | ✅ | [sqlite](#nodesqlite) |
|
|
478
|
+
| `node:stream` / `stream/promises` / `stream/consumers` | ✅ | [stream](#nodestream) |
|
|
479
|
+
| `node:stream/web` (+ globals `ReadableStream`, `WritableStream`, `TransformStream`, …) | ✅ | [stream/web](#nodestreamweb) |
|
|
480
|
+
| `node:string_decoder` | ✅ | [string_decoder](#nodestring_decoder) |
|
|
481
|
+
| `node:sys` | ✅ | [constants / sys](#nodeconstants--nodesys) |
|
|
482
|
+
| `node:test` | ✅ | [test](#nodetest) |
|
|
483
|
+
| `node:test/reporters` | ❌ | [test/reporters](#nodetestreporters) |
|
|
484
|
+
| `node:timers` / `node:timers/promises` | ✅ | [timers](#nodetimers) |
|
|
485
|
+
| `node:tls` | ✅ | [tls](#nodetls) |
|
|
486
|
+
| `node:trace_events` | ❌ | [trace_events](#nodetrace_events) |
|
|
487
|
+
| `node:tty` | ✅ | [tty](#nodetty) |
|
|
488
|
+
| `node:url` (+ globals `URL`, `URLSearchParams`) | ✅ | [url](#nodeurl) |
|
|
489
|
+
| `node:util` / `node:util/types` | ✅ | [util](#nodeutil) |
|
|
490
|
+
| `node:v8` | ❌ | [v8](#nodev8) |
|
|
491
|
+
| `node:vm` | ❌ | [vm](#nodevm) |
|
|
492
|
+
| `node:wasi` | ❌ | [wasi](#nodewasi) |
|
|
493
|
+
| `node:worker_threads` (+ globals `MessageChannel`, `MessagePort`, `BroadcastChannel`) | ✅ | [worker_threads](#nodeworker_threads) |
|
|
494
|
+
| `node:zlib` | ✅ | [zlib](#nodezlib) |
|
|
495
|
+
| Global `fetch` (+ `Headers`, `Request`, `Response`, `FormData`) | ✅ | [fetch](#fetch) |
|
|
496
|
+
|
|
497
|
+
#### `node:path`
|
|
498
|
+
|
|
499
|
+
| API | Status | Probe | Notes |
|
|
500
|
+
| ------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | --------------------------------------------------------------------- |
|
|
501
|
+
| `join` / `dirname` / `basename` / `extname` / `resolve` | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | Ports of Node's algorithms (not Go's `filepath`): same results as Node |
|
|
502
|
+
| `normalize` / `relative` / `isAbsolute` / `parse` / `format` / `sep` / `delimiter` | ✅ | [lib-node-path-more.ts](conformance/lib-node-path-more.ts) | Trailing separators, `.bashrc`-style extensions, `''` for same paths |
|
|
503
|
+
| `path.posix` / `path.win32` / `node:path/posix` / `toNamespacedPath` | ✅ | [lib-node-path-posix-win32.ts](conformance/lib-node-path-posix-win32.ts) | Both flavours on every OS (drive letters, UNC roots); `path` is the platform's |
|
|
504
|
+
| `matchesGlob` (`*`, `**`, `?`, `[...]`, `{a,b}`; no leading-dot matches) | ✅ | [lib-node-path-glob.ts](conformance/lib-node-path-glob.ts) | minimatch-style patterns compiled to regular expressions |
|
|
505
|
+
|
|
506
|
+
#### `node:buffer`
|
|
507
|
+
|
|
508
|
+
| API | Status | Probe | Notes |
|
|
509
|
+
| --------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
|
510
|
+
| `Buffer.from` / `alloc` / `concat` / `byteLength` / `isBuffer` / `compare`; `buf[i]`, `length` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | Buffers are Go `[]byte`; `subarray` / `slice` share memory; writes wrap modulo 256 |
|
|
511
|
+
| `toString` / `equals` / `indexOf` / `includes` / `fill` / `write` / `copy` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | `` `${buf}` `` decodes UTF-8; `console.log(buf)` prints `<Buffer 68 69>` |
|
|
512
|
+
| Encodings (utf8, hex, base64, base64url, latin1, ascii, utf16le); `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | Invalid UTF-8 bytes decode to U+FFFD, as in Node |
|
|
513
|
+
| `TextEncoder` / `TextDecoder` (`decode(bytes, { stream: true })`), minimal `Uint8Array` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | `Uint8Array` is `[]byte` too: `length`, indexing, `subarray`, `slice`, `set` |
|
|
514
|
+
| `read*` / `write*` (U)Int8/16/32 LE/BE, Float, Double | ✅ | [lib-node-buffer-binary.ts](conformance/lib-node-buffer-binary.ts) | Out-of-range offsets throw `ERR_OUT_OF_RANGE` |
|
|
515
|
+
| `Blob` / `File` (`size`, `type`, `name`, `lastModified`, `text()` / `bytes()` / `arrayBuffer()`, `slice`, `stream()`); parts of strings, Buffers and Blobs | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | Also globals; bytes held in memory |
|
|
516
|
+
| `read/writeBigInt64LE/BE`, `read/writeBigUInt64LE/BE`, `swap16/32/64`; `isUtf8` / `isAscii` / `transcode` / `kMaxLength` | ✅ | [lib-node-buffer-bigint.ts](conformance/lib-node-buffer-bigint.ts) | bigints are `*big.Int` |
|
|
517
|
+
| Typed arrays other than `Uint8Array` (`Int32Array`, `Float64Array`, `DataView`, …) | ❌ | — | Buffers and `Uint8Array`s are `[]byte`; other views are not implemented |
|
|
518
|
+
|
|
519
|
+
#### `node:fs`
|
|
520
|
+
|
|
521
|
+
| API | Status | Probe | Notes |
|
|
522
|
+
| --------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
523
|
+
| `readFileSync` / `writeFileSync` / `appendFileSync` / `existsSync` / `rmSync` | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | `readFileSync` returns a Buffer without an encoding, a string with one; `flag` option |
|
|
524
|
+
| `statSync` / `lstatSync` (`Stats`) / `renameSync` / `copyFileSync` / `truncateSync` / `realpathSync` / `accessSync` / `unlinkSync` | ✅ | [lib-node-fs-stat.ts](conformance/lib-node-fs-stat.ts) | `throwIfNoEntry: false`; Go exposes only the modification time portably, so `atime` / `ctime` / `birthtime` report it too |
|
|
525
|
+
| `mkdirSync` / `mkdtempSync` / `readdirSync` (`withFileTypes`, `recursive`) / `rmdirSync` / `cpSync` | ✅ | [lib-node-fs-dirs.ts](conformance/lib-node-fs-dirs.ts) | `Dirent` with `isFile()` / `isDirectory()` / `parentPath` |
|
|
526
|
+
| Node system errors (`err.code` / `syscall` / `path` / `errno`) | ✅ | [lib-node-fs-errors.ts](conformance/lib-node-fs-errors.ts) | `ENOENT: no such file or directory, open 'x'`; `EEXIST`, `ENOTEMPTY`, `ERR_FS_EISDIR`, `COPYFILE_EXCL` |
|
|
527
|
+
| File descriptors: `openSync` / `readSync` / `writeSync` / `fstatSync` / `closeSync` | ✅ | [lib-node-fs-fd.ts](conformance/lib-node-fs-fd.ts) | Flags `r`, `w`, `a`, `+`, `x`; positional reads and writes |
|
|
528
|
+
| Callback API (`readFile(path, enc, (err, data) => …)` & co.) | ✅ | [lib-node-fs-callbacks.ts](conformance/lib-node-fs-callbacks.ts) | Work runs on a goroutine; callbacks run on the event loop |
|
|
529
|
+
| `fs/promises` / `fs.promises` (incl. `FileHandle` from `open`) | ✅ | [lib-node-fs-promises.ts](conformance/lib-node-fs-promises.ts) | Rejections carry the error code |
|
|
530
|
+
| `createReadStream` / `createWriteStream` | ✅ | [lib-node-fs-streams.ts](conformance/lib-node-fs-streams.ts) | `encoding`, `start` / `end`, `highWaterMark`, `flags` |
|
|
531
|
+
| `chmodSync` / `utimesSync` / `symlinkSync` / `readlinkSync` / `linkSync` | ✅ | — | Implemented, not probed (symlinks need privileges on Windows) |
|
|
532
|
+
| `watch` / `watchFile` | ❌ | — | Go's standard library has no file-system notifications |
|
|
533
|
+
|
|
534
|
+
#### `node:os`
|
|
535
|
+
|
|
536
|
+
| API | Status | Probe | Notes |
|
|
537
|
+
| -------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ----------------------------------------------------------------------- |
|
|
538
|
+
| `platform` / `arch` / `type` / `machine` / `EOL` / `devNull` / `endianness` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | Node's names (`win32`, `x64`, `Windows_NT`, `x86_64`) |
|
|
539
|
+
| `hostname` / `homedir` / `tmpdir` / `userInfo` / `cpus` / `availableParallelism` / `networkInterfaces` / `constants.signals` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | `cpus()` has one entry per logical CPU (model / speed / times are zero) |
|
|
540
|
+
| `totalmem` / `freemem` / `uptime` / `loadavg` / `release` / `version` | ✅ | [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | `/proc` on Linux, `sysctl` on macOS / BSD; zeros where neither exists |
|
|
541
|
+
|
|
542
|
+
#### `node:process`
|
|
543
|
+
|
|
544
|
+
| API | Status | Probe | Notes |
|
|
545
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
546
|
+
| `argv` / `argv0` / `execPath` / `execArgv` / `pid` / `ppid` / `arch` / `version` / `versions` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `argv` has Node's shape: `[execPath, script, ...args]`; `version` is `v24.0.0`; `versions.go` is Go's |
|
|
547
|
+
| `hrtime` / `hrtime.bigint` / `uptime` / `memoryUsage` / `chdir` / `cwd` / `stdout.write` / `nextTick` / `exitCode` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `exitCode` is applied when the event loop drains |
|
|
548
|
+
| `process.env` reads, writes, `delete`, `in`, `Object.keys(process.env)`; `import { env } from 'node:process'` | ✅ | [lib-node-process-env.ts](conformance/lib-node-process-env.ts) | `os.Setenv` / `os.Unsetenv`; missing variables read as `""` |
|
|
549
|
+
| `process.on('exit' \| 'SIGINT' \| 'SIGTERM' \| 'SIGHUP')` / `once` / `off` / `emit` | ✅ | [lib-node-process-events.ts](conformance/lib-node-process-events.ts) | `'exit'` runs after the event loop with the exit code; signals arrive on the loop |
|
|
550
|
+
| `process.stdin` / `stdout` / `stderr` as streams | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `stdin` keeps the process alive only while flowing |
|
|
551
|
+
| `kill` / `emitWarning` / `getuid` / `getgid` | ✅ | — | Implemented, not probed |
|
|
552
|
+
| `on('uncaughtException')` / `'uncaughtExceptionMonitor'` / `'unhandledRejection'` / `'beforeExit'` (per drain, can schedule more work); `cpuUsage` / `resourceUsage` / `availableMemory` / `loadEnvFile` | ✅ | [lib-node-process-uncaught.ts](conformance/lib-node-process-uncaught.ts), [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | Throws in the top-level code, loop callbacks and detached async calls reach the handlers; CPU times from `/proc` (Linux) or Go's runtime metrics |
|
|
553
|
+
| `umask` / `stdout.columns` / `setRawMode` | ❌ | — | Need OS-specific syscalls a single portable binary can't contain |
|
|
554
|
+
|
|
555
|
+
#### `node:console`
|
|
556
|
+
|
|
557
|
+
| API | Status | Probe | Notes |
|
|
558
|
+
| ----------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------- |
|
|
559
|
+
| Module re-export (`import { log } from 'node:console'`) | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | Same as the global `console` |
|
|
560
|
+
| `new Console(stdout, stderr)` / `new Console({ stdout, stderr })` | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | `log` / `info` / `debug` / `error` / `warn` / `dir` |
|
|
561
|
+
|
|
562
|
+
#### `node:util`
|
|
563
|
+
|
|
564
|
+
| API | Status | Probe | Notes |
|
|
565
|
+
| ------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
566
|
+
| `format` / `formatWithOptions` (`%s %d %i %f %j %o %O %c %%`) | ✅ | [lib-node-util-format.ts](conformance/lib-node-util-format.ts) | Extra arguments appended; also used by `console.log` |
|
|
567
|
+
| `inspect` (`depth`, `breakLength`, `compact`) | ✅ | [lib-node-util-inspect.ts](conformance/lib-node-util-inspect.ts) | Node's layout rules: single line up to 80 columns, number arrays grouped in columns, `Map(1) {…}`, `ClassName {…}`, `[Circular *1]` |
|
|
568
|
+
| `isDeepStrictEqual` / `types.*` (`node:util/types`) / `deprecate` / `stripVTControlCharacters` / `styleText` | ✅ | [lib-node-util-misc.ts](conformance/lib-node-util-misc.ts) | `styleText` colours only TTYs unless `validateStream: false` |
|
|
569
|
+
| `promisify` / `callbackify` | ✅ | [lib-node-util-promisify.ts](conformance/lib-node-util-promisify.ts) | Node functions map to their promise versions at compile time (`fs.readFile`, `setTimeout`, `exec`); other functions are wrapped |
|
|
570
|
+
| `parseArgs` (short / long / grouped flags, `multiple`, `default`, `strict`, `allowPositionals`, `allowNegative`, `tokens`, Node's errors), `getSystemErrorName` / `getSystemErrorMessage` / `getSystemErrorMap`, `MIMEType` / `MIMEParams`, `parseEnv` (+ `process.loadEnvFile`), `aborted`, `debuglog` (`NODE_DEBUG`), `toUSVString` | ✅ | [lib-node-util-parse-args.ts](conformance/lib-node-util-parse-args.ts) | |
|
|
571
|
+
| `inherits` (legacy), `inspect.custom` (symbols), `getCallSites` (V8 stack frames) | ❌ | — | Legacy or engine-specific |
|
|
572
|
+
|
|
573
|
+
#### `node:assert`
|
|
574
|
+
|
|
575
|
+
| API | Status | Probe | Notes |
|
|
576
|
+
| ----------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
577
|
+
| `assert` / `ok` / `equal` / `strictEqual` (+ `not*`) / `match` / `throws` / `doesNotThrow` / `fail` / `ifError`; `node:assert/strict` | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | Failures throw an `AssertionError` (`code: 'ERR_ASSERTION'`, `actual`, `expected`, `operator`); `throws` validates with a RegExp, class or object |
|
|
578
|
+
| `deepEqual` / `deepStrictEqual` (+ `not*`) / `rejects` / `doesNotReject` | ✅ | [lib-node-assert-deep.ts](conformance/lib-node-assert-deep.ts) | Key order is ignored for objects, Maps and Sets; failure messages are simplified (no diff) |
|
|
579
|
+
|
|
580
|
+
#### `node:url`
|
|
581
|
+
|
|
582
|
+
| API | Status | Probe | Notes |
|
|
583
|
+
| -------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
584
|
+
| `fileURLToPath` / `pathToFileURL` | ✅ | [lib-node-url.ts](conformance/lib-node-url.ts) | `pathToFileURL` returns a `URL`; Windows drive letters |
|
|
585
|
+
| `URL` (WHATWG): parsing, relative resolution, getters / setters, `canParse`, `parse`; `domainToASCII` / `domainToUnicode`; `format` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | Special schemes, dot segments, default ports, percent-encode sets, IDN hosts (punycode); invalid input throws `ERR_INVALID_URL` |
|
|
586
|
+
| `URLSearchParams` (and `url.searchParams`, kept in sync) | ✅ | [lib-node-url-search-params.ts](conformance/lib-node-url-search-params.ts) | `for...of`, `forEach`, `sort`, construction from strings / objects / pairs |
|
|
587
|
+
| Legacy `url.parse` / `url.resolve` | ❌ | — | Deprecated upstream; not implemented |
|
|
588
|
+
|
|
589
|
+
#### `node:querystring`
|
|
590
|
+
|
|
591
|
+
| API | Status | Probe | Notes |
|
|
592
|
+
| --------------------------------------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------ |
|
|
593
|
+
| `parse` / `stringify` / `escape` / `unescape` / `decode` / `encode` | ✅ | [lib-node-querystring.ts](conformance/lib-node-querystring.ts) | Repeated keys become arrays; custom separators |
|
|
594
|
+
|
|
595
|
+
#### `node:punycode`
|
|
596
|
+
|
|
597
|
+
| API | Status | Probe | Notes |
|
|
598
|
+
| --------------------------------------------- | :----: | -------------------------------------------------------- | ------------------------------- |
|
|
599
|
+
| `encode` / `decode` / `toASCII` / `toUnicode` | ✅ | [lib-node-punycode.ts](conformance/lib-node-punycode.ts) | RFC 3492 (deprecated upstream) |
|
|
600
|
+
|
|
601
|
+
#### `node:string_decoder`
|
|
602
|
+
|
|
603
|
+
| API | Status | Probe | Notes |
|
|
604
|
+
| --------------------------------------- | :----: | ------------------------------------------------------------------ | ----------------------------------------------------------- |
|
|
605
|
+
| `StringDecoder` (`write` / `end`) | ✅ | [lib-node-string-decoder.ts](conformance/lib-node-string-decoder.ts) | Holds back split UTF-8 / UTF-16LE characters and base64 groups |
|
|
606
|
+
|
|
607
|
+
#### `node:crypto`
|
|
608
|
+
|
|
609
|
+
| API | Status | Probe | Notes |
|
|
610
|
+
| ------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
611
|
+
| `createHash` / `createHmac` / `hash` / `getHashes` (`update` / `digest` / `copy`) | ✅ | [lib-node-crypto-hash.ts](conformance/lib-node-crypto-hash.ts) | md5, sha1, sha224/256/384/512, sha512-224/256, sha3-224/256/384/512 |
|
|
612
|
+
| `randomBytes` / `randomUUID` / `randomInt` / `getRandomValues` / `timingSafeEqual`; global `crypto` | ✅ | [lib-node-crypto-random.ts](conformance/lib-node-crypto-random.ts) | `crypto/rand` |
|
|
613
|
+
| `pbkdf2Sync` / `hkdfSync` | ✅ | [lib-node-crypto-kdf.ts](conformance/lib-node-crypto-kdf.ts) | `crypto/pbkdf2` / `crypto/hkdf` (Go 1.24+) |
|
|
614
|
+
| `createCipheriv` / `createDecipheriv` (aes-128/192/256-cbc/ctr/gcm) | ✅ | [lib-node-crypto-cipher.ts](conformance/lib-node-crypto-cipher.ts) | GCM output arrives from `final()` (authenticated as a whole) |
|
|
615
|
+
| `scryptSync` / `scrypt` (`N` / `r` / `p` / `maxmem` and their aliases); callback forms of `pbkdf2`, `hkdf`, `randomBytes`, `randomFill`; `randomFillSync` | ✅ | [lib-node-crypto-scrypt.ts](conformance/lib-node-crypto-scrypt.ts) | scrypt written out over `crypto/pbkdf2` (Salsa20/8, BlockMix, ROMix); callbacks run on the event loop |
|
|
616
|
+
| `KeyObject` (`type`, `asymmetricKeyType`, `asymmetricKeyDetails`, `symmetricKeySize`, `export` as PEM / DER / JWK, `equals`, `KeyObject.from`), `createPrivateKey` / `createPublicKey` / `createSecretKey` (PEM, DER, JWK; pkcs1 / pkcs8 / sec1 / spki; certificates) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA, EC (P-256 / P-384 / P-521), Ed25519, X25519 |
|
|
617
|
+
| `generateKeyPair(Sync)` (`rsa`, `ec`, `ed25519`, `x25519`; KeyObjects or `publicKeyEncoding` / `privateKeyEncoding`), `generateKey(Sync)` (`hmac`, `aes`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA keys use the public exponent 65537 |
|
|
618
|
+
| `sign` / `verify`, `createSign` / `createVerify` (RSA PKCS#1 v1.5 and PSS with `saltLength`, ECDSA in DER or `ieee-p1363`, Ed25519); `publicEncrypt` / `privateDecrypt` (OAEP with `oaepHash` / `oaepLabel`, PKCS#1, none), `privateEncrypt` / `publicDecrypt`; `crypto.constants` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | |
|
|
619
|
+
| `createECDH` (compressed / uncompressed keys), `getCurves`, `diffieHellman` (ec / x25519 KeyObjects), `createDiffieHellman` / `getDiffieHellman` (modp1 – modp18) | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `createDiffieHellman(bits)` generates a random (not safe) prime |
|
|
620
|
+
| `generatePrime(Sync)` (`bigint`, `safe`, `add` / `rem`), `checkPrime(Sync)` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `math/big`'s Miller-Rabin |
|
|
621
|
+
| `X509Certificate` (`subject`, `issuer`, `subjectAltName`, `validFrom` / `validTo` (+ `Date`s), fingerprints, `serialNumber`, `ca`, `publicKey`, `raw`, `keyUsage`, `checkHost` / `checkIP` / `checkEmail`, `checkIssued`, `verify`, `toString`, `toLegacyObject`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | `crypto/x509` |
|
|
622
|
+
| `crypto.subtle` / `webcrypto.subtle`: `digest`, `generateKey`, `importKey` / `exportKey` (`raw`, `spki`, `pkcs8`, `jwk`), `sign` / `verify` (HMAC, RSASSA-PKCS1-v1_5, RSA-PSS, ECDSA, Ed25519), `encrypt` / `decrypt` (AES-GCM / CBC / CTR, RSA-OAEP), `deriveBits` / `deriveKey` (PBKDF2, HKDF, ECDH, X25519), `wrapKey` / `unwrapKey` | ✅ | [lib-node-crypto-subtle.ts](conformance/lib-node-crypto-subtle.ts) | Key usages are recorded but not enforced |
|
|
623
|
+
| Encrypted private keys (`passphrase` / `cipher`), `rsa-pss` / `dsa` / `dh` / `ed448` / `x448` key types, `secp256k1`, AES-KW, `Certificate` (SPKAC), `hash` streams (`createHash` as a stream) | ❌ | — | No Go standard-library support (encrypted PKCS#8, these algorithms) |
|
|
624
|
+
|
|
625
|
+
#### `node:zlib`
|
|
626
|
+
|
|
627
|
+
| API | Status | Probe | Notes |
|
|
628
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | -------------------------------------------------------- |
|
|
629
|
+
| `gzipSync` / `gunzipSync` / `deflateSync` / `inflateSync` / `deflateRawSync` / `inflateRawSync` / `unzipSync` / `crc32` / `constants` | ✅ | [lib-node-zlib.ts](conformance/lib-node-zlib.ts) | `{ level }`; invalid input throws `Z_DATA_ERROR` |
|
|
630
|
+
| `createGzip` / `createGunzip` / `createDeflate` / `createInflate` / `createDeflateRaw` / `createInflateRaw` / `createUnzip` | ✅ | [lib-node-zlib-streams.ts](conformance/lib-node-zlib-streams.ts) | Transforms that (de)compress when the input ends |
|
|
631
|
+
| Callback forms `gzip` / `gunzip` / `deflate` / `inflate` / `deflateRaw` / `inflateRaw` / `unzip` (`buf, [options], cb`) and `util.promisify` of them | ✅ | [lib-node-zlib-async.ts](conformance/lib-node-zlib-async.ts) | The codec runs on a goroutine; the callback runs on the event loop |
|
|
632
|
+
| Brotli (`brotliCompressSync` & co.) | ❌ | — | Go's standard library has no Brotli codec |
|
|
633
|
+
|
|
634
|
+
#### `node:timers`
|
|
635
|
+
|
|
636
|
+
| API | Status | Probe | Notes |
|
|
637
|
+
| -------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | -------------------------------------------------------------------------- |
|
|
638
|
+
| `setTimeout` / `setInterval` / `setImmediate` (+ extra arguments) / `clear*`; global `setImmediate` | ✅ | [lib-node-timers.ts](conformance/lib-node-timers.ts) | Callbacks run on the event loop |
|
|
639
|
+
| `node:timers/promises` (`setTimeout`, `setImmediate`, `setInterval`, `scheduler`) | ✅ | [lib-node-timers-promises.ts](conformance/lib-node-timers-promises.ts) | `{ signal }` aborts; `setInterval` is an async iterator |
|
|
640
|
+
| `Timeout` / `Immediate` handles: `ref` / `unref` / `hasRef` / `refresh` / `close` (also on intervals) | ✅ | [lib-node-timers-ref.ts](conformance/lib-node-timers-ref.ts) | Unref'ed timers don't keep the process alive |
|
|
641
|
+
|
|
642
|
+
#### `node:perf_hooks`
|
|
643
|
+
|
|
644
|
+
| API | Status | Probe | Notes |
|
|
645
|
+
| -------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------- |
|
|
646
|
+
| `performance.now` / `timeOrigin` / `mark` / `measure` / `getEntries*` / `clearMarks`; global `performance` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Monotonic milliseconds since process start |
|
|
647
|
+
| `PerformanceObserver` (`entryTypes` / `type` + `buffered`, batched, sorted by `startTime`), `timerify`, `createHistogram`, `monitorEventLoopDelay`, `eventLoopUtilization` | ✅ | [lib-node-perf-observer.ts](conformance/lib-node-perf-observer.ts) | `eventLoopUtilization` is estimated from CPU time |
|
|
648
|
+
|
|
649
|
+
#### `node:tty`
|
|
650
|
+
|
|
651
|
+
| API | Status | Probe | Notes |
|
|
652
|
+
| ------------ | :----: | ---------------------------------------------------------- | ---------------------------------------- |
|
|
653
|
+
| `isatty(fd)` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Character-device check on fds 0–2 |
|
|
654
|
+
| `ReadStream` / `WriteStream` (`columns`, `setRawMode`) | ❌ | — | Terminal sizes need non-portable syscalls |
|
|
655
|
+
|
|
656
|
+
#### `node:constants` / `node:sys`
|
|
657
|
+
|
|
658
|
+
| API | Status | Probe | Notes |
|
|
659
|
+
| ----------------------------------------- | :----: | ---------------------------------------------------------- | ---------------------------------------------------- |
|
|
660
|
+
| `node:constants` (`F_OK`, `SIGINT`, …) | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Deprecated upstream: `fs.constants` + `os.constants.signals` |
|
|
661
|
+
| `node:sys` | ✅ | — | Deprecated alias of `node:util` |
|
|
662
|
+
|
|
663
|
+
#### `node:events`
|
|
664
|
+
|
|
665
|
+
| API | Status | Probe | Notes |
|
|
666
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
667
|
+
| `EventEmitter`: `on` / `once` / `off` / `prepend*` / `emit` / `removeAllListeners` / `listenerCount` / `eventNames` / max listeners / `newListener`; unhandled `'error'` throws | ✅ | [lib-node-events.ts](conformance/lib-node-events.ts) | Listeners are called with any signature; removal by identity |
|
|
668
|
+
| `class X extends EventEmitter` | ✅ | [lib-node-events-extends.ts](conformance/lib-node-events-extends.ts) | The emitter is embedded; `this.emit` and inherited methods work |
|
|
669
|
+
| `events.once` (→ promise) / `events.on` (async iterator) | ✅ | [lib-node-events-once.ts](conformance/lib-node-events-once.ts) | `'error'` rejects `once` |
|
|
670
|
+
| `EventTarget` / `Event` / `AbortController` / `AbortSignal` (`abort`, `timeout`, `any`, `throwIfAborted`) | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | Globals (also exported by `node:events`) |
|
|
671
|
+
| `errorMonitor`, `captureRejections` (option and global), `getMaxListeners` / `setMaxListeners` (static), `addAbortListener` | ✅ | [lib-node-events-extra.ts](conformance/lib-node-events-extra.ts) | Captures rejections of listeners that return a promise; async arrow listeners run inline (their `await`s don't yield to `emit`) |
|
|
672
|
+
| Symbol event names other than `errorMonitor`, `EventEmitterAsyncResource`, `Symbol.for('nodejs.rejection')` | ❌ | — | Event names are strings |
|
|
673
|
+
|
|
674
|
+
#### `node:stream`
|
|
675
|
+
|
|
676
|
+
| API | Status | Probe | Notes |
|
|
677
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
678
|
+
| `Readable` (`push`, `read`, `pause` / `resume`, `setEncoding`, `destroy`), `Readable.from`, `for await` | ✅ | [lib-node-stream-readable.ts](conformance/lib-node-stream-readable.ts) | Arrays, strings, Buffers and async generators as sources |
|
|
679
|
+
| `Writable` (`write` / `end` / callbacks, `final`, `'finish'`, write after end) | ✅ | [lib-node-stream-writable.ts](conformance/lib-node-stream-writable.ts) | Strings become Buffers unless `decodeStrings: false` or `objectMode` |
|
|
680
|
+
| `Transform` / `PassThrough` / `Duplex`, `pipe` chains, subclasses overriding `_transform` & co. | ✅ | [lib-node-stream-transform.ts](conformance/lib-node-stream-transform.ts) | Option methods (`transform`, `flush`, `write`, `final`, `read`) and `_`-overrides both work; `this` inside option methods is not the stream (use the callback) |
|
|
681
|
+
| `pipeline` / `finished` / `stream/promises` / `stream/consumers` (`text`, `json`, `buffer`) | ✅ | [lib-node-stream-pipeline.ts](conformance/lib-node-stream-pipeline.ts) | Errors destroy the pipeline and reach the callback / rejection |
|
|
682
|
+
| `Readable.toWeb` / `fromWeb`, `Writable.toWeb` / `fromWeb`, `Duplex.toWeb` / `fromWeb`, `compose` (Node and web streams) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | `toWeb` pauses the Node stream while the web queue is full |
|
|
683
|
+
| Backpressure (`highWaterMark` beyond `write()`'s return value), `compose` with generator functions | ❌ | — | Not implemented |
|
|
684
|
+
|
|
685
|
+
#### `node:stream/web`
|
|
686
|
+
|
|
687
|
+
| API | Status | Probe | Notes |
|
|
688
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
689
|
+
| `ReadableStream` (underlying source `start` / `pull` / `cancel`, sync or async), `getReader()` → `read` / `releaseLock` / `cancel` / `closed`, `locked`, `cancel`, `tee`, `for await` / `values()`, `ReadableStream.from` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Promise reactions run as microtasks on the event loop; an error ends `for await` with a throw |
|
|
690
|
+
| `WritableStream` (sink `start` / `write` / `close` / `abort`), `getWriter()` → `write` / `close` / `abort` / `ready` / `closed` / `desiredSize` / `releaseLock`; controller `error` / `signal` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Writes run one at a time; `ready` follows the queue's backpressure |
|
|
691
|
+
| `TransformStream` (`transform` / `flush` / `start`, controller `enqueue` / `error` / `terminate`), `pipeThrough` / `pipeTo` (`preventClose` / `preventAbort` / `preventCancel` / `signal`) | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | A transform waits until its readable side wants more |
|
|
692
|
+
| `CountQueuingStrategy` / `ByteLengthQueuingStrategy`, `{ highWaterMark, size }` strategies | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | |
|
|
693
|
+
| `TextEncoderStream` / `TextDecoderStream` (characters split across chunks), `CompressionStream` / `DecompressionStream` (`gzip`, `deflate`, `deflate-raw`) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | Decompression decodes once the input ends |
|
|
694
|
+
| BYOB readers (`getReader({ mode: 'byob' })` reads into a view), byte-stream controllers' `byobRequest`, transferring streams | ❌ | — | `getReader({ mode: 'byob' })` returns a default reader |
|
|
695
|
+
|
|
696
|
+
#### `node:readline`
|
|
697
|
+
|
|
698
|
+
| API | Status | Probe | Notes |
|
|
699
|
+
| --------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
700
|
+
| `createInterface` (`'line'` / `'close'`, `question(q, cb)`, `prompt`, `close`, `for await`) | ✅ | [lib-node-readline.ts](conformance/lib-node-readline.ts) | Any readable stream as input (`process.stdin` included) |
|
|
701
|
+
| `node:readline/promises` (`await rl.question(q)`) | ✅ | [lib-node-readline-promises.ts](conformance/lib-node-readline-promises.ts) | |
|
|
702
|
+
| `question(prompt)` (synchronous) | ✅ | [lib-node-readline-question.ts](conformance/lib-node-readline-question.ts) | TypeNative extension (not in Node): used by the self-hosted compiler |
|
|
703
|
+
| `cursorTo` / `moveCursor` / `clearLine` / `clearScreenDown` | ✅ | [lib-node-readline-cursor.ts](conformance/lib-node-readline-cursor.ts) | ANSI escape sequences written to the stream; optional callback |
|
|
704
|
+
| `emitKeypressEvents`, `history`, `completer` | ❌ | — | Need raw terminal mode (OS-specific syscalls) |
|
|
705
|
+
|
|
706
|
+
#### `node:child_process`
|
|
707
|
+
|
|
708
|
+
| API | Status | Probe | Notes |
|
|
709
|
+
| ------------------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
710
|
+
| `execSync` / `execFileSync` / `spawnSync` (`encoding`, `input`, `cwd`, `env`, `shell`, `stdio: 'inherit'`) | ✅ | [lib-node-child-process-sync.ts](conformance/lib-node-child-process-sync.ts) | Buffers unless an encoding is given (as in Node); a non-zero exit throws with `status` / `stdout` / `stderr` |
|
|
711
|
+
| `exec` / `execFile` (callbacks), `spawn` → `ChildProcess` (stdio streams, `'exit'` / `'close'`, `kill`); `promisify(exec)` | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `'close'` follows the end of the stdio streams being read; exit codes on `err.code` |
|
|
712
|
+
| `fork(modulePath, args, { env, cwd, silent })` → `send` / `'message'` / `disconnect` / `'disconnect'` / `connected`; in the child `process.send` / `process.on('message')` / `process.connected` / `process.disconnect` | ✅ | [lib-node-child-process-fork.ts](conformance/lib-node-child-process-fork.ts) | The child is this program run again (branch on `process.argv` / `process.send`), linked over loopback TCP; messages are structured clones (a superset of Node's default JSON) |
|
|
713
|
+
| `detached`, `stdio` arrays beyond stdout, `serialization: 'advanced'` handle passing (`send(msg, socket)`), forking another file | ❌ | — | `detached` needs OS-specific process attributes; one binary holds one program |
|
|
714
|
+
|
|
715
|
+
#### `node:cluster`
|
|
716
|
+
|
|
717
|
+
| API | Status | Probe | Notes |
|
|
718
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
719
|
+
| `isPrimary` / `isWorker` / `isMaster`, `fork(env)`, `workers`, `worker`, `setupPrimary` / `settings`, `disconnect(cb)`, `SCHED_RR` / `schedulingPolicy`; events `'fork'` / `'online'` / `'listening'` / `'message'` / `'disconnect'` / `'exit'` | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | Workers are this program run again with `NODE_UNIQUE_ID` set |
|
|
720
|
+
| `Worker` (`id`, `process`, `send`, `'message'`, `disconnect`, `kill`, `isConnected`, `isDead`, `exitedAfterDisconnect`); `process.send` from workers | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | |
|
|
721
|
+
| Shared ports: `net` / `http` / `https` / `tls` servers in workers listen on one port (also `listen(0)`), connections round-robin | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | The primary owns the listener and relays each connection to a worker's private loopback listener with the client's address (no handle passing) |
|
|
722
|
+
| `SCHED_NONE` (OS-level balancing), `exclusive: true` listeners, dgram sockets in workers | ❌ | — | Everything goes through the primary |
|
|
723
|
+
|
|
724
|
+
#### `node:diagnostics_channel`
|
|
725
|
+
|
|
726
|
+
| API | Status | Probe | Notes |
|
|
727
|
+
| ------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------------------- | ----------------------------- |
|
|
728
|
+
| `channel` / `publish` / `subscribe` / `unsubscribe` / `hasSubscribers` | ✅ | [lib-node-diagnostics-channel.ts](conformance/lib-node-diagnostics-channel.ts) | Synchronous; shared by name |
|
|
729
|
+
| `tracingChannel` (`start` / `end` / `asyncStart` / `asyncEnd` / `error` channels, `subscribe` / `unsubscribe`, `traceSync` / `tracePromise` / `traceCallback`); `channel.bindStore` / `unbindStore` / `runStores` | ✅ | [lib-node-diagnostics-tracing.ts](conformance/lib-node-diagnostics-tracing.ts) | The context gets `result` / `error`; a struct context without those fields is copied into a record |
|
|
730
|
+
|
|
731
|
+
#### `node:net`
|
|
732
|
+
|
|
733
|
+
| API | Status | Probe | Notes |
|
|
734
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
735
|
+
| `createServer` / `Server` (`listen` forms incl. `{ port, host }` and Unix paths, `address()`, `close(cb)`, `getConnections`, `maxConnections`, `ref` / `unref`; `'listening'` / `'connection'` / `'close'` / `'error'`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | A listening server keeps the process alive; `close()` emits `'close'` once its connections end |
|
|
736
|
+
| `connect` / `createConnection` / `Socket` (a duplex stream: `write` / `end` / `'data'` / `'end'`, `setEncoding`, `remoteAddress` / `remotePort` / `localPort`, `setTimeout` + `'timeout'`, `setNoDelay`, `setKeepAlive`, `destroy`, `'close'(hadError)`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | One goroutine reads the `net.Conn`; `allowHalfOpen: false` ends the socket after `'end'`, as in Node |
|
|
737
|
+
| Node's errors (`connect ECONNREFUSED 127.0.0.1:80`, `EADDRINUSE`, `ECONNRESET`; `code` / `errno` / `syscall` / `address` / `port`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
|
|
738
|
+
| `isIP` / `isIPv4` / `isIPv6` | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
|
|
739
|
+
| `BlockList` (`addAddress` / `addRange` / `addSubnet` / `check` / `rules` / `isBlockList`) / `SocketAddress` (`parse`, `toJSON`) | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | `net/netip`; IPv4-mapped IPv6 addresses match IPv4 rules, as in Node |
|
|
740
|
+
| `net.Stream`, `get/setDefaultAutoSelectFamily(AttemptTimeout)` | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | Go's dialer always races IPv4 / IPv6, so the settings are reported but not used |
|
|
741
|
+
| IPC handle passing (`send(msg, socket)`) | ❌ | — | Needs file-descriptor passing over the IPC channel |
|
|
742
|
+
|
|
743
|
+
#### `node:dns`
|
|
744
|
+
|
|
745
|
+
| API | Status | Probe | Notes |
|
|
746
|
+
| -------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | --------------------------------------------------------------------- |
|
|
747
|
+
| `lookup` (`family`, `all`) and `dns/promises` / `dns.promises` `lookup` | ✅ | [lib-node-dns.ts](conformance/lib-node-dns.ts) | Go's resolver; `getaddrinfo ENOTFOUND host` errors with `hostname` |
|
|
748
|
+
| `resolve` (rrtype) / `resolve4` / `resolve6` / `resolveCname` / `resolveMx` / `resolveTxt` / `resolveNs` / `resolveSrv` / `reverse` (callback and promise forms), `getServers` | ✅ | — | Implemented, not probed (needs a network); `getServers` reads `/etc/resolv.conf` |
|
|
749
|
+
| `Resolver` class (callback and `dns/promises` forms: `setServers` / `getServers` / `setLocalAddress` / `cancel`, `timeout` option), module `setServers`, `lookupService` | ✅ | [lib-node-dns-resolver.ts](conformance/lib-node-dns-resolver.ts) | Go's pure resolver dialing the configured servers in turn; `ETIMEOUT` / `ECANCELLED`; services from `/etc/services` |
|
|
750
|
+
| `resolveAny` / `resolveCaa` / `resolveNaptr` / `resolvePtr` / `resolveSoa`, the `ttl` option, `tries` | ❌ | — | Go's resolver does not expose these records or TTLs |
|
|
751
|
+
|
|
752
|
+
#### `node:http` / `node:https`
|
|
753
|
+
|
|
754
|
+
| API | Status | Probe | Notes |
|
|
755
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
756
|
+
| `createServer((req, res) => …)` / `'request'`; `IncomingMessage` (a Readable: `method`, `url`, `headers`, `headersDistinct`, `rawHeaders`, `httpVersion`, `socket.remoteAddress`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | Go's `net/http` serves the connections; bodies stream into the request |
|
|
757
|
+
| `ServerResponse` (a Writable: `statusCode`, `setHeader` / `getHeader` / `getHeaders` / `hasHeader` / `removeHeader` / `appendHeader`, `writeHead`, `write`, `end`, `headersSent`, `'finish'`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `end(data)` without earlier writes sends a `Content-Length`; `write()` streams a chunked body |
|
|
758
|
+
| `request` / `get` (URL strings, `URL` objects, options: `hostname` / `port` / `path` / `method` / `headers` / `auth` / `timeout` / `signal` / `socketPath`); `ClientRequest` (`setHeader`, `write`, `end`, `destroy`, `'response'`, `'error'`, `'timeout'`) | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | No redirects are followed and bodies are not decompressed, as in Node; `destroy()` before a response fails with `socket hang up` |
|
|
759
|
+
| `STATUS_CODES` / `METHODS` / `maxHeaderSize` / `Agent` / `globalAgent` | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `Agent` options are accepted; Go's transport pools connections |
|
|
760
|
+
| `https.createServer({ key, cert })` / `https.request` / `https.get` (`ca`, `rejectUnauthorized`, `servername`, client `key` / `cert`) | ✅ | [lib-node-https.ts](conformance/lib-node-https.ts) | Certificate checks as in [node:tls](#nodetls) |
|
|
761
|
+
| `headers` values | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | Repeated headers are joined with `, ` (`; ` for `cookie`) — including `set-cookie`, which Node keeps as an array: use `headersDistinct['set-cookie']` |
|
|
762
|
+
| Server `'upgrade'` / `'connect'` (`req, socket, head`) and client `'upgrade'` / `'connect'` events | ✅ | [lib-node-http-upgrade.ts](conformance/lib-node-http-upgrade.ts) | The server hijacks the connection; an upgrade nobody listens for is an ordinary request, an unhandled CONNECT closes the connection, as in Node |
|
|
763
|
+
| `statusMessage` on responses we send, `'checkContinue'`, `Agent` socket pooling control, trailers we send | ❌ | — | Go's `ResponseWriter` sends its standard reason phrases |
|
|
764
|
+
|
|
765
|
+
#### `node:http2`
|
|
766
|
+
|
|
767
|
+
| API | Status | Probe | Notes |
|
|
768
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
769
|
+
| `createServer` (cleartext h2c) / `createSecureServer({ key, cert, allowHTTP1 })`; `'stream'` → `ServerHttp2Stream` (`respond`, `write` / `end`, `respondWithFile`, `close`, a Duplex over the request body) with `:method` / `:path` / `:scheme` / `:authority` headers | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | On `net/http`'s HTTP/2 (`http.Protocols`) |
|
|
770
|
+
| Compatibility API: `(req, res)` handlers get `Http2ServerRequest` / `Http2ServerResponse` (`httpVersion` `'2.0'`, pseudo-headers in `req.headers`) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | The node:http objects |
|
|
771
|
+
| `connect(authority, { ca, rejectUnauthorized, servername })` → `ClientHttp2Session` (`request`, `close`, `destroy`, `'connect'` / `'error'` / `'close'`, `alpnProtocol`, `encrypted`); `ClientHttp2Stream` (`'response'` with `:status`, body as a Readable, request bodies) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | Connection failures error the session and cancel its streams (`ERR_HTTP2_STREAM_CANCEL`); request bodies are sent once the writable side ends |
|
|
772
|
+
| `constants`, `getDefaultSettings` | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | |
|
|
773
|
+
| Server push, `ping`, `settings` / `goaway` / `altsvc`, `'session'` events, `getPackedSettings`, upgrades from HTTP/1 | ❌ | — | Go's standard library does not expose HTTP/2 frames |
|
|
774
|
+
|
|
775
|
+
#### `node:tls`
|
|
776
|
+
|
|
777
|
+
| API | Status | Probe | Notes |
|
|
778
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
779
|
+
| `createServer({ key, cert, ca, requestCert, ALPNProtocols, minVersion, maxVersion }, cb)` / `'secureConnection'` | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Handshakes run on the accept goroutine |
|
|
780
|
+
| `connect` (`host`, `port`, `ca`, `servername`, `rejectUnauthorized`, client `key` / `cert`) / `'secureConnect'`; `TLSSocket` (`authorized`, `authorizationError`, `encrypted`, `alpnProtocol`, `getPeerCertificate`, `getProtocol`, `getCipher`) | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Node's verification codes: `DEPTH_ZERO_SELF_SIGNED_CERT`, `SELF_SIGNED_CERT_IN_CHAIN`, `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `CERT_HAS_EXPIRED`, `ERR_TLS_CERT_ALTNAME_INVALID` |
|
|
781
|
+
| `createSecureContext` / `getCiphers` / `DEFAULT_MIN_VERSION` / `DEFAULT_MAX_VERSION` | ✅ | — | Implemented, not probed; cipher names are Go's |
|
|
782
|
+
| `checkServerIdentity` (function and `connect` option) | ✅ | [lib-node-tls-identity.ts](conformance/lib-node-tls-identity.ts) | Node's rules: one leftmost wildcard label, IP altnames, CN only without DNS altnames |
|
|
783
|
+
| PFX / passphrase-protected keys, session resumption, `renegotiate`, `rootCertificates` | ❌ | — | Not implemented |
|
|
784
|
+
|
|
785
|
+
#### `node:dgram`
|
|
786
|
+
|
|
787
|
+
| API | Status | Probe | Notes |
|
|
788
|
+
| ----------------------------------------------------------------------------------------- | :----: | ---------------------------------------------- | --------------------------------------------- |
|
|
789
|
+
| `createSocket('udp4' \| 'udp6' \| { type })`, `bind`, `send` (offset / length forms, callback), `'message'(msg, rinfo)`, `address`, `close`, `connect` / `disconnect` / `remoteAddress`, `ref` / `unref` | ✅ | [lib-node-dgram.ts](conformance/lib-node-dgram.ts) | `send` binds an unbound socket first, as in Node |
|
|
790
|
+
| Multicast membership, `setBroadcast` / `setTTL` effects | ❌ | — | Accepted without effect |
|
|
791
|
+
|
|
792
|
+
#### `fetch`
|
|
793
|
+
|
|
794
|
+
| API | Status | Probe | Notes |
|
|
795
|
+
| ----------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
796
|
+
| `fetch(url \| Request, { method, headers, body, redirect, signal })`; `Response` (`status`, `ok`, `statusText`, `headers`, `url`, `redirected`, `text()` / `json()` / `bytes()` / `arrayBuffer()`, `clone()`, `Response.json` / `error` / `redirect`) | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Follows redirects (`manual` / `error` too); gzip bodies are decompressed; failures reject with `TypeError('fetch failed')` whose `cause` is the system error; aborts reject with `AbortError` |
|
|
797
|
+
| `Headers` (`get` / `set` / `append` / `has` / `delete` / `forEach` / `entries` / `getSetCookie`, `for...of`) / `Request` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Names are lower-cased and iterated in sorted order |
|
|
798
|
+
| Streaming bodies: `response.body` / `request.body` as `ReadableStream`s, `ReadableStream` request bodies (`duplex: 'half'`), `clone()` tees the body | ✅ | [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | Network bodies are read a chunk per pull |
|
|
799
|
+
| `Blob` / `FormData` bodies (multipart encoding), `blob()` / `formData()` (multipart and urlencoded) | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts), [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | |
|
|
800
|
+
| The Fetch standard's bad-port list (also on redirects) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | `TypeError: fetch failed` with cause `bad port` |
|
|
801
|
+
|
|
802
|
+
#### `node:async_hooks`
|
|
803
|
+
|
|
804
|
+
| API | Status | Probe | Notes |
|
|
805
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
806
|
+
| `AsyncLocalStorage` (`run`, `getStore`, `enterWith`, `exit`, `disable`, static `bind` / `snapshot`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | The store follows timers, `setImmediate`, `nextTick`, microtasks, promise callbacks, `await`, async function bodies, fs / dns callbacks; streams, sockets and servers emit in the context they were created / listened in |
|
|
807
|
+
| `AsyncResource` (`runInAsyncScope`, `bind`, `asyncId`, static `bind`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | Captures the context it is created in |
|
|
808
|
+
| `createHook` callbacks (`init` / `before` / `after` / `destroy`), real `executionAsyncId` / `triggerAsyncId` | ❌ | — | `createHook` is accepted but never calls back; ids are always `1` / `0` |
|
|
809
|
+
|
|
810
|
+
#### `node:test`
|
|
811
|
+
|
|
812
|
+
| API | Status | Probe | Notes |
|
|
813
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
814
|
+
| `test` / `it` / `describe` / `suite` (+ `.skip` / `.todo` / `.only`; `skip` / `todo` / `timeout` options); sync, async and `done`-callback tests | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Tests run one after another once the main module has finished, as in Node |
|
|
815
|
+
| `before` / `after` / `beforeEach` / `afterEach` (file and suite level, `t.before` & co.) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Node's order: outer `beforeEach` first, inner `afterEach` first |
|
|
816
|
+
| `TestContext`: `t.test` subtests, `t.skip`, `t.todo`, `t.diagnostic`, `t.plan`, `t.name`, `t.fullName`, `t.signal`, `t.mock` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | |
|
|
817
|
+
| Reporting: TAP (Node's default when stdout is not a terminal) / spec (on a terminal); `tests` / `suites` / `pass` / `fail` / `cancelled` / `skipped` / `todo` counters; exit code 1 on failure | ✅ | [lib-node-test-fail.ts](conformance/lib-node-test-fail.ts) | Same layout as Node, without `location` / `stack` (a native binary has no source positions); timeouts count as cancelled |
|
|
818
|
+
| `mock.fn(original?, implementation?)`; `fn.mock.calls` / `callCount()` / `mockImplementation(Once)` / `resetCalls()` / `restore()` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | The mock has the original's Go function type |
|
|
819
|
+
| `t.assert` (`node:assert`'s functions, counted by `t.plan`) and `mock.timers` (`enable({ apis, now })`, `tick`, `runAll`, `setTime`, `reset`; `setTimeout` / `setInterval` / `setImmediate` / `Date`) | ✅ | [lib-node-test-mock-timers.ts](conformance/lib-node-test-mock-timers.ts) | Mocked timers do not keep the process alive; `t.mock` timers reset after each test |
|
|
820
|
+
| `mock.method` / `mock.getter` / `mock.setter` | ❌ | — | Go methods cannot be replaced at runtime |
|
|
821
|
+
| Snapshots, coverage, `--test` / `--test-reporter` / `--test-only` flags, `run()` | ❌ | — | Not implemented (`only` runs everything, like Node without `--test-only`) |
|
|
822
|
+
|
|
823
|
+
#### `node:worker_threads`
|
|
824
|
+
|
|
825
|
+
| API | Status | Probe | Notes |
|
|
826
|
+
| ---------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
827
|
+
| `Worker` (`workerData`, `argv`, `env` / `SHARE_ENV`; `postMessage`, `'online'` / `'message'` / `'error'` / `'exit'`, `terminate()`, `threadId`, `ref` / `unref`); `isMainThread`, `parentPort`, `workerData`, `threadId` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | A worker re-runs the current program as a child process (an isolate of its own, as in Node) linked over loopback TCP; branch on `isMainThread` |
|
|
828
|
+
| Messages: structured clone of JSON-like values, Buffers (arriving as `Uint8Array`s), `Map`, `Set`, `Date`, `bigint`, errors | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Functions throw `DataCloneError` |
|
|
829
|
+
| Uncaught exceptions in a worker / `terminate()` | ✅ | [lib-node-worker-errors.ts](conformance/lib-node-worker-errors.ts) | `'error'` with the message, then exit code `1` |
|
|
830
|
+
| `MessageChannel` / `MessagePort` (`postMessage`, `on('message')`, `onmessage`, `start`, `close`, `ref` / `unref`), `receiveMessageOnPort`, `BroadcastChannel`, `get/setEnvironmentData` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Channels and broadcast channels work within one process (ports can't be transferred to workers) |
|
|
831
|
+
| Workers for another file / `eval: true`, transferring ports, `SharedArrayBuffer` / `Atomics`, `resourceLimits`, worker `stdout: true` streams | ❌ | — | One binary holds one program; memory is not shared between processes |
|
|
832
|
+
|
|
833
|
+
#### `node:sqlite`
|
|
834
|
+
|
|
835
|
+
SQLite comes from [ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3): SQLite compiled
|
|
836
|
+
to Wasm and translated to Go, so programs need no cgo and still cross-compile. The npm package
|
|
837
|
+
ships the driver in [govendor/](govendor/) (`npm run vendor:go` updates it), so builds need no
|
|
838
|
+
network; it adds about 10 MB to a binary. Rows are records: `row.name`, `row as Row` and
|
|
839
|
+
`rows as Row[]` all work.
|
|
840
|
+
|
|
841
|
+
| API | Status | Probe | Notes |
|
|
842
|
+
| --- | :----: | ----- | ----- |
|
|
843
|
+
| `new DatabaseSync(path, options)` (`:memory:`, files, `file:` URIs), `open` / `close` / `isOpen` / `isTransaction` / `location()`, `exec` | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | `open: false` defers to `open()` |
|
|
844
|
+
| `prepare(sql, options)`; `StatementSync#run` (`{ changes, lastInsertRowid }`) / `get` / `all` / `iterate` (`for…of`, `next()`) | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Rows are objects keyed by column name; `get()` without a row is `undefined` |
|
|
845
|
+
| Parameters: anonymous `?`, named `:x` / `$x` / `@x`, bare names (`{ x }`); values `null`, number (REAL), bigint (INTEGER), string, boolean (1 / 0), `Uint8Array` / Buffer | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Results: INTEGER → number (bigint with `readBigInts`), REAL → number, TEXT → string, BLOB → `Uint8Array`, NULL → `null` |
|
|
846
|
+
| Options `readOnly`, `enableForeignKeyConstraints` (on by default), `enableDoubleQuotedStringLiterals`, `timeout`, `readBigInts`, `returnArrays`, `allowBareNamedParameters`, `allowUnknownNamedParameters`, `defensive`, `limits` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | `db.limits.x = n` sets a limit; `Infinity` restores the maximum |
|
|
847
|
+
| `columns()`, `sourceSQL`, `expandedSQL`, `setReadBigInts` / `setReturnArrays` / `setAllowBareNamedParameters` / `setAllowUnknownNamedParameters`, `enableDefensive` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | |
|
|
848
|
+
| `createTagStore()` (`` sql.get`… ${x}` `` / `all` / `run` / `iterate`, `size`, `capacity`, `clear`) | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | One cached statement per template, least recently used out first |
|
|
849
|
+
| `function(name, options, fn)` (`deterministic`, `directOnly`, `varargs`, `useBigIntArguments`), `aggregate(name, { start, step, result, inverse })` (window functions) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | A throw inside the callback is rethrown by the statement |
|
|
850
|
+
| `setAuthorizer(callback)`, `constants` (`SQLITE_OK` / `DENY` / `IGNORE`, action codes, `SQLITE_CHANGESET_*`) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | |
|
|
851
|
+
| Errors: SQLite's message with `code: 'ERR_SQLITE_ERROR'`, `errcode` (extended result code), `errstr`; `ERR_INVALID_STATE` / `ERR_OUT_OF_RANGE` / `ERR_INVALID_ARG_VALUE` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Same messages as Node 24 |
|
|
852
|
+
| `backup(db, path, { source, rate, progress })` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Copies `rate` pages per event-loop turn; resolves with the page count |
|
|
853
|
+
| `loadExtension` / `enableLoadExtension` | ❌ | — | SQLite runs as Wasm inside the program; native extensions can't load |
|
|
854
|
+
| `createSession` / `applyChangeset` | ❌ | — | The bundled SQLite build has no session extension |
|
|
855
|
+
| `serialize` / `deserialize` | ❌ | — | The driver has no `sqlite3_serialize` binding |
|
|
856
|
+
| `undefined` as a parameter value, `[Object: null prototype]` rows | ❌ | — | `undefined` and `null` are both `nil` (binds NULL instead of throwing); rows print as plain objects |
|
|
857
|
+
| Finalizing a statement when it is garbage-collected | ❌ | — | Statements live until `db.close()` (Go has no hook that is safe here): re-preparing in a loop holds every copy until then; reuse statements or `createTagStore()` |
|
|
858
|
+
|
|
859
|
+
#### `node:inspector`
|
|
860
|
+
|
|
861
|
+
| API | Status | Probe | Notes |
|
|
862
|
+
| --- | :----: | ----- | ----- |
|
|
863
|
+
| Debugger / profiler sessions (`Session`, `open`, `url`) | ❌ | — | Speaks the inspector protocol of a JavaScript engine; a native binary has none |
|
|
864
|
+
|
|
865
|
+
#### `node:repl`
|
|
866
|
+
|
|
867
|
+
| API | Status | Probe | Notes |
|
|
868
|
+
| --- | :----: | ----- | ----- |
|
|
869
|
+
| `start` / `REPLServer` | ❌ | — | Evaluates JavaScript at runtime; needs a JavaScript engine |
|
|
870
|
+
|
|
871
|
+
#### `node:vm`
|
|
872
|
+
|
|
873
|
+
| API | Status | Probe | Notes |
|
|
874
|
+
| --- | :----: | ----- | ----- |
|
|
875
|
+
| `Script` / `runInContext` / `createContext` / `compileFunction` & co. | ❌ | — | Compiles and runs JavaScript code at runtime; needs a JavaScript engine |
|
|
876
|
+
|
|
877
|
+
#### `node:v8`
|
|
878
|
+
|
|
879
|
+
| API | Status | Probe | Notes |
|
|
880
|
+
| --- | :----: | ----- | ----- |
|
|
881
|
+
| Heap statistics / snapshots, `serialize` / `deserialize`, flags | ❌ | — | V8 internals; there is no V8 in a native binary |
|
|
882
|
+
|
|
883
|
+
#### `node:wasi`
|
|
884
|
+
|
|
885
|
+
| API | Status | Probe | Notes |
|
|
886
|
+
| --- | :----: | ----- | ----- |
|
|
887
|
+
| `WASI` | ❌ | — | Runs WebAssembly modules; the generated program has no Wasm runtime |
|
|
888
|
+
|
|
889
|
+
#### `node:sea`
|
|
890
|
+
|
|
891
|
+
| API | Status | Probe | Notes |
|
|
892
|
+
| --- | :----: | ----- | ----- |
|
|
893
|
+
| `isSea` / `getAsset` / `getRawAsset` | ❌ | — | Single-executable-application assets; TypeNative already produces a native binary |
|
|
894
|
+
|
|
895
|
+
#### `node:trace_events`
|
|
896
|
+
|
|
897
|
+
| API | Status | Probe | Notes |
|
|
898
|
+
| --- | :----: | ----- | ----- |
|
|
899
|
+
| `createTracing` / `getEnabledCategories` | ❌ | — | V8 / Node trace categories; no native equivalent |
|
|
900
|
+
|
|
901
|
+
#### `node:module`
|
|
902
|
+
|
|
903
|
+
| API | Status | Probe | Notes |
|
|
904
|
+
| --- | :----: | ----- | ----- |
|
|
905
|
+
| `createRequire` / `register` / `builtinModules` / `findPackageJSON` & co. | ❌ | — | Loader hooks for a JavaScript runtime; imports are resolved at compile time |
|
|
906
|
+
|
|
907
|
+
#### `node:test/reporters`
|
|
908
|
+
|
|
909
|
+
| API | Status | Probe | Notes |
|
|
910
|
+
| --- | :----: | ----- | ----- |
|
|
911
|
+
| `tap` / `spec` / `dot` / `junit` / `lcov` | ❌ | — | Reporters consume `run()`'s event stream, and `run()` runs test files as separate processes; one binary holds one program (see [test](#nodetest)) |
|
|
912
|
+
|
|
913
|
+
#### `node:domain`
|
|
914
|
+
|
|
915
|
+
| API | Status | Probe | Notes |
|
|
916
|
+
| --- | :----: | ----- | ----- |
|
|
917
|
+
| `create` / `Domain` | ❌ | — | Deprecated upstream |
|
|
475
918
|
|
|
476
919
|
### Go bridges (`go:*`)
|
|
477
920
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
|
482
|
-
|
|
|
483
|
-
| `go:archive/tar`
|
|
484
|
-
| `go:archive/zip`
|
|
485
|
-
| `go:bufio`
|
|
486
|
-
| `go:bytes`
|
|
487
|
-
| `go:cmp`
|
|
488
|
-
| `go:compress/bzip2`
|
|
489
|
-
| `go:compress/flate`
|
|
490
|
-
| `go:compress/gzip`
|
|
491
|
-
| `go:compress/lzw`
|
|
492
|
-
| `go:compress/zlib`
|
|
493
|
-
| `go:container/heap`
|
|
494
|
-
| `go:container/list`
|
|
495
|
-
| `go:container/ring`
|
|
496
|
-
| `go:context`
|
|
497
|
-
| `go:crypto`
|
|
498
|
-
| `go:crypto/aes`
|
|
499
|
-
| `go:crypto/cipher`
|
|
500
|
-
| `go:crypto/des`
|
|
501
|
-
| `go:crypto/dsa`
|
|
502
|
-
| `go:crypto/ecdh`
|
|
503
|
-
| `go:crypto/ecdsa`
|
|
504
|
-
| `go:crypto/ed25519`
|
|
505
|
-
| `go:crypto/elliptic`
|
|
506
|
-
| `go:crypto/fips140`
|
|
507
|
-
| `go:crypto/hkdf`
|
|
508
|
-
| `go:crypto/hmac`
|
|
509
|
-
| `go:crypto/hpke`
|
|
510
|
-
| `go:crypto/md5`
|
|
511
|
-
| `go:crypto/mlkem`
|
|
512
|
-
| `go:crypto/mlkem/mlkemtest`
|
|
513
|
-
| `go:crypto/pbkdf2`
|
|
514
|
-
| `go:crypto/rand`
|
|
515
|
-
| `go:crypto/rc4`
|
|
516
|
-
| `go:crypto/rsa`
|
|
517
|
-
| `go:crypto/sha1`
|
|
518
|
-
| `go:crypto/sha256`
|
|
519
|
-
| `go:crypto/sha3`
|
|
520
|
-
| `go:crypto/sha512`
|
|
521
|
-
| `go:crypto/subtle`
|
|
522
|
-
| `go:crypto/tls`
|
|
523
|
-
| `go:crypto/x509`
|
|
524
|
-
| `go:crypto/x509/pkix`
|
|
525
|
-
| `go:database/sql`
|
|
526
|
-
| `go:database/sql/driver`
|
|
527
|
-
| `go:debug/buildinfo`
|
|
528
|
-
| `go:debug/dwarf`
|
|
529
|
-
| `go:debug/elf`
|
|
530
|
-
| `go:debug/gosym`
|
|
531
|
-
| `go:debug/macho`
|
|
532
|
-
| `go:debug/pe`
|
|
533
|
-
| `go:debug/plan9obj`
|
|
534
|
-
| `go:
|
|
535
|
-
| `go:encoding`
|
|
536
|
-
| `go:encoding/
|
|
537
|
-
| `go:encoding/
|
|
538
|
-
| `go:encoding/
|
|
539
|
-
| `go:encoding/
|
|
540
|
-
| `go:encoding/
|
|
541
|
-
| `go:encoding/
|
|
542
|
-
| `go:encoding/
|
|
543
|
-
| `go:encoding/
|
|
544
|
-
| `go:encoding/
|
|
545
|
-
| `go:encoding/
|
|
546
|
-
| `go:
|
|
547
|
-
| `go:
|
|
548
|
-
| `go:
|
|
549
|
-
| `go:
|
|
550
|
-
| `go:go/ast`
|
|
551
|
-
| `go:go/build`
|
|
552
|
-
| `go:go/build/constraint`
|
|
553
|
-
| `go:go/constant`
|
|
554
|
-
| `go:go/doc`
|
|
555
|
-
| `go:go/doc/comment`
|
|
556
|
-
| `go:go/format`
|
|
557
|
-
| `go:go/importer`
|
|
558
|
-
| `go:go/parser`
|
|
559
|
-
| `go:go/printer`
|
|
560
|
-
| `go:go/scanner`
|
|
561
|
-
| `go:go/token`
|
|
562
|
-
| `go:go/types`
|
|
563
|
-
| `go:go/version`
|
|
564
|
-
| `go:hash`
|
|
565
|
-
| `go:hash/adler32`
|
|
566
|
-
| `go:hash/crc32`
|
|
567
|
-
| `go:hash/crc64`
|
|
568
|
-
| `go:hash/fnv`
|
|
569
|
-
| `go:hash/maphash`
|
|
570
|
-
| `go:html`
|
|
571
|
-
| `go:html/template`
|
|
572
|
-
| `go:image`
|
|
573
|
-
| `go:image/color`
|
|
574
|
-
| `go:image/color/palette`
|
|
575
|
-
| `go:image/draw`
|
|
576
|
-
| `go:image/gif`
|
|
577
|
-
| `go:image/jpeg`
|
|
578
|
-
| `go:image/png`
|
|
579
|
-
| `go:index/suffixarray`
|
|
580
|
-
| `go:io`
|
|
581
|
-
| `go:io/fs`
|
|
582
|
-
| `go:io/ioutil`
|
|
583
|
-
| `go:iter`
|
|
584
|
-
| `go:log`
|
|
585
|
-
| `go:log/slog`
|
|
586
|
-
| `go:log/syslog`
|
|
587
|
-
| `go:maps`
|
|
588
|
-
| `go:math`
|
|
589
|
-
| `go:math/big`
|
|
590
|
-
| `go:math/bits`
|
|
591
|
-
| `go:math/cmplx`
|
|
592
|
-
| `go:math/rand`
|
|
593
|
-
| `go:math/rand/v2`
|
|
594
|
-
| `go:mime`
|
|
595
|
-
| `go:mime/multipart`
|
|
596
|
-
| `go:mime/quotedprintable`
|
|
597
|
-
| `go:net`
|
|
598
|
-
| `go:net/http`
|
|
599
|
-
| `go:net/http/cgi`
|
|
600
|
-
| `go:net/http/cookiejar`
|
|
601
|
-
| `go:net/http/fcgi`
|
|
602
|
-
| `go:net/http/httptest`
|
|
603
|
-
| `go:net/http/httptrace`
|
|
604
|
-
| `go:net/http/httputil`
|
|
605
|
-
| `go:net/http/pprof`
|
|
606
|
-
| `go:net/mail`
|
|
607
|
-
| `go:net/netip`
|
|
608
|
-
| `go:net/rpc`
|
|
609
|
-
| `go:net/rpc/jsonrpc`
|
|
610
|
-
| `go:net/smtp`
|
|
611
|
-
| `go:net/textproto`
|
|
612
|
-
| `go:net/url`
|
|
613
|
-
| `go:os`
|
|
614
|
-
| `go:os/exec`
|
|
615
|
-
| `go:os/signal`
|
|
616
|
-
| `go:os/user`
|
|
617
|
-
| `go:path`
|
|
618
|
-
| `go:path/filepath`
|
|
619
|
-
| `go:
|
|
620
|
-
| `go:
|
|
621
|
-
| `go:regexp`
|
|
622
|
-
| `go:
|
|
623
|
-
| `go:runtime`
|
|
624
|
-
| `go:runtime/
|
|
625
|
-
| `go:runtime/
|
|
626
|
-
| `go:runtime/
|
|
627
|
-
| `go:
|
|
628
|
-
| `go:
|
|
629
|
-
| `go:
|
|
630
|
-
| `go:
|
|
631
|
-
| `go:
|
|
632
|
-
| `go:
|
|
633
|
-
| `go:sync`
|
|
634
|
-
| `go:
|
|
635
|
-
| `go:
|
|
636
|
-
| `go:testing`
|
|
637
|
-
| `go:testing/
|
|
638
|
-
| `go:testing/
|
|
639
|
-
| `go:testing/
|
|
640
|
-
| `go:testing/
|
|
641
|
-
| `go:testing/
|
|
642
|
-
| `go:
|
|
643
|
-
| `go:text/
|
|
644
|
-
| `go:text/
|
|
645
|
-
| `go:text/template`
|
|
646
|
-
| `go:
|
|
647
|
-
| `go:time`
|
|
648
|
-
| `go:
|
|
649
|
-
| `go:unicode`
|
|
650
|
-
| `go:unicode/
|
|
651
|
-
| `go:
|
|
652
|
-
| `go:
|
|
653
|
-
| `go:
|
|
654
|
-
| `go:
|
|
921
|
+
Status: ✅ probed, ⚠️ typed (declared and bridged), no probe yet, ❌ excluded.
|
|
922
|
+
|
|
923
|
+
<!-- go-bridges:start -->
|
|
924
|
+
| Module | Status | Probe | Notes |
|
|
925
|
+
| ------ | :----: | ----- | ----- |
|
|
926
|
+
| `go:archive/tar` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | tar archive read/write |
|
|
927
|
+
| `go:archive/zip` | ✅ | [lib-go-archive.ts](conformance/lib-go-archive.ts) | ZIP archive read/write |
|
|
928
|
+
| `go:bufio` | ✅ | [lib-go-bufio.ts](conformance/lib-go-bufio.ts) | Buffered I/O |
|
|
929
|
+
| `go:bytes` | ✅ | [lib-go-bytes.ts](conformance/lib-go-bytes.ts) | Byte-slice utilities |
|
|
930
|
+
| `go:cmp` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Ordered comparison primitives |
|
|
931
|
+
| `go:compress/bzip2` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | bzip2 decompression (read-only) |
|
|
932
|
+
| `go:compress/flate` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | DEFLATE compression |
|
|
933
|
+
| `go:compress/gzip` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | gzip read/write |
|
|
934
|
+
| `go:compress/lzw` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | LZW compression (GIF/PDF/TIFF) |
|
|
935
|
+
| `go:compress/zlib` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | zlib read/write |
|
|
936
|
+
| `go:container/heap` | ⚠️ | — | Needs a TS class satisfying `heap.Interface`; TS classes cannot implement Go interfaces yet |
|
|
937
|
+
| `go:container/list` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Doubly linked list |
|
|
938
|
+
| `go:container/ring` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Circular list |
|
|
939
|
+
| `go:context` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Cancellation and deadlines |
|
|
940
|
+
| `go:crypto` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | Crypto constants and algorithm selection |
|
|
941
|
+
| `go:crypto/aes` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | AES encryption |
|
|
942
|
+
| `go:crypto/cipher` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Block cipher modes (GCM, CBC, CTR) |
|
|
943
|
+
| `go:crypto/des` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | DES / triple DES (deprecated) |
|
|
944
|
+
| `go:crypto/dsa` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | DSA signatures (deprecated) |
|
|
945
|
+
| `go:crypto/ecdh` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDH key exchange |
|
|
946
|
+
| `go:crypto/ecdsa` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDSA signatures |
|
|
947
|
+
| `go:crypto/ed25519` | ✅ | [lib-go-ed25519.ts](conformance/lib-go-ed25519.ts) | Ed25519 signatures |
|
|
948
|
+
| `go:crypto/elliptic` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | Elliptic curves (legacy; use ecdh/ecdsa) |
|
|
949
|
+
| `go:crypto/fips140` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | FIPS 140-3 mode controls |
|
|
950
|
+
| `go:crypto/hkdf` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | HKDF key derivation |
|
|
951
|
+
| `go:crypto/hmac` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | HMAC keyed hashing |
|
|
952
|
+
| `go:crypto/hpke` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | HPKE encryption (RFC 9180) |
|
|
953
|
+
| `go:crypto/md5` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | MD5 hash |
|
|
954
|
+
| `go:crypto/mlkem` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ML-KEM post-quantum key encapsulation |
|
|
955
|
+
| `go:crypto/mlkem/mlkemtest` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | Deterministic ML-KEM encapsulation |
|
|
956
|
+
| `go:crypto/pbkdf2` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | PBKDF2 key derivation |
|
|
957
|
+
| `go:crypto/rand` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Cryptographically secure random bytes |
|
|
958
|
+
| `go:crypto/rc4` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | RC4 stream cipher (deprecated) |
|
|
959
|
+
| `go:crypto/rsa` | ✅ | [lib-go-rsa.ts](conformance/lib-go-rsa.ts) | RSA signatures / encryption |
|
|
960
|
+
| `go:crypto/sha1` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-1 hash |
|
|
961
|
+
| `go:crypto/sha256` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | SHA-224 / SHA-256 hashes |
|
|
962
|
+
| `go:crypto/sha3` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | SHA-3 / SHAKE hashes |
|
|
963
|
+
| `go:crypto/sha512` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-384 / SHA-512 family hashes |
|
|
964
|
+
| `go:crypto/subtle` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Constant-time comparison primitives |
|
|
965
|
+
| `go:crypto/tls` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | TLS client/server; loopback probe is a later phase |
|
|
966
|
+
| `go:crypto/x509` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 certificates and revocation |
|
|
967
|
+
| `go:crypto/x509/pkix` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 ASN.1/PKIX structures |
|
|
968
|
+
| `go:database/sql` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | No std driver: registry and errors probed |
|
|
969
|
+
| `go:database/sql/driver` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | Driver interfaces and value converters |
|
|
970
|
+
| `go:debug/buildinfo` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Build info from executables |
|
|
971
|
+
| `go:debug/dwarf` | ⚠️ | — | DWARF debug info parsing |
|
|
972
|
+
| `go:debug/elf` | ⚠️ | — | ELF object files |
|
|
973
|
+
| `go:debug/gosym` | ⚠️ | — | Go symbol tables |
|
|
974
|
+
| `go:debug/macho` | ⚠️ | — | Mach-O object files |
|
|
975
|
+
| `go:debug/pe` | ⚠️ | — | PE (Windows) object files |
|
|
976
|
+
| `go:debug/plan9obj` | ⚠️ | — | Plan 9 object files |
|
|
977
|
+
| `go:encoding` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | Shared encoding interfaces |
|
|
978
|
+
| `go:encoding/ascii85` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ascii85 encoding |
|
|
979
|
+
| `go:encoding/asn1` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ASN.1 DER encoding |
|
|
980
|
+
| `go:encoding/base32` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | base32 encoding |
|
|
981
|
+
| `go:encoding/base64` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | base64 encoding |
|
|
982
|
+
| `go:encoding/binary` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Binary packing / varints |
|
|
983
|
+
| `go:encoding/csv` | ✅ | [lib-go-csv.ts](conformance/lib-go-csv.ts) | CSV read/write |
|
|
984
|
+
| `go:encoding/gob` | ✅ | [lib-go-gob.ts](conformance/lib-go-gob.ts) | Go binary serialization |
|
|
985
|
+
| `go:encoding/hex` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | hex encoding |
|
|
986
|
+
| `go:encoding/json` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | JSON encode/decode |
|
|
987
|
+
| `go:encoding/pem` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | PEM encoding |
|
|
988
|
+
| `go:encoding/xml` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | XML read/write |
|
|
989
|
+
| `go:errors` | ✅ | [lib-go-errors.ts](conformance/lib-go-errors.ts) | Error creation / wrapping / inspection |
|
|
990
|
+
| `go:expvar` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Public process variables |
|
|
991
|
+
| `go:flag` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | Command-line flag parsing |
|
|
992
|
+
| `go:fmt` | ✅ | [lib-go-fmt.ts](conformance/lib-go-fmt.ts) | Formatted I/O; integer verbs take TS numbers |
|
|
993
|
+
| `go:go/ast` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go syntax tree |
|
|
994
|
+
| `go:go/build` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go package build metadata |
|
|
995
|
+
| `go:go/build/constraint` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Build-tag constraint parsing |
|
|
996
|
+
| `go:go/constant` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Untyped constant values |
|
|
997
|
+
| `go:go/doc` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go doc extraction |
|
|
998
|
+
| `go:go/doc/comment` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Doc comment parse/print |
|
|
999
|
+
| `go:go/format` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go source formatting |
|
|
1000
|
+
| `go:go/importer` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Export-data type importer |
|
|
1001
|
+
| `go:go/parser` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go source parser |
|
|
1002
|
+
| `go:go/printer` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go AST printer |
|
|
1003
|
+
| `go:go/scanner` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go tokenizer |
|
|
1004
|
+
| `go:go/token` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go tokens / positions |
|
|
1005
|
+
| `go:go/types` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go type checker |
|
|
1006
|
+
| `go:go/version` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go version comparison |
|
|
1007
|
+
| `go:hash` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | Hash function interface |
|
|
1008
|
+
| `go:hash/adler32` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Adler-32 checksum |
|
|
1009
|
+
| `go:hash/crc32` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | CRC-32 checksum |
|
|
1010
|
+
| `go:hash/crc64` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | CRC-64 checksum |
|
|
1011
|
+
| `go:hash/fnv` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | FNV-1 / FNV-1a hash |
|
|
1012
|
+
| `go:hash/maphash` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Seeded string hashing |
|
|
1013
|
+
| `go:html` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | HTML escaping |
|
|
1014
|
+
| `go:html/template` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | HTML templating (auto-escaped) |
|
|
1015
|
+
| `go:image` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | 2D image interface |
|
|
1016
|
+
| `go:image/color` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Color types |
|
|
1017
|
+
| `go:image/color/palette` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Standard color palettes |
|
|
1018
|
+
| `go:image/draw` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Image compositing |
|
|
1019
|
+
| `go:image/gif` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | GIF decode/encode |
|
|
1020
|
+
| `go:image/jpeg` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | JPEG decode/encode |
|
|
1021
|
+
| `go:image/png` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | PNG decode/encode |
|
|
1022
|
+
| `go:index/suffixarray` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Suffix-array substring search |
|
|
1023
|
+
| `go:io` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | Core I/O interfaces (Reader/Writer) |
|
|
1024
|
+
| `go:io/fs` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Filesystem abstraction |
|
|
1025
|
+
| `go:io/ioutil` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Deprecated I/O helpers (Go 1.16) |
|
|
1026
|
+
| `go:iter` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Range-over-func iterators via `for…of`; `Pull` not bridged |
|
|
1027
|
+
| `go:log` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Logging to stderr |
|
|
1028
|
+
| `go:log/slog` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Structured logging |
|
|
1029
|
+
| `go:log/syslog` | ⚠️ | — | Unix syslog; no portable probe |
|
|
1030
|
+
| `go:maps` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Generic map helpers |
|
|
1031
|
+
| `go:math` | ✅ | [lib-go-math.ts](conformance/lib-go-math.ts) | Math functions |
|
|
1032
|
+
| `go:math/big` | ✅ | [lib-go-big.ts](conformance/lib-go-big.ts) | Arbitrary-precision arithmetic |
|
|
1033
|
+
| `go:math/bits` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Bit operations |
|
|
1034
|
+
| `go:math/cmplx` | ⚠️ | — | `complex128` has no TS mapping |
|
|
1035
|
+
| `go:math/rand` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers |
|
|
1036
|
+
| `go:math/rand/v2` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers (v2 API) |
|
|
1037
|
+
| `go:mime` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | MIME media types |
|
|
1038
|
+
| `go:mime/multipart` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Multipart forms |
|
|
1039
|
+
| `go:mime/quotedprintable` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | Quoted-printable encoding |
|
|
1040
|
+
| `go:net` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Sockets (loopback TCP), addresses |
|
|
1041
|
+
| `go:net/http` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP client/server (loopback) |
|
|
1042
|
+
| `go:net/http/cgi` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | CGI request parsing |
|
|
1043
|
+
| `go:net/http/cookiejar` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Cookie jars (loopback) |
|
|
1044
|
+
| `go:net/http/fcgi` | ⚠️ | — | FastCGI handler; needs a FastCGI web server |
|
|
1045
|
+
| `go:net/http/httptest` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP test servers (loopback) |
|
|
1046
|
+
| `go:net/http/httptrace` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP tracing hooks |
|
|
1047
|
+
| `go:net/http/httputil` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP utilities (loopback) |
|
|
1048
|
+
| `go:net/http/pprof` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | pprof HTTP handlers |
|
|
1049
|
+
| `go:net/mail` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Mail address parsing |
|
|
1050
|
+
| `go:net/netip` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | IP address types |
|
|
1051
|
+
| `go:net/rpc` | ⚠️ | — | Needs Go method sets on registered receivers |
|
|
1052
|
+
| `go:net/rpc/jsonrpc` | ⚠️ | — | Needs Go method sets on registered receivers |
|
|
1053
|
+
| `go:net/smtp` | ⚠️ | — | SMTP client; needs a server |
|
|
1054
|
+
| `go:net/textproto` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Text protocol I/O |
|
|
1055
|
+
| `go:net/url` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | URL parsing |
|
|
1056
|
+
| `go:os` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | OS files and processes |
|
|
1057
|
+
| `go:os/exec` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | External commands |
|
|
1058
|
+
| `go:os/signal` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Signal notification (`Notify` + `Stop`) |
|
|
1059
|
+
| `go:os/user` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | User lookup |
|
|
1060
|
+
| `go:path` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Slash-separated paths |
|
|
1061
|
+
| `go:path/filepath` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | File paths |
|
|
1062
|
+
| `go:reflect` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Runtime reflection |
|
|
1063
|
+
| `go:regexp` | ✅ | [lib-go-regexp.ts](conformance/lib-go-regexp.ts) | Regular expressions |
|
|
1064
|
+
| `go:regexp/syntax` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Regexp parse trees |
|
|
1065
|
+
| `go:runtime` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Runtime introspection |
|
|
1066
|
+
| `go:runtime/debug` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Stack traces and GC stats |
|
|
1067
|
+
| `go:runtime/metrics` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Runtime metrics sampling |
|
|
1068
|
+
| `go:runtime/pprof` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Profiling data |
|
|
1069
|
+
| `go:runtime/trace` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Execution tracing |
|
|
1070
|
+
| `go:slices` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Generic slice helpers |
|
|
1071
|
+
| `go:sort` | ✅ | [lib-go-sort.ts](conformance/lib-go-sort.ts) | Sorting |
|
|
1072
|
+
| `go:strconv` | ✅ | [lib-go-strconv.ts](conformance/lib-go-strconv.ts) | String conversions |
|
|
1073
|
+
| `go:strings` | ✅ | [lib-go-strings.ts](conformance/lib-go-strings.ts) | String utilities |
|
|
1074
|
+
| `go:structs` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | `HostLayout` marker |
|
|
1075
|
+
| `go:sync` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Mutexes and wait groups |
|
|
1076
|
+
| `go:sync/atomic` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Atomic operations |
|
|
1077
|
+
| `go:syscall` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Portable subset probed; per-arch constants dropped |
|
|
1078
|
+
| `go:testing` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Helpers usable outside `go test` |
|
|
1079
|
+
| `go:testing/cryptotest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
|
|
1080
|
+
| `go:testing/fstest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | `TestFS` over any `fs.FS` |
|
|
1081
|
+
| `go:testing/iotest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Reader/writer test wrappers |
|
|
1082
|
+
| `go:testing/quick` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Property checks with TS callbacks |
|
|
1083
|
+
| `go:testing/slogtest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
|
|
1084
|
+
| `go:testing/synctest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
|
|
1085
|
+
| `go:text/scanner` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Text scanner |
|
|
1086
|
+
| `go:text/tabwriter` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Aligned text columns |
|
|
1087
|
+
| `go:text/template` | ✅ | [lib-go-template.ts](conformance/lib-go-template.ts) | Text templating |
|
|
1088
|
+
| `go:text/template/parse` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Template parse trees |
|
|
1089
|
+
| `go:time` | ✅ | [lib-go-time.ts](conformance/lib-go-time.ts) | Time and durations |
|
|
1090
|
+
| `go:time/tzdata` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Embedded timezone database (side-effect import) |
|
|
1091
|
+
| `go:unicode` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | Unicode tables |
|
|
1092
|
+
| `go:unicode/utf16` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | UTF-16 encoding |
|
|
1093
|
+
| `go:unicode/utf8` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | UTF-8 encoding |
|
|
1094
|
+
| `go:unique` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Canonical values |
|
|
1095
|
+
| `go:weak` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Weak pointers |
|
|
1096
|
+
| `go:plugin` | ❌ | — | cgo, `-buildmode=plugin` |
|
|
1097
|
+
| `go:unsafe` | ❌ | — | raw pointers |
|
|
1098
|
+
| `go:runtime/race` | ❌ | — | needs `-race` |
|
|
1099
|
+
| `go:runtime/coverage` | ❌ | — | needs `-cover` |
|
|
1100
|
+
| `go:runtime/cgo` | ❌ | — | needs cgo |
|
|
1101
|
+
| `go:embed` | ❌ | — | needs a `//go:embed` directive; a later phase |
|
|
1102
|
+
<!-- go-bridges:end -->
|
|
1103
|
+
|
|
1104
|
+
#### Go bridge semantics
|
|
1105
|
+
|
|
1106
|
+
| Rule | Meaning |
|
|
1107
|
+
| ---- | ------- |
|
|
1108
|
+
| Number conversion | All Go ints/floats map to TS `number`; args convert via `T(x)`, results read back via `float64(x)`. `int64`/`uint64` beyond 2^53 lose precision. |
|
|
1109
|
+
| Throw on error | `(T, error)` results throw a `GoError` on failure; `error`-only calls throw as statements and yield the error value in value position. |
|
|
1110
|
+
| Tuples | Multi-value results pack into a slice (TS tuple); `const [a, b] = f()` types each element (ints read as numbers). |
|
|
1111
|
+
| Structs | `new pkg.T({...})` builds a composite literal (pointer when any method needs it); fields read/write directly, converting numbers both ways (`h.Size += 1`). Embedded structs promote their fields. |
|
|
1112
|
+
| Named numerics | Typed constants (`time.Second`, `reflect.String`) stay typed in Go; arithmetic and `===` coerce the `number` side (`time.Second * 2`). Results read as numbers: `token.Token(n)` restores the methods. |
|
|
1113
|
+
| Callbacks | Func-typed params and struct fields become Go closures with the exact Go signature (int params read as numbers, returns convert to the result type); sync callbacks (sort, slices, strings, ...) run inline. |
|
|
1114
|
+
| Generics | Type args are inferred from the arguments, including through constraints (`maps.Keys(m)` with `Map ~map[K]V`); unresolved ones become `any`. |
|
|
1115
|
+
| printf verbs | With a literal format, numbers passed to `%d %x %o %b %c %U` convert to `int64`; scan into number refs with `%v`. |
|
|
1116
|
+
| nil | `null` passes as `nil`; `x === null` on nil-able Go values (slices, maps, interfaces, pointers) is a real nil check. |
|
|
1117
|
+
| Channels | `chan<T>(size?)` / `GoChan<T>` with `send`, `recv`, `close`; `for…of` ranges channels, `iter.Seq` and `iter.Seq2` (`for (const [k, v] of seq2)`). |
|
|
1118
|
+
| Out-params | `ref<T>(init?)` makes a pointer cell; `.value` dereferences it. |
|
|
1119
|
+
| Byte slices | `[]byte` is `Uint8Array` (zero-copy); `number[]` converts per call (mutations of the copy are lost). |
|
|
1120
|
+
| Side-effect imports | `import 'go:time/tzdata'` emits a blank `import _`. |
|
|
655
1121
|
|
|
656
1122
|
### npm packages
|
|
657
1123
|
|