custom_elements_manifest_parser 0.2.7 → 0.2.9
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 +4 -4
- data/.yardopts +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +66 -1
- data/README.md +2 -2
- data/Rakefile +4 -0
- data/lib/custom_elements_manifest_parser/mixins/has_parent_module.rb +12 -0
- data/lib/custom_elements_manifest_parser/nodes/class_declaration.rb +1 -0
- data/lib/custom_elements_manifest_parser/nodes/class_field.rb +2 -0
- data/lib/custom_elements_manifest_parser/nodes/class_method.rb +1 -0
- data/lib/custom_elements_manifest_parser/nodes/custom_element_export.rb +2 -0
- data/lib/custom_elements_manifest_parser/nodes/function_declaration.rb +2 -0
- data/lib/custom_elements_manifest_parser/nodes/javascript_export.rb +2 -0
- data/lib/custom_elements_manifest_parser/nodes/javascript_module.rb +2 -2
- data/lib/custom_elements_manifest_parser/nodes/mixin_declaration.rb +3 -1
- data/lib/custom_elements_manifest_parser/nodes/variable_declaration.rb +2 -0
- data/lib/custom_elements_manifest_parser/parser.rb +1 -1
- data/lib/custom_elements_manifest_parser/structs/declarable_node_struct.rb +3 -1
- data/lib/custom_elements_manifest_parser/version.rb +1 -1
- data/lib/custom_elements_manifest_parser.rb +0 -3
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a001a44dccd2121534449c7bf8b1f3aaa8f21f2254ff384f66ae4fbd23e5274d
|
|
4
|
+
data.tar.gz: b5a909ac1b9dfa1839ca381f76e43f56eb633e7bcc417317044c836825ef5f88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 440c1f987a729a4af2cd776ce324fc2067b397635bded843ed43286d54df62007f5fc8737365d104a116c469ab4cad03dde92b4b2ef15351398ba41f2697034c
|
|
7
|
+
data.tar.gz: bb6277a2c4e7539410b3a741710d40d3a66800d6853520b11dcf3d9359bed048bf311c9ac5421094ccf1081bc015f58632300122b6819436e5d75ae82f6b3f8c
|
data/.yardopts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-m markdown
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
custom_elements_manifest_parser (0.2.
|
|
4
|
+
custom_elements_manifest_parser (0.2.9)
|
|
5
5
|
dry-struct (~> 1.0)
|
|
6
6
|
dry-types (~> 1.0)
|
|
7
7
|
dry-validation (~> 1.0)
|
|
@@ -9,7 +9,12 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
+
ast (2.4.2)
|
|
13
|
+
backport (1.2.0)
|
|
14
|
+
backports (3.24.1)
|
|
15
|
+
benchmark (0.2.1)
|
|
12
16
|
concurrent-ruby (1.2.2)
|
|
17
|
+
diff-lcs (1.5.0)
|
|
13
18
|
dry-configurable (1.1.0)
|
|
14
19
|
dry-core (~> 1.0, < 2)
|
|
15
20
|
zeitwerk (~> 2.6)
|
|
@@ -47,10 +52,68 @@ GEM
|
|
|
47
52
|
dry-initializer (~> 3.0)
|
|
48
53
|
dry-schema (>= 1.12, < 2)
|
|
49
54
|
zeitwerk (~> 2.6)
|
|
55
|
+
e2mmap (0.1.0)
|
|
50
56
|
ice_nine (0.11.2)
|
|
57
|
+
jaro_winkler (1.5.6)
|
|
58
|
+
json (2.6.3)
|
|
59
|
+
kramdown (2.4.0)
|
|
60
|
+
rexml
|
|
61
|
+
kramdown-parser-gfm (1.1.0)
|
|
62
|
+
kramdown (~> 2.0)
|
|
63
|
+
language_server-protocol (3.17.0.3)
|
|
51
64
|
minitest (5.20.0)
|
|
65
|
+
nokogiri (1.15.4-arm64-darwin)
|
|
66
|
+
racc (~> 1.4)
|
|
67
|
+
parallel (1.23.0)
|
|
68
|
+
parser (3.2.2.4)
|
|
69
|
+
ast (~> 2.4.1)
|
|
70
|
+
racc
|
|
71
|
+
racc (1.7.1)
|
|
72
|
+
rainbow (3.1.1)
|
|
52
73
|
rake (13.0.6)
|
|
74
|
+
rbs (2.8.4)
|
|
75
|
+
regexp_parser (2.8.2)
|
|
76
|
+
reverse_markdown (2.1.1)
|
|
77
|
+
nokogiri
|
|
78
|
+
rexml (3.2.6)
|
|
79
|
+
rubocop (1.57.2)
|
|
80
|
+
json (~> 2.3)
|
|
81
|
+
language_server-protocol (>= 3.17.0)
|
|
82
|
+
parallel (~> 1.10)
|
|
83
|
+
parser (>= 3.2.2.4)
|
|
84
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
85
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
86
|
+
rexml (>= 3.2.5, < 4.0)
|
|
87
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
88
|
+
ruby-progressbar (~> 1.7)
|
|
89
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
90
|
+
rubocop-ast (1.30.0)
|
|
91
|
+
parser (>= 3.2.1.0)
|
|
92
|
+
ruby-progressbar (1.13.0)
|
|
93
|
+
solargraph (0.49.0)
|
|
94
|
+
backport (~> 1.2)
|
|
95
|
+
benchmark
|
|
96
|
+
bundler (~> 2.0)
|
|
97
|
+
diff-lcs (~> 1.4)
|
|
98
|
+
e2mmap
|
|
99
|
+
jaro_winkler (~> 1.5)
|
|
100
|
+
kramdown (~> 2.3)
|
|
101
|
+
kramdown-parser-gfm (~> 1.1)
|
|
102
|
+
parser (~> 3.0)
|
|
103
|
+
rbs (~> 2.0)
|
|
104
|
+
reverse_markdown (~> 2.0)
|
|
105
|
+
rubocop (~> 1.38)
|
|
106
|
+
thor (~> 1.0)
|
|
107
|
+
tilt (~> 2.0)
|
|
108
|
+
yard (~> 0.9, >= 0.9.24)
|
|
109
|
+
thor (1.3.0)
|
|
110
|
+
tilt (2.3.0)
|
|
111
|
+
unicode-display_width (2.5.0)
|
|
53
112
|
yard (0.9.34)
|
|
113
|
+
yard-junk (0.0.9)
|
|
114
|
+
backports (>= 3.18)
|
|
115
|
+
rainbow
|
|
116
|
+
yard
|
|
54
117
|
zeitwerk (2.6.12)
|
|
55
118
|
|
|
56
119
|
PLATFORMS
|
|
@@ -60,7 +123,9 @@ DEPENDENCIES
|
|
|
60
123
|
custom_elements_manifest_parser!
|
|
61
124
|
minitest (~> 5.0)
|
|
62
125
|
rake (~> 13.0)
|
|
126
|
+
solargraph (~> 0.49.0)
|
|
63
127
|
yard
|
|
128
|
+
yard-junk (~> 0.0.9)
|
|
64
129
|
|
|
65
130
|
BUNDLED WITH
|
|
66
131
|
2.2.33
|
data/README.md
CHANGED
|
@@ -240,7 +240,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
240
240
|
|
|
241
241
|
## Contributing
|
|
242
242
|
|
|
243
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/custom_elements_manifest_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
|
243
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/custom_elements_manifest_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/konnorrogers/custom_elements_manifest_parser/blob/main/CODE_OF_CONDUCT.md).
|
|
244
244
|
|
|
245
245
|
## License
|
|
246
246
|
|
|
@@ -248,4 +248,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
248
248
|
|
|
249
249
|
## Code of Conduct
|
|
250
250
|
|
|
251
|
-
Everyone interacting in the CustomElementsManifestParser project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
251
|
+
Everyone interacting in the CustomElementsManifestParser project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/konnorrogers/custom_elements_manifest_parser/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
|
@@ -27,6 +27,8 @@ module CustomElementsManifestParser
|
|
|
27
27
|
# @return [SourceReference, nil]
|
|
28
28
|
attribute :source, Types::Nominal::Any.optional.meta(required: false)
|
|
29
29
|
|
|
30
|
+
include Mixins::HasParentModule
|
|
31
|
+
|
|
30
32
|
# @!parse include Structs::DeclarableNodeStruct
|
|
31
33
|
attributes_from Structs::DeclarableNodeStruct
|
|
32
34
|
|
|
@@ -20,6 +20,8 @@ module CustomElementsManifestParser
|
|
|
20
20
|
# @return ["custom-element-definition"]
|
|
21
21
|
attribute :kind, Types.Value("custom-element-definition")
|
|
22
22
|
|
|
23
|
+
include Mixins::HasParentModule
|
|
24
|
+
|
|
23
25
|
# @!parse Structs::DeclarableNodeStruct
|
|
24
26
|
attributes_from Structs::DeclarableNodeStruct
|
|
25
27
|
|
|
@@ -48,8 +48,8 @@ module CustomElementsManifestParser
|
|
|
48
48
|
|
|
49
49
|
def visit(parser:)
|
|
50
50
|
hash = {}
|
|
51
|
-
hash[:declarations] = declarations.map { |declaration| parser.visit_node(declaration.merge(
|
|
52
|
-
hash[:exports] = exports.map { |export| parser.visit_node(export.merge(
|
|
51
|
+
hash[:declarations] = declarations.map { |declaration| parser.visit_node(declaration.merge(_parent_module: self, parser: parser)) } unless declarations.nil?
|
|
52
|
+
hash[:exports] = exports.map { |export| parser.visit_node(export.merge(_parent_module: self, parser: parser)) } unless exports.nil?
|
|
53
53
|
|
|
54
54
|
new(hash)
|
|
55
55
|
end
|
|
@@ -68,7 +68,9 @@ module CustomElementsManifestParser
|
|
|
68
68
|
attribute attr.name, attr.type
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
include Mixins::HasParentModule
|
|
72
|
+
|
|
73
|
+
# @!parse Structs::DeclarableNodeStruct
|
|
72
74
|
attributes_from Structs::DeclarableNodeStruct
|
|
73
75
|
|
|
74
76
|
# @!attribute kind
|
|
@@ -9,7 +9,9 @@ module CustomElementsManifestParser
|
|
|
9
9
|
# @return [JavaScriptModule, nil] -
|
|
10
10
|
# A convenience helper so you don't need to manually traverse the manifest and always go top -> bottom.
|
|
11
11
|
# By using this you can grab the "path" and "exports" of a custom element.
|
|
12
|
-
attribute :
|
|
12
|
+
attribute :_parent_module, Types::Nominal::Any.optional.meta(required: false)
|
|
13
|
+
|
|
14
|
+
attribute :parser, Types::Nominal::Any.optional.meta(required: false)
|
|
13
15
|
|
|
14
16
|
def self.build_hash(parser:, struct:)
|
|
15
17
|
{}
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
# @!parse
|
|
5
5
|
Dir["#{__dir__}/custom_elements_manifest_parser/**/*.rb"].each { |file| require file }
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
#
|
|
9
7
|
# Top level parser
|
|
10
8
|
module CustomElementsManifestParser
|
|
11
|
-
autoload :Parser, "custom_elements_manifest_parser/parser"
|
|
12
9
|
# Shortuct for `CustomElementsManifestParser::Parser.new().parse()`
|
|
13
10
|
# @return [CustomElementsManifestParser::Parser]
|
|
14
11
|
def self.parse(hash)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: custom_elements_manifest_parser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- konnorrogers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dry-struct
|
|
@@ -59,6 +59,7 @@ executables: []
|
|
|
59
59
|
extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
|
61
61
|
files:
|
|
62
|
+
- ".yardopts"
|
|
62
63
|
- CHANGELOG.md
|
|
63
64
|
- CODE_OF_CONDUCT.md
|
|
64
65
|
- Gemfile
|
|
@@ -84,6 +85,7 @@ files:
|
|
|
84
85
|
- lib/custom_elements_manifest_parser/data_types/source_reference.rb
|
|
85
86
|
- lib/custom_elements_manifest_parser/data_types/type.rb
|
|
86
87
|
- lib/custom_elements_manifest_parser/data_types/type_reference.rb
|
|
88
|
+
- lib/custom_elements_manifest_parser/mixins/has_parent_module.rb
|
|
87
89
|
- lib/custom_elements_manifest_parser/nodes/class_declaration.rb
|
|
88
90
|
- lib/custom_elements_manifest_parser/nodes/class_field.rb
|
|
89
91
|
- lib/custom_elements_manifest_parser/nodes/class_method.rb
|