diff --git a/.github/workflows/checkmarx.yml b/.github/workflows/checkmarx.yml index 765e69a704..fae9411344 100644 --- a/.github/workflows/checkmarx.yml +++ b/.github/workflows/checkmarx.yml @@ -1,5 +1,8 @@ name: Checkmarx One Scan -on: workflow_dispatch +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" jobs: trigger_scan: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 31914c6b94..cf17943fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,21 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec --> +## [v2.17.0] (2024-10-02) + +#### :rocket: Added +* [#3946](https://github.com/SAP/luigi/pull/3946) Adds option to disable luigiCookie ([@walmazacn](https://github.com/walmazacn)) +* [#3922](https://github.com/SAP/luigi/pull/3922) Adds node property for hiding global search ([@walmazacn](https://github.com/walmazacn)) + +#### :bug: Fixed +* [#3968](https://github.com/SAP/luigi/pull/3968) Fix fdToolLayout background-color ([@JohannesDoberer](https://github.com/JohannesDoberer)) +* [#3964](https://github.com/SAP/luigi/pull/3964) Clean Luigi store ([@JohannesDoberer](https://github.com/JohannesDoberer)) + + + + + + ## [v2.16.0] (2024-09-27) #### :rocket: Added @@ -1866,4 +1881,5 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec [v2.14.2]: https://github.com/SAP/luigi/compare/v2.14.1...v2.14.2 [v2.14.3]: https://github.com/SAP/luigi/compare/v2.14.2...v2.14.3 [v2.15.0]: https://github.com/SAP/luigi/compare/v2.14.3...v2.15.0 -[v2.16.0]: https://github.com/SAP/luigi/compare/v2.15.0...v2.16.0 \ No newline at end of file +[v2.16.0]: https://github.com/SAP/luigi/compare/v2.15.0...v2.16.0 +[v2.17.0]: https://github.com/SAP/luigi/compare/v2.16.0...v2.17.0 \ No newline at end of file diff --git a/blog/2024-07-10-release-notes.md b/blog/2024-07-10-release-notes.md new file mode 100644 index 0000000000..9383361f35 --- /dev/null +++ b/blog/2024-07-10-release-notes.md @@ -0,0 +1,33 @@ +--- +title: Luigi v2.14 +seoMetaDescription: Release notes for Luigi v2.14 +author: + - Mahati Shankar +layout: blog +--- + +You can read about the new features in Luigi v2.14 in the release notes below. + + + + +#### E2E Tests With Nightwatch, WebdriverIO and Puppeteer + +The testing-utilities library now additionally supports Nightwatch, WebdriverIO and Puppeteer. You can now use these testing frameworks for your e2e tests. + +#### getCurrentRoute Has Been Added + +[getCurrentRoute](https://docs.luigi-project.io/docs/luigi-core-api?section=getcurrentroute) has been added to the Luigi core API which as the name suggests returns the current Luigi route. + +#### getCurrentTheme in WC Client + +The method [getCurrentTheme](https://docs.luigi-project.io/docs/luigi-core-api?section=getcurrenttheme) is now part of the core API so you can now use it in the WebComponent client too. + + +#### Fix Top Nav Children Not Rendered + +Fixed issue where nodes weren't rendered in the top navigation under certain conditions. + +#### Bugfixes + +For a full list of bugfixes in this release, see our [changelog](https://github.com/SAP/luigi/blob/main/CHANGELOG.md). \ No newline at end of file diff --git a/client-frameworks-support/client-support-angular/projects/client-support-angular/package.json b/client-frameworks-support/client-support-angular/projects/client-support-angular/package.json index 7e8b7e1125..b474112439 100644 --- a/client-frameworks-support/client-support-angular/projects/client-support-angular/package.json +++ b/client-frameworks-support/client-support-angular/projects/client-support-angular/package.json @@ -22,5 +22,5 @@ "@luigi-project/client": "^2.0.0", "@luigi-project/testing-utilities": "^2.0.0" }, - "version": "2.16.0" + "version": "2.17.0" } \ No newline at end of file diff --git a/client-frameworks-support/testing-utilities/dist/package.json b/client-frameworks-support/testing-utilities/dist/package.json index 6ee6b7005a..5c583d89fe 100644 --- a/client-frameworks-support/testing-utilities/dist/package.json +++ b/client-frameworks-support/testing-utilities/dist/package.json @@ -19,7 +19,7 @@ "microfrontends", "testing" ], - "version": "2.16.0", + "version": "2.17.0", "engines": { "node": ">=18.19.1" } diff --git a/client-frameworks-support/testing-utilities/package-lock.json b/client-frameworks-support/testing-utilities/package-lock.json index fc7cd53b92..08cbcd4437 100644 --- a/client-frameworks-support/testing-utilities/package-lock.json +++ b/client-frameworks-support/testing-utilities/package-lock.json @@ -1,12 +1,12 @@ { "name": "@luigi-project/testing-utilities", - "version": "2.16.0", + "version": "2.17.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@luigi-project/testing-utilities", - "version": "2.16.0", + "version": "2.17.0", "license": "Apache-2.0", "devDependencies": { "ncp": "^2.0.0", diff --git a/client-frameworks-support/testing-utilities/package.json b/client-frameworks-support/testing-utilities/package.json index e91fa68e5d..0ca54a6c89 100644 --- a/client-frameworks-support/testing-utilities/package.json +++ b/client-frameworks-support/testing-utilities/package.json @@ -29,7 +29,7 @@ "microfrontends", "testing" ], - "version": "2.16.0", + "version": "2.17.0", "engines": { "node": ">=18.19.1" } diff --git a/client/public/package.json b/client/public/package.json index bdbf7ffa9d..b2791aa3c1 100644 --- a/client/public/package.json +++ b/client/public/package.json @@ -17,5 +17,5 @@ "micro-frontends", "microfrontends" ], - "version": "2.16.0" + "version": "2.17.0" } \ No newline at end of file diff --git a/client/src/lifecycleManager.js b/client/src/lifecycleManager.js index 3f6f0c2329..5b9f2fab5d 100644 --- a/client/src/lifecycleManager.js +++ b/client/src/lifecycleManager.js @@ -91,6 +91,7 @@ class LifecycleManager extends LuigiClientBase { helpers.setLuigiCoreDomain(e.origin); this.luigiInitialized = true; this._notifyInit(e.origin); + this._tpcCheck(); helpers.sendPostMessageToLuigiCore({ msg: 'luigi.init.ok' }); }); @@ -135,10 +136,12 @@ class LifecycleManager extends LuigiClientBase { }, '*' ); - this._tpcCheck(); } _tpcCheck() { + if (this.currentContext?.internal?.thirdPartyCookieCheck?.disabled) { + return; + } let tpc = 'enabled'; let cookies = document.cookie; let luigiCookie; diff --git a/container/.gitignore b/container/.gitignore index 5d7df85d75..b2415001fb 100644 --- a/container/.gitignore +++ b/container/.gitignore @@ -9,6 +9,7 @@ /test-app/bundle.js /test-app/bundle.js.map /test-app/compound/luigi-element.js +/test-app/iframe/luigi-client.js /public/**/*.ts /coverage diff --git a/container/cypress/e2e/test-app/iframe/iframe-container.cy.js b/container/cypress/e2e/test-app/iframe/iframe-container.cy.js index b659bc112d..55297964ff 100644 --- a/container/cypress/e2e/test-app/iframe/iframe-container.cy.js +++ b/container/cypress/e2e/test-app/iframe/iframe-container.cy.js @@ -7,6 +7,19 @@ describe('Iframe Container Test', () => { stub = cy.stub(); }); + it('should sent third party cookies request', () => { + cy.on('window:alert', stub); + + cy.get(containerSelector).should('not.have.attr', 'skip-cookie-check'); + cy.get(containerSelector) + .shadow() + .get('iframe') + .then(() => { + cy.wrap(stub).should('have.been.calledWith', 'set-third-party-cookies-request'); + cy.getCookie('luigiCookie').should('exist'); + }); + }); + it('navigation sent', () => { cy.get(containerSelector) .shadow() @@ -24,13 +37,12 @@ describe('Iframe Container Test', () => { }); it('sendCustomMessage', () => { - cy.get('#btn-1') - .click() + cy.get('#btn-1').click(); cy.get(containerSelector) .shadow() .get('iframe') .then(iframe => { - const $body = iframe.contents().find('body') + const $body = iframe.contents().find('body'); cy.wrap($body) .find('#content') .should('have.text', 'Received Custom Message: some data'); diff --git a/container/cypress/e2e/test-app/iframe/iframe-cookies.cy.js b/container/cypress/e2e/test-app/iframe/iframe-cookies.cy.js new file mode 100644 index 0000000000..e9e5e8af1a --- /dev/null +++ b/container/cypress/e2e/test-app/iframe/iframe-cookies.cy.js @@ -0,0 +1,24 @@ +describe('Iframe Cookies Test', () => { + const containerSelector = '[data-test-id="iframe-based-container-test"]'; + let stub; + + beforeEach(() => { + cy.visit('http://localhost:8080/iframe/iframe-cookies.html'); + stub = cy.stub(); + }); + + it('should not sent third party cookies request', () => { + cy.on('window:alert', stub); + + cy.get(containerSelector) + .should('have.attr', 'skip-cookie-check') + .and('match', /true/); + cy.get(containerSelector) + .shadow() + .get('iframe') + .then(() => { + cy.wrap(stub).should('not.have.been.calledWith', 'set-third-party-cookies-request'); + cy.getCookie('luigiCookie').should('not.exist'); + }); + }); +}); diff --git a/container/package.json b/container/package.json index 37c3d22c48..66f42352c4 100644 --- a/container/package.json +++ b/container/package.json @@ -18,8 +18,9 @@ "bundle": "npm run build", "dev": "rollup -c -w", "copyBundle": "cp public/bundle.js public/bundle.js.map test-app/ && cp public/bundle.js public/bundle.js.map examples/ || COPY public\\* test-app\\", + "copyLuigiClient": "cp ../client/public/luigi-client.js test-app/iframe", "copyLuigiElement": "cp ../client/src/luigi-element.js test-app/compound", - "serve": "npm run build && npm run copyLuigiElement && npm run copyBundle && sirv -D -c test-app --no-clear", + "serve": "npm run build && npm run copyLuigiClient && npm run copyLuigiElement && npm run copyBundle && sirv -D -c test-app --no-clear", "bundle:watch": "chokidar \"src/**/*.*\" -c \"npm run build && npm run copyBundle\"", "start": "concurrently -k \"npm run serve\" \"npm run bundle:watch\"", "start-examples":"npm run copyBundle && sirv -D -c examples --no-clear", diff --git a/container/public/LuigiCompoundContainer.js b/container/public/LuigiCompoundContainer.js new file mode 100644 index 0000000000..35e5f15204 --- /dev/null +++ b/container/public/LuigiCompoundContainer.js @@ -0,0 +1 @@ +export { LuigiCompoundContainer as default } from "./bundle.js"; \ No newline at end of file diff --git a/container/public/LuigiContainer.js b/container/public/LuigiContainer.js new file mode 100644 index 0000000000..b9ee6e194f --- /dev/null +++ b/container/public/LuigiContainer.js @@ -0,0 +1 @@ +export { LuigiContainer as default } from "./bundle.js"; \ No newline at end of file diff --git a/container/src/LuigiContainer.svelte b/container/src/LuigiContainer.svelte index 974f91c70b..86f9aa0d06 100644 --- a/container/src/LuigiContainer.svelte +++ b/container/src/LuigiContainer.svelte @@ -20,6 +20,7 @@ pathParams: { type: 'Object', reflect: false, attribute: 'path-params' }, sandboxRules: { type: 'Array', reflect: false, attribute: 'sandbox-rules' }, searchParams: { type: 'Object', reflect: false, attribute: 'search-params' }, + skipCookieCheck: { type: 'String', reflect: false, attribute: 'skip-cookie-check' }, skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' }, theme: { type: 'String', reflect: false, attribute: 'theme' }, userSettings: { type: 'Object', reflect: false, attribute: 'user-settings' }, @@ -79,6 +80,7 @@ export let pathParams: any; export let sandboxRules: string[]; export let searchParams: any; + export let skipCookieCheck: 'false' | 'true'; export let skipInitCheck: boolean; export let theme: string; export let userSettings: any; @@ -113,6 +115,7 @@ pathParams && sandboxRules && searchParams && + skipCookieCheck && skipInitCheck && theme && userSettings diff --git a/container/src/services/container.service.ts b/container/src/services/container.service.ts index c25d3d53af..5ac67c92a2 100644 --- a/container/src/services/container.service.ts +++ b/container/src/services/container.service.ts @@ -106,7 +106,11 @@ export class ContainerService { { msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE, context: targetCnt.context || {}, - internal: {}, + internal: { + thirdPartyCookieCheck: { + disabled: targetCnt.skipCookieCheck === 'true' + } + }, authData: targetCnt.authData || {} }, '*' diff --git a/container/test-app/iframe/iframe-cookies.html b/container/test-app/iframe/iframe-cookies.html new file mode 100644 index 0000000000..27a7d05bc1 --- /dev/null +++ b/container/test-app/iframe/iframe-cookies.html @@ -0,0 +1,38 @@ + + + + + +

+ This page is used to test **skip-cookie-check** feature for iFrame based LuigiContainer +

+ +
+ + +
+ + + + diff --git a/container/test-app/iframe/microfrontend.html b/container/test-app/iframe/microfrontend.html index 80e1159dc7..b69fc1a4e9 100644 --- a/container/test-app/iframe/microfrontend.html +++ b/container/test-app/iframe/microfrontend.html @@ -4,7 +4,7 @@ - +