custom_elements_manifest_parser 0.2.2 → 0.2.4
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/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/custom_elements_manifest_parser/data_types/attribute.rb +1 -1
- data/lib/custom_elements_manifest_parser/nodes/class_field.rb +4 -4
- data/lib/custom_elements_manifest_parser/nodes/class_method.rb +2 -2
- data/lib/custom_elements_manifest_parser/parser.rb +1 -1
- data/lib/custom_elements_manifest_parser/structs/class_like_struct.rb +3 -3
- data/lib/custom_elements_manifest_parser/structs/custom_element_like_struct.rb +1 -0
- data/lib/custom_elements_manifest_parser/version.rb +1 -1
- data/lib/custom_elements_manifest_parser.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbdac277ddc19dbfe7f4c67022644caccbf23ce436e06b4cf9791b2838c8fae8
|
4
|
+
data.tar.gz: 9f7523aff92f0abea19802bdddd3340eabf036607ec51b535e8764d4fef97c32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6220b7424d3bfb1d6296d5f7c808ce35f8f1e0b0789426cec85eacf5ef1f0323f7ba4c6e3777230651043906f9f05f4644480ec61f380f071a8b40a0da0f084
|
7
|
+
data.tar.gz: de8ed5232c950fdd5e25672c0c654206bc8db5ce9b8099072c0fbda9c94ce30fdf563dc8e01555d839a5e16cf740b2189bc663d92778a0107cd6644c95b6782c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## [0.2.3] - 10/08/2023
|
4
|
+
|
5
|
+
- Fixed a bug where `ClassLikeStruct` was not getting properly serialized.
|
6
|
+
- Fixed a bug with `static` types on members.
|
7
|
+
- Fixed a bug with inconsistent naming of `inheritedFrom` on data_types.
|
8
|
+
|
3
9
|
## [0.2.2] - 10/08/2023
|
4
10
|
|
5
11
|
- Fixed a bug where `ClassDeclaration` wasn't properly serializing it's data types.
|
data/Gemfile.lock
CHANGED
@@ -47,7 +47,7 @@ module CustomElementsManifestParser
|
|
47
47
|
|
48
48
|
def visit(parser:)
|
49
49
|
hash = {}
|
50
|
-
hash[:inheritedFrom] = parser.data_types[:
|
50
|
+
hash[:inheritedFrom] = parser.data_types[:inherited_from].new(inheritedFrom).visit(parser: parser) unless inheritedFrom.nil?
|
51
51
|
hash[:type] = parser.data_types[:type].new(type).visit(parser: parser) unless type.nil?
|
52
52
|
hash[:resolveInitializer] = parser.data_types[:resolve_initializer].new(resolveInitializer).visit(parser: parser) unless resolveInitializer.nil?
|
53
53
|
new(hash)
|
@@ -16,8 +16,8 @@ module CustomElementsManifestParser
|
|
16
16
|
attribute :kind, Types.Value("field")
|
17
17
|
|
18
18
|
# @!attribute privacy
|
19
|
-
# @return [
|
20
|
-
attribute :static, Types.
|
19
|
+
# @return [Boolean, nil]
|
20
|
+
attribute :static, Types::Strict::Bool.optional.meta(required: false)
|
21
21
|
|
22
22
|
# @!attribute inheritedFrom
|
23
23
|
# @return [Reference, nil]
|
@@ -39,8 +39,8 @@ module CustomElementsManifestParser
|
|
39
39
|
hash[:source] = parser.data_types[:source].new(source).visit(parser: parser) unless source.nil?
|
40
40
|
|
41
41
|
hash = hash.merge(
|
42
|
-
Structs::DeclarableNodeStruct.build_hash(parser: parser, struct:
|
43
|
-
Structs::PropertyLikeStruct.build_hash(parser: parser, struct:
|
42
|
+
Structs::DeclarableNodeStruct.build_hash(parser: parser, struct: self),
|
43
|
+
Structs::PropertyLikeStruct.build_hash(parser: parser, struct: self)
|
44
44
|
)
|
45
45
|
|
46
46
|
new(hash)
|
@@ -44,8 +44,8 @@ module CustomElementsManifestParser
|
|
44
44
|
hash[:source] = parser.data_types[:source].new(source).visit(parser: parser) unless source.nil?
|
45
45
|
|
46
46
|
hash = hash.merge(
|
47
|
-
Structs::FunctionLikeStruct.build_hash(parser: parser, struct:
|
48
|
-
Structs::DeclarableNodeStruct.build_hash(parser: parser, struct:
|
47
|
+
Structs::FunctionLikeStruct.build_hash(parser: parser, struct: self),
|
48
|
+
Structs::DeclarableNodeStruct.build_hash(parser: parser, struct: self)
|
49
49
|
)
|
50
50
|
|
51
51
|
new(hash)
|
@@ -47,7 +47,7 @@ module CustomElementsManifestParser
|
|
47
47
|
slot: DataTypes::Slot,
|
48
48
|
type: DataTypes::Type,
|
49
49
|
type_reference: DataTypes::TypeReference,
|
50
|
-
|
50
|
+
inherited_from: DataTypes::Reference,
|
51
51
|
resolve_initializer: DataTypes::ResolveInitializer,
|
52
52
|
reference: DataTypes::Reference
|
53
53
|
}
|
@@ -65,7 +65,7 @@ module CustomElementsManifestParser
|
|
65
65
|
attribute :mixins, Types::Strict::Array.optional.meta(required: false)
|
66
66
|
|
67
67
|
# @!attribute members
|
68
|
-
# @return [Array<
|
68
|
+
# @return [Array<Nodes::CustomElementField, Nodes::ClassMethod>, nil]
|
69
69
|
attribute :members, Types::Strict::Array.optional.meta(required: false)
|
70
70
|
|
71
71
|
# @!attribute source
|
@@ -80,9 +80,9 @@ module CustomElementsManifestParser
|
|
80
80
|
|
81
81
|
def self.build_hash(parser:, struct:)
|
82
82
|
hash = {}
|
83
|
-
hash[:superclass] =
|
83
|
+
hash[:superclass] = parser.data_types[:superclass].new(struct.superclass).visit(parser: parser) unless struct.superclass.nil?
|
84
84
|
hash[:mixins] = struct.mixins.map { |mixin| parser.data_types[:mixin].new(mixin).visit(parser: parser) } unless struct.mixins.nil?
|
85
|
-
hash[:source] =
|
85
|
+
hash[:source] = parser.data_types[:source].new(struct.source).visit(parser: parser) unless struct.source.nil?
|
86
86
|
|
87
87
|
hash[:members] = struct.members.map { |member| parser.visit_node(member) } unless struct.members.nil?
|
88
88
|
hash
|
@@ -57,6 +57,7 @@ module CustomElementsManifestParser
|
|
57
57
|
hash[:slots] = struct.slots.map { |slot| parser.data_types[:slot].new(slot).visit(parser: parser) } unless struct.slots.nil?
|
58
58
|
hash[:events] = struct.events.map { |event| parser.data_types[:event].new(event).visit(parser: parser) } unless struct.events.nil?
|
59
59
|
|
60
|
+
hash = hash.merge(ClassLikeStruct.build_hash(parser: parser, struct: struct))
|
60
61
|
hash
|
61
62
|
end
|
62
63
|
end
|
@@ -6,6 +6,7 @@ module CustomElementsManifestParser
|
|
6
6
|
Dir["#{__dir__}/custom_elements_manifest_parser/**/*.rb"].each { |file| require file }
|
7
7
|
|
8
8
|
# Shortuct for `CustomElementsManifestParser::Parser.new().parse()`
|
9
|
+
# @return [CustomElementsManifestParser::Parser]
|
9
10
|
def self.parse(hash)
|
10
11
|
Parser.new(hash).parse
|
11
12
|
end
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- konnorrogers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|