diff --git a/.changeset/tidy-numbers-rush.md b/.changeset/tidy-numbers-rush.md new file mode 100644 index 0000000000..b9a577a12c --- /dev/null +++ b/.changeset/tidy-numbers-rush.md @@ -0,0 +1,10 @@ +--- +"@patternfly/pfe-tools": patch +"@patternfly/pfe-core": patch +"@patternfly/elements": patch +--- + +"@patternfly/elements": major +--- + +Update dependencies, including Lit version 3 diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index d55f9c2649..7d6949adad 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' cache: npm - name: Bundle diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 64543539cf..915c5b4e41 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' cache: npm - name: Verify JSPM URL diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 658389c19d..0685fc84c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' cache: npm - run: npm ci --prefer-offline diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2fcacb44ac..d00b424a18 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,9 +40,8 @@ jobs: # steps: # - name: Debugging context variables # run: echo "$GITHUB_CONTEXT" - - test: - name: Run test suite (Web Test Runner) + lint: + name: Lint files runs-on: ubuntu-latest steps: - name: Checkout repository @@ -52,7 +51,7 @@ jobs: - name: Configure node version uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' cache: npm - name: Install dependencies @@ -62,13 +61,32 @@ jobs: id: lint run: npm run lint + + test: + name: Run test suite (Web Test Runner) + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Configures the node version used on GitHub-hosted runners + - name: Configure node version + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: npm + + - name: Install dependencies + run: npm ci --prefer-offline + + - name: install playwright + run: npx playwright install + - name: Run tests run: npm test - if: ${{ always() }} - name: JUnit Report Action uses: mikepenz/action-junit-report@v2.8.2 - if: ${{ always() }} with: report_paths: test-results/test-results.xml fail_on_failure: true # fail the actions run if the tests failed @@ -79,10 +97,8 @@ jobs: strategy: matrix: node: - - '18' - - '19' - # https://github.com/TypeStrong/ts-node/issues/1997 - # - '20' + - '20' + - '21' if: | github.event_name == 'workflow_dispatch' || github.event_name == 'push' @@ -126,8 +142,9 @@ jobs: validate: name: Validate successful build on main needs: - - build + - lint - test + - build if: ${{ always() }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml index 36bac55fca..db55b2b814 100644 --- a/.github/workflows/visual-regression.yml +++ b/.github/workflows/visual-regression.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' cache: npm - run: npm ci --prefer-offline diff --git a/.nvmrc b/.nvmrc index e44a38e080..790e1105f2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.12.1 +v20.10.0 diff --git a/core/pfe-core/package.json b/core/pfe-core/package.json index 3180309240..70b0af951b 100644 --- a/core/pfe-core/package.json +++ b/core/pfe-core/package.json @@ -51,8 +51,8 @@ "test": "wtr --files './test/*.spec.ts' --config ../../web-test-runner.config.js" }, "dependencies": { - "@floating-ui/dom": "^1.2.6", - "lit": "^2.7.2" + "@floating-ui/dom": "^1.5.3", + "lit": "^3.1.0" }, "repository": { "type": "git", diff --git a/docs/_data/importMap.cjs b/docs/_data/importMap.cjs index 4334cadce2..5a5d8a941e 100644 --- a/docs/_data/importMap.cjs +++ b/docs/_data/importMap.cjs @@ -1,8 +1,6 @@ const fs = require('fs'); const path = require('path'); -const { promisify } = require('node:util'); -const Glob = require('glob'); -const glob = promisify(Glob); +const { glob } = require('glob'); const packageLock = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package-lock.json'))); @@ -46,12 +44,17 @@ const LIT_DEPS = [ './decorators.js', './directive.js', './directive-helpers.js', - './experimental-hydrate-support.js', - './experimental-hydrate.js', './html.js', './polyfill-support.js', './static-html.js', ] + }, + { + target: `@lit-labs/ssr-client`, + subpaths: [ + '.', + './lit-element-hydrate-support.js', + ] } ]; @@ -69,7 +72,7 @@ module.exports = async function() { const { Generator } = await import('@jspm/generator'); const generator = new Generator({ - defaultProvider: 'jspm', + defaultProvider: 'jspm.io', env: ['production', 'browser', 'module'] }); diff --git a/docs/_plugins/create-import-map.cjs b/docs/_plugins/create-import-map.cjs index 301e515df9..c235d7df5a 100644 --- a/docs/_plugins/create-import-map.cjs +++ b/docs/_plugins/create-import-map.cjs @@ -3,7 +3,7 @@ module.exports = function(eleventyConfig) { const { Generator } = await import('@jspm/generator'); const generator = new Generator({ - defaultProvider: 'jspm', + defaultProvider: 'jspm.io', env: ['production', 'browser', 'module'] }); diff --git a/docs/docs/develop/import-maps.md b/docs/docs/develop/import-maps.md index 965f0ad4a4..9a823df0e3 100644 --- a/docs/docs/develop/import-maps.md +++ b/docs/docs/develop/import-maps.md @@ -65,18 +65,18 @@ Once you've generated your import map and added it to your project, you can use ``` diff --git a/elements/package.json b/elements/package.json index 014d929f90..a5138b48f1 100644 --- a/elements/package.json +++ b/elements/package.json @@ -126,14 +126,14 @@ "Mark Caron (https://github.com/markcaron)", "Michael Clayton ", "Michael Potter", - "Steven Spriggs ", "castastrophe (https://github.com/castastrophe)", "Wes Ruvalcaba" ], "dependencies": { "@patternfly/icons": "^1.0.2", - "@patternfly/pfe-core": "^2.4.0", - "lit": "2.6.1", - "tslib": "^2.4.1" + "@patternfly/pfe-core": "^2.4.1", + "lit": "^3.1.0", + "tslib": "^2.6.2" } } diff --git a/elements/pf-avatar/test/pf-avatar.spec.ts b/elements/pf-avatar/test/pf-avatar.spec.ts index e9f78c958b..160b67b0e6 100644 --- a/elements/pf-avatar/test/pf-avatar.spec.ts +++ b/elements/pf-avatar/test/pf-avatar.spec.ts @@ -39,7 +39,7 @@ describe('', function() { beforeEach(async function() { element = await createFixture(html``); setTimeout(() => element.src = datauri); - await oneEvent(element, 'load'); + await oneEvent(element, 'load', false); }); it('loads the image', function() { expect(loaded).to.equal(datauri); diff --git a/elements/pf-button/BaseButton.ts b/elements/pf-button/BaseButton.ts index d1cada1120..801c21614b 100644 --- a/elements/pf-button/BaseButton.ts +++ b/elements/pf-button/BaseButton.ts @@ -1,3 +1,5 @@ +// we will shortly remove this file in #2631 +/* eslint-disable lit-a11y/no-aria-slot */ import type { TemplateResult } from 'lit'; import { LitElement, html } from 'lit'; import { property } from 'lit/decorators/property.js'; diff --git a/elements/pf-icon/test/pf-icon.spec.ts b/elements/pf-icon/test/pf-icon.spec.ts index f02f373d7f..9ee4257ed3 100644 --- a/elements/pf-icon/test/pf-icon.spec.ts +++ b/elements/pf-icon/test/pf-icon.spec.ts @@ -11,7 +11,7 @@ describe('', function() { let element: PfIcon; async function expectIconsEqual(actualIconUrl: URL) { - await oneEvent(element, 'load'); + await oneEvent(element, 'load', false); const tpl = await import(actualIconUrl.pathname).then(x => x.default); const rootNode = render(tpl, document.createDocumentFragment()); const actual = element.shadowRoot?.querySelector('svg'); @@ -76,7 +76,7 @@ describe('', function() { element.innerHTML = `

Icon failed to load.

`; // Check that the fallback is hidden when the icon is successfully loaded element.icon = 'bike'; - await oneEvent(element, 'load'); + await oneEvent(element, 'load', false); expect(element).shadowDom.to.equal(`