Skip to content

Commit

Permalink
Merge pull request opal#2691 from janbiedermann/move_nashorn_back_to_…
Browse files Browse the repository at this point in the history
…natural_habitat

Remove Nashorn runner
  • Loading branch information
elia authored Oct 10, 2024
2 parents d336f26 + 6310079 commit e6918ef
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 73 deletions.
1 change: 0 additions & 1 deletion lib/opal/cli_runners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def self.alias_runner(new_name, old_name)
register_runner :compiler, :Compiler, 'opal/cli_runners/compiler'
register_runner :deno, :Deno, 'opal/cli_runners/deno'
register_runner :firefox, :Firefox, 'opal/cli_runners/firefox'
register_runner :nashorn, :Nashorn, 'opal/cli_runners/nashorn'
register_runner :nodejs, :Nodejs, 'opal/cli_runners/nodejs'
register_runner :quickjs, :Quickjs, 'opal/cli_runners/quickjs'
register_runner :server, :Server, 'opal/cli_runners/server'
Expand Down
25 changes: 0 additions & 25 deletions lib/opal/cli_runners/nashorn.rb

This file was deleted.

5 changes: 0 additions & 5 deletions stdlib/nashorn.rb

This file was deleted.

32 changes: 0 additions & 32 deletions stdlib/nashorn/file.rb

This file was deleted.

4 changes: 0 additions & 4 deletions stdlib/nashorn/io.rb

This file was deleted.

7 changes: 2 additions & 5 deletions stdlib/opal-platform.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# backtick_javascript: true

`/* global Java, GjsFileImporter, Deno, Bun */`
`/* global GjsFileImporter, Deno, Bun */`

browser = `typeof(document) !== "undefined"`
bun = `typeof(Bun) === "object" && typeof(Bun.version) === "string"`
deno = `typeof(Deno) === "object" && typeof(Deno.version) === "object"`
node = `typeof(process) !== "undefined" && process.versions && process.versions.node`
nashorn = `typeof(Java) !== "undefined" && Java.type`
headless_chrome = `typeof(opalheadlesschrome) !== "undefined"`
headless_firefox = `typeof(opalheadlessfirefox) !== "undefined"`
safari = `typeof(opalsafari) !== "undefined"`
gjs = `typeof(window) !== "undefined" && typeof(GjsFileImporter) !== "undefined"`
quickjs = `typeof(window) === "undefined" && typeof(__loadScript) !== "undefined"`
opal_miniracer = `typeof(opalminiracer) !== "undefined"`

OPAL_PLATFORM = if nashorn
'nashorn'
elsif bun
OPAL_PLATFORM = if bun
'bun'
elsif deno
'deno'
Expand Down
1 change: 0 additions & 1 deletion stdlib/opal/platform.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'opal-platform'

case OPAL_PLATFORM
when 'nashorn' then require 'nashorn'
when 'gjs' then require 'gjs'
when 'quickjs' then require 'quickjs'
when 'deno' then require 'deno/base'
Expand Down

0 comments on commit e6918ef

Please sign in to comment.