diff --git a/.changeset/breezy-steaks-melt.md b/.changeset/breezy-steaks-melt.md new file mode 100644 index 0000000000..71a9fd57fb --- /dev/null +++ b/.changeset/breezy-steaks-melt.md @@ -0,0 +1,5 @@ +--- +"@patternfly/pfe-label": patch +--- + +Fix label style loading diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 815d8c4c6d..c6aac1d4d5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -120,6 +120,10 @@ jobs: id: build run: npm run build + - name: Release Dry Run + id: release-dry + run: npm run prepublishOnly -ws --if-present + # Upload compiled assets to make them available for downstream jobs - name: Upload artifacts uses: actions/upload-artifact@v2 diff --git a/elements/pfe-icon/demo/pfe-icon.js b/elements/pfe-icon/demo/pfe-icon.js index 9197ac59a5..63189fb948 100644 --- a/elements/pfe-icon/demo/pfe-icon.js +++ b/elements/pfe-icon/demo/pfe-icon.js @@ -1,6 +1,8 @@ import '@patternfly/pfe-icon'; import '@patternfly/pfe-tooltip'; -import '@patternfly/pfe-button'; +// TS6202: Project references may not form a circular graph. +// import '@patternfly/pfe-button'; +import('@patternfly' + '/' + 'pfe-button'); import '@patternfly/pfe-autocomplete'; import { iconSets } from '@patternfly/pfe-tools/environment.js'; import { render, html } from 'lit'; diff --git a/elements/pfe-icon/pfe-icon.ts b/elements/pfe-icon/pfe-icon.ts index 5d340a8dfb..3324d011f7 100644 --- a/elements/pfe-icon/pfe-icon.ts +++ b/elements/pfe-icon/pfe-icon.ts @@ -67,7 +67,7 @@ export class PfeIcon extends LitElement { private static getters = new Map(); - private static instances = new Set(); + private static instances = new Set(); /** Icon set */ @property() set = PfeIcon.defaultIconSet; diff --git a/elements/pfe-icon/tsconfig.json b/elements/pfe-icon/tsconfig.json index 2072bf4071..3569d20e6f 100644 --- a/elements/pfe-icon/tsconfig.json +++ b/elements/pfe-icon/tsconfig.json @@ -4,7 +4,11 @@ "./**/*" ], "exclude": [ - "./icons/**/*.js" + "./icons/**/*.js", + "./demo/pfe-icon.js", + "./demo/custom-icon-sets.js", + "./test/rh-icon*.js", + "./custom-elements-manifest.config.js" ], "compilerOptions": { "module": "esnext", @@ -22,9 +26,6 @@ { "path": "../pfe-tooltip" }, - { - "path": "../pfe-button" - }, { "path": "../pfe-autocomplete" } diff --git a/elements/pfe-label/pfe-label.ts b/elements/pfe-label/pfe-label.ts index 689032535d..e65009763a 100644 --- a/elements/pfe-label/pfe-label.ts +++ b/elements/pfe-label/pfe-label.ts @@ -96,7 +96,7 @@ import styles from './pfe-label.scss'; export class PfeLabel extends BaseLabel { static readonly version = '{{version}}'; - static readonly styles = [BaseLabel.styles, styles]; + static readonly styles = [...BaseLabel.styles, styles]; static readonly shadowRootOptions: ShadowRootInit = { ...BaseLabel.shadowRootOptions, delegatesFocus: true }; diff --git a/elements/pfe-label/test/pfe-label.spec.ts b/elements/pfe-label/test/pfe-label.spec.ts index 0414ee23e5..83c50cd143 100644 --- a/elements/pfe-label/test/pfe-label.spec.ts +++ b/elements/pfe-label/test/pfe-label.spec.ts @@ -39,8 +39,8 @@ describe('', function() { // replace the default built-in icon set resolveIconName function // with one that loads local icons. we don't want tests dependent on // prod servers. - PfeIcon.addIconSet('rh', '', function(name: string) { - return `/elements/pfe-icon/test/${name.replace('rh', 'rh-icon')}.svg`; + PfeIcon.addIconSet('rh', function(name: string) { + return new URL(`/elements/pfe-icon/test/${name.replace('rh', 'rh-icon')}.svg`); }); });