Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Load script as module

オープン
#353 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, ruby
領域
backend

調査の方向性

Start by reading the MiniRacer::Context#eval entry point and how it passes JavaScript source to V8; the issue does not name files or tests. Check how V8 supports compiling and running modules, then determine how module loading should fit the existing context API. Done means mini_racer can load module code and accept top-level await; add coverage for that behavior.

索引モデルが issue の本文から書いたものです。

説明

mini_racer 0.18.1
libv8-node 23.6.1.0
Ruby 3.4.2

JavaScript modules are different than classic scripts in a few ways. As an example, in a module, you can do a top-level await, but in a classic script, you can't.

> require 'mini_racer'
=> false
> context = MiniRacer::Context.new(timeout: 500, max_memory: 20_000_000)
=> #<MiniRacer::Context:0x00007f11ecd95148>
> context.eval('await Promise.resolve(console.log("🎉"));')
:3:in 'MiniRacer::Context#eval': Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules at <eval>:1:0 (MiniRacer::ParseError)
        from :3:in '<main>'

I would like to be able to load code as a module with mini_racer.

主要言語
JavaScript
スター
628
フォーク
100
平均マージ
1日 20時間
マージ済み PR(30日)
2

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyjs/mini_racer のほかの issue

rubyjs/mini_racer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。