opal 1.0.0 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b19165946a12d9809dfc921cb6a493f43341604eee8be9e88a464dd7544be303
4
- data.tar.gz: 89bb5ea2d36bc47b12694506c1473f03e367fae8e5568e304c8ee1f2e9ec4019
3
+ metadata.gz: 3aa0e89c4ec45d23afb8a14072ab0ef24b7d9e8ef2e0771600dd6e06910f9392
4
+ data.tar.gz: 7f93b034d7ea2c325ae75f0c2fb8d69168ddae340f25a0422b606df4b1e626e0
5
5
  SHA512:
6
- metadata.gz: 0fdd6c709d32eea146ed3bee706d9306c4aab8646dde7f7188a5d16a4c1970a58889211c7f6f1d2cce7491e7e942b73444412817a8ecab395901e446ef27a6ce
7
- data.tar.gz: a827e8d5f9a640dee5cf24dd7b5b5b9c7a5cbe0cead3138d8827e6efa27a930fc99e90848467011a583970b4bd9b8bb0b8c66b3d0fa6d36334144d4c05be2d18
6
+ metadata.gz: 9a52c4d4d98020e2e970b299c57b27a8860bc6093a916960fde9399c7fc0f61d58b572159a35859c1337d69e4754b08b0f1561ce76332ed9dd9170186e447ed2
7
+ data.tar.gz: c0902f840424bc3567a813077034eb3c5d174ba5411f3096dcd7bda877066793bfd598e9ddc35b93d1acdb9ff602216e96a337cea9ac06153e7a418c8904ab9f
@@ -0,0 +1 @@
1
+ open_collective: opal
@@ -0,0 +1,85 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - "*-stable"
8
+ - "*/ci-check"
9
+ pull_request:
10
+ branches:
11
+ - master
12
+
13
+ jobs:
14
+ rake:
15
+ name: ${{ matrix.combo.name || matrix.combo.ruby }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ combo:
20
+ - name: mspec-nodejs
21
+ ruby: 2.7
22
+ command: bin/rake mspec_nodejs
23
+ - name: mspec-chrome
24
+ ruby: 2.7
25
+ command: bin/rake mspec_chrome
26
+ - name: minitest
27
+ ruby: 2.7
28
+ command: bin/rake minitest
29
+ - name: current-ruby
30
+ ruby: 2.7
31
+ - name: previous-ruby
32
+ ruby: 2.6
33
+ - name: older-ruby
34
+ ruby: 2.5
35
+ - name: windows
36
+ # These two fail because of broken stacktraces on windows: minitest_node_nodejs mspec_nodejs
37
+ command: bundle exec rake rspec minitest_nodejs
38
+ ruby: 2.7
39
+ os: windows-latest
40
+ - name: lint
41
+ command: bin/rake lint
42
+ ruby: 2.7
43
+ - name: timezone
44
+ ruby: 2.7
45
+
46
+ # Currently failing:
47
+ # - ruby: truffleruby
48
+ # - ruby: jruby
49
+ # - ruby: ruby-head
50
+
51
+ runs-on: ${{ matrix.combo.os || 'ubuntu-latest' }}
52
+ steps:
53
+ - uses: actions/checkout@v2
54
+ - uses: ruby/setup-ruby@v1
55
+ with:
56
+ ruby-version: ${{ matrix.combo.ruby }}
57
+ # NOTE: Bundler 2.2.0 fails to install libv8
58
+ # https://github.com/rubyjs/libv8/issues/310
59
+ bundler: "2.1.4"
60
+ bundler-cache: false
61
+ - run: ruby bin/git-submodule-fast-install
62
+ - run: bundle lock
63
+ - uses: actions/cache@v2
64
+ with:
65
+ path: ./vendor/bundle
66
+ key: ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
67
+ restore-keys: |
68
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}
69
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-1-0-stable
70
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-
71
+ - uses: actions/cache@v2
72
+ with:
73
+ path: ./node_modules
74
+ key: ${{ runner.os }}-npm-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
75
+ restore-keys: |
76
+ ${{ runner.os }}-npm-${{ github.ref }}
77
+ ${{ runner.os }}-npm-1-0-stable
78
+ ${{ runner.os }}-npm-
79
+ - run: yarn install
80
+ - name: bundle install
81
+ run: |
82
+ bundle config path $PWD/vendor/bundle
83
+ bundle install --jobs 4 --retry 3
84
+ bundle clean
85
+ - run: ${{ matrix.combo.command || 'bin/rake rspec' }}
@@ -15,14 +15,58 @@ Changes are grouped as follows:
15
15
 
16
16
 
17
17
 
