Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for remaining private methods #9306

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdalton
Copy link
Contributor

@jdalton jdalton commented Mar 7, 2024

What does this PR do?

Add support for remaining private methods.
This is a follow-up to oven-sh/WebKit#46.

Copy link

github-actions bot commented Mar 7, 2024

@jdalton 483 files with test failures on linux-x64:

View test output

#0d7e247401eb1c1f82e32dfac2ae116a9d5387f4

Copy link

github-actions bot commented Mar 7, 2024

@jdalton 483 files with test failures on linux-x64-baseline:

View test output

#0d7e247401eb1c1f82e32dfac2ae116a9d5387f4

Copy link

github-actions bot commented Mar 7, 2024

@jdalton 483 files with test failures on bun-darwin-aarch64:

View test output

#0d7e247401eb1c1f82e32dfac2ae116a9d5387f4

Copy link

github-actions bot commented Mar 7, 2024

@jdalton 483 files with test failures on bun-darwin-x64:

View test output

#0d7e247401eb1c1f82e32dfac2ae116a9d5387f4

Copy link

github-actions bot commented Mar 7, 2024

❌🪟 @jdalton, there are 473 test regressions on Windows x86_64

  • test\bundler\bun-build-api.test.ts
  • test\bundler\bundler_browser.test.ts
  • test\bundler\bundler_cjs2esm.test.ts
  • test\bundler\bundler_bun.test.ts
  • test\bundler\bundler_compile.test.ts
  • test\bundler\bundler_decorator_metadata.test.ts
  • test\bundler\bundler_edgecase.test.ts
  • test\bundler\bundler_jsx.test.ts
  • test\bundler\bundler_minify.test.ts
  • test\bundler\bundler_naming.test.ts
  • test\bundler\bundler_npm.test.ts
  • test\bundler\bundler_plugin.test.ts
  • test\bundler\bundler_regressions.test.ts
  • test\bundler\bundler_string.test.ts
  • test\bundler\esbuild\css.test.ts
  • test\bundler\cli.test.ts
  • test\bundler\esbuild\default.test.ts
  • test\bundler\esbuild\dce.test.ts
  • test\bundler\esbuild\extra.test.ts
  • test\bundler\esbuild\importstar.test.ts
  • test\bundler\esbuild\loader.test.ts
  • test\bundler\esbuild\importstar_ts.test.ts
  • test\bundler\esbuild\packagejson.test.ts
  • test\bundler\esbuild\lower.test.ts
  • test\bundler\esbuild\splitting.test.ts
  • test\bundler\esbuild\ts.test.ts
  • test\bundler\esbuild\tsconfig.test.ts
  • test\cli\bun.test.ts
  • test\cli\hot\hot.test.ts
  • test\cli\hot\watch.test.ts
  • test\cli\init\init.test.ts
  • test\cli\inspect\inspect.test.ts
  • test\cli\install\bad-workspace.test.ts
  • test\cli\install\bun-add.test.ts
  • test\cli\install\bun-create.test.ts
  • test\cli\install\bun-install-pathname-trailing-slash.test.ts
  • test\cli\install\bun-link.test.ts
  • test\cli\install\bun-install.test.ts
  • test\cli\install\bun-remove.test.ts
  • test\cli\install\bun-pm.test.ts
  • test\cli\install\bun-run-bunfig.test.ts
  • test\cli\install\bun-update.test.ts
  • test\cli\install\bun-upgrade.test.ts
  • test\cli\install\bunx.test.ts
  • test\cli\install\migration\complex-workspace.test.ts
  • test\cli\install\migration\out-of-sync.test.ts
  • test\cli\install\migration\migrate.test.ts
  • test\cli\install\overrides.test.ts
  • test\cli\install\registry\bun-install-registry.test.ts
  • test\cli\run\as-node.test.ts
  • test\cli\install\semver.test.ts
  • test\cli\run\commonjs-no-export.test.ts
  • test\cli\run\empty-file.test.ts
  • test\cli\run\env.test.ts
  • test\cli\run\if-present.test.ts
  • test\cli\run\log-test.test.ts
  • test\cli\run\preload-test.test.js
  • test\cli\run\require-cache.test.ts
  • test\cli\run\run-cjs.test.ts
  • test\cli\run\run-eval.test.ts
  • test\cli\run\run-extensionless.test.ts
  • test\cli\run\run-process-env.test.ts
  • test\cli\run\run-quote.test.ts
  • test\cli\run\run-unicode.test.ts
  • test\cli\run\run_command.test.ts
  • test\cli\test\bun-test.test.ts
  • test\cli\run\transpiler-cache.test.ts
  • test\cli\watch\watch.test.ts
  • test\integration\mysql2\mysql2.test.ts
  • test\integration\sharp\sharp.test.ts
  • test\internal\package-json-lint.test.ts
  • test\js\bun\console\console-iterator.test.ts
  • test\js\bun\console\console-table.test.ts
  • test\js\bun\crypto\cipheriv-decipheriv.test.ts
  • test\js\bun\empty-file.test.ts
  • test\js\bun\dns\resolve-dns.test.ts
  • test\js\bun\eventsource\eventsource.test.ts
  • test\js\bun\ffi\ffi.test.js
  • test\js\bun\glob\match.test.ts
  • test\js\bun\glob\leak.test.ts
  • test\js\bun\glob\stress.test.ts
  • test\js\bun\glob\scan.test.ts
  • test\js\bun\globals.test.js
  • test\js\bun\http\async-iterator-stream.test.ts
  • test\js\bun\http\bun-serve-body-json-async.test.ts
  • test\js\bun\http\bun-serve-headers.test.ts
  • test\js\bun\http\bun-server.test.ts
  • test\js\bun\http\fetch-file-upload.test.ts
  • test\js\bun\http\proxy.test.js
  • test\js\bun\http\serve-listen.test.ts
  • test\js\bun\io\bun-write.test.js
  • test\js\bun\jsc\bun-jsc.test.ts
  • test\js\bun\jsc\domjit.test.ts
  • test\js\bun\jsc\shadow.test.js
  • test\js\bun\net\tcp-server.test.ts
  • test\js\bun\plugin\plugins.test.ts
  • test\js\bun\resolve\import-custom-condition.test.ts
  • test\js\bun\resolve\esModule-annotation.test.js
  • test\js\bun\resolve\import-meta.test.js
  • test\js\bun\resolve\load-file-loader-a-lot.test.ts
  • test\js\bun\resolve\load-same-js-file-a-lot.test.ts
  • test\js\bun\resolve\non-english-import.test.js
  • test\js\bun\resolve\resolve-error.test.ts
  • test\js\bun\resolve\png\test-png-import.test.js
  • test\js\bun\resolve\resolve-ts.test.ts
  • test\js\bun\resolve\resolve.test.ts
  • test\js\bun\resolve\toml\toml.test.js
  • test\js\bun\shell\brace.test.ts
  • test\js\bun\shell\bunshell-file.test.ts
  • test\js\bun\shell\bunshell-instance.test.ts
  • test\js\bun\shell\commands\mv.test.ts
  • test\js\bun\shell\commands\rm.test.ts
  • test\js\bun\shell\lazy.test.ts
  • test\js\bun\shell\leak.test.ts
  • test\js\bun\shell\lex.test.ts
  • test\js\bun\shell\shell-hang.test.ts
  • test\js\bun\shell\parse.test.ts
  • test\js\bun\shell\shelloutput.test.ts
  • test\js\bun\shell\throw.test.ts
  • test\js\bun\spawn\exit-code.test.ts
  • test\js\bun\spawn\spawn-kill-signal.test.ts
  • test\js\bun\spawn\spawn-streaming-stdin.test.ts
  • test\js\bun\spawn\spawn-streaming-stdout.test.ts
  • test\js\bun\spawn\spawn.ipc.test.ts
  • test\js\bun\spawn\spawn.test.ts
  • test\js\bun\sqlite\sql-raw.test.js
  • test\js\bun\spawn\spawn_waiter_thread.test.ts
  • test\js\bun\sqlite\sqlite.test.js
  • test\js\bun\stream\direct-readable-stream.test.tsx
  • test\js\bun\test\bun-test.test.ts
  • test\js\bun\test\expect-extend-preload.test.ts
  • test\js\bun\test\expect-extend.test.js
  • test\js\bun\test\expect-unreaachable.test.ts
  • test\js\bun\test\jest-each.test.ts
  • test\js\bun\test\expect.test.js
  • test\js\bun\test\jest-extended.test.js
  • test\js\bun\test\jest-hooks.test.ts
  • test\js\bun\test\mock\6874\A.test.ts
  • test\js\bun\test\mock\6874\B.test.ts
  • test\js\bun\test\mock\mock-module.test.ts
  • test\js\bun\test\mock\6879\6879.test.ts
  • test\js\bun\test\mock-fn.test.js
  • test\js\bun\test\nested-describes.test.ts
  • test\js\bun\test\preload-test.test.js
  • test\js\bun\test\snapshot-tests\bun-snapshots.test.ts
  • test\js\bun\test\snapshot-tests\existing-snapshots.test.ts
  • test\js\bun\test\snapshot-tests\new-snapshot.test.ts
  • test\js\bun\test\snapshot-tests\snapshots\more-snapshots\different-directory.test.ts
  • test\js\bun\test\snapshot-tests\snapshots\more.test.ts
  • test\js\bun\test\snapshot-tests\snapshots\moremore.test.ts
  • test\js\bun\test\snapshot-tests\snapshots\snapshot.test.ts
  • test\js\bun\test\test-test.test.ts
  • test\js\bun\test\test-auto-import-jest-globals.test.js
  • test\js\bun\util\arraybuffersink.test.ts
  • test\js\bun\test\test-timers.test.ts
  • test\js\bun\util\bun-cryptohasher.test.ts
  • test\js\bun\util\bun-file-exists.test.js
  • test\js\bun\util\bun-file-windows.test.ts
  • test\js\bun\util\bun-file-read.test.ts
  • test\js\bun\util\bun-isMainThread.test.js
  • test\js\bun\util\concat.test.js
  • test\js\bun\util\error-gc-test.test.js
  • test\js\bun\util\escapeHTML.test.js
  • test\js\bun\util\exotic-global-mutable-prototype.test.ts
  • test\js\bun\util\file-type.test.ts
  • test\js\bun\util\filesink.test.ts
  • test\js\bun\util\filesystem_router.test.ts
  • test\js\bun\util\fileUrl.test.js
  • test\js\bun\util\hash.test.js
  • test\js\bun\util\highlighter.test.ts
  • test\js\bun\util\index-of-line.test.ts
  • test\js\bun\util\inspect-error.test.js
  • test\js\bun\util\inspect.test.js
  • test\js\bun\util\mmap.test.js
  • test\js\bun\util\password.test.ts
  • test\js\bun\util\peek.test.ts
  • test\js\bun\util\readablestreamtoarraybuffer.test.ts
  • test\js\bun\util\sleep.test.ts
  • test\js\bun\util\reportError.test.ts
  • test\js\bun\util\stringWidth.test.ts
  • test\js\bun\util\sleepSync.test.ts
  • test\js\bun\util\text-loader.test.ts
  • test\js\bun\util\unsafe.test.js
  • test\js\bun\wasm\wasi.test.js
  • test\js\bun\util\which.test.ts
  • test\js\bun\websocket\websocket-server.test.ts
  • test\js\deno\abort\abort-controller.test.ts
  • test\js\deno\crypto\random.test.ts
  • test\js\deno\crypto\webcrypto.test.ts
  • test\js\deno\encoding\encoding.test.ts
  • test\js\deno\event\custom-event.test.ts
  • test\js\deno\event\event-target.test.ts
  • test\js\deno\event\event.test.ts
  • test\js\deno\fetch\blob.test.ts
  • test\js\deno\fetch\body.test.ts
  • test\js\deno\fetch\headers.test.ts
  • test\js\deno\fetch\request.test.ts
  • test\js\deno\fetch\response.test.ts
  • test\js\deno\url\url.test.ts
  • test\js\deno\url\urlsearchparams.test.ts
  • test\js\deno\v8\error.test.ts
  • test\js\first_party\undici\undici.test.ts
  • test\js\first_party\utf-8-validate\utf-8-validate.test.ts
  • test\js\first_party\ws\ws.test.ts
  • test\js\node\assert\assert-match.test.cjs
  • test\js\node\assert\assert-doesNotMatch.test.cjs
  • test\js\node\assert\assert.test.cjs
  • test\js\node\assert\assert.test.ts
  • test\js\node\async_hooks\async-local-storage-thenable.test.ts
  • test\js\node\async_hooks\AsyncLocalStorage.test.ts
  • test\js\node\async_hooks\async_hooks.node.test.ts
  • test\js\node\async_hooks\EventEmitterAsyncResource.test.ts
  • test\js\node\buffer-concat.test.ts
  • test\js\node\buffer.test.js
  • test\js\node\child_process\child-process-stdio.test.js
  • test\js\node\child_process\child_process-node.test.js
  • test\js\node\child_process\child_process.test.ts
  • test\js\node\console\console.test.ts
  • test\js\node\crypto\crypto-lazyhash.test.ts
  • test\js\node\crypto\crypto-scrypt.test.ts
  • test\js\node\crypto\crypto.key-objects.test.ts
  • test\js\node\crypto\crypto.hmac.test.ts
  • test\js\node\crypto\crypto.test.ts
  • test\js\node\crypto\node-crypto.test.js
  • test\js\node\diagnostics_channel\diagnostics_channel.test.ts
  • test\js\node\dirname.test.js
  • test\js\node\env-windows.test.ts
  • test\js\node\dns\node-dns.test.js
  • test\js\node\events\event-emitter.test.ts
  • test\js\node\fs\cp.test.ts
  • test\js\node\fs\fs-leak.test.js
  • test\js\node\fs\fs.test.ts
  • test\js\node\fs\promises.test.js
  • test\js\node\harness.test.js
  • test\js\node\http\node-fetch.test.js
  • test\js\node\http\node-fetch-cjs.test.js
  • test\js\node\http\node-http.test.ts
  • test\js\node\http2\node-http2.test.js
  • test\js\node\missing-module.test.js
  • test\js\node\module\node-module-module.test.js
  • test\js\node\net\node-net-server.test.ts
  • test\js\node\net\node-net.test.ts
  • test\js\node\nodettywrap.test.ts
  • test\js\node\os\os.test.js
  • test\js\node\path\basename.test.js
  • test\js\node\path\browserify.test.js
  • test\js\node\path\dirname.test.js
  • test\js\node\path\extname.test.js
  • test\js\node\path\is-absolute.test.js
  • test\js\node\path\join.test.js
  • test\js\node\path\normalize.test.js
  • test\js\node\path\parse-format.test.js
  • test\js\node\path\path.test.js
  • test\js\node\path\posix-exists.test.js
  • test\js\node\path\posix-relative-on-windows.test.js
  • test\js\node\path\relative.test.js
  • test\js\node\path\resolve.test.js
  • test\js\node\path\to-namespaced-path.test.js
  • test\js\node\path\win32-exists.test.js
  • test\js\node\path\zero-length-strings.test.js
  • test\js\node\process\process-args.test.js
  • test\js\node\perf_hooks\perf_hooks.test.ts
  • test\js\node\process\process-nexttick.test.js
  • test\js\node\process\process-stdio.test.ts
  • test\js\node\process-binding.test.ts
  • test\js\node\process\process.test.js
  • test\js\node\readline\getStringWidth.test.ts
  • test\js\node\readline\readline.node.test.ts
  • test\js\node\readline\readline_promises.node.test.ts
  • test\js\node\stream\bufferlist.test.ts
  • test\js\node\stream\node-stream-uint8array.test.ts
  • test\js\node\stream\node-stream.test.js
  • test\js\node\string_decoder\string-decoder.test.js
  • test\js\node\stubs.test.js
  • test\js\node\tls\fetch-tls-cert.test.ts
  • test\js\node\timers\node-timers.test.ts
  • test\js\node\tls\node-tls-connect.test.ts
  • test\js\node\tls\node-tls-cert.test.ts
  • test\js\node\tls\node-tls-internals.test.ts
  • test\js\node\tls\node-tls-server.test.ts
  • test\js\node\tty.test.ts
  • test\js\node\url\url-canParse-whatwg.test.js
  • test\js\node\url\url-domain-ascii-unicode.test.js
  • test\js\node\url\url-fileurltopath.test.js
  • test\js\node\url\url-format-invalid-input.test.js
  • test\js\node\url\url-format-whatwg.test.js
  • test\js\node\url\url-format.test.js
  • test\js\node\url\url-is-url.test.js
  • test\js\node\url\url-parse-format.test.js
  • test\js\node\url\url-null-char.test.js
  • test\js\node\url\url-parse-invalid-input.test.js
  • test\js\node\url\url-parse-query.test.js
  • test\js\node\url\url-pathtofileurl.test.js
  • test\js\node\url\url-relative.test.js
  • test\js\node\url\url.test.ts
  • test\js\node\url\url-revokeobjecturl.test.js
  • test\js\node\util\bun-inspect.test.ts
  • test\js\node\util\custom-inspect.test.js
  • test\js\node\util\node-inspect-tests\import.test.mjs
  • test\js\node\util\node-inspect-tests\internal-inspect.test.js
  • test\js\node\util\node-inspect-tests\parallel\util-format.test.js
  • test\js\node\util\node-inspect-tests\parallel\util-inspect-getters-accessing-this.test.js
  • test\js\node\util\node-inspect-tests\parallel\util-inspect-long-running.test.mjs
  • test\js\node\util\node-inspect-tests\parallel\util-inspect-proxy.test.js
  • test\js\node\util\node-inspect-tests\parallel\util-inspect.test.js
  • test\js\node\util\parse_args\default-args.test.mjs
  • test\js\node\util\parse_args\parse-args.test.mjs
  • test\js\node\util\test-util-types.test.js
  • test\js\node\util\util-callbackify.test.js
  • test\js\node\util\util-promisify.test.js
  • test\js\node\util\util.test.js
  • test\js\node\v8\capture-stack-trace.test.js
  • test\js\node\v8\v8-date-parser.test.js
  • test\js\node\vm\vm.test.ts
  • test\js\node\watch\fs.watch.test.ts
  • test\js\node\watch\fs.watchFile.test.ts
  • test\js\node\worker_threads\worker_threads.test.ts
  • test\js\node\zlib\zlib.test.js
  • test\js\third_party\comlink\comlink.test.ts
  • test\js\third_party\body-parser\express-body-parser-test.test.ts
  • test\js\third_party\esbuild\esbuild-child_process.test.ts
  • test\js\third_party\es-module-lexer\es-module-lexer.test.ts
  • test\js\third_party\grpc-js\test-client.test.ts
  • test\js\third_party\grpc-js\test-channel-credentials.test.ts
  • test\js\third_party\grpc-js\test-idle-timer.test.ts
  • test\js\third_party\grpc-js\test-retry.test.ts
  • test\js\third_party\jsonwebtoken\async_sign.test.js
  • test\js\third_party\jsonwebtoken\buffer.test.js
  • test\js\third_party\jsonwebtoken\claim-exp.test.js
  • test\js\third_party\jsonwebtoken\claim-aud.test.js
  • test\js\third_party\jsonwebtoken\claim-iss.test.js
  • test\js\third_party\jsonwebtoken\claim-iat.test.js
  • test\js\third_party\jsonwebtoken\claim-nbf.test.js
  • test\js\third_party\jsonwebtoken\claim-jti.test.js
  • test\js\third_party\jsonwebtoken\claim-private.test.js
  • test\js\third_party\jsonwebtoken\claim-sub.test.js
  • test\js\third_party\jsonwebtoken\decoding.test.js
  • test\js\third_party\jsonwebtoken\encoding.test.js
  • test\js\third_party\jsonwebtoken\expires_format.test.js
  • test\js\third_party\jsonwebtoken\header-kid.test.js
  • test\js\third_party\jsonwebtoken\issue_147.test.js
  • test\js\third_party\jsonwebtoken\invalid_exp.test.js
  • test\js\third_party\jsonwebtoken\issue_70.test.js
  • test\js\third_party\jsonwebtoken\issue_304.test.js
  • test\js\third_party\jsonwebtoken\jwt.asymmetric_signing.test.js
  • test\js\third_party\jsonwebtoken\jwt.hs.test.js
  • test\js\third_party\jsonwebtoken\non_object_values.test.js
  • test\js\third_party\jsonwebtoken\jwt.malicious.test.js
  • test\js\third_party\jsonwebtoken\noTimestamp.test.js
  • test\js\third_party\jsonwebtoken\option-complete.test.js
  • test\js\third_party\jsonwebtoken\option-nonce.test.js
  • test\js\third_party\jsonwebtoken\option-maxAge.test.js
  • test\js\third_party\jsonwebtoken\rsa-public-key.test.js
  • test\js\third_party\jsonwebtoken\schema.test.js
  • test\js\third_party\jsonwebtoken\set_headers.test.js
  • test\js\third_party\jsonwebtoken\undefined_secretOrPublickey.test.js
  • test\js\third_party\jsonwebtoken\validateAsymmetricKey.test.js
  • test\js\third_party\jsonwebtoken\verify.test.js
  • test\js\third_party\mongodb\mongodb.test.ts
  • test\js\third_party\jsonwebtoken\wrong_alg.test.js
  • test\js\third_party\postgres\postgres.test.ts
  • test\js\third_party\nodemailer\nodemailer.test.ts
  • test\js\third_party\resvg\bbox.test.js
  • test\js\third_party\rollup-v4\rollup-v4.test.ts
  • test\js\third_party\socket.io\socket.io-close.test.ts
  • test\js\third_party\socket.io\socket.io-connection-state-recovery.test.ts
  • test\js\third_party\socket.io\socket.io-handshake.test.ts
  • test\js\third_party\socket.io\socket.io-messaging-many.test.ts
  • test\js\third_party\socket.io\socket.io-middleware.test.ts
  • test\js\third_party\socket.io\socket.io-namespaces.test.ts
  • test\js\third_party\socket.io\socket.io-server-attachment.test.ts
  • test\js\third_party\socket.io\socket.io-socket-middleware.test.ts
  • test\js\third_party\socket.io\socket.io-socket-timeout.test.ts
  • test\js\third_party\socket.io\socket.io-utility-methods.test.ts
  • test\js\third_party\svelte\svelte.test.ts
  • test\js\third_party\socket.io\socket.io.test.ts
  • test\js\third_party\yargs\yargs-cjs.test.js
  • test\js\third_party\webpack\webpack.test.ts
  • test\js\web\broadcastchannel\broadcast-channel.test.ts
  • test\js\web\abort\abort.test.ts
  • test\js\web\console\console-recursive.test.ts
  • test\js\web\console\console-log.test.ts
  • test\js\web\console\console-timeLog.test.ts
  • test\js\web\crypto\web-crypto.test.ts
  • test\js\web\encoding\text-decoder.test.js
  • test\js\web\encoding\text-encoder.test.js
  • test\js\web\explicit-resource-management.test.ts
  • test\js\web\fetch\blob-cow.test.ts
  • test\js\web\fetch\body-mixin-errors.test.ts
  • test\js\web\fetch\blob.test.ts
  • test\js\web\fetch\body-stream-excess.test.ts
  • test\js\web\fetch\body-stream.test.ts
  • test\js\web\fetch\body.test.ts
  • test\js\web\fetch\fetch-gzip.test.ts
  • test\js\web\fetch\fetch-leak.test.js
  • test\js\web\fetch\fetch.brotli.test.ts
  • test\js\web\fetch\fetch.stream.test.ts
  • test\js\web\fetch\fetch.test.ts
  • test\js\web\fetch\fetch.tls.test.ts
  • test\js\web\fetch\fetch.unix.test.ts
  • test\js\web\fetch\fetch_headers.test.js
  • test\js\web\fetch\headers.test.ts
  • test\js\web\fetch\response.test.ts
  • test\js\web\fetch\utf8-bom.test.ts
  • test\js\web\html\FormData.test.ts
  • test\js\web\html\URLSearchParams.test.ts
  • test\js\web\request\request.test.ts
  • test\js\web\nationalized.test.ts
  • test\js\web\streams\streams.test.js
  • test\js\web\timers\microtask.test.js
  • test\js\web\timers\setImmediate.test.js
  • test\js\web\timers\performance.test.js
  • test\js\web\timers\setInterval.test.js
  • test\js\web\timers\setImmediate2.test.ts
  • test\js\web\timers\setTimeout.test.js
  • test\js\web\url\url.test.ts
  • test\js\web\util\atob.test.js
  • test\js\web\url\url.windows.test.js
  • test\js\web\websocket\autobahn.test.ts
  • test\js\web\web-globals.test.js
  • test\js\web\websocket\websocket-client-short-read.test.ts
  • test\js\web\websocket\websocket-client.test.ts
  • test\js\web\websocket\websocket.test.js
  • test\js\web\websocket\websocket-upgrade.test.ts
  • test\js\web\workers\message-channel.test.ts
  • test\js\web\workers\structured-clone.test.ts
  • test\js\web\workers\worker.test.ts
  • test\js\workerd\html-rewriter.test.js
  • test\napi\napi.test.ts
  • test\regression\issue\00631.test.ts
  • test\regression\issue\02367.test.ts
  • test\regression\issue\02005.test.ts
  • test\regression\issue\02369.test.ts
  • test\regression\issue\02368.test.ts
  • test\regression\issue\02499.test.ts
  • test\regression\issue\03091.test.ts
  • test\regression\issue\03216.test.ts
  • test\regression\issue\03830.test.ts
  • test\regression\issue\04011.test.ts
  • test\regression\issue\04893.test.ts
  • test\regression\issue\04947.test.js
  • test\regression\issue\06443.test.ts
  • test\regression\issue\06467.test.ts
  • test\regression\issue\06946\06946.test.ts
  • test\regression\issue\07261.test.ts
  • test\regression\issue\07001.test.ts
  • test\regression\issue\07397.test.ts
  • test\regression\issue\07500.test.ts
  • test\regression\issue\07736.test.ts
  • test\regression\issue\07740.test.ts
  • test\regression\issue\08040.test.ts
  • test\regression\issue\07827.test.ts
  • test\regression\issue\08095.test.ts
  • test\regression\issue\08093.test.ts
  • test\regression\issue\08757.test.ts
  • test\regression\issue\08794.test.ts
  • test\regression\issue\08964.test.ts
  • test\regression\issue\08965\08965.test.ts
  • test\regression\issue\09279.test.ts
  • test\regression\issue\09340.test.ts
  • test\regression\issue\09559.test.ts
  • test\regression\issue\09563\09563.test.ts
  • test\transpiler\7324.test.ts
  • test\snippets\segfault-todo.test.js
  • test\transpiler\decorator-metadata.test.ts
  • test\transpiler\decorators.test.ts
  • test\transpiler\export-default.test.js
  • test\transpiler\macro-test.test.ts
  • test\transpiler\property.test.ts
  • test\transpiler\runtime-transpiler.test.ts
  • test\transpiler\template-literal.test.ts
  • test\transpiler\transpiler-stack-overflow.test.ts
  • test\transpiler\transpiler.test.js

