From 5f45b406a73dd1f53c3bc362281f09692fede0e3 Mon Sep 17 00:00:00 2001 From: Daniel Leroux Date: Tue, 18 Jun 2024 07:37:40 +0200 Subject: [PATCH] build: remove internal polyfills --- .changeset/real-jokes-walk.md | 7 ++++ packages/angular/src/app-initialize.ts | 5 +-- packages/core/.eslintignore | 3 ++ packages/core/component-doc.json | 4 +- .../static/code-runtime/html/src/main.js | 8 ++-- packages/html-test-app/src/main.js | 9 ++--- .../src/preview-examples/init.js | 7 ++-- packages/vue/src/plugin.ts | 6 +-- pnpm-lock.yaml | 38 +++++++++---------- 9 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 .changeset/real-jokes-walk.md create mode 100644 packages/core/.eslintignore diff --git a/.changeset/real-jokes-walk.md b/.changeset/real-jokes-walk.md new file mode 100644 index 0000000000..0fcf031829 --- /dev/null +++ b/.changeset/real-jokes-walk.md @@ -0,0 +1,7 @@ +--- +'@siemens/ix-angular': patch +'@siemens/ix': patch +'@siemens/ix-vue': patch +--- + +build: remove internal polyfills diff --git a/packages/angular/src/app-initialize.ts b/packages/angular/src/app-initialize.ts index 786457d95c..5c35442b0e 100644 --- a/packages/angular/src/app-initialize.ts +++ b/packages/angular/src/app-initialize.ts @@ -8,7 +8,7 @@ */ import { defineCustomElements as iconsDefineCustomElements } from '@siemens/ix-icons/loader'; -import { applyPolyfills, defineCustomElements } from '@siemens/ix/loader'; +import { defineCustomElements } from '@siemens/ix/loader'; let didInitialize = false; @@ -22,9 +22,8 @@ export const appInitialize = (doc: Document) => { didInitialize = true; - await applyPolyfills(); + defineCustomElements(); await iconsDefineCustomElements(); - await defineCustomElements(); } }; }; diff --git a/packages/core/.eslintignore b/packages/core/.eslintignore new file mode 100644 index 0000000000..68102d276f --- /dev/null +++ b/packages/core/.eslintignore @@ -0,0 +1,3 @@ +playwright-ct.config.ts +playwright.config.ts +stencil.config.ts diff --git a/packages/core/component-doc.json b/packages/core/component-doc.json index c84991159e..d358e5947e 100644 --- a/packages/core/component-doc.json +++ b/packages/core/component-doc.json @@ -2,8 +2,8 @@ "timestamp": "", "compiler": { "name": "@stencil/core", - "version": "4.13.0", - "typescriptVersion": "5.4.2" + "version": "4.18.3", + "typescriptVersion": "5.4.5" }, "components": [ { diff --git a/packages/documentation/static/code-runtime/html/src/main.js b/packages/documentation/static/code-runtime/html/src/main.js index e49856c16d..9dc5853f03 100644 --- a/packages/documentation/static/code-runtime/html/src/main.js +++ b/packages/documentation/static/code-runtime/html/src/main.js @@ -6,10 +6,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import '@siemens/ix/dist/siemens-ix/siemens-ix.css'; -import { applyPolyfills, defineCustomElements } from '@siemens/ix/loader'; + +import { defineCustomElements } from '@siemens/ix/loader'; +import './styles/global.css'; (async () => { - await applyPolyfills(); - await defineCustomElements(); + defineCustomElements(); })(); diff --git a/packages/html-test-app/src/main.js b/packages/html-test-app/src/main.js index 582a9dcf16..9a17961cb5 100644 --- a/packages/html-test-app/src/main.js +++ b/packages/html-test-app/src/main.js @@ -6,11 +6,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import '@siemens/ix/dist/siemens-ix/siemens-ix.css'; -import { applyPolyfills, defineCustomElements } from '@siemens/ix/loader'; -(async () => { - await applyPolyfills(); - await defineCustomElements(); +import { defineCustomElements } from '@siemens/ix/loader'; +import 'example-styles/dist/global.css'; +(async () => { + defineCustomElements(); })(); diff --git a/packages/html-test-app/src/preview-examples/init.js b/packages/html-test-app/src/preview-examples/init.js index 749d8bf361..be2594846a 100644 --- a/packages/html-test-app/src/preview-examples/init.js +++ b/packages/html-test-app/src/preview-examples/init.js @@ -8,8 +8,8 @@ */ import '@siemens/ix-aggrid/dist/ix-aggrid/ix-aggrid.css'; import { defineCustomElements as ixIconsDefineCustomElements } from '@siemens/ix-icons/loader'; -import '@siemens/ix/dist/siemens-ix/siemens-ix.css'; -import { applyPolyfills, defineCustomElements } from '@siemens/ix/loader'; +import { defineCustomElements } from '@siemens/ix/loader'; +import 'example-styles/dist/global.css'; import './placeholder-logo'; function loadAdditionalTheme() { @@ -69,9 +69,8 @@ function setBodySizes() { } (async function init() { - await applyPolyfills(); await ixIconsDefineCustomElements(); - await defineCustomElements(); + defineCustomElements(); detectThemeSwitching(); setBodySizes(); diff --git a/packages/vue/src/plugin.ts b/packages/vue/src/plugin.ts index a4b2a5449d..3bf54345ee 100644 --- a/packages/vue/src/plugin.ts +++ b/packages/vue/src/plugin.ts @@ -1,10 +1,8 @@ -import { applyPolyfills, defineCustomElements } from '@siemens/ix/loader'; +import { defineCustomElements } from '@siemens/ix/loader'; import { Plugin } from 'vue'; export const ixPlugin: Plugin = { async install() { - applyPolyfills().then(() => { - defineCustomElements(); - }); + defineCustomElements(); }, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1979744f2f..032d544af1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -282,7 +282,7 @@ importers: version: 2.11.8 '@stencil/core': specifier: ^4.13.0 - version: 4.13.0 + version: 4.18.3 '@types/luxon': specifier: ^3.3.7 version: 3.3.7 @@ -307,19 +307,19 @@ importers: version: 0.7.1(@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(@typescript-eslint/parser@6.18.1(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-react@7.33.2(eslint@8.56.0))(eslint@8.56.0)(typescript@5.3.3) '@stencil-community/postcss': specifier: ^2.2.0 - version: 2.2.0(@stencil/core@4.13.0) + version: 2.2.0(@stencil/core@4.18.3) '@stencil/angular-output-target': specifier: ^0.8.3 - version: 0.8.3(@stencil/core@4.13.0) + version: 0.8.3(@stencil/core@4.18.3) '@stencil/react-output-target': specifier: ^0.5.3 - version: 0.5.3(@stencil/core@4.13.0) + version: 0.5.3(@stencil/core@4.18.3) '@stencil/sass': specifier: ^3.0.8 - version: 3.0.8(@stencil/core@4.13.0) + version: 3.0.8(@stencil/core@4.18.3) '@stencil/vue-output-target': specifier: ^0.8.7 - version: 0.8.7(@stencil/core@4.13.0) + version: 0.8.7(@stencil/core@4.18.3) '@testing-library/dom': specifier: ^8.11.0 version: 8.20.1 @@ -3282,8 +3282,8 @@ packages: engines: {node: '>=14.10.0', npm: '>=6.0.0'} hasBin: true - '@stencil/core@4.13.0': - resolution: {integrity: sha512-gg+gtBWekQ08mDja8GVAUHNu+rrFhQaKZDvfhnS3l/5JbYiJddTimuDPPhuc0sR0JZL1iRdJTJSa+JbvmnQ1cQ==} + '@stencil/core@4.18.3': + resolution: {integrity: sha512-8yoG5AFQYEPocVtuoc5kvRS0Hku0MoDWDUpADRaXPVHsOFLmxR16LJENj25ucCz5GEfeTGQ/tCE8JAypPmr/fQ==} engines: {node: '>=16.0.0', npm: '>=7.10.0'} hasBin: true @@ -17384,30 +17384,30 @@ snapshots: tsutils: 3.21.0(typescript@5.3.3) typescript: 5.3.3 - '@stencil-community/postcss@2.2.0(@stencil/core@4.13.0)': + '@stencil-community/postcss@2.2.0(@stencil/core@4.18.3)': dependencies: - '@stencil/core': 4.13.0 + '@stencil/core': 4.18.3 postcss: 8.4.31 - '@stencil/angular-output-target@0.8.3(@stencil/core@4.13.0)': + '@stencil/angular-output-target@0.8.3(@stencil/core@4.18.3)': dependencies: - '@stencil/core': 4.13.0 + '@stencil/core': 4.18.3 '@stencil/core@3.2.1': {} - '@stencil/core@4.13.0': {} + '@stencil/core@4.18.3': {} - '@stencil/react-output-target@0.5.3(@stencil/core@4.13.0)': + '@stencil/react-output-target@0.5.3(@stencil/core@4.18.3)': dependencies: - '@stencil/core': 4.13.0 + '@stencil/core': 4.18.3 - '@stencil/sass@3.0.8(@stencil/core@4.13.0)': + '@stencil/sass@3.0.8(@stencil/core@4.18.3)': dependencies: - '@stencil/core': 4.13.0 + '@stencil/core': 4.18.3 - '@stencil/vue-output-target@0.8.7(@stencil/core@4.13.0)': + '@stencil/vue-output-target@0.8.7(@stencil/core@4.18.3)': dependencies: - '@stencil/core': 4.13.0 + '@stencil/core': 4.18.3 '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.23.7)': dependencies: