Commit Graph

42 Commits

Author SHA1 Message Date
Artem Kobzar 725a224f74 [K/JS] Make available transitive reexport for ES modules 2022-11-18 16:54:10 +00:00
Ilya Chernikov 44cce3ad52 FIR JS: mute remaining tests for now 2022-11-12 16:28:23 +01:00
Artem Kobzar ea6b784e41 [K/JS] Exclude Enum.entries property from export to JS 2022-10-21 10:31:06 +00:00
Artem Kobzar eb2326eabb [K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore. 2022-10-03 11:07:25 +00:00
Artem Kobzar 39a44d4ccb [K/JS] Add lateinit as exception for simple properties ^KT-53968 Fixed 2022-09-22 13:50:51 +00:00
Artem Kobzar 73e7053c35 [K/JS] Use only single variant of default arguments function wrapper for exported and not-exported functions 2022-09-19 17:49:04 +00:00
Artem Kobzar da367a467d [K/JS] chore: stop unnecessary defineProperties generating. 2022-09-09 11:14:26 +00:00
Artem Kobzar dbda8dcad1 [K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests. 2022-08-26 09:51:59 +00:00
Artem Kobzar 0cef573a7b [K/JS] test(@JsExport): add few more tests on export after ExportModel discussion meeting. 2022-08-01 12:17:35 +00:00
Nikolay Lunyak bdc3b5fe6f [FIR JS] Mute 170 failing multi-module tests 2022-06-02 13:47:24 +00:00
Ilya Goncharov 0c24d0ec9f [JS IR]Add case with file-exported class inherited from non-exported int
KT-52252

Merge-request: KT-MR-6270
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-05-13 10:41:16 +00:00
Ilya Goncharov 1fc7fbed79 rra/ilgonmic/export-call-site
[JS IR] Add test with exported overridden property from interface

[JS IR] Accessors should not be exported when overridden from non-exported interface

Merge-request: KT-MR-6166
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-52144 fixed
2022-04-29 12:13:09 +00:00
Anton Bannykh 90ee8662da rra/ilgonmic/kt-51973
[JS IR] Add non overridden property and method insode exported class

[JS IR] Add method into exported interface in test

[JS IR] Add interface properties cases to all file export test

[JS IR] Fix usage of isExported inside IrJsUtils


Co-authored-by: Anton Bannykh <Anton.Bannykh@jetbrains.com>

Merge-request: KT-MR-6087
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51973 fixed
2022-04-14 16:59:54 +00:00
Ilya Goncharov e2766e402c rra/ilgonmic/more-tests-for-internal-export
[JS IR] Add single file test

[JS IR] isExportedMember considers only public API

[JS IR] Add case with non default accessor

Merge-request: KT-MR-6008
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-50504 fixed
2022-04-05 15:45:41 +00:00
Ilya Goncharov c67c1a69b9 rra/ilgonmic/reducing-size
[JS IR] Fix review remarks

- Fix translation mode from flags calculation
- comment why not top level could be safely inlined

[JS IR] Add test on exportness of internal val

Revert "[Gradle, JS] Disable minimizing names in production by default"

This reverts commit 700ff8634a73f155a2f0eaf963778216d6877075.

[JS IR] Adopt reserved names

Revert "[JS IR] Reserve interop names"

This reverts commit 63f30becaf1a45750ff85aea3753aae9a85985f4.

Revert "[JS IR] Clear minimized namer states"

This reverts commit ef7f19fa8a928021e8bdfbee7fbb5285fc74b7ab.

[JS IR] Clear minimized namer states

[JS IR] Reserve interop names

[JS IR] Separate arguments for users

[JS IR] Minimized member names in tests

[Gradle, JS] Disable minimizing names in production by default

[JS IR] Fix extra helps

[JS IR] Move mangling of signatures to linking namer

[JS IR] Add key and minimized name generator

[JS IR] cross module dependencies minimized

[JS IR] Minimize names

[JS IR] Cross module by index

[JS IR] Fix warning

[JS IR] Fix inlining accessors

[JS IR] Bridges for property accessors

[JS IR] Special case of jsFunctionSignature with property accessors

[JS IR] Inline property accessor for non top level properties

[JS IR] Reduce crossModule size

Merge-request: KT-MR-5785
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51735 fixed
^KT-50504 fixed
2022-03-28 10:39:15 +00:00
Ilya Goncharov adad0b4628 [JS IR] Fix export of nested enums
Merge-request: KT-MR-5916
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51211 fixed
2022-03-18 09:45:14 +00:00
Anton Bannykh aa628ae7b3 [JS IR] tests both per-module and regular mode 2021-12-22 10:14:08 +03:00
Artem Kobzar ab7615adaf fix: fake override on interfaces. 2021-12-17 14:22:46 +00:00
Ilya Goncharov 00289d3514 rra/ilgonmic/exported-bridges-2
[JS IR] Use js name for signature

[JS] bridgeSavingExport only for JS IR

[JS IR] Fix test

[JS IR] Stable and non stable signatures

[JS IR] Consider return type in js signature and erase for JS name signature

[JS IR] Copy signature from wasm to JS and export bridge, not original

Merge-request: KT-MR-5174
2021-12-08 08:30:14 +00:00
Anton Bannykh 9122304acb [JS IR] shorten lib name to fit 255 path total length on Windows 2021-12-01 16:50:29 +03:00
Anton Bannykh 5a3c8336ca [JS IR] import Bar from its module 2021-12-01 16:50:28 +03:00
Ilya Goncharov 1481ad21f5 Enum implementing exported interface
[JS IR] Not export get instance enum function

[JS IR] Enum corresponding class is not considered in export

[JS IR] All enums are abstract and with private constructor

[JS IR] Any methods is left in d.ts

[JS IR] Make enum with declarations inside corresponding class

[JS IR] Export of interface through fake override

[JS IR] Include enum entry corresponding class members into export model

Merge-request: KT-MR-5031

^KT-49779 fixed
^KT-49773 fixed
2021-11-24 12:25:50 +00:00
Artem Kobzar d5dd35cb20 feat(@JsExport for interfaces): add ability to export interfaces in TypeScript. 2021-11-18 10:07:38 +00:00
Ilya Goncharov f22de86954 [JS IR] Possibility to use export for nested inside object
[JS IR] Fix test data after master rebase

[JS IR] Use stdlib's listOfNotNull

[JS IR] Possibility to use export for nested inside object

- Add tests for such cases

Merge-request: KT-MR-4883

^KT-49363 fixed
2021-11-03 09:56:22 +00:00
Ilya Goncharov 4fa2fa6c26 [JS IR] Export name and ordinal for enum classes
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:24 +00:00
Ilya Goncharov a31a6c5117 [JS IR] Fix conflict with master
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:23 +00:00
Ilya Goncharov cd1296309f [JS IR] Add constructor parameter to test and values, valueOf methods
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:21 +00:00
Ilya Goncharov 9bd44e01f5 [JS IR] Export enum members like from usual classes
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:20 +00:00
Ilya Goncharov 196dc6b071 [JS IR] Add test for enum exportness
^KT-44494 fixed
2021-11-01 13:28:19 +00:00
Ivan Kylchik 2bea77d4e2 [JS TESTS] Replace - symbol in module name with _ 2021-10-25 00:14:19 +03:00
Artem Kobzar 3dbf996ec6 fix(KT-49225): remove unnecessery boxing. 2021-10-21 06:38:42 +00:00
Sergej Jaskiewicz 8b2410733f [JS IR] Improve the test for exporting protected members 2021-10-15 12:52:11 +00:00
Sergej Jaskiewicz cb3d5f90e6 [JS IR] Export protected members too
#KT-47524 Fixed
#KT-47525 Fixed
2021-09-06 12:46:25 +00:00
Sergej Jaskiewicz be999564b1 [JS IR] Export nested objects
Companion objects are exported as ParentClass.Companion.
Companion object's members are not exposed to its parent class —
one must reference the companion object explicitly if they want to
access its members.

#KT-43783 Fixed
2021-09-02 14:40:15 +03:00
Anton Bannykh 6c6d43c29a JS: add missing reachable nodes data 2021-02-12 16:21:09 +03:00
Ilya Goncharov 19bffc694b [JS IR] Add test with chain export--not-export--export
^KT-44616 fixed
2021-02-08 13:41:16 +03:00
Ilya Goncharov 7b4624aac4 [JS IR] Add exported method into exportNestedClass.kt
^KT-44616 fixed
2021-02-08 13:38:47 +03:00
Ilya Goncharov 6c051b2be4 [JS IR] Override method are not exported
[JS IR] Add test with jsexport overrides not js export method with stable name

^KT-44616 fixed
2021-02-08 13:38:30 +03:00
Ilya Goncharov 977781fa49 [JS IR] Add tests with export all file and export nested class
[JS IR] Skip dce driven for nested classes export

^KT-44469 fixed
2021-01-28 18:55:33 +03:00
Ilya Goncharov a89fe90043 [JS IR] Add test on exportable overriden method
^KT-44415 fixed
2021-01-25 15:16:22 +03:00
Svyatoslav Kuzmich 69962cbf8c [JS IR BE] Add JsExport annotations 2019-07-01 18:55:41 +03:00
Svyatoslav Kuzmich e30bdb8dc9 Fix hanling module names that require escaping 2019-04-25 03:54:17 +03:00