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 env option for node:worker_threads #4052

Merged
merged 9 commits into from
Aug 8, 2023
Merged

Add env option for node:worker_threads #4052

merged 9 commits into from
Aug 8, 2023

Conversation

paperclover
Copy link
Member

@paperclover paperclover commented Aug 8, 2023

What does this PR do?

  • Types: Fix Worker and Node Worker being the same type; they are different.
  • Implement the env option for workers.
  • In some stubbed parts of worker_threads, throw better errors.
  • .terminate calls unref properly
  • ref true is default

Makes sveltekit work

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

new automated tests

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

prettier errors have been resolved. Thank you.

#0303faceb2f302198ca76eaf81a335a5d93e01b5

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

@paperdave 6 files with test failures on bun-darwin-aarch64:

  • test/bundler/bundler_npm.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/bun/util/bun-isMainThread.test.js
  • test/js/node/dns/node-dns.test.js
  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/web/worker.test.ts

View test output

#0303faceb2f302198ca76eaf81a335a5d93e01b5

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

@paperdave 6 files with test failures on linux-x64-baseline:

  • test/js/bun/test/test-test.test.ts
  • test/js/bun/util/bun-isMainThread.test.js
  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/prisma/prisma.test.ts
  • test/js/web/fetch/fetch.test.ts
  • test/js/web/worker.test.ts

View test output

#0303faceb2f302198ca76eaf81a335a5d93e01b5

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

@paperdave 5 files with test failures on linux-x64:

  • test/js/bun/test/test-test.test.ts
  • test/js/bun/util/bun-isMainThread.test.js
  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/prisma/prisma.test.ts
  • test/js/web/worker.test.ts

View test output

#0303faceb2f302198ca76eaf81a335a5d93e01b5

@paperclover paperclover mentioned this pull request Aug 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

@paperdave 8 files with test failures on bun-darwin-x64-baseline:

  • test/js/bun/spawn/spawn-streaming-stdin.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/test/test-test.test.ts
  • test/js/bun/util/bun-isMainThread.test.js
  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js
  • test/js/web/worker.test.ts

View test output

#0303faceb2f302198ca76eaf81a335a5d93e01b5

@paperclover
Copy link
Member Author

ready for rewview

@Jarred-Sumner Jarred-Sumner merged commit 5497acc into main Aug 8, 2023
@Jarred-Sumner Jarred-Sumner deleted the dave/workerenv branch August 8, 2023 06:58
trnxdev pushed a commit to trnxdev/bun that referenced this pull request Aug 9, 2023
* almost works

* env stuff

* test fixes

* wtfmove

* ok

* ok

* ref by default

* it now does the ref stuff by default

* cool
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.

2 participants