ruby-next-core 1.0.0.rc.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +5 -6
- data/lib/.rbnext/2.3/ruby-next/config.rb +2 -2
- data/lib/ruby-next/config.rb +2 -2
- data/lib/ruby-next/language/rewriters/3.1/shorthand_hash.rb +2 -1
- data/lib/ruby-next/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d93cf2f90d65b784dc88faa364ce5bd1cca02443610a370bcd24389e727872
|
4
|
+
data.tar.gz: d6f995ee6175fe8e65c237900639b7a62e10876a1f479ce076c9e671218cfc7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73e75f758e537e32c2d0cd79f57483337fcb9ee10f9b76daa6d5a560f7e2269ebf574974cd5b620249e177ef6edd746eae08def2f10f1b2094466a4717f238a
|
7
|
+
data.tar.gz: 54e14beaef6122ceff3514c270a0fe2877c3ad727037c08eb6d0537b93d36ef9e305e7d67626f14123e9916c1663ea8af7c188389d9a7f4aa85b93abaa1c6bcb
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.0.0 🎄
|
6
|
+
|
5
7
|
- Add `it` block parameter support. ([@palkan][])
|
6
8
|
|
7
9
|
- Deprecate AST transpiling mode. ([@palkan][])
|
@@ -20,7 +22,7 @@
|
|
20
22
|
|
21
23
|
- Use `.rbnextrc` arguments for runtime transpiling and auto-transpiling gems. ([@palkan][])
|
22
24
|
|
23
|
-
- Stop testing Ruby <2.
|
25
|
+
- Stop testing Ruby <2.4. ([@palkan][])
|
24
26
|
|
25
27
|
- Extract `require-hooks`. ([@palkan][])
|
26
28
|
|
data/README.md
CHANGED
@@ -127,7 +127,7 @@ First, install a gem:
|
|
127
127
|
gem "ruby-next-core"
|
128
128
|
|
129
129
|
# gemspec
|
130
|
-
spec.add_dependency "ruby-next-core"
|
130
|
+
spec.add_dependency "ruby-next-core", "~> 1.0"
|
131
131
|
```
|
132
132
|
|
133
133
|
**NOTE:** we use a different gem for _distribution_, `ruby-next-core`, to provide a zero-dependency, polyfills-only version.
|
@@ -182,10 +182,10 @@ Installation:
|
|
182
182
|
|
183
183
|
```ruby
|
184
184
|
# Gemfile
|
185
|
-
gem "ruby-next"
|
185
|
+
gem "ruby-next", "~> 1.0"
|
186
186
|
|
187
187
|
# gemspec
|
188
|
-
spec.add_dependency "ruby-next"
|
188
|
+
spec.add_dependency "ruby-next", "~> 1.0"
|
189
189
|
```
|
190
190
|
|
191
191
|
```sh
|
@@ -222,7 +222,6 @@ Usage: ruby-next nextify DIRECTORY_OR_FILE [options]
|
|
222
222
|
--overwrite Overwrites the original file with one version of --single-version (works only with --single-version or --rewrite)
|
223
223
|
--edge Enable edge (master) Ruby features
|
224
224
|
--proposed Enable proposed/experimental Ruby features
|
225
|
-
--transpile-mode=MODE Transpiler mode (ast or rewrite). Default: ast
|
226
225
|
--[no-]refine Do not inject `using RubyNext`
|
227
226
|
--list-rewriters List available rewriters
|
228
227
|
--rewrite=REWRITERS... Specify particular Ruby features to rewrite
|
@@ -234,7 +233,7 @@ Usage: ruby-next nextify DIRECTORY_OR_FILE [options]
|
|
234
233
|
|
235
234
|
The behaviour depends on whether you transpile a single file or a directory:
|
236
235
|
|
237
|
-
- When transpiling a directory, the `.rbnext` subfolder is created within the target folder with subfolders for each supported Ruby versions (e.g., `.rbnext/2.
|
236
|
+
- When transpiling a directory, the `.rbnext` subfolder is created within the target folder with subfolders for each supported Ruby versions (e.g., `.rbnext/2.7`, `.rbnext/3.1`, `.rbnext/3.4`, etc.). If you want to create only a single version (the smallest), you can also pass `--single-version` flag. In that case, no version directory is created (i.e., transpiled files go into `.rbnext`).
|
238
237
|
|
239
238
|
- When transpiling a file and providing the output path as a _file_ path, only a single version is created. For example:
|
240
239
|
|
@@ -300,7 +299,7 @@ Configuration file is a YAML with commands as keys and options as multiline stri
|
|
300
299
|
# ./.rbnextrc
|
301
300
|
|
302
301
|
nextify: |
|
303
|
-
--
|
302
|
+
--min-version=2.7
|
304
303
|
--edge
|
305
304
|
```
|
306
305
|
|
@@ -10,10 +10,10 @@ module RubyNext
|
|
10
10
|
# Defines last minor version for every major version
|
11
11
|
LAST_MINOR_VERSIONS = {
|
12
12
|
2 => 8, # 2.8 is required for backward compatibility: some gems already uses it
|
13
|
-
3 =>
|
13
|
+
3 => 4
|
14
14
|
}.freeze
|
15
15
|
|
16
|
-
LATEST_VERSION = [3,
|
16
|
+
LATEST_VERSION = [3, 4].freeze
|
17
17
|
|
18
18
|
# A virtual version number used for proposed features
|
19
19
|
NEXT_VERSION = "1995.next.0"
|
data/lib/ruby-next/config.rb
CHANGED
@@ -10,10 +10,10 @@ module RubyNext
|
|
10
10
|
# Defines last minor version for every major version
|
11
11
|
LAST_MINOR_VERSIONS = {
|
12
12
|
2 => 8, # 2.8 is required for backward compatibility: some gems already uses it
|
13
|
-
3 =>
|
13
|
+
3 => 4
|
14
14
|
}.freeze
|
15
15
|
|
16
|
-
LATEST_VERSION = [3,
|
16
|
+
LATEST_VERSION = [3, 4].freeze
|
17
17
|
|
18
18
|
# A virtual version number used for proposed features
|
19
19
|
NEXT_VERSION = "1995.next.0"
|
@@ -9,7 +9,8 @@ module RubyNext
|
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("3.1.0")
|
10
10
|
|
11
11
|
def on_pair(node)
|
12
|
-
return super(node) unless node.children[0].loc.last_column == node.children[1].loc.last_column
|
12
|
+
return super(node) unless (node.children[0].loc.last_column == node.children[1].loc.last_column) &&
|
13
|
+
(node.children[1].loc.first_line == node.children[1].loc.last_line)
|
13
14
|
|
14
15
|
context.track! self
|
15
16
|
|
data/lib/ruby-next/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-next-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
@@ -220,9 +220,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
220
|
version: 2.2.0
|
221
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
222
|
requirements:
|
223
|
-
- - "
|
223
|
+
- - ">="
|
224
224
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
225
|
+
version: '0'
|
226
226
|
requirements: []
|
227
227
|
rubygems_version: 3.4.20
|
228
228
|
signing_key:
|