From 6edbaddbc58c5f0adc361bcbfb438dc8bf4644ae Mon Sep 17 00:00:00 2001 From: zoobestik Date: Wed, 27 Dec 2023 15:33:20 +0100 Subject: [PATCH 1/2] fix(crosslink); hide crosslink for jslibs --- src/executable-code/index.js | 2 +- tests/crosslink.e2e.ts | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/executable-code/index.js b/src/executable-code/index.js index 0c3ee68e..d38b8ce7 100644 --- a/src/executable-code/index.js +++ b/src/executable-code/index.js @@ -116,7 +116,7 @@ export default class ExecutableCode { crosslinkValue === 'disabled' || // disabled by developer highlightOnly || // highlighted only not worked in... ( // Unsupported external deps - (jsLibs && jsLibs.length > 0) || + (jsLibs && !!jsLibs.size) || (hiddenDependencies && hiddenDependencies.length > 0) ) ) diff --git a/tests/crosslink.e2e.ts b/tests/crosslink.e2e.ts index 7c980fbd..63726885 100644 --- a/tests/crosslink.e2e.ts +++ b/tests/crosslink.e2e.ts @@ -52,21 +52,15 @@ test.describe('open in playground', () => { printlnCode('Hello, World'), )); - test('no link for js-libs', ({ page }) => { - test.fixme( - true, - "Test doesn't work, BUG in code! jsLibs.length -> jsLibs.size", - ); - - return checkCrosslink( + test('no link for js-libs', ({ page }) => + checkCrosslink( page, { 'data-target-platform': 'js', 'data-js-libs': 'https://somescript.js', }, printlnCode('Hello, World!'), - ); - }); + )); test('no link for hidden deps', ({ page }) => checkCrosslink( From 79840c61aa361d2bed0444f5b4e912448969cda4 Mon Sep 17 00:00:00 2001 From: zoobestik Date: Wed, 27 Dec 2023 15:33:37 +0100 Subject: [PATCH 2/2] chore: bump version to 1.30.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9d21aee..3c1d89c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kotlin-playground", - "version": "1.29.0", + "version": "1.30.0", "description": "Self-contained component to embed in websites for running Kotlin code", "keywords": [ "kotlin",