jsii-rosetta 1.76.0 → 4.9.0-dev.0
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.
- package/LICENSE +202 -0
- package/NOTICE +1 -0
- package/README.md +287 -388
- package/bin/jsii-rosetta +1 -1
- package/lib/ambient/semver-intersect.d.ts +13 -0
- package/lib/ambient/semver-intersect.js +2 -0
- package/lib/ambient/semver-intersect.js.map +1 -0
- package/lib/commands/convert.js.map +1 -0
- package/lib/commands/coverage.js.map +1 -0
- package/lib/commands/extract.js +2 -2
- package/lib/commands/extract.js.map +1 -0
- package/lib/commands/infuse.js +2 -2
- package/lib/commands/infuse.js.map +1 -0
- package/lib/commands/read.js +6 -6
- package/lib/commands/read.js.map +1 -0
- package/lib/commands/transliterate.js +4 -4
- package/lib/commands/transliterate.js.map +1 -0
- package/lib/commands/trim-cache.js.map +1 -0
- package/lib/find-utils.js +4 -4
- package/lib/find-utils.js.map +1 -0
- package/lib/fixtures.js +2 -2
- package/lib/fixtures.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/jsii/assemblies.d.ts +1 -1
- package/lib/jsii/assemblies.js +14 -11
- package/lib/jsii/assemblies.js.map +1 -0
- package/lib/jsii/fingerprinting.js +9 -9
- package/lib/jsii/fingerprinting.js.map +1 -0
- package/lib/jsii/jsii-types.d.ts +4 -4
- package/lib/jsii/jsii-types.js +9 -4
- package/lib/jsii/jsii-types.js.map +1 -0
- package/lib/jsii/jsii-utils.d.ts +1 -1
- package/lib/jsii/jsii-utils.js +2 -2
- package/lib/jsii/jsii-utils.js.map +1 -0
- package/lib/jsii/packages.js.map +1 -0
- package/lib/languages/csharp.d.ts +3 -3
- package/lib/languages/csharp.js +2 -2
- package/lib/languages/csharp.js.map +1 -0
- package/lib/languages/default.d.ts +2 -2
- package/lib/languages/default.js.map +1 -0
- package/lib/languages/go.d.ts +3 -3
- package/lib/languages/go.js +20 -16
- package/lib/languages/go.js.map +1 -0
- package/lib/languages/index.d.ts +1 -1
- package/lib/languages/index.js +4 -4
- package/lib/languages/index.js.map +1 -0
- package/lib/languages/java.d.ts +2 -2
- package/lib/languages/java.js +2 -2
- package/lib/languages/java.js.map +1 -0
- package/lib/languages/python.d.ts +3 -3
- package/lib/languages/python.js +1 -1
- package/lib/languages/python.js.map +1 -0
- package/lib/languages/record-references-version.d.ts +2 -0
- package/lib/languages/record-references-version.js +6 -0
- package/lib/languages/record-references-version.js.map +1 -0
- package/lib/languages/record-references.d.ts +2 -2
- package/lib/languages/record-references.js +3 -2
- package/lib/languages/record-references.js.map +1 -0
- package/lib/languages/target-language.d.ts +0 -2
- package/lib/languages/target-language.js +2 -1
- package/lib/languages/target-language.js.map +1 -0
- package/lib/languages/visualize.d.ts +1 -1
- package/lib/languages/visualize.js +1 -1
- package/lib/languages/visualize.js.map +1 -0
- package/lib/logging.js +1 -1
- package/lib/logging.js.map +1 -0
- package/lib/main.d.ts +2 -0
- package/{bin/jsii-rosetta.js → lib/main.js} +21 -21
- package/lib/main.js.map +1 -0
- package/lib/markdown/escapes.js.map +1 -0
- package/lib/markdown/extract-snippets.d.ts +2 -2
- package/lib/markdown/extract-snippets.js +1 -1
- package/lib/markdown/extract-snippets.js.map +1 -0
- package/lib/markdown/index.js.map +1 -0
- package/lib/markdown/javadoc-renderer.js.map +1 -0
- package/lib/markdown/markdown-renderer.js.map +1 -0
- package/lib/markdown/markdown.js.map +1 -0
- package/lib/markdown/replace-code-renderer.d.ts +1 -1
- package/lib/markdown/replace-code-renderer.js.map +1 -0
- package/lib/markdown/replace-typescript-transform.d.ts +2 -2
- package/lib/markdown/replace-typescript-transform.js +1 -1
- package/lib/markdown/replace-typescript-transform.js.map +1 -0
- package/lib/markdown/structure-renderer.js.map +1 -0
- package/lib/markdown/types.js.map +1 -0
- package/lib/markdown/xml-comment-renderer.js.map +1 -0
- package/lib/o-tree.js +3 -3
- package/lib/o-tree.js.map +1 -0
- package/lib/renderer.js.map +1 -0
- package/lib/rosetta-reader.js.map +1 -0
- package/lib/rosetta-translator.d.ts +1 -1
- package/lib/rosetta-translator.js +2 -2
- package/lib/rosetta-translator.js.map +1 -0
- package/lib/snippet-dependencies.js +12 -12
- package/lib/snippet-dependencies.js.map +1 -0
- package/lib/snippet-selectors.d.ts +1 -1
- package/lib/snippet-selectors.js +2 -2
- package/lib/snippet-selectors.js.map +1 -0
- package/lib/snippet.d.ts +3 -3
- package/lib/snippet.js +5 -5
- package/lib/snippet.js.map +1 -0
- package/lib/strict.js.map +1 -0
- package/lib/submodule-reference.d.ts +1 -1
- package/lib/submodule-reference.js +11 -11
- package/lib/submodule-reference.js.map +1 -0
- package/lib/tablets/key.js +3 -3
- package/lib/tablets/key.js.map +1 -0
- package/lib/tablets/schema.js.map +1 -0
- package/lib/tablets/tablets.d.ts +1 -1
- package/lib/tablets/tablets.js +13 -13
- package/lib/tablets/tablets.js.map +1 -0
- package/lib/translate.d.ts +1 -1
- package/lib/translate.js +9 -7
- package/lib/translate.js.map +1 -0
- package/lib/translate_all.js +2 -2
- package/lib/translate_all.js.map +1 -0
- package/lib/translate_all_worker.js.map +1 -0
- package/lib/typescript/ast-utils.d.ts +2 -2
- package/lib/typescript/ast-utils.js +2 -4
- package/lib/typescript/ast-utils.js.map +1 -0
- package/lib/typescript/imports.d.ts +2 -2
- package/lib/typescript/imports.js +3 -3
- package/lib/typescript/imports.js.map +1 -0
- package/lib/typescript/syntax-kind-counter.d.ts +1 -1
- package/lib/typescript/syntax-kind-counter.js +1 -2
- package/lib/typescript/syntax-kind-counter.js.map +1 -0
- package/lib/typescript/ts-compiler.js.map +1 -0
- package/lib/typescript/types.d.ts +2 -2
- package/lib/typescript/types.js +1 -1
- package/lib/typescript/types.js.map +1 -0
- package/lib/typescript/visible-spans.js +6 -6
- package/lib/typescript/visible-spans.js.map +1 -0
- package/lib/util.d.ts +1 -1
- package/lib/util.js +2 -2
- package/lib/util.js.map +1 -0
- package/package.json +68 -37
- package/temp.tabl.json +48 -0
- package/bin/jsii-rosetta.d.ts +0 -2
- package/jest.config.mjs +0 -8
- package/jestsetup.js +0 -4
- package/test/commands/extract.test.d.ts +0 -2
- package/test/commands/extract.test.js +0 -698
- package/test/commands/infuse.test.d.ts +0 -2
- package/test/commands/infuse.test.js +0 -165
- package/test/commands/transliterate.test.d.ts +0 -2
- package/test/commands/transliterate.test.js +0 -1636
- package/test/commands/trim-cache.test.d.ts +0 -2
- package/test/commands/trim-cache.test.js +0 -85
- package/test/fixtures.test.d.ts +0 -2
- package/test/fixtures.test.js +0 -49
- package/test/jsii/assemblies.test.d.ts +0 -2
- package/test/jsii/assemblies.test.js +0 -230
- package/test/jsii/fake-assembly.d.ts +0 -3
- package/test/jsii/fake-assembly.js +0 -21
- package/test/jsii/fixtures/rosetta/explicit.ts-fixture +0 -7
- package/test/jsii/visible-spans.test.d.ts +0 -2
- package/test/jsii/visible-spans.test.js +0 -40
- package/test/jsii-imports.test.d.ts +0 -2
- package/test/jsii-imports.test.js +0 -438
- package/test/markdown/javadoc.test.d.ts +0 -2
- package/test/markdown/javadoc.test.js +0 -110
- package/test/markdown/roundtrip.test.d.ts +0 -2
- package/test/markdown/roundtrip.test.js +0 -126
- package/test/markdown/xmldoccomments.test.d.ts +0 -2
- package/test/markdown/xmldoccomments.test.js +0 -89
- package/test/otree.test.d.ts +0 -2
- package/test/otree.test.js +0 -36
- package/test/record-references.test.d.ts +0 -2
- package/test/record-references.test.js +0 -88
- package/test/rosetta/default.ts-fixture +0 -1
- package/test/rosetta-translator.test.d.ts +0 -2
- package/test/rosetta-translator.test.js +0 -33
- package/test/rosetta.test.d.ts +0 -2
- package/test/rosetta.test.js +0 -221
- package/test/snippet-selectors.test.d.ts +0 -2
- package/test/snippet-selectors.test.js +0 -57
- package/test/snippet.test.d.ts +0 -2
- package/test/snippet.test.js +0 -18
- package/test/syntax-counter.test.d.ts +0 -2
- package/test/syntax-counter.test.js +0 -60
- package/test/testutil.d.ts +0 -64
- package/test/testutil.js +0 -104
- package/test/translate.test.d.ts +0 -2
- package/test/translate.test.js +0 -175
- package/test/translations/calls/declaring_default_arguments.cs +0 -4
- package/test/translations/calls/declaring_default_arguments.go +0 -6
- package/test/translations/calls/declaring_default_arguments.java +0 -11
- package/test/translations/calls/declaring_default_arguments.py +0 -2
- package/test/translations/calls/default_struct_fields.cs +0 -9
- package/test/translations/calls/default_struct_fields.go +0 -7
- package/test/translations/calls/default_struct_fields.java +0 -21
- package/test/translations/calls/default_struct_fields.py +0 -2
- package/test/translations/calls/function_call.cs +0 -1
- package/test/translations/calls/function_call.go +0 -1
- package/test/translations/calls/function_call.java +0 -1
- package/test/translations/calls/function_call.py +0 -1
- package/test/translations/calls/list_of_anonymous_structs.cs +0 -9
- package/test/translations/calls/list_of_anonymous_structs.go +0 -12
- package/test/translations/calls/list_of_anonymous_structs.java +0 -6
- package/test/translations/calls/list_of_anonymous_structs.py +0 -9
- package/test/translations/calls/literal_map_argument.cs +0 -5
- package/test/translations/calls/literal_map_argument.go +0 -7
- package/test/translations/calls/literal_map_argument.java +0 -4
- package/test/translations/calls/literal_map_argument.py +0 -4
- package/test/translations/calls/method_call.cs +0 -1
- package/test/translations/calls/method_call.go +0 -1
- package/test/translations/calls/method_call.java +0 -1
- package/test/translations/calls/method_call.py +0 -1
- package/test/translations/calls/self_method_call.cs +0 -1
- package/test/translations/calls/self_method_call.go +0 -1
- package/test/translations/calls/self_method_call.java +0 -1
- package/test/translations/calls/self_method_call.py +0 -1
- package/test/translations/calls/shorthand_property.cs +0 -2
- package/test/translations/calls/shorthand_property.go +0 -4
- package/test/translations/calls/shorthand_property.java +0 -2
- package/test/translations/calls/shorthand_property.py +0 -2
- package/test/translations/calls/static_function_call.cs +0 -1
- package/test/translations/calls/static_function_call.go +0 -1
- package/test/translations/calls/static_function_call.java +0 -1
- package/test/translations/calls/static_function_call.py +0 -1
- package/test/translations/calls/this_argument.cs +0 -1
- package/test/translations/calls/this_argument.go +0 -1
- package/test/translations/calls/this_argument.java +0 -1
- package/test/translations/calls/this_argument.py +0 -1
- package/test/translations/calls/translate_object_literals_in_function_call.cs +0 -1
- package/test/translations/calls/translate_object_literals_in_function_call.go +0 -4
- package/test/translations/calls/translate_object_literals_in_function_call.java +0 -1
- package/test/translations/calls/translate_object_literals_in_function_call.py +0 -1
- package/test/translations/calls/translate_object_literals_only_one_level_deep.cs +0 -1
- package/test/translations/calls/translate_object_literals_only_one_level_deep.go +0 -7
- package/test/translations/calls/translate_object_literals_only_one_level_deep.java +0 -1
- package/test/translations/calls/translate_object_literals_only_one_level_deep.py +0 -1
- package/test/translations/calls/translate_object_literals_second_level_with_newlines.cs +0 -4
- package/test/translations/calls/translate_object_literals_second_level_with_newlines.go +0 -7
- package/test/translations/calls/translate_object_literals_second_level_with_newlines.java +0 -3
- package/test/translations/calls/translate_object_literals_second_level_with_newlines.py +0 -4
- package/test/translations/calls/translate_object_literals_with_multiple_newlines.cs +0 -5
- package/test/translations/calls/translate_object_literals_with_multiple_newlines.go +0 -5
- package/test/translations/calls/translate_object_literals_with_multiple_newlines.java +0 -4
- package/test/translations/calls/translate_object_literals_with_multiple_newlines.py +0 -5
- package/test/translations/calls/translate_object_literals_with_newlines.cs +0 -4
- package/test/translations/calls/translate_object_literals_with_newlines.go +0 -4
- package/test/translations/calls/translate_object_literals_with_newlines.java +0 -3
- package/test/translations/calls/translate_object_literals_with_newlines.py +0 -4
- package/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.cs +0 -24
- package/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.go +0 -24
- package/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.java +0 -48
- package/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.py +0 -7
- package/test/translations/classes/class_declaration_with_private_fields_and_constructor.cs +0 -9
- package/test/translations/classes/class_declaration_with_private_fields_and_constructor.go +0 -9
- package/test/translations/classes/class_declaration_with_private_fields_and_constructor.java +0 -7
- package/test/translations/classes/class_declaration_with_private_fields_and_constructor.py +0 -4
- package/test/translations/classes/class_declaration_with_public_fields_and_constructor.cs +0 -9
- package/test/translations/classes/class_declaration_with_public_fields_and_constructor.go +0 -9
- package/test/translations/classes/class_declaration_with_public_fields_and_constructor.java +0 -7
- package/test/translations/classes/class_declaration_with_public_fields_and_constructor.py +0 -4
- package/test/translations/classes/class_implementing_jsii_interface.cs +0 -7
- package/test/translations/classes/class_implementing_jsii_interface.go +0 -6
- package/test/translations/classes/class_implementing_jsii_interface.java +0 -5
- package/test/translations/classes/class_implementing_jsii_interface.py +0 -4
- package/test/translations/classes/class_with_different_name.cs +0 -6
- package/test/translations/classes/class_with_different_name.go +0 -7
- package/test/translations/classes/class_with_different_name.java +0 -4
- package/test/translations/classes/class_with_different_name.py +0 -3
- package/test/translations/classes/class_with_extends_and_implements.cs +0 -3
- package/test/translations/classes/class_with_extends_and_implements.go +0 -3
- package/test/translations/classes/class_with_extends_and_implements.java +0 -2
- package/test/translations/classes/class_with_inheritance.cs +0 -3
- package/test/translations/classes/class_with_inheritance.go +0 -3
- package/test/translations/classes/class_with_inheritance.java +0 -2
- package/test/translations/classes/class_with_inheritance.py +0 -2
- package/test/translations/classes/class_with_inheritance_and_super_class.cs +0 -6
- package/test/translations/classes/class_with_inheritance_and_super_class.go +0 -9
- package/test/translations/classes/class_with_inheritance_and_super_class.java +0 -5
- package/test/translations/classes/class_with_inheritance_and_super_class.py +0 -3
- package/test/translations/classes/class_with_method.cs +0 -7
- package/test/translations/classes/class_with_method.go +0 -7
- package/test/translations/classes/class_with_method.java +0 -5
- package/test/translations/classes/class_with_method.py +0 -3
- package/test/translations/classes/class_with_props_argument.cs +0 -14
- package/test/translations/classes/class_with_props_argument.go +0 -16
- package/test/translations/classes/class_with_props_argument.java +0 -26
- package/test/translations/classes/class_with_props_argument.py +0 -5
- package/test/translations/classes/constructor_with_optional_params.go +0 -10
- package/test/translations/classes/constructor_with_optional_params.java +0 -12
- package/test/translations/classes/empty_class.cs +0 -3
- package/test/translations/classes/empty_class.go +0 -2
- package/test/translations/classes/empty_class.java +0 -2
- package/test/translations/classes/empty_class.py +0 -2
- package/test/translations/classes/invisible_interfaces_do_not_affect_whitespace.cs +0 -11
- package/test/translations/classes/invisible_interfaces_do_not_affect_whitespace.go +0 -8
- package/test/translations/classes/invisible_interfaces_do_not_affect_whitespace.java +0 -8
- package/test/translations/classes/invisible_interfaces_do_not_affect_whitespace.py +0 -5
- package/test/translations/classes/whitespace_between_multiple_empty_members.cs +0 -15
- package/test/translations/classes/whitespace_between_multiple_empty_members.go +0 -12
- package/test/translations/classes/whitespace_between_multiple_empty_members.java +0 -11
- package/test/translations/classes/whitespace_between_multiple_empty_members.py +0 -9
- package/test/translations/classes/whitespace_between_multiple_members.cs +0 -17
- package/test/translations/classes/whitespace_between_multiple_members.go +0 -16
- package/test/translations/classes/whitespace_between_multiple_members.java +0 -13
- package/test/translations/classes/whitespace_between_multiple_members.py +0 -9
- package/test/translations/comments/empty_lines_in_comments.cs +0 -4
- package/test/translations/comments/empty_lines_in_comments.go +0 -4
- package/test/translations/comments/empty_lines_in_comments.java +0 -4
- package/test/translations/comments/empty_lines_in_comments.py +0 -4
- package/test/translations/comments/interleave_multiline_comments_with_function_call.cs +0 -7
- package/test/translations/comments/interleave_multiline_comments_with_function_call.go +0 -7
- package/test/translations/comments/interleave_multiline_comments_with_function_call.java +0 -6
- package/test/translations/comments/interleave_multiline_comments_with_function_call.py +0 -7
- package/test/translations/comments/interleave_single_line_comments_with_function_call.cs +0 -7
- package/test/translations/comments/interleave_single_line_comments_with_function_call.go +0 -7
- package/test/translations/comments/interleave_single_line_comments_with_function_call.java +0 -6
- package/test/translations/comments/interleave_single_line_comments_with_function_call.py +0 -7
- package/test/translations/comments/no_duplication_of_comments.cs +0 -2
- package/test/translations/comments/no_duplication_of_comments.go +0 -2
- package/test/translations/comments/no_duplication_of_comments.java +0 -2
- package/test/translations/comments/no_duplication_of_comments.py +0 -2
- package/test/translations/expressions/array_index.cs +0 -3
- package/test/translations/expressions/array_index.go +0 -3
- package/test/translations/expressions/array_index.java +0 -3
- package/test/translations/expressions/array_index.py +0 -3
- package/test/translations/expressions/as_expression.cs +0 -1
- package/test/translations/expressions/as_expression.go +0 -1
- package/test/translations/expressions/as_expression.java +0 -1
- package/test/translations/expressions/as_expression.py +0 -1
- package/test/translations/expressions/await.cs +0 -1
- package/test/translations/expressions/await.go +0 -1
- package/test/translations/expressions/await.java +0 -1
- package/test/translations/expressions/await.py +0 -1
- package/test/translations/expressions/backtick_string_w_o_substitutions.cs +0 -1
- package/test/translations/expressions/backtick_string_w_o_substitutions.go +0 -1
- package/test/translations/expressions/backtick_string_w_o_substitutions.java +0 -1
- package/test/translations/expressions/backtick_string_w_o_substitutions.py +0 -1
- package/test/translations/expressions/computed_key.cs +0 -4
- package/test/translations/expressions/computed_key.go +0 -8
- package/test/translations/expressions/computed_key.java +0 -4
- package/test/translations/expressions/computed_key.py +0 -4
- package/test/translations/expressions/double_quoted_dict_keys.cs +0 -1
- package/test/translations/expressions/double_quoted_dict_keys.go +0 -3
- package/test/translations/expressions/double_quoted_dict_keys.java +0 -1
- package/test/translations/expressions/double_quoted_dict_keys.py +0 -1
- package/test/translations/expressions/ellipsis_at_a_random_place.cs +0 -1
- package/test/translations/expressions/ellipsis_at_a_random_place.go +0 -1
- package/test/translations/expressions/ellipsis_at_a_random_place.java +0 -1
- package/test/translations/expressions/ellipsis_at_a_random_place.py +0 -1
- package/test/translations/expressions/enum_access.cs +0 -1
- package/test/translations/expressions/enum_access.go +0 -1
- package/test/translations/expressions/enum_access.java +0 -1
- package/test/translations/expressions/enum_access.py +0 -1
- package/test/translations/expressions/enum_like_access.cs +0 -1
- package/test/translations/expressions/enum_like_access.go +0 -1
- package/test/translations/expressions/enum_like_access.java +0 -1
- package/test/translations/expressions/enum_like_access.py +0 -1
- package/test/translations/expressions/map-literal.cs +0 -3
- package/test/translations/expressions/map-literal.go +0 -3
- package/test/translations/expressions/map-literal.java +0 -2
- package/test/translations/expressions/map-literal.py +0 -3
- package/test/translations/expressions/non_null_expression.cs +0 -1
- package/test/translations/expressions/non_null_expression.go +0 -1
- package/test/translations/expressions/non_null_expression.java +0 -1
- package/test/translations/expressions/non_null_expression.py +0 -1
- package/test/translations/expressions/string_interpolation.cs +0 -10
- package/test/translations/expressions/string_interpolation.go +0 -6
- package/test/translations/expressions/string_interpolation.java +0 -6
- package/test/translations/expressions/string_interpolation.py +0 -10
- package/test/translations/expressions/string_literal.cs +0 -9
- package/test/translations/expressions/string_literal.go +0 -9
- package/test/translations/expressions/string_literal.java +0 -1
- package/test/translations/expressions/string_literal.py +0 -9
- package/test/translations/expressions/struct_assignment.cs +0 -6
- package/test/translations/expressions/struct_assignment.go +0 -7
- package/test/translations/expressions/struct_assignment.java +0 -12
- package/test/translations/expressions/struct_assignment.py +0 -1
- package/test/translations/expressions/unary_and_binary_operators.cs +0 -3
- package/test/translations/expressions/unary_and_binary_operators.go +0 -3
- package/test/translations/expressions/unary_and_binary_operators.java +0 -3
- package/test/translations/expressions/unary_and_binary_operators.py +0 -3
- package/test/translations/hiding/hide_block_level_statements_using_void_directive.cs +0 -6
- package/test/translations/hiding/hide_block_level_statements_using_void_directive.go +0 -5
- package/test/translations/hiding/hide_block_level_statements_using_void_directive.java +0 -5
- package/test/translations/hiding/hide_block_level_statements_using_void_directive.py +0 -4
- package/test/translations/hiding/hide_expression_with_explicit_ellipsis.cs +0 -1
- package/test/translations/hiding/hide_expression_with_explicit_ellipsis.go +0 -1
- package/test/translations/hiding/hide_expression_with_explicit_ellipsis.java +0 -1
- package/test/translations/hiding/hide_expression_with_explicit_ellipsis.py +0 -1
- package/test/translations/hiding/hide_halfway_into_class_using_comments.cs +0 -3
- package/test/translations/hiding/hide_halfway_into_class_using_comments.go +0 -3
- package/test/translations/hiding/hide_halfway_into_class_using_comments.java +0 -3
- package/test/translations/hiding/hide_halfway_into_class_using_comments.py +0 -3
- package/test/translations/hiding/hide_parameter_sequence.cs +0 -1
- package/test/translations/hiding/hide_parameter_sequence.go +0 -1
- package/test/translations/hiding/hide_parameter_sequence.java +0 -1
- package/test/translations/hiding/hide_parameter_sequence.py +0 -1
- package/test/translations/hiding/hide_statements_with_explicit_ellipsis.cs +0 -3
- package/test/translations/hiding/hide_statements_with_explicit_ellipsis.go +0 -3
- package/test/translations/hiding/hide_statements_with_explicit_ellipsis.java +0 -3
- package/test/translations/hiding/hide_statements_with_explicit_ellipsis.py +0 -3
- package/test/translations/hiding/hide_top_level_statements_using_void_directive.cs +0 -1
- package/test/translations/hiding/hide_top_level_statements_using_void_directive.go +0 -1
- package/test/translations/hiding/hide_top_level_statements_using_void_directive.java +0 -1
- package/test/translations/hiding/hide_top_level_statements_using_void_directive.py +0 -1
- package/test/translations/identifiers/keyword.cs +0 -4
- package/test/translations/identifiers/keyword.go +0 -4
- package/test/translations/identifiers/keyword.java +0 -4
- package/test/translations/identifiers/keyword.py +0 -4
- package/test/translations/imports/import_require.cs +0 -2
- package/test/translations/imports/import_require.go +0 -2
- package/test/translations/imports/import_require.java +0 -2
- package/test/translations/imports/import_require.py +0 -2
- package/test/translations/imports/import_star_as.cs +0 -2
- package/test/translations/imports/import_star_as.go +0 -2
- package/test/translations/imports/import_star_as.java +0 -2
- package/test/translations/imports/import_star_as.py +0 -2
- package/test/translations/imports/multiple-imports.cs +0 -2
- package/test/translations/imports/multiple-imports.go +0 -2
- package/test/translations/imports/multiple-imports.java +0 -3
- package/test/translations/imports/multiple-imports.py +0 -2
- package/test/translations/imports/selective_import.cs +0 -4
- package/test/translations/imports/selective_import.go +0 -3
- package/test/translations/imports/selective_import.java +0 -6
- package/test/translations/imports/selective_import.py +0 -3
- package/test/translations/imports/submodule-import.cs +0 -15
- package/test/translations/imports/submodule-import.go +0 -23
- package/test/translations/imports/submodule-import.java +0 -17
- package/test/translations/imports/submodule-import.py +0 -15
- package/test/translations/interfaces/interface_with_method.cs +0 -4
- package/test/translations/interfaces/interface_with_method.go +0 -3
- package/test/translations/interfaces/interface_with_method.java +0 -3
- package/test/translations/interfaces/interface_with_props.cs +0 -4
- package/test/translations/interfaces/interface_with_props.go +0 -3
- package/test/translations/interfaces/interface_with_props.java +0 -3
- package/test/translations/misc/booleans_render_to_right_primitives.cs +0 -1
- package/test/translations/misc/booleans_render_to_right_primitives.go +0 -1
- package/test/translations/misc/booleans_render_to_right_primitives.java +0 -1
- package/test/translations/misc/booleans_render_to_right_primitives.py +0 -1
- package/test/translations/statements/block_without_braces.cs +0 -1
- package/test/translations/statements/block_without_braces.go +0 -3
- package/test/translations/statements/block_without_braces.java +0 -1
- package/test/translations/statements/block_without_braces.py +0 -1
- package/test/translations/statements/declare_var.cs +0 -1
- package/test/translations/statements/declare_var.go +0 -1
- package/test/translations/statements/declare_var.java +0 -1
- package/test/translations/statements/declare_var.py +0 -1
- package/test/translations/statements/empty_control_block.cs +0 -3
- package/test/translations/statements/empty_control_block.go +0 -1
- package/test/translations/statements/empty_control_block.java +0 -2
- package/test/translations/statements/empty_control_block.py +0 -2
- package/test/translations/statements/for_of_loop.cs +0 -4
- package/test/translations/statements/for_of_loop.go +0 -3
- package/test/translations/statements/for_of_loop.java +0 -3
- package/test/translations/statements/for_of_loop.py +0 -2
- package/test/translations/statements/if.cs +0 -4
- package/test/translations/statements/if.go +0 -3
- package/test/translations/statements/if.java +0 -3
- package/test/translations/statements/if.py +0 -2
- package/test/translations/statements/if_then_else.cs +0 -8
- package/test/translations/statements/if_then_else.go +0 -5
- package/test/translations/statements/if_then_else.java +0 -5
- package/test/translations/statements/if_then_else.py +0 -4
- package/test/translations/statements/initialize_object_literal.cs +0 -5
- package/test/translations/statements/initialize_object_literal.go +0 -8
- package/test/translations/statements/initialize_object_literal.java +0 -4
- package/test/translations/statements/initialize_object_literal.py +0 -5
- package/test/translations/statements/multiline_if_then_else.cs +0 -9
- package/test/translations/statements/multiline_if_then_else.go +0 -6
- package/test/translations/statements/multiline_if_then_else.java +0 -6
- package/test/translations/statements/multiline_if_then_else.py +0 -5
- package/test/translations/statements/statements_and_newlines.cs +0 -26
- package/test/translations/statements/statements_and_newlines.go +0 -21
- package/test/translations/statements/statements_and_newlines.java +0 -21
- package/test/translations/statements/statements_and_newlines.py +0 -16
- package/test/translations/statements/vararg_any_call.cs +0 -7
- package/test/translations/statements/vararg_any_call.go +0 -13
- package/test/translations/statements/vararg_any_call.java +0 -6
- package/test/translations/statements/vararg_any_call.py +0 -6
- package/test/translations/statements/whitespace_between_statements.cs +0 -3
- package/test/translations/statements/whitespace_between_statements.go +0 -3
- package/test/translations/statements/whitespace_between_statements.java +0 -3
- package/test/translations/statements/whitespace_between_statements.py +0 -3
- package/test/translations/statements/whitespace_between_statements_in_a_block.cs +0 -6
- package/test/translations/statements/whitespace_between_statements_in_a_block.go +0 -5
- package/test/translations/statements/whitespace_between_statements_in_a_block.java +0 -5
- package/test/translations/statements/whitespace_between_statements_in_a_block.py +0 -4
- package/test/translations/structs/any_type_never_a_struct.cs +0 -3
- package/test/translations/structs/any_type_never_a_struct.go +0 -3
- package/test/translations/structs/any_type_never_a_struct.java +0 -2
- package/test/translations/structs/any_type_never_a_struct.py +0 -3
- package/test/translations/structs/infer_struct_from_union.cs +0 -6
- package/test/translations/structs/infer_struct_from_union.go +0 -8
- package/test/translations/structs/infer_struct_from_union.java +0 -6
- package/test/translations/structs/infer_struct_from_union.py +0 -6
- package/test/translations/structs/optional_known_struct.cs +0 -3
- package/test/translations/structs/optional_known_struct.go +0 -3
- package/test/translations/structs/optional_known_struct.java +0 -3
- package/test/translations/structs/optional_known_struct.py +0 -3
- package/test/translations/structs/struct_starting_with_i.cs +0 -3
- package/test/translations/structs/struct_starting_with_i.go +0 -3
- package/test/translations/structs/struct_starting_with_i.java +0 -3
- package/test/translations/structs/struct_starting_with_i.py +0 -3
- package/test/translations/structs/var_new_class_known_struct.cs +0 -3
- package/test/translations/structs/var_new_class_known_struct.go +0 -3
- package/test/translations/structs/var_new_class_known_struct.java +0 -3
- package/test/translations/structs/var_new_class_known_struct.py +0 -3
- package/test/translations/structs/var_new_class_unknown_struct.cs +0 -3
- package/test/translations/structs/var_new_class_unknown_struct.go +0 -3
- package/test/translations/structs/var_new_class_unknown_struct.java +0 -3
- package/test/translations/structs/var_new_class_unknown_struct.py +0 -3
- package/test/translations.test.d.ts +0 -9
- package/test/translations.test.js +0 -112
- package/test/util.test.d.ts +0 -2
- package/test/util.test.js +0 -25
- package/vendor/semver-intersect.d.ts +0 -13
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const spec_1 = require("@jsii/spec");
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const jsii_1 = require("jsii");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const lib_1 = require("../../lib");
|
|
8
|
-
const extract = require("../../lib/commands/extract");
|
|
9
|
-
const assemblies_1 = require("../../lib/jsii/assemblies");
|
|
10
|
-
const languages_1 = require("../../lib/languages");
|
|
11
|
-
const logging = require("../../lib/logging");
|
|
12
|
-
const util_1 = require("../../lib/util");
|
|
13
|
-
const testutil_1 = require("../testutil");
|
|
14
|
-
jest.setTimeout(30000);
|
|
15
|
-
const DUMMY_README = `
|
|
16
|
-
Here is an example of how to use ClassA:
|
|
17
|
-
|
|
18
|
-
\`\`\`ts
|
|
19
|
-
import * as ass from 'my_assembly';
|
|
20
|
-
const aClass = new ass.ClassA();
|
|
21
|
-
aClass.someMethod();
|
|
22
|
-
\`\`\`
|
|
23
|
-
`;
|
|
24
|
-
const defaultExtractOptions = {
|
|
25
|
-
includeCompilerDiagnostics: false,
|
|
26
|
-
validateAssemblies: false,
|
|
27
|
-
};
|
|
28
|
-
let assembly;
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
// Create an assembly in a temp directory
|
|
31
|
-
assembly = testutil_1.TestJsiiModule.fromSource({
|
|
32
|
-
'index.ts': `
|
|
33
|
-
export class ClassA {
|
|
34
|
-
public someMethod() {
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export class ClassB {
|
|
38
|
-
public anotherMethod() {
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
`,
|
|
42
|
-
'README.md': DUMMY_README,
|
|
43
|
-
}, {
|
|
44
|
-
name: 'my_assembly',
|
|
45
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
afterEach(() => assembly.cleanup());
|
|
49
|
-
test('extract samples from test assembly', async () => {
|
|
50
|
-
const cacheToFile = path.join(assembly.moduleDirectory, 'test.tabl.json');
|
|
51
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
52
|
-
cacheToFile,
|
|
53
|
-
...defaultExtractOptions,
|
|
54
|
-
});
|
|
55
|
-
const tablet = new lib_1.LanguageTablet();
|
|
56
|
-
await tablet.load(cacheToFile);
|
|
57
|
-
expect(tablet.snippetKeys.length).toEqual(1);
|
|
58
|
-
expect(tablet.compressedSource).toBeFalsy();
|
|
59
|
-
});
|
|
60
|
-
test('extract can compress cached tablet file', async () => {
|
|
61
|
-
const compressedCacheFile = path.join(assembly.moduleDirectory, 'test.tabl.gz');
|
|
62
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
63
|
-
cacheToFile: compressedCacheFile,
|
|
64
|
-
compressCacheToFile: true,
|
|
65
|
-
...defaultExtractOptions,
|
|
66
|
-
});
|
|
67
|
-
const tablet = new lib_1.LanguageTablet();
|
|
68
|
-
await tablet.load(compressedCacheFile);
|
|
69
|
-
expect(tablet.snippetKeys.length).toEqual(1);
|
|
70
|
-
expect(tablet.compressedSource).toBeTruthy();
|
|
71
|
-
});
|
|
72
|
-
test('extract can compress implicit tablet file', async () => {
|
|
73
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
74
|
-
...defaultExtractOptions,
|
|
75
|
-
compressTablet: true,
|
|
76
|
-
});
|
|
77
|
-
const compImplicitTablet = path.join(assembly.moduleDirectory, lib_1.DEFAULT_TABLET_NAME_COMPRESSED);
|
|
78
|
-
expect(fs.existsSync(compImplicitTablet)).toBeTruthy();
|
|
79
|
-
expect(fs.existsSync(path.join(assembly.moduleDirectory, lib_1.DEFAULT_TABLET_NAME))).toBeFalsy();
|
|
80
|
-
const tablet = new lib_1.LanguageTablet();
|
|
81
|
-
await tablet.load(compImplicitTablet);
|
|
82
|
-
expect(tablet.snippetKeys.length).toEqual(1);
|
|
83
|
-
});
|
|
84
|
-
describe('extract behavior regarding compressing implicit tablets', () => {
|
|
85
|
-
function hasCompressedDefaultTablet(directory) {
|
|
86
|
-
return (fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME_COMPRESSED)) &&
|
|
87
|
-
!fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME)));
|
|
88
|
-
}
|
|
89
|
-
function hasUncompressedDefaultTablet(directory) {
|
|
90
|
-
return (!fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME_COMPRESSED)) &&
|
|
91
|
-
fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME)));
|
|
92
|
-
}
|
|
93
|
-
function hasBothDefaultTablets(directory) {
|
|
94
|
-
return (fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME_COMPRESSED)) &&
|
|
95
|
-
fs.existsSync(path.join(directory, lib_1.DEFAULT_TABLET_NAME)));
|
|
96
|
-
}
|
|
97
|
-
test('preserve uncompressed tablet by default', async () => {
|
|
98
|
-
// Run extract with compressTablet = false to create .jsii.tabl.json file
|
|
99
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
100
|
-
...defaultExtractOptions,
|
|
101
|
-
compressTablet: false,
|
|
102
|
-
});
|
|
103
|
-
expect(hasUncompressedDefaultTablet(assembly.moduleDirectory)).toBeTruthy();
|
|
104
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
105
|
-
...defaultExtractOptions,
|
|
106
|
-
});
|
|
107
|
-
expect(hasUncompressedDefaultTablet(assembly.moduleDirectory)).toBeTruthy();
|
|
108
|
-
});
|
|
109
|
-
test('preserve compressed tablet by default', async () => {
|
|
110
|
-
// Run extract with compressTablet = true to create .jsii.tabl.json.gz file
|
|
111
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
112
|
-
...defaultExtractOptions,
|
|
113
|
-
compressTablet: true,
|
|
114
|
-
});
|
|
115
|
-
expect(hasCompressedDefaultTablet(assembly.moduleDirectory)).toBeTruthy();
|
|
116
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
117
|
-
...defaultExtractOptions,
|
|
118
|
-
});
|
|
119
|
-
expect(hasCompressedDefaultTablet(assembly.moduleDirectory)).toBeTruthy();
|
|
120
|
-
});
|
|
121
|
-
test('respects the explicit call to compress the tablet', async () => {
|
|
122
|
-
// Run extract with compressTablet = false to create .jsii.tabl.json file
|
|
123
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
124
|
-
...defaultExtractOptions,
|
|
125
|
-
compressTablet: false,
|
|
126
|
-
});
|
|
127
|
-
expect(hasUncompressedDefaultTablet(assembly.moduleDirectory)).toBeTruthy();
|
|
128
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
129
|
-
...defaultExtractOptions,
|
|
130
|
-
compressTablet: true,
|
|
131
|
-
});
|
|
132
|
-
expect(hasBothDefaultTablets(assembly.moduleDirectory)).toBeTruthy();
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
test('extract works from compressed test assembly', async () => {
|
|
136
|
-
const compressedAssembly = testutil_1.TestJsiiModule.fromSource({
|
|
137
|
-
'index.ts': `
|
|
138
|
-
export class ClassA {
|
|
139
|
-
public someMethod() {
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
export class ClassB {
|
|
143
|
-
public anotherMethod() {
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
`,
|
|
147
|
-
'README.md': DUMMY_README,
|
|
148
|
-
}, {
|
|
149
|
-
name: 'my_assembly',
|
|
150
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
151
|
-
}, {
|
|
152
|
-
compressAssembly: true,
|
|
153
|
-
});
|
|
154
|
-
try {
|
|
155
|
-
// assert that assembly is zipped
|
|
156
|
-
expect(fs.existsSync(path.join(compressedAssembly.moduleDirectory, spec_1.SPEC_FILE_NAME_COMPRESSED))).toBeTruthy();
|
|
157
|
-
// behavior is as expected
|
|
158
|
-
const cacheToFile = path.join(compressedAssembly.moduleDirectory, 'test.tabl.json');
|
|
159
|
-
await extract.extractSnippets([compressedAssembly.moduleDirectory], {
|
|
160
|
-
cacheToFile,
|
|
161
|
-
...defaultExtractOptions,
|
|
162
|
-
});
|
|
163
|
-
const tablet = new lib_1.LanguageTablet();
|
|
164
|
-
await tablet.load(cacheToFile);
|
|
165
|
-
expect(tablet.snippetKeys.length).toEqual(1);
|
|
166
|
-
}
|
|
167
|
-
finally {
|
|
168
|
-
compressedAssembly.cleanup();
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
describe('with cache file', () => {
|
|
172
|
-
let cacheTabletFile;
|
|
173
|
-
beforeEach(async () => {
|
|
174
|
-
cacheTabletFile = path.join(assembly.moduleDirectory, 'cache.tabl.json');
|
|
175
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
176
|
-
cacheToFile: cacheTabletFile,
|
|
177
|
-
...defaultExtractOptions,
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
async function givenThatDefaultTabletDoesNotExist() {
|
|
181
|
-
await fs.promises.unlink(path.join(assembly.moduleDirectory, lib_1.DEFAULT_TABLET_NAME));
|
|
182
|
-
}
|
|
183
|
-
describe('translation does not happen ', () => {
|
|
184
|
-
test('if it can be read from cache', async () => {
|
|
185
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
186
|
-
// GIVEN
|
|
187
|
-
await givenThatDefaultTabletDoesNotExist();
|
|
188
|
-
// WHEN
|
|
189
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
190
|
-
cacheToFile: path.join(assembly.moduleDirectory, 'dummy.tabl.json'),
|
|
191
|
-
cacheFromFile: cacheTabletFile,
|
|
192
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
193
|
-
...defaultExtractOptions,
|
|
194
|
-
});
|
|
195
|
-
expect(translationFunction).not.toHaveBeenCalled();
|
|
196
|
-
});
|
|
197
|
-
test('because output file acts as cache', async () => {
|
|
198
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
199
|
-
// GIVEN
|
|
200
|
-
await givenThatDefaultTabletDoesNotExist();
|
|
201
|
-
// WHEN
|
|
202
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
203
|
-
cacheFromFile: cacheTabletFile,
|
|
204
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
205
|
-
...defaultExtractOptions,
|
|
206
|
-
});
|
|
207
|
-
expect(translationFunction).not.toHaveBeenCalled();
|
|
208
|
-
});
|
|
209
|
-
test('because default tablet file acts as cache', async () => {
|
|
210
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
211
|
-
// WHEN
|
|
212
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
213
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
214
|
-
...defaultExtractOptions,
|
|
215
|
-
});
|
|
216
|
-
expect(translationFunction).not.toHaveBeenCalled();
|
|
217
|
-
});
|
|
218
|
-
});
|
|
219
|
-
test('translation does happen if translator version is different', async () => {
|
|
220
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
221
|
-
// GIVEN
|
|
222
|
-
await givenThatDefaultTabletDoesNotExist();
|
|
223
|
-
// WHEN
|
|
224
|
-
const oldJavaVersion = languages_1.TARGET_LANGUAGES.java.version;
|
|
225
|
-
languages_1.TARGET_LANGUAGES.java.version = '999';
|
|
226
|
-
try {
|
|
227
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
228
|
-
cacheToFile: path.join(assembly.moduleDirectory, 'dummy.tabl.json'),
|
|
229
|
-
cacheFromFile: cacheTabletFile,
|
|
230
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
231
|
-
...defaultExtractOptions,
|
|
232
|
-
});
|
|
233
|
-
expect(translationFunction).toHaveBeenCalled();
|
|
234
|
-
}
|
|
235
|
-
finally {
|
|
236
|
-
languages_1.TARGET_LANGUAGES.java.version = oldJavaVersion;
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
test('both default and explicit tablet are written', async () => {
|
|
240
|
-
// WHEN
|
|
241
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
242
|
-
cacheToFile: path.join(assembly.moduleDirectory, 'dummy.tabl.json'),
|
|
243
|
-
...defaultExtractOptions,
|
|
244
|
-
});
|
|
245
|
-
// THEN
|
|
246
|
-
expect(await (0, util_1.pathExists)(path.join(assembly.moduleDirectory, 'dummy.tabl.json'))).toBeTruthy();
|
|
247
|
-
expect(await (0, util_1.pathExists)(path.join(assembly.moduleDirectory, '.jsii.tabl.json'))).toBeTruthy();
|
|
248
|
-
});
|
|
249
|
-
describe('when the cache output tablet has unrelated snippets', () => {
|
|
250
|
-
let cacheToFile;
|
|
251
|
-
beforeEach(async () => {
|
|
252
|
-
cacheToFile = path.join(assembly.moduleDirectory, 'dummy.tabl.json');
|
|
253
|
-
const tbl = new lib_1.LanguageTablet();
|
|
254
|
-
tbl.addSnippet(bogusTranslatedSnippet());
|
|
255
|
-
await tbl.save(cacheToFile);
|
|
256
|
-
});
|
|
257
|
-
test('it is not trimmed by default', async () => {
|
|
258
|
-
// WHEN
|
|
259
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
260
|
-
cacheToFile,
|
|
261
|
-
...defaultExtractOptions,
|
|
262
|
-
});
|
|
263
|
-
// THEN
|
|
264
|
-
const cacheTablet = await lib_1.LanguageTablet.fromFile(cacheToFile);
|
|
265
|
-
expect(cacheTablet.count).toEqual(2);
|
|
266
|
-
});
|
|
267
|
-
test('it can be trimmed with an option', async () => {
|
|
268
|
-
// WHEN
|
|
269
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
270
|
-
cacheToFile,
|
|
271
|
-
trimCache: true,
|
|
272
|
-
...defaultExtractOptions,
|
|
273
|
-
});
|
|
274
|
-
// THEN
|
|
275
|
-
const cacheTablet = await lib_1.LanguageTablet.fromFile(cacheToFile);
|
|
276
|
-
expect(cacheTablet.count).toEqual(1);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
test('default tablet is always trimmed', async () => {
|
|
280
|
-
const defaultTabletFile = path.join(assembly.moduleDirectory, lib_1.DEFAULT_TABLET_NAME);
|
|
281
|
-
// GIVEN - the '.jsii.tabl.json' file contains something already
|
|
282
|
-
const tbl = new lib_1.LanguageTablet();
|
|
283
|
-
tbl.addSnippet(bogusTranslatedSnippet());
|
|
284
|
-
await tbl.save(defaultTabletFile);
|
|
285
|
-
// WHEN - we run extract
|
|
286
|
-
await extract.extractSnippets([assembly.moduleDirectory], defaultExtractOptions);
|
|
287
|
-
// THEN - the default tablet file now only contains one snippet, the new one
|
|
288
|
-
const defaultTablet = await lib_1.LanguageTablet.fromFile(defaultTabletFile);
|
|
289
|
-
expect(defaultTablet.translatedSnippets.map((s) => s.snippet.location)).toEqual([
|
|
290
|
-
{
|
|
291
|
-
api: { api: 'moduleReadme', moduleFqn: 'my_assembly' },
|
|
292
|
-
field: { field: 'markdown', line: 4 },
|
|
293
|
-
},
|
|
294
|
-
]);
|
|
295
|
-
});
|
|
296
|
-
test('existing tablet is updated when assembly changes', async () => {
|
|
297
|
-
// Modify the assembly with a new example
|
|
298
|
-
assembly.assembly.types['my_assembly.ClassB'].docs = {
|
|
299
|
-
example: 'ClassB.anotherMethod();',
|
|
300
|
-
};
|
|
301
|
-
assembly.updateAssembly();
|
|
302
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
303
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
304
|
-
cacheToFile: cacheTabletFile,
|
|
305
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
306
|
-
...defaultExtractOptions,
|
|
307
|
-
});
|
|
308
|
-
// There are two examples, one should be cached and the other should be translated
|
|
309
|
-
expect(translationFunction).toHaveBeenCalledTimes(1);
|
|
310
|
-
});
|
|
311
|
-
test('compiler diagnostics property is passed on', async () => {
|
|
312
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
313
|
-
await extract.extractSnippets([assembly.moduleDirectory], {
|
|
314
|
-
cacheToFile: path.join(assembly.moduleDirectory, 'dummy.tabl.json'),
|
|
315
|
-
validateAssemblies: false,
|
|
316
|
-
includeCompilerDiagnostics: true,
|
|
317
|
-
translatorFactory: (o) => {
|
|
318
|
-
expect(o.includeCompilerDiagnostics).toEqual(true);
|
|
319
|
-
return new MockTranslator(o, translationFunction);
|
|
320
|
-
},
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
|
-
describe('non-compiling cached examples', () => {
|
|
325
|
-
let otherAssembly;
|
|
326
|
-
let cacheToFile;
|
|
327
|
-
beforeEach(async () => {
|
|
328
|
-
// Create an assembly in a temp directory
|
|
329
|
-
otherAssembly = testutil_1.TestJsiiModule.fromSource({
|
|
330
|
-
'index.ts': `
|
|
331
|
-
export class ClassA {
|
|
332
|
-
/**
|
|
333
|
-
* Some method
|
|
334
|
-
* @example x
|
|
335
|
-
*/
|
|
336
|
-
public someMethod() {
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
`,
|
|
340
|
-
}, {
|
|
341
|
-
name: 'my_assembly',
|
|
342
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
343
|
-
});
|
|
344
|
-
// add non-compiling snippet to cache
|
|
345
|
-
cacheToFile = path.join(otherAssembly.moduleDirectory, 'test.tabl.json');
|
|
346
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
347
|
-
cacheToFile,
|
|
348
|
-
includeCompilerDiagnostics: true,
|
|
349
|
-
validateAssemblies: false,
|
|
350
|
-
});
|
|
351
|
-
const tablet = await lib_1.LanguageTablet.fromFile(cacheToFile);
|
|
352
|
-
expect(tablet.count).toEqual(1);
|
|
353
|
-
const tr = tablet.tryGetSnippet(tablet.snippetKeys[0]);
|
|
354
|
-
expect(tr?.snippet.didCompile).toBeFalsy();
|
|
355
|
-
});
|
|
356
|
-
afterEach(() => assembly.cleanup());
|
|
357
|
-
test('are ignored with strict mode', async () => {
|
|
358
|
-
// second run of extract snippets should still evaluate the snippet
|
|
359
|
-
// even though it is present in the cache
|
|
360
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
361
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
362
|
-
cacheToFile,
|
|
363
|
-
cacheFromFile: cacheToFile,
|
|
364
|
-
includeCompilerDiagnostics: true,
|
|
365
|
-
validateAssemblies: false,
|
|
366
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
367
|
-
});
|
|
368
|
-
expect(translationFunction).toHaveBeenCalledTimes(1);
|
|
369
|
-
});
|
|
370
|
-
test('are utilized with strict mode off', async () => {
|
|
371
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
372
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
373
|
-
cacheToFile,
|
|
374
|
-
cacheFromFile: cacheToFile,
|
|
375
|
-
includeCompilerDiagnostics: false,
|
|
376
|
-
validateAssemblies: false,
|
|
377
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
378
|
-
});
|
|
379
|
-
expect(translationFunction).toHaveBeenCalledTimes(0);
|
|
380
|
-
});
|
|
381
|
-
});
|
|
382
|
-
test('do not ignore example strings', async () => {
|
|
383
|
-
// Create an assembly in a temp directory
|
|
384
|
-
const otherAssembly = testutil_1.TestJsiiModule.fromSource({
|
|
385
|
-
'index.ts': `
|
|
386
|
-
export class ClassA {
|
|
387
|
-
/**
|
|
388
|
-
* Some method
|
|
389
|
-
* @example x
|
|
390
|
-
*/
|
|
391
|
-
public someMethod() {
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
`,
|
|
395
|
-
}, {
|
|
396
|
-
name: 'my_assembly',
|
|
397
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
398
|
-
});
|
|
399
|
-
try {
|
|
400
|
-
const cacheToFile = path.join(otherAssembly.moduleDirectory, 'test.tabl.json');
|
|
401
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
402
|
-
cacheToFile,
|
|
403
|
-
...defaultExtractOptions,
|
|
404
|
-
});
|
|
405
|
-
const tablet = await lib_1.LanguageTablet.fromFile(cacheToFile);
|
|
406
|
-
expect(tablet.count).toEqual(1);
|
|
407
|
-
const tr = tablet.tryGetSnippet(tablet.snippetKeys[0]);
|
|
408
|
-
expect(tr?.originalSource.source).toEqual('x');
|
|
409
|
-
}
|
|
410
|
-
finally {
|
|
411
|
-
otherAssembly.cleanup();
|
|
412
|
-
}
|
|
413
|
-
});
|
|
414
|
-
describe('can find fqns via symbolId when ', () => {
|
|
415
|
-
test('there is an outDir', async () => {
|
|
416
|
-
const outDir = 'jsii-outDir';
|
|
417
|
-
const otherAssembly = createAssemblyWithDirectories(undefined, outDir);
|
|
418
|
-
try {
|
|
419
|
-
const outputFile = path.join(otherAssembly.moduleDirectory, 'test.tabl.json');
|
|
420
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
421
|
-
cacheToFile: outputFile,
|
|
422
|
-
...defaultExtractOptions,
|
|
423
|
-
});
|
|
424
|
-
const tablet = await lib_1.LanguageTablet.fromFile(outputFile);
|
|
425
|
-
const tr = tablet.tryGetSnippet(tablet.snippetKeys[0]);
|
|
426
|
-
expect(tr?.fqnsReferenced()).toEqual(['my_assembly.ClassA']);
|
|
427
|
-
}
|
|
428
|
-
finally {
|
|
429
|
-
otherAssembly.cleanup();
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
test('there is an outDir and rootDir', async () => {
|
|
433
|
-
const outDir = 'jsii-outDir';
|
|
434
|
-
const rootDir = '.';
|
|
435
|
-
const otherAssembly = createAssemblyWithDirectories(rootDir, outDir);
|
|
436
|
-
try {
|
|
437
|
-
const outputFile = path.join(otherAssembly.moduleDirectory, 'test.tabl.json');
|
|
438
|
-
await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
439
|
-
cacheToFile: outputFile,
|
|
440
|
-
...defaultExtractOptions,
|
|
441
|
-
});
|
|
442
|
-
const tablet = await lib_1.LanguageTablet.fromFile(outputFile);
|
|
443
|
-
const tr = tablet.tryGetSnippet(tablet.snippetKeys[0]);
|
|
444
|
-
expect(tr?.fqnsReferenced()).toEqual(['my_assembly.ClassA']);
|
|
445
|
-
}
|
|
446
|
-
finally {
|
|
447
|
-
otherAssembly.cleanup();
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
});
|
|
451
|
-
test('extract and infuse in one command', async () => {
|
|
452
|
-
const cacheToFile = path.join(assembly.moduleDirectory, 'test.tabl.json');
|
|
453
|
-
await extract.extractAndInfuse([assembly.moduleDirectory], {
|
|
454
|
-
cacheToFile,
|
|
455
|
-
...defaultExtractOptions,
|
|
456
|
-
});
|
|
457
|
-
const tablet = new lib_1.LanguageTablet();
|
|
458
|
-
await tablet.load(cacheToFile);
|
|
459
|
-
// extract works as expected, with a caveat
|
|
460
|
-
// the infuse part of this call will re-insert the example back
|
|
461
|
-
// into the tablet under a new key and new location.
|
|
462
|
-
// so we confirm that the locations of the snippets are as expected.
|
|
463
|
-
expect(tablet.snippetKeys.length).toEqual(2);
|
|
464
|
-
const locations = new Set();
|
|
465
|
-
for (const key of tablet.snippetKeys) {
|
|
466
|
-
locations.add(tablet.tryGetSnippet(key)?.snippet.location.api.api);
|
|
467
|
-
}
|
|
468
|
-
expect(locations).toContain('type');
|
|
469
|
-
expect(locations).toContain('moduleReadme');
|
|
470
|
-
const assemblies = (0, assemblies_1.loadAssemblies)([assembly.moduleDirectory], false);
|
|
471
|
-
const types = assemblies[0].assembly.types;
|
|
472
|
-
// infuse works as expected
|
|
473
|
-
expect(types).toBeDefined();
|
|
474
|
-
expect(types['my_assembly.ClassA'].docs?.example).toBeDefined();
|
|
475
|
-
});
|
|
476
|
-
describe('infused examples', () => {
|
|
477
|
-
let infusedAssembly;
|
|
478
|
-
beforeEach(() => {
|
|
479
|
-
infusedAssembly = testutil_1.TestJsiiModule.fromSource({
|
|
480
|
-
'index.ts': `
|
|
481
|
-
/**
|
|
482
|
-
* ClassA
|
|
483
|
-
*
|
|
484
|
-
* @exampleMetadata infused
|
|
485
|
-
* @example x
|
|
486
|
-
*/
|
|
487
|
-
export class ClassA {
|
|
488
|
-
public someMethod() {
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
`,
|
|
492
|
-
}, {
|
|
493
|
-
name: 'my_assembly',
|
|
494
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
495
|
-
});
|
|
496
|
-
});
|
|
497
|
-
afterEach(() => {
|
|
498
|
-
infusedAssembly.cleanup();
|
|
499
|
-
});
|
|
500
|
-
test('always returned from cache', async () => {
|
|
501
|
-
const cacheFile = path.join(infusedAssembly.moduleDirectory, 'test.tabl.json');
|
|
502
|
-
// Cache to file
|
|
503
|
-
await extract.extractSnippets([infusedAssembly.moduleDirectory], {
|
|
504
|
-
cacheToFile: cacheFile,
|
|
505
|
-
...defaultExtractOptions,
|
|
506
|
-
});
|
|
507
|
-
// Update the example with a fixture that would fail compilation
|
|
508
|
-
// Nothing like this should happen in practice
|
|
509
|
-
infusedAssembly.assembly.types['my_assembly.ClassA'].docs.custom.exampleMetadata =
|
|
510
|
-
'infused fixture=myfix.ts-fixture';
|
|
511
|
-
infusedAssembly.updateAssembly();
|
|
512
|
-
// Expect to return cached snippet regardless of change
|
|
513
|
-
// No compilation should happen
|
|
514
|
-
const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] });
|
|
515
|
-
await extract.extractSnippets([infusedAssembly.moduleDirectory], {
|
|
516
|
-
cacheFromFile: cacheFile,
|
|
517
|
-
...defaultExtractOptions,
|
|
518
|
-
translatorFactory: (o) => new MockTranslator(o, translationFunction),
|
|
519
|
-
});
|
|
520
|
-
expect(translationFunction).not.toHaveBeenCalled();
|
|
521
|
-
});
|
|
522
|
-
test('skip loose mode', async () => {
|
|
523
|
-
// Remove infused for now and add lit metadata that should fail
|
|
524
|
-
infusedAssembly.assembly.types['my_assembly.ClassA'].docs.custom.exampleMetadata = 'lit=integ.test.ts';
|
|
525
|
-
infusedAssembly.updateAssembly();
|
|
526
|
-
const cacheToFile = path.join(infusedAssembly.moduleDirectory, 'test.tabl.json');
|
|
527
|
-
// Without exampleMetadata infused, expect an error
|
|
528
|
-
await expect(extract.extractSnippets([infusedAssembly.moduleDirectory], {
|
|
529
|
-
cacheToFile,
|
|
530
|
-
...defaultExtractOptions,
|
|
531
|
-
})).rejects.toThrowError(/Sample uses literate source/);
|
|
532
|
-
// Add infused to metadata and update assembly
|
|
533
|
-
infusedAssembly.assembly.types['my_assembly.ClassA'].docs.custom.exampleMetadata = 'lit=integ.test.ts infused';
|
|
534
|
-
infusedAssembly.updateAssembly();
|
|
535
|
-
// Expect same function call to succeed now
|
|
536
|
-
await extract.extractSnippets([infusedAssembly.moduleDirectory], {
|
|
537
|
-
cacheToFile,
|
|
538
|
-
...defaultExtractOptions,
|
|
539
|
-
});
|
|
540
|
-
const tablet = await lib_1.LanguageTablet.fromFile(cacheToFile);
|
|
541
|
-
expect(tablet.count).toEqual(1);
|
|
542
|
-
const tr = tablet.tryGetSnippet(tablet.snippetKeys[0]);
|
|
543
|
-
expect(tr?.originalSource.source).toEqual('x');
|
|
544
|
-
});
|
|
545
|
-
});
|
|
546
|
-
test('can use additional dependencies from monorepo', async () => {
|
|
547
|
-
logging.configure({ level: logging.Level.VERBOSE });
|
|
548
|
-
const asm = testutil_1.TestJsiiModule.fromSource({
|
|
549
|
-
'index.ts': `
|
|
550
|
-
/**
|
|
551
|
-
* Class to hold values
|
|
552
|
-
*
|
|
553
|
-
* @example
|
|
554
|
-
* import { ValueHolder } from 'my_assembly';
|
|
555
|
-
* import { SomeClass } from 'otherModule';
|
|
556
|
-
* new ValueHolder(new SomeClass());
|
|
557
|
-
*/
|
|
558
|
-
export class ValueHolder {
|
|
559
|
-
constructor(public readonly theValue: any) { }
|
|
560
|
-
}
|
|
561
|
-
`,
|
|
562
|
-
}, {
|
|
563
|
-
name: 'my_assembly',
|
|
564
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
565
|
-
jsiiRosetta: {
|
|
566
|
-
exampleDependencies: {
|
|
567
|
-
// This relies on the fact that Rosetta will find the package in the monorepo
|
|
568
|
-
otherModule: '*',
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
});
|
|
572
|
-
try {
|
|
573
|
-
// GIVEN - install some random other module
|
|
574
|
-
asm.workspace.addDependency((0, jsii_1.compileJsiiForTest)({
|
|
575
|
-
'index.ts': 'export class SomeClass { }',
|
|
576
|
-
}, {
|
|
577
|
-
packageJson: {
|
|
578
|
-
name: 'otherModule',
|
|
579
|
-
},
|
|
580
|
-
}));
|
|
581
|
-
// GIVEN - a lerna.json that would find that package
|
|
582
|
-
await fs.promises.writeFile(path.join(asm.workspaceDirectory, 'lerna.json'), JSON.stringify({
|
|
583
|
-
packages: ['node_modules/*'],
|
|
584
|
-
}));
|
|
585
|
-
// WHEN
|
|
586
|
-
await extract.extractSnippets([asm.moduleDirectory], defaultExtractOptions);
|
|
587
|
-
// THEN -- did not throw an error
|
|
588
|
-
}
|
|
589
|
-
finally {
|
|
590
|
-
asm.cleanup();
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
test('can use additional dependencies from NPM', async () => {
|
|
594
|
-
const asm = testutil_1.TestJsiiModule.fromSource({
|
|
595
|
-
'index.ts': `
|
|
596
|
-
/**
|
|
597
|
-
* Class to hold values
|
|
598
|
-
*
|
|
599
|
-
* @example
|
|
600
|
-
* import { ValueHolder } from 'my_assembly';
|
|
601
|
-
* import { ConstructOrder } from 'constructs';
|
|
602
|
-
* new ValueHolder(ConstructOrder.PREORDER);
|
|
603
|
-
*/
|
|
604
|
-
export class ValueHolder {
|
|
605
|
-
constructor(public readonly theValue: any) { }
|
|
606
|
-
}
|
|
607
|
-
`,
|
|
608
|
-
}, {
|
|
609
|
-
name: 'my_assembly',
|
|
610
|
-
jsii: testutil_1.DUMMY_JSII_CONFIG,
|
|
611
|
-
jsiiRosetta: {
|
|
612
|
-
exampleDependencies: {
|
|
613
|
-
// This relies on the fact that Rosetta will find the package in the monorepo
|
|
614
|
-
constructs: '^10.0.0',
|
|
615
|
-
},
|
|
616
|
-
},
|
|
617
|
-
});
|
|
618
|
-
try {
|
|
619
|
-
// WHEN
|
|
620
|
-
await extract.extractSnippets([asm.moduleDirectory], defaultExtractOptions);
|
|
621
|
-
// THEN -- did not throw an error
|
|
622
|
-
}
|
|
623
|
-
finally {
|
|
624
|
-
asm.cleanup();
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
test('infused examples have no diagnostics', async () => {
|
|
628
|
-
const otherAssembly = testutil_1.TestJsiiModule.fromSource({
|
|
629
|
-
'index.ts': `
|
|
630
|
-
/**
|
|
631
|
-
* ClassA
|
|
632
|
-
*
|
|
633
|
-
* @exampleMetadata infused
|
|
634
|
-
* @example x
|
|
635
|
-
*/
|
|
636
|
-
export class ClassA {
|
|
637
|
-
public someMethod() {
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
`,
|
|
641
|
-
}, {
|
|
642
|
-
name: 'my_assembly',
|
|
643
|
-
jsii: {
|
|
644
|
-
...testutil_1.DUMMY_JSII_CONFIG,
|
|
645
|
-
},
|
|
646
|
-
});
|
|
647
|
-
try {
|
|
648
|
-
const cacheToFile = path.join(otherAssembly.moduleDirectory, 'test.tabl.json');
|
|
649
|
-
const results = await extract.extractSnippets([otherAssembly.moduleDirectory], {
|
|
650
|
-
cacheToFile,
|
|
651
|
-
includeCompilerDiagnostics: true,
|
|
652
|
-
loose: false,
|
|
653
|
-
});
|
|
654
|
-
expect(results.diagnostics).toEqual([]);
|
|
655
|
-
}
|
|
656
|
-
finally {
|
|
657
|
-
otherAssembly.cleanup();
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
class MockTranslator extends lib_1.RosettaTranslator {
|
|
661
|
-
constructor(opts, translatorFn) {
|
|
662
|
-
super(opts);
|
|
663
|
-
this.translateAll = translatorFn;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
function createAssemblyWithDirectories(rootDir, outDir) {
|
|
667
|
-
return testutil_1.TestJsiiModule.fromSource({
|
|
668
|
-
'index.ts': `
|
|
669
|
-
export class ClassA {
|
|
670
|
-
/**
|
|
671
|
-
* Some method
|
|
672
|
-
*
|
|
673
|
-
* @example
|
|
674
|
-
* import * as ass from 'my_assembly';
|
|
675
|
-
* new ass.ClassA.someMethod();
|
|
676
|
-
*/
|
|
677
|
-
public someMethod() {
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
`,
|
|
681
|
-
'README.md': '',
|
|
682
|
-
}, {
|
|
683
|
-
name: 'my_assembly',
|
|
684
|
-
main: `${outDir}/index.js`,
|
|
685
|
-
types: `${outDir}/index.d.ts`,
|
|
686
|
-
jsii: {
|
|
687
|
-
...testutil_1.DUMMY_JSII_CONFIG,
|
|
688
|
-
tsc: {
|
|
689
|
-
outDir,
|
|
690
|
-
rootDir,
|
|
691
|
-
},
|
|
692
|
-
},
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
function bogusTranslatedSnippet() {
|
|
696
|
-
return lib_1.TranslatedSnippet.fromTypeScript((0, lib_1.typeScriptSnippetFromVisibleSource)('console.log("hello");', (0, testutil_1.testSnippetLocation)('x.ts'), true), true);
|
|
697
|
-
}
|
|
698
|
-
//# sourceMappingURL=extract.test.js.map
|