18
+ ## [1.0.5](https://github.com/opal/opal/compare/v1.0.4...1.0.5) - 2020-12-24
19
+
20
+
21
+ ### Fixed
22
+
23
+ - [Backported] Add --rbrequire (-q) option to opal cmdline tool ([#2120](https://github.com/opal/opal/pull/2120))
24
+ - Improved the --help descriptions
25
+
26
+
27
+
28
+
29
+ ## [1.0.4](https://github.com/opal/opal/compare/v1.0.3...v1.0.4) - 2020-12-13
30
+
31
+
32
+ ### Fixed
33
+
34
+ - [Backported] Using the `--map` / `-P` CLI option was only working in conjunction with other options ([#1974](https://github.com/opal/opal/pull/1974))
35
+
36
+
37
+
38
+
39
+ ## [1.0.3](https://github.com/opal/opal/compare/v1.0.2...v1.0.3) - 2020-02-01
40
+
41
+
42
+ ### Fixed
43
+
44
+ - Fixed compiling code with Unicode chars from Opal with opal-parser ([#2074](https://github.com/opal/opal/pull/2074))
45
+
46
+
47
+
48
+
49
+ ## [1.0.2](https://github.com/opal/opal/compare/v1.0.1...v1.0.2) - 2019-12-15
50
+
51
+
52
+ - Increase the timeout for starting Chrome within the Chrome runner ([#2037](https://github.com/opal/opal/pull/2037))
53
+ - Run the Opal code within the body inside Chrome runner, it fixes an issue in opal-rspec ([#2037](https://github.com/opal/opal/pull/2037))
54
+
55
+
56
+
57
+
58
+ ## [1.0.1](https://github.com/opal/opal/compare/v1.0.0...v1.0.1) - 2019-12-08
59
+
60
+
61
+ ### Changed
62
+
63
+ - Relaxed parser version requirement ([#2013](https://github.com/opal/opal/pull/2013))
64
+
65
+
66
+
67
+
18
68
  ## [1.0.0](https://github.com/opal/opal/compare/v0.11.4...v1.0.0) - 2019-05-12
19
69
 
20
- <!--
21
- Whitespace conventions:
22
- - 4 spaces before ## titles
23
- - 2 spaces before ### titles
24
- - 1 spaces before normal text
25
- -->
26
70
 
27
71
  ### Added
28
72
 
data/Gemfile CHANGED
@@ -48,8 +48,8 @@ end unless ENV['CI']
48
48
 
49
49
  group :doc do
50
50
  gem 'redcarpet' unless RUBY_ENGINE == 'truffleruby'
51
- end
51
+ end unless ENV['CI']
52
52
 
53
53
  platforms :ruby, :mswin, :mswin64, :mingw, :x64_mingw do
54
- gem 'c_lexer', '2.5.3.0.0' unless RUBY_ENGINE == 'truffleruby'
54
+ gem 'c_lexer', '~> 2.6' unless RUBY_ENGINE == 'truffleruby'
55
55
  end
@@ -1,141 +1 @@
1
- <!--
2
- Whitespace conventions:
3
- - 4 spaces before ## titles
4
- - 2 spaces before ### titles
5
- - 1 spaces before normal text
6
- -->
7
1
 
8
- ### Added
9
-
10
- - Added `Module#prepend` and completely overhauled the module and class inheritance system (#1826)
11
- - Methods and properties are now assigned with `Object.defineProperty()` as non-enumerable (#1821)
12
- - Backtrace now includes the location inside the source file for syntax errors (#1814)
13
- - Added support for a faster C-implemented lexer, it's enough to add `gem 'c_lexer` to the `Gemfile` (#1806)
14
- - Added `Date#to_n` that returns the JavaScript Date object (in native.rb). (#1779, #1792)
15
- - Added `Array#pack` (supports only `C, S, L, Q, c, s, l, q, A, a` formats). (#1723)
16
- - Added `String#unpack` (supports only `C, S, L, Q, S>, L>, Q>, c, s, l, q, n, N, v, V, U, w, A, a, Z, B, b, H, h, u, M, m` formats). (#1723)
17
- - Added `File#symlink?` for Node.js. (#1725)
18
- - Added `Dir#glob` for Node.js (does not support flags). (#1727)
19
- - Added support for a static folder in the "server" CLI runner via the `OPAL_CLI_RUNNERS_SERVER_STATIC_FOLDER` env var
20
- - Added the CLI option `--runner-options` that allows passing arbitrary options to the selected runner, currently the only runner making use of them is `server` accepting `port` and `static_folder`
21
- - Added a short helper to navigate constants manually: E.g. `Opal.$$.Regexp.$$.IGNORECASE` (see docs for "Compiled Ruby")
22
- - Added initial support for OpenURI module (using XMLHttpRequest on browser and [xmlhttprequest](https://www.npmjs.com/package/xmlhttprequest) on Node). (#1735)
23
- - Added `String#prepend` to the list of unsupported methods (because String are immutable in JavaScript)
24
- - Added methods (most introduced in 2.4/2.5):
25
- * `Array#prepend` (#1757)
26
- * `Array#append` (#1757)
27
- * `Array#max` (#1757)
28
- * `Array#min` (#1757)
29
- * `Complex#finite?` (#1757)
30
- * `Complex#infinite?` (#1757)
31
- * `Complex#infinite?` (#1757)
32
- * `Date#to_time` (#1757)
33
- * `Date#next_year` (#1885)
34
- * `Date#prev_year` (#1885)
35
- * `Hash#slice` (#1757)
36
- * `Hash#transform_keys` (#1757)
37
- * `Hash#transform_keys!` (#1757)
38
- * `Numeric#finite?` (#1757)
39
- * `Numeric#infinite?` (#1757)
40
- * `Numeric#infinite?` (#1757)
41
- * `Integer#allbits?` (#1757)
42
- * `Integer#anybits?` (#1757)
43
- * `Integer#digits` (#1757)
44
- * `Integer#nobits?` (#1757)
45
- * `Integer#pow` (#1757)
46
- * `Integer#remainder` (#1757)
47
- * `Integer.sqrt` (#1757)
48
- * `Random.urandom` (#1757)
49
- * `String#delete_prefix` (#1757)
50
- * `String#delete_suffix` (#1757)
51
- * `String#casecmp?` (#1757)
52
- * `Kernel#yield_self` (#1757)
53
- * `String#unpack1` (#1757)
54
- * `String#to_r` (#1842)
55
- * `String#to_c` (#1842)
56
- * `String#match?` (#1842)
57
- * `String#unicode_normalize` returns self (#1842)
58
- * `String#unicode_normalized?` returns true (#1842)
59
- * `String#[]=` throws `NotImplementedError`(#1836)
60
-
61
- - Added support of the `pattern` argument for `Enumerable#all?`, `Enumerable#any?`, `Enumerable#none?`. (#1757)
62
- - Added `ndigits` option support to `Number#floor`, `Number#ceil`, `Number#truncate`. (#1757)
63
- - Added `key` and `receiver` attributes to the `KeyError`. (#1757)
64
- - Extended `Struct.new` to support `keyword_init` option. (#1757)
65
- - Added a new `Opal::Config.missing_require_severity` option and relative `--missing-require` CLI flag. This option will command how the builder will behave when a required file is missing. Previously the behavior was undefined and partly controlled by `dynamic_require_severity`. Not to be confused with the runtime config option `Opal.config.missing_require_severity;` which controls the runtime behavior.
66
- - Added `Matrix` (along with the internal MRI utility `E2MM`)
67
- - Use shorter helpers for constant lookups, `$$` for relative (nesting) lookups and `$$$` for absolute (qualified) lookups
68
- - Add support for the Mersenne Twister random generator, the same used by CRuby/MRI (#657 & #1891)
69
- - [Nodejs] Added support for binary data in `OpenURI` (#1911, #1920)
70
- - [Nodejs] Added support for binary data in `File#read` (#1919, #1921)
71
- - [Nodejs] Added support for `File#readlines` (#1882)
72
- - [Nodejs] Added support for `ENV#[]`, `ENV#[]=`, `ENV#key?`, `ENV#has_key?`, `ENV#include?`, `ENV#member?`, `ENV#empty?`, `ENV#keys`, `ENV#delete` and `ENV#to_s` (#1928)
73
-
74
-
75
- ### Changed
76
-
77
- - **BREAKING** The dot (`.`) character is no longer replaced with [\s\S] in a multiline regexp passed to Regexp#match and Regexp#match? (#1796, #1795)
78
- * You're advised to always use [\s\S] instead of . in a multiline regexp, which is portable between Ruby and JavaScript
79
- - **BREAKING** `Kernel#format` (and `sprintf` alias) are now in a dedicated module `corelib/kernel/format` and available exclusively in `opal` (#1930)
80
- * Previously the methods were part of the `corelib/kernel` module and available in both `opal` and `opal/mini`
81
- - Filename extensions are no longer stripped from filenames internally, resulting in better error reporting (#1804)
82
- - The internal API for CLI runners has changed, now it's just a callable object
83
- - The `--map` CLI option now works only in conjunction with `--compile` (or `--runner compiler`)
84
- - The `node` CLI runner now adds its `NODE_PATH` entry instead of replacing the ENV var altogether
85
- - Added `--disable-web-security` option flag to the Chrome headless runner to be able to do `XMLHttpRequest`
86
- - Migrated parser to 2.5. Bump RUBY_VERSION to 2.5.0.
87
- - Exceptions raised during the compilation now add to the backtrace the current location of the opal file if available (#1814).
88
- - Better use of `displayName` on functions and methods and more readable temp variable names (#1910)
89
- - Source-maps are now inlined and already contain sources, incredibly more stable and precise (#1856)
90
-
91
-
92
- ### Deprecated
93
-
94
- - The CLI `--server-port 1234` option is now deprecated in favor of using `--runner-options='{"port": 1234}'`
95
- - Including `::Native` is now deprecated because it generates conflicts with core classes in constant lookups (both `Native::Object` and `Native::Array` exist). Instead `Native::Werapper` should be used.
96
- - Using `node_require 'my_module'` to access the native `require()` function in Node.js is deprecated in favor of <code>\`require('my_module')\`</code> because static builders need to parse the call in order to function (#1886).
97
-
98
-
99
- ### Removed
100
-
101
- - The `node` CLI runner no longer supports passing extra node options via the `NODE_OPT` env var, instead Node.js natively supports the `NODE_OPTIONS` env var.
102
- - The gem "hike" is no longer an external dependency and is now an internal dependency available as `Opal::Hike` (#1881)
103
- - Removed the internal Opal class `Marshal::BinaryString` (#1914)
104
- - Removed Racc, as it's now replaced by the parser gem (#1880)
105
-
106
-
107
-
108
- ### Fixed
109
-
110
- - Fix handling of trailing semicolons and JavaScript returns inside x-strings, the behavior is now well defined and covered by proper specs (#1776)
111
- - Fixed singleton method definition to return method name. (#1757)
112
- - Allow passing number of months to `Date#next_month` and `Date#prev_month`. (#1757)
113
- - Fixed `pattern` argument handling for `Enumerable#grep` and `Enumerable#grep_v`. (#1757)
114
- - Raise `ArgumentError` instead of `TypeError` from `Numeric#step` when step is not a number. (#1757)
115
- - At run-time `LoadError` wasn't being raised even with `Opal.config.missing_require_severity;` set to `'error'`.
116
- - Fixed `Kernel#public_methods` to return instance methods if the argument is set to false. (#1848)
117
- - Fixed an issue in `String#gsub` that made it start an infinite loop when used recursively. (#1879)
118
- - `Kernel#exit` was using status 0 when a number or a generic object was provided, now accepts numbers and tries to convert objects with `#to_int` (#1898, #1808).
119
- - Fixed metaclass inheritance in subclasses of Module (#1901)
120
- - `Method#to_proc` now correctly sets parameters and arity on the resulting Proc (#1903)
121
- - Fixed bridged classes having their prototype removed from the original chain by separating them from the Ruby class (#1909)
122
- - Improve `String#to_proc` performance (#1888)
123
- - Fixed/updated the examples (#1887)
124
- - `Opal.ancestors()` now returns false for when provided with JS-falsy objects (#1839)
125
- - When subclassing now the constant is set before calling `::inherited` (#1838)
126
- - `String#to_sym` now returns the string literal (#1835)
127
- - `String#center` now correctly checks length (#1833)
128
- - `redo` inside `while` now works properly (#1820)
129
- - Fixed compilation of empty/whitespace-only x-strings (#1811)
130
- - Fix `||=` assignments on constants when the constant is not yet defined (#1935)
131
- - Fix `String#chomp` to return an empty String when `arg == self` (#1936)
132
- - Fix methods of `Comparable` when `<=>` does not return Numeric (#1945)
133
- - Fix `Class#native_alias` error message (#1946)
134
- - Fix `gmt_offset` (alias `utc_offset`) should return 0 if the date is UTC (#1941)
135
- - `exceptionDetails.stackTrace` can be undefined (#1955)
136
- - Implement `String#each_codepoint` and `String#codepoints` (#1944, #1947)
137
- - [internal] Terminate statement with semi-colon and remove unecessary semi-colon (#1948)
138
- - Some steps toward "strict mode" (#1953)
139
- - Preserve `Exception.stack`, in some cases the backtrace was lost (#1963)
140
- - Make `String#ascii_only?` a little less wrong (#1951)
141
- - Minor fixes to `::Native` (#1957)
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ def system(*args)
4
+ puts "== command: #{args.inspect}"
5
+ super
6
+ end
7
+
8
+ def system!(*args)
9
+ system(*args) or raise "== command failed: #{args.inspect}"
10
+ end
11
+
12
+
13
+ Dir.chdir "#{__dir__}/.."
14
+ Dir.mkdir 'tmp' unless File.directory? 'tmp'
15
+
16
+ system 'git submodule --quiet deinit --all -f 2> /dev/null'
17
+
18
+ modules = {}
19
+ `git config -f #{__dir__}/../.gitmodules --list`.lines.each do |line|
20
+ fullkey, value = line.split('=', 2)
21
+ _, name, key = fullkey.split('.', 3)
22
+ modules[name] ||= {}
23
+ modules[name][key.to_sym] = value.strip
24
+ end
25
+
26
+ `git submodule`.lines.each do |line|
27
+ sha1, name = line[1..-1].scan(/^(?<sha1>\w+) (?<name>\S+)/).first
28
+ modules[name][:sha1] = sha1
29
+ end
30
+
31
+ modules.map do |name, config|
32
+ puts "== installing #{name}..."
33
+ url, sha1, path = config.values_at(:url, :sha1, :path)
34
+ dir = File.dirname(path)
35
+ url.sub!(/\.git$/, '')
36
+
37
+ Thread.new do
38
+ system! "curl -L #{url}/archive/#{sha1}.zip -o #{sha1}.zip"
39
+
40
+ system! "unzip -q #{sha1}.zip -d #{dir}"
41
+ system! "rm #{sha1}.zip"
42
+
43
+ system! "rm -rf #{path}" if File.directory? path
44
+ system! "mv #{dir}/*-#{sha1} #{path}"
45
+ print "== completed installing #{name}.\n"
46
+ end
47
+ end.each(&:join)
48
+
49
+ system! 'git submodule init'
data/bin/setup CHANGED
@@ -3,6 +3,10 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
+ gem install bundler --conservative
7
+
6
8
  bundle update
7
9
 
8
10
  git submodule update --init
11
+
12
+ bin/yarn install
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
+ begin
5
+ exec "yarnpkg", *ARGV
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -0,0 +1,18 @@
1
+ # Releasing
2
+
3
+ _This guide is a work-in-progress._
4
+
5
+ ## Updating the version
6
+
7
+ - Update `lib/opal/version.rb`
8
+ - Update `opal/corelib/constants.rb` with the same version number along with release dates
9
+
10
+ ## Updating the changelog
11
+
12
+ - Ensure all the unreleased changes are documented in UNRELEASED.md
13
+ - Run `bin/rake changelog VERSION=v1.2.3` specifying the version number you're about to release
14
+
15
+ ## The commit
16
+
17
+ - Commit the updated changelog along with the version bump using this commmit message:
18
+ "Release v1.2.3"
@@ -7,7 +7,7 @@ require 'opal/cli_runners'
7
7
  module Opal
8
8
  class CLI
9
9
  attr_reader :options, :file, :compiler_options, :evals, :load_paths, :argv,
10
- :output, :requires, :gems, :stubs, :verbose, :runner_options,
10
+ :output, :requires, :rbrequires, :gems, :stubs, :verbose, :runner_options,
11
11
  :preload, :filename, :debug, :no_exit, :lib_only, :missing_require_severity
12
12
 
13
13
  class << self
@@ -37,6 +37,7 @@ module Opal
37
37
  @debug = options.delete(:debug) { false }
38
38
  @filename = options.delete(:filename) { @file && @file.path }
39
39
  @requires = options.delete(:requires) { [] }
40
+ @rbrequires = options.delete(:rbrequires) { [] }
40
41
 
41
42
  @missing_require_severity = options.delete(:missing_require_severity) { Opal::Config.missing_require_severity }
42
43
 
@@ -79,6 +80,8 @@ module Opal
79
80
  end
80
81
 
81
82
  def create_builder
83
+ rbrequires.each(&Kernel.method(:require))
84
+
82
85
  builder = Opal::Builder.new(
83
86
  stubs: stubs,
84
87
  compiler_options: compiler_options,
@@ -58,6 +58,13 @@ module Opal
58
58
  options[:requires] << library
59
59
  end
60
60
 
61
+ on('-q', '--rbrequire LIBRARY', String,
62
+ 'Require the library in Ruby context before compiling'
63
+ ) do |library|
64
+ options[:rbrequires] ||= []
65
+ options[:rbrequires] << library
66
+ end
67
+
61
68
  on('-s', '--stub FILE', String, 'Stubbed files will be compiled as empty files') do |stub|
62
69
  options[:stubs] ||= []
63
70
  options[:stubs] << stub
@@ -105,11 +112,11 @@ module Opal
105
112
 
106
113
  section 'Compilation Options:'
107
114
 
108
- on('-M', '--no-method-missing', 'Enable/Disable method missing') do
115
+ on('-M', '--no-method-missing', 'Disable method missing') do
109
116
  options[:method_missing] = false
110
117
  end
111
118
 
112
- on('-O', '--no-opal', 'Enable/Disable implicit `require "opal"`') do
119
+ on('-O', '--no-opal', 'Disable implicit `require "opal"`') do
113
120
  options[:skip_opal_require] = true
114
121
  end
115
122
 
@@ -137,7 +144,8 @@ module Opal
137
144
  options[:missing_require_severity] = level.to_sym
138
145
  end
139
146
 
140
- on('-P', '--map FILE', 'Enable/Disable source map') do |file|
147
+ on('-P', '--map FILE', 'Output path to FILE') do |file|
148
+ options[:runner_options] ||= {}
141
149
  options[:runner_options][:map_file] = file
142
150
  end
143
151
 
@@ -13,9 +13,9 @@ fs.writeFileSync("/tmp/chrome-opal.html", "" +
13
13
  "<html>" +
14
14
  "<head>" +
15
15
  "<meta charset='utf-8'>" +
16
- "<script src='chrome-opal.js'></script>" +
17
16
  "</head>" +
18
17
  "<body>" +
18
+ "<script src='./chrome-opal.js'></script>" +
19
19
  "</body>" +
20
20
  "</html>"
21
21
  );
@@ -62,10 +62,10 @@ module Opal
62
62
 
63
63
  chrome_pid = Process.spawn(chrome_server_cmd)
64
64
 
65
- Timeout.timeout(1) do
65
+ Timeout.timeout(10) do
66
66
  loop do
67
67
  break if chrome_server_running?
68
- sleep 0.1
68
+ sleep 0.5
69
69
  end
70
70
  end
71
71
 
@@ -1,6 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  if RUBY_ENGINE == 'opal'
4
+ class Parser::Lexer
5
+ def source_buffer=(source_buffer)
6
+ @source_buffer = source_buffer
7
+
8
+ if @source_buffer
9
+ source = @source_buffer.source
10
+ # Force UTF8 unpacking even if JS works with UTF-16/UCS-2
11
+ # See: https://mathiasbynens.be/notes/javascript-encoding
12
+ @source_pts = source.unpack('U*')
13
+ else
14
+ @source_pts = nil
15
+ end
16
+ end
17
+ end
18
+
4
19
  class Parser::Lexer::Literal
5
20
  undef :extend_string
6
21
 
@@ -6,66 +6,29 @@ module Opal
6
6
  module Util
7
7
  extend self
8
8
 
9
+ ExitStatusError = Class.new(StandardError)
10
+
9
11
  # Used for uglifying source to minify.
10
12
  #
11
13
  # Opal::Util.uglify("javascript contents")
12
14
  #
13
15
  # @param str [String] string to minify
14
16
  # @return [String]
15
- def uglify(str)
16
- uglifyjs = DigestSourceCommand.new(:uglifyjs, '-c', ' (install with: "npm install -g uglify-js")')
17
- uglifyjs.digest(str)
17
+ def uglify(source)
18
+ sh 'bin/yarn -s run uglifyjs -c', data: source
18
19
  end
19
20
 
20
21
  # Gzip code to check file size.
21
- def gzip(str)
22
- gzip = DigestSourceCommand.new(:gzip, '-f', ', it is required to produce the .gz version')
23
- gzip.digest(str)
22
+ def gzip(source)
23
+ sh 'gzip -f', data: source
24
24
  end
25
25
 
26
- class Command
27
- def initialize(command, options, message = nil)
28
- @command, @options, @message = command, options, message
29
- return unless command_installed? command, message
30
- end
31
- attr_reader :command, :options, :message
32
-
33
- private
34
-
35
- def hide_stderr
36
- if (/mswin|mingw/ =~ RUBY_PLATFORM).nil?
37
- '2> /dev/null'
38
- else
39
- '2> nul'
40
- end
41
- end
42
-
43
- # Code from http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
44
- def which(cmd)
45
- exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
46
- ENV['PATH'].split(File::PATH_SEPARATOR).find do |path|
47
- exts.find do |ext|
48
- exe = File.join(path, "#{cmd}#{ext}")
49
- exe if File.executable? exe
50
- end
51
- end
52
- end
53
-
54
- INSTALLED = {}
55
- def command_installed?(cmd, install_comment)
56
- command_installed = Command::INSTALLED[cmd.to_s] ||= which(cmd)
57
- $stderr.puts %{"#{cmd}" command not found#{install_comment}} unless command_installed
58
- command_installed
59
- end
60
- end
26
+ private
61
27
 
62
- class DigestSourceCommand < Command
63
- ExitStatusError = Class.new(StandardError)
64
- def digest(source)
65
- out, _, status = Open3.capture3("#{command} #{options} #{hide_stderr}", stdin_data: source)
66
- raise ExitStatusError, "exited with status #{status.exitstatus}" unless status.success?
67
- out
68
- end
28
+ def sh(command, data:)
29
+ out, _err, status = Open3.capture3(command, stdin_data: data)
30
+ raise ExitStatusError, "exited with status #{status.exitstatus}" unless status.success?
31
+ out
69
32
  end
70
33
  end
71
34
  end
@@ -3,5 +3,5 @@
3
3
  module Opal
4
4
  # WHEN RELEASING:
5
5
  # Remember to update RUBY_ENGINE_VERSION in opal/corelib/constants.rb too!
6
- VERSION = '1.0.0'
6
+ VERSION = '1.0.5'
7
7
  end
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.required_ruby_version = '>= 2.3'
37
37
 
38
38
  spec.add_dependency 'ast', '>= 2.3.0'
39
- spec.add_dependency 'parser', '= 2.5.3.0'
39
+ spec.add_dependency 'parser', '~> 2.6'
40
40
 
41
41
  spec.add_development_dependency 'sourcemap', '~> 0.1.0'
42
42
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -1,9 +1,9 @@
1
1
  RUBY_PLATFORM = 'opal'
2
2
  RUBY_ENGINE = 'opal'
3
- RUBY_VERSION = '2.5.3'
4
- RUBY_ENGINE_VERSION = '1.0.0'
5
- RUBY_RELEASE_DATE = '2019-05-12'
3
+ RUBY_VERSION = '2.5.8'
4
+ RUBY_ENGINE_VERSION = '1.0.5'
5
+ RUBY_RELEASE_DATE = '2020-12-24'
6
6
  RUBY_PATCHLEVEL = 0
7
7
  RUBY_REVISION = 0
8
- RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2019 Adam Beynon and the Opal contributors'
8
+ RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2020 Adam Beynon and the Opal contributors'
9
9
  RUBY_DESCRIPTION = "opal #{RUBY_ENGINE_VERSION} (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION})"
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "opal-dev",
3
+ "private": true,
4
+ "dependencies": {
5
+ "benchmark": "^2.1.4",
6
+ "jshint": "^2.11.0-rc1",
7
+ "source-map-support": "^0.5.16",
8
+ "uglify-js": "^3.7.2"
9
+ },
10
+ "devDependencies": {},
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/opal/opal.git"
14
+ }
15
+ }
@@ -14,7 +14,7 @@ task :jshint do
14
14
  # opal-builder and opal-parser take so long travis stalls
15
15
  next if path =~ /.min.js\z|opal-builder|opal-parser/
16
16
 
17
- sh "jshint --verbose #{path}"
17
+ sh "yarn -s run jshint --verbose #{path}"
18
18
  }
19
19
  puts
20
20
  puts "= Checking corelib files separately..."
@@ -26,16 +26,14 @@ task :jshint do
26
26
  js_paths << js_path
27
27
  end
28
28
  js_paths.each do |js_path|
29
- sh "jshint --verbose #{js_path}"
29
+ sh "yarn -s run jshint --verbose #{js_path}"
30
30
  end
31
- sh "jshint --verbose opal/corelib/runtime.js"
31
+ sh 'yarn -s run jshint --verbose opal/corelib/runtime.js'
32
32
  end
33
33
 
34
34
  require 'rubocop/rake_task'
35
35
  desc 'Run RuboCop on lib/, opal/ and stdlib/ directories'
36
36
  RuboCop::RakeTask.new(:rubocop) do |task|
37
- # TODO: enable it back after releasing https://github.com/bbatsov/rubocop/pull/5633
38
- # task.options << '--fail-fast'
39
37
  task.options << '--extra-details'
40
38
  task.options << '--display-style-guide'
41
39
  task.options << '--parallel'
@@ -70,8 +70,8 @@ task :changelog do
70
70
  end
71
71
 
72
72
  changelog_entries.unshift changelog_entry.call(
73
- tag_name: 'HEAD',
74
- release_date: 'unreleased',
73
+ tag_name: ENV['VERSION'] || 'HEAD',
74
+ release_date: (ENV['VERSION'] ? Time.now.to_date.iso8601 : 'unreleased'),
75
75
  previous_tag_name: previous_tag_name,
76
76
  body: File.read(unreleased_path),
77
77
  )
@@ -0,0 +1,244 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ balanced-match@^1.0.0:
6
+ version "1.0.0"
7
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
8
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
9
+
10
+ benchmark@^2.1.4:
11
+ version "2.1.4"
12
+ resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629"
13
+ integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik=
14
+ dependencies:
15
+ lodash "^4.17.4"
16
+ platform "^1.3.3"
17
+
18
+ brace-expansion@^1.1.7:
19
+ version "1.1.11"
20
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
21
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
22
+ dependencies:
23
+ balanced-match "^1.0.0"
24
+ concat-map "0.0.1"
25
+
26
+ buffer-from@^1.0.0:
27
+ version "1.1.1"
28
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
29
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
30
+
31
+ cli@~1.0.0:
32
+ version "1.0.1"
33
+ resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14"
34
+ integrity sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=
35
+ dependencies:
36
+ exit "0.1.2"
37
+ glob "^7.1.1"
38
+
39
+ concat-map@0.0.1:
40
+ version "0.0.1"
41
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
42
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
43
+
44
+ console-browserify@1.1.x:
45
+ version "1.1.0"
46
+ resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
47
+ integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=
48
+ dependencies:
49
+ date-now "^0.1.4"
50
+
51
+ core-util-is@~1.0.0:
52
+ version "1.0.2"
53
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
54
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
55
+
56
+ date-now@^0.1.4:
57
+ version "0.1.4"
58
+ resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
59
+ integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=
60
+
61
+ dom-serializer@0:
62
+ version "0.2.2"
63
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
64
+ integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
65
+ dependencies:
66
+ domelementtype "^2.0.1"
67
+ entities "^2.0.0"
68
+
69
+ domelementtype@1:
70
+ version "1.3.1"
71
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
72
+ integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
73
+
74
+ domelementtype@^2.0.1:
75
+ version "2.1.0"
76
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e"
77
+ integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==
78
+
79
+ domhandler@2.3:
80
+ version "2.3.0"
81
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
82
+ integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg=
83
+ dependencies:
84
+ domelementtype "1"
85
+
86
+ domutils@1.5:
87
+ version "1.5.1"
88
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
89
+ integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=
90
+ dependencies:
91
+ dom-serializer "0"
92
+ domelementtype "1"
93
+
94
+ entities@1.0:
95
+ version "1.0.0"
96
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
97
+ integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=
98
+
99
+ entities@^2.0.0:
100
+ version "2.1.0"
101
+ resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
102
+ integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
103
+
104
+ exit@0.1.2, exit@0.1.x:
105
+ version "0.1.2"
106
+ resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
107
+ integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=
108
+
109
+ fs.realpath@^1.0.0:
110
+ version "1.0.0"
111
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
112
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
113
+
114
+ glob@^7.1.1:
115
+ version "7.1.6"
116
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
117
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
118
+ dependencies:
119
+ fs.realpath "^1.0.0"
120
+ inflight "^1.0.4"
121
+ inherits "2"
122
+ minimatch "^3.0.4"
123
+ once "^1.3.0"
124
+ path-is-absolute "^1.0.0"
125
+
126
+ htmlparser2@3.8.x:
127
+ version "3.8.3"
128
+ resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
129
+ integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg=
130
+ dependencies:
131
+ domelementtype "1"
132
+ domhandler "2.3"
133
+ domutils "1.5"
134
+ entities "1.0"
135
+ readable-stream "1.1"
136
+
137
+ inflight@^1.0.4:
138
+ version "1.0.6"
139
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
140
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
141
+ dependencies:
142
+ once "^1.3.0"
143
+ wrappy "1"
144
+
145
+ inherits@2, inherits@~2.0.1:
146
+ version "2.0.4"
147
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
148
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
149
+
150
+ isarray@0.0.1:
151
+ version "0.0.1"
152
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
153
+ integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
154
+
155
+ jshint@^2.11.0-rc1:
156
+ version "2.12.0"
157
+ resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.12.0.tgz#52e75bd058d587ef81a0e2f95e5cf18eb5dc5c37"
158
+ integrity sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==
159
+ dependencies:
160
+ cli "~1.0.0"
161
+ console-browserify "1.1.x"
162
+ exit "0.1.x"
163
+ htmlparser2 "3.8.x"
164
+ lodash "~4.17.19"
165
+ minimatch "~3.0.2"
166
+ shelljs "0.3.x"
167
+ strip-json-comments "1.0.x"
168
+
169
+ lodash@^4.17.4, lodash@~4.17.19:
170
+ version "4.17.20"
171
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
172
+ integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
173
+
174
+ minimatch@^3.0.4, minimatch@~3.0.2:
175
+ version "3.0.4"
176
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
177
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
178
+ dependencies:
179
+ brace-expansion "^1.1.7"
180
+
181
+ once@^1.3.0:
182
+ version "1.4.0"
183
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
184
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
185
+ dependencies:
186
+ wrappy "1"
187
+
188
+ path-is-absolute@^1.0.0:
189
+ version "1.0.1"
190
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
191
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
192
+
193
+ platform@^1.3.3:
194
+ version "1.3.6"
195
+ resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7"
196
+ integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==
197
+
198
+ readable-stream@1.1:
199
+ version "1.1.13"
200
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
201
+ integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=
202
+ dependencies:
203
+ core-util-is "~1.0.0"
204
+ inherits "~2.0.1"
205
+ isarray "0.0.1"
206
+ string_decoder "~0.10.x"
207
+
208
+ shelljs@0.3.x:
209
+ version "0.3.0"
210
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
211
+ integrity sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=
212
+
213
+ source-map-support@^0.5.16:
214
+ version "0.5.19"
215
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
216
+ integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
217
+ dependencies:
218
+ buffer-from "^1.0.0"
219
+ source-map "^0.6.0"
220
+
221
+ source-map@^0.6.0:
222
+ version "0.6.1"
223
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
224
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
225
+
226
+ string_decoder@~0.10.x:
227
+ version "0.10.31"
228
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
229
+ integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
230
+
231
+ strip-json-comments@1.0.x:
232
+ version "1.0.4"
233
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"
234
+ integrity sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=
235
+
236
+ uglify-js@^3.7.2:
237
+ version "3.12.1"
238
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.1.tgz#78307f539f7b9ca5557babb186ea78ad30cc0375"
239
+ integrity sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ==
240
+
241
+ wrappy@1:
242
+ version "1.0.2"
243
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
244
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
8
8
  - meh.
9
9
  - Adam Beynon
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-05-12 00:00:00.000000000 Z
13
+ date: 2020-12-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ast
@@ -30,16 +30,16 @@ dependencies:
30
30
  name: parser
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '='
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: 2.5.3.0
35
+ version: '2.6'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '='
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 2.5.3.0
42
+ version: '2.6'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: sourcemap
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -209,6 +209,8 @@ extra_rdoc_files: []
209
209
  files:
210
210
  - ".codeclimate.yml"
211
211
  - ".gitattributes"
212
+ - ".github/FUNDING.yml"
213
+ - ".github/workflows/build.yml"
212
214
  - ".gitignore"
213
215
  - ".gitmodules"
214
216
  - ".inch.yml"
@@ -216,7 +218,6 @@ files:
216
218
  - ".rspec"
217
219
  - ".rubocop.yml"
218
220
  - ".rubocop_todo.yml"
219
- - ".travis.yml"
220
221
  - ".yardopts"
221
222
  - CHANGELOG.md
222
223
  - CONDUCT.md
@@ -228,7 +229,6 @@ files:
228
229
  - README.md
229
230
  - Rakefile
230
231
  - UNRELEASED.md
231
- - appveyor.yml
232
232
  - benchmark-ips/README.md
233
233
  - benchmark-ips/bm_block_vs_yield.rb
234
234
  - benchmark-ips/bm_case.rb
@@ -335,12 +335,14 @@ files:
335
335
  - benchmark/bm_module_definition_small.rb
336
336
  - benchmark/run.rb
337
337
  - bin/console
338
+ - bin/git-submodule-fast-install
338
339
  - bin/opal
339
340
  - bin/opal-benchmark-ips
340
341
  - bin/opal-mspec
341
342
  - bin/opal-repl
342
343
  - bin/rake
343
344
  - bin/setup
345
+ - bin/yarn
344
346
  - config.ru
345
347
  - docs/compiled_ruby.md
346
348
  - docs/compiler.md
@@ -354,6 +356,7 @@ files:
354
356
  - docs/opal_parser.md
355
357
  - docs/promises.md
356
358
  - docs/rails.md
359
+ - docs/releasing.md
357
360
  - docs/rspec.md
358
361
  - docs/sinatra.md
359
362
  - docs/source_maps.md
@@ -577,6 +580,7 @@ files:
577
580
  - opal/opal/base.rb
578
581
  - opal/opal/full.rb
579
582
  - opal/opal/mini.rb
583
+ - package.json
580
584
  - stdlib/README.md
581
585
  - stdlib/base64.rb
582
586
  - stdlib/benchmark.rb
@@ -730,19 +734,20 @@ files:
730
734
  - vendored-minitest/minitest/test.rb
731
735
  - vendored-minitest/minitest/unit.rb
732
736
  - vendored-minitest/test/unit.rb
737
+ - yarn.lock
733
738
  homepage: https://opalrb.com
734
739
  licenses:
735
740
  - MIT
736
741
  metadata:
737
742
  bug_tracker_uri: https://github.com/opal/opal/issues
738
- changelog_uri: https://github.com/opal/opal/blob/v1.0.0/CHANGELOG.md
739
- readme_uri: https://github.com/opal/opal/blob/v1.0.0/README.md
740
- api_documentation_uri: http://opalrb.com/docs/api/v1.0.0/index.html
741
- guides_uri: http://opalrb.com/docs/guides/v1.0.0/index.html
743
+ changelog_uri: https://github.com/opal/opal/blob/v1.0.5/CHANGELOG.md
744
+ readme_uri: https://github.com/opal/opal/blob/v1.0.5/README.md
745
+ api_documentation_uri: http://opalrb.com/docs/api/v1.0.5/index.html
746
+ guides_uri: http://opalrb.com/docs/guides/v1.0.5/index.html
742
747
  homepage_uri: https://opalrb.com/
743
748
  chat_uri: https://gitter.im/opal/opal
744
749
  source_code_uri: https://github.com/opal/opal
745
- post_install_message:
750
+ post_install_message:
746
751
  rdoc_options: []
747
752
  require_paths:
748
753
  - lib
@@ -757,8 +762,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
757
762
  - !ruby/object:Gem::Version
758
763
  version: '0'
759
764
  requirements: []
760
- rubygems_version: 3.0.3
761
- signing_key:
765
+ rubygems_version: 3.1.4
766
+ signing_key:
762
767
  specification_version: 4
763
768
  summary: Ruby runtime and core library for JavaScript
764
769
  test_files: []
@@ -1,109 +0,0 @@
1
- language: ruby
2
-
3
- # https://github.com/discourse/mini_racer#travis-ci
4
- sudo: required
5
- dist: trusty
6
-
7
- addons:
8
- chrome: stable
9
-
10
- branches:
11
- only:
12
- - master
13
- - /^.*-stable$/
14
- - /^.*ci-check$/
15
-
16
- cache:
17
- bundler: true
18
- directories:
19
- - /home/travis/.nvm/
20
- - smoke_test_opal_rspec
21
-
22
- matrix:
23
- fast_finish: true
24
-
25
- include:
26
- - rvm: 2.5.3
27
- env: RUN=mspec_opal_chrome
28
-
29
- - rvm: 2.5.3
30
- env: RUN=mspec_ruby_chrome
31
-
32
- # - rvm: 2.5.3
33
- # env:
34
- # - RUN=browser_test
35
- # - SAUCE_USERNAME=elia
36
- # # SAUCE_ACCESS_KEY:
37
- # - secure: GT13SjzU8vmqKIyY2LAXje+ndqevTsX/w71JkZHRLTrDUl0qcIod7xsfahbzGt2gOZPYZUkKiVaPoUenhc/YeJ2jTJVHeHY9UEl2II+3tOtuvp2jLadA//aBbsB6/09d7lIZMzpa93TL2R/SncPxugYW9v2o8o8Lwd2iIzowT/g=
38
-
39
- - rvm: 2.5.3
40
- env: RUN=lint
41
-
42
- - rvm: 2.5.3
43
- env: RUN=mspec_opal_nodejs
44
-
45
- - rvm: 2.5.3
46
- env: RUN=mspec_ruby_nodejs TZ="/usr/share/zoneinfo/Pacific/Fiji"
47
-
48
- - rvm: 2.5.3
49
- env: RUN=minitest
50
-
51
- - rvm: 2.5.3
52
- env: RUN=rspec RACK_VERSION='~> 2.0' CHECK_COVERAGE=true
53
-
54
- - rvm: 2.5.3
55
- env: RUN=smoke_test
56
-
57
- - rvm: ruby-head
58
- env: RUN=rspec
59
-
60
- - rvm: 2.4.5
61
- env: RUN=rspec RACK_VERSION='~> 2.0'
62
-
63
- - rvm: 2.3.8
64
- env: RUN=rspec
65
-
66
- - rvm: 2.6.0
67
- env: RUN=rspec
68
-
69
- - rvm: truffleruby
70
- env: RUN=rspec
71
-
72
- - rvm: jruby-9.2.4.1
73
- env: RUN=rspec
74
-
75
- - rvm: jruby-head
76
- env: RUN=rspec
77
-
78
- allow_failures:
79
- - rvm: ruby-head
80
- - rvm: jruby-head
81
- - rvm: truffleruby
82
- - env: RUN=smoke_test
83
-
84
-
85
- before_install:
86
- # Keep track of which version of node we're running the specs against
87
- - node -v
88
- - git submodule update --init
89
- - npm install -g jshint
90
- - npm install -g uglify-js
91
- - bundle config without doc
92
- - which google-chrome-stable
93
- - google-chrome-stable --version
94
- - export RUBYOPT=-w
95
- # Wokraround from https://github.com/travis-ci/travis-ci/issues/9024#issuecomment-356282802
96
- - sudo chown root /opt/google/chrome/chrome-sandbox
97
- - sudo chmod 4755 /opt/google/chrome/chrome-sandbox
98
-
99
- script:
100
- - "bundle exec rake $RUN"
101
-
102
- notifications:
103
- irc: "irc.freenode.org#opal"
104
- webhooks:
105
- urls:
106
- - https://webhooks.gitter.im/e/2ea12333adebda0c2289
107
-
108
- # addons:
109
- # sauce_connect: true
@@ -1,35 +0,0 @@
1
- version: '{build}'
2
-
3
- skip_tags: true
4
- # AppVeyor automatically skips the build if the commit contains [ci skip] or [skip ci]
5
- #skip_commits:
6
- # message: /\[ci skip\]/
7
-
8
- clone_depth: 10
9
-
10
- environment:
11
- ruby_version: '25'
12
-
13
- branches:
14
- only:
15
- - master
16
- - /.*-stable/
17
- - /.*/ci-check/
18
-
19
- install:
20
- - git submodule update --init --recursive
21
- # Take default Ruby out of path
22
- - SET PATH=%PATH:C:\Ruby193\bin;=%
23
- # Add Ruby to path from build matrix
24
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
25
- - ruby --version
26
- - gem --version
27
- - node --version
28
- - bundler --version
29
- - bundle
30
-
31
- build: off
32
-
33
- # TODO: add mspec_chrome and minitest_chrome once Chrome 60 will be released
34
- test_script:
35
- - bundle exec rake rspec mspec_nodejs minitest_nodejs minitest_node_nodejs