Full Test Output

@jdalton jdalton force-pushed the jdalton/array-private-methods branch 2 times, most recently from ef36e7a to 5e9f82f Compare March 11, 2024 15:50
if (typeof value === null) throw new Error("Invalid enum object " + name + " defined in " + import.meta.file);
const keys = Array.isArray(value) ? value : Object.keys(value).filter(k => !k.match(/^[0-9]+$/));
define[`$${name}IdToLabel`] = "[" + keys.map(k => `"${k}"`).join(", ") + "]";
define[`$${name}LabelToId`] = "{" + keys.map(k => `"${k}": ${keys.indexOf(k)}`).join(", ") + "}";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ Used the index param of map instead of keys.indexOf.

if (typeof value !== "object") throw new Error("Invalid enum object " + name + " defined in " + import.meta.file);
if (typeof value === null) throw new Error("Invalid enum object " + name + " defined in " + import.meta.file);
const keys = Array.isArray(value) ? value : Object.keys(value).filter(k => !k.match(/^[0-9]+$/));
define[`$${name}IdToLabel`] = "[" + keys.map(k => `"${k}"`).join(", ") + "]";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ Simplified the join as the keys weren't in need of mapping.

};

// ------------------------------ //

for (const name in enums) {
const value = enums[name];
if (typeof value !== "object") throw new Error("Invalid enum object " + name + " defined in " + import.meta.file);
if (typeof value === null) throw new Error("Invalid enum object " + name + " defined in " + import.meta.file);
const keys = Array.isArray(value) ? value : Object.keys(value).filter(k => !k.match(/^[0-9]+$/));
Copy link
Contributor Author

@jdalton jdalton Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k.match produces an array or null. In this case we just needed a boolean so regexp.test is a better fit.

global?: boolean;
}

/** Applies source code replacements as defined in `replacements` */
export function applyReplacements(src: string, length: number) {
let slice = src.slice(0, length);
let rest = src.slice(length);
slice = slice.replace(/([^a-zA-Z0-9_\$])\$([a-zA-Z0-9_]+\b)/gm, `$1__intrinsic__$2`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ a-zA-Z0-9_ is \w. (there's case folding too but not an issue here)

}
let match;
if ((match = slice.match(/__intrinsic__(debug|assert)$/)) && rest.startsWith("(")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ Doing the cheap check first (.startsWith).

@jdalton jdalton force-pushed the jdalton/array-private-methods branch from 5e9f82f to 7358e72 Compare March 11, 2024 17:23
for (const replacement of replacements) {
slice = slice.replace(replacement.from, replacement.to.replaceAll("$", "__intrinsic__").replaceAll("%", "$"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move replacement.to transforms higher to ensure they are performed once and to improve consistency of transformation between replacements and globalReplacements.

@jdalton jdalton force-pushed the jdalton/array-private-methods branch from f4d5219 to f18a4ec Compare March 11, 2024 17:26
{
from: /\bnotImplementedIssueFn\(\s*([0-9]+)\s*,\s*((?:"[^"]*"|'[^']+'))\s*\)/g,
to: "() => $throwTypeError(`${$2} is not implemented yet. See https://github.com/oven-sh/bun/issues/$1`)",
},
Copy link
Contributor Author

@jdalton jdalton Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR the globalReplacements .to was being transformed with.replaceAll("$", "__intrinsic__") which would have made the $2 and $1 incorrectly transformed because it didn't have the transform that the replacements .to has for %1, %2, etc.

export const globalReplacements: ReplacementRule[] = [
{
from: /\bnotImplementedIssue\(\s*([0-9]+)\s*,\s*((?:"[^"]*"|'[^']+'))\s*\)/g,
to: "new TypeError(`${$2} is not implemented yet. See https://github.com/oven-sh/bun/issues/$1`)",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notImplementedIssue isn't used in our code ✂️ , where as notImplementedIssueFn is.

Copy link
Collaborator

@paperdave paperdave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes in replacements.ts is great so far. i am happy to see someone else finally add something to the builtins bundler.

@jdalton jdalton force-pushed the jdalton/array-private-methods branch from f18a4ec to a5ccb5c Compare March 22, 2024 17:43
@jdalton jdalton changed the title Add support for remaining private Array methods Add support for remaining private methods Mar 22, 2024
@jdalton jdalton force-pushed the jdalton/array-private-methods branch 5 times, most recently from 8971d01 to 30b8332 Compare March 26, 2024 18:58
@jdalton jdalton mentioned this pull request Mar 26, 2024
@jdalton jdalton force-pushed the jdalton/array-private-methods branch from 30b8332 to 68ae23b Compare March 26, 2024 20:45
@jdalton jdalton force-pushed the jdalton/array-private-methods branch 6 times, most recently from 637b3d1 to 7e912a2 Compare March 29, 2024 15:21
@@ -84,7 +84,7 @@ void JSNextTickQueue::drain(JSC::VM& vm, JSC::JSGlobalObject* globalObject)

if (!isEmpty()) {
if (mustResetContext) {
globalObject->m_asyncContextData.get()->putInternalField(vm, 0, jsUndefined());
globalObject->asyncContextTuple()->putInternalField(vm, 0, jsUndefined());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR I've made a distinction between the asyncContextTuple and asyncContextData because in main the current forms are conflated as asyncContext which gets confusing (is it the tuple or the data of the tuple). With this we have a clear and consistent distinction.

@@ -864,8 +865,8 @@ export function onPullDirectStream(controller) {
deferFlush = controller._deferFlush;
controller._deferFlush = controller._deferClose = 0;

if (asyncContext) {
$putInternalField($asyncContext, 0, prev);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed as prev was not defined in the outer scope.

@jdalton jdalton force-pushed the jdalton/array-private-methods branch from 7e912a2 to dcfdfcb Compare March 30, 2024 03:11
@jdalton jdalton force-pushed the jdalton/array-private-methods branch 2 times, most recently from 2e79afa to 515bd66 Compare April 8, 2024 17:41
@jdalton jdalton force-pushed the jdalton/array-private-methods branch from 515bd66 to 8843060 Compare April 8, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants