Skip to content

Commit

Permalink
Remove Nashorn runner because its ES5.1, only partial ES6, no longer …
Browse files Browse the repository at this point in the history
…worked on and only distributed as jar for maven without runnable command like jjs. Also its no longer part of recent JDKs.
  • Loading branch information
janbiedermann committed Sep 20, 2024
1 parent 9ede9ed commit 6310079
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 6310079

Please sign in to comment.