patternfly-elements icon indicating copy to clipboard operation
patternfly-elements copied to clipboard

chore: update dependencies

Open bennypowers opened this issue 3 years ago • 2 comments
trafficstars

Updates many dependencies

bennypowers avatar Aug 16 '22 12:08 bennypowers

🦋 Changeset detected

Latest commit: 61ab08839cedf6c118cc7f574df05430ac453352

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@patternfly/pfe-core Patch
@patternfly/pfe-styles Patch
@patternfly/pfe-accordion Patch
@patternfly/pfe-autocomplete Patch
@patternfly/pfe-avatar Patch
@patternfly/pfe-badge Patch
@patternfly/pfe-band Patch
@patternfly/pfe-button Patch
@patternfly/pfe-card Patch
@patternfly/pfe-clipboard Patch
@patternfly/pfe-codeblock Patch
@patternfly/pfe-collapse Patch
@patternfly/pfe-cta Patch
@patternfly/pfe-datetime Patch
@patternfly/pfe-dropdown Patch
@patternfly/pfe-health-index Patch
@patternfly/pfe-icon Patch
@patternfly/pfe-icon-panel Patch
@patternfly/pfe-jump-links Patch
@patternfly/pfe-label Patch
@patternfly/pfe-markdown Patch
@patternfly/pfe-modal Patch
@patternfly/pfe-number Patch
@patternfly/pfe-page-status Patch
@patternfly/pfe-primary-detail Patch
@patternfly/pfe-progress-indicator Patch
@patternfly/pfe-progress-steps Patch
@patternfly/pfe-readtime Patch
@patternfly/pfe-select Patch
@patternfly/pfe-tabs Patch
@patternfly/pfe-toast Patch
@patternfly/pfe-tooltip Patch
@patternfly/create-element Patch
@patternfly/eslint-config-elements Patch
netlify-plugin-github-actions Patch
@patternfly/pfe-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Aug 16 '22 12:08 changeset-bot[bot]

Deploy Preview for patternfly-elements ready!

Name Link
Latest commit f38bc93aaffd4b961de65bf83b09c3de0cf2ed70
Deploy Preview https://deploy-preview-2097--patternfly-elements.netlify.app/

_To edit notification comments on pull requests, go to your Netlify site settings.

github-actions[bot] avatar Aug 16 '22 13:08 github-actions[bot]

@bennypowers

On fresh install when loading label demo.

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "pfe-button" has already been used with this registry
    at http://localhost:8001/node_modules/@lit/reactive-element/decorators/custom-element.js:6:80
    at http://localhost:8001/node_modules/@lit/reactive-element/decorators/custom-element.js:6:100
    at a (http://localhost:8001/elements/pfe-label/node_modules/@patternfly/pfe-button/pfe-button.js:5:42)
    at http://localhost:8001/elements/pfe-label/node_modules/@patternfly/pfe-button/pfe-button.js:42:266

Also primary-detail.

Digging into to find why this is only on a couple of components.

zeroedin avatar Aug 18 '22 15:08 zeroedin

Also primary-detail.

Correction primary detail looks to be a seperate issue with the demo/pfe-primary-detail.js:

Error while transforming elements/pfe-primary-detail/demo/pfe-primary-detail.js: Top-level await is not available in the configured target environment ("es2020")

   5 | const root = document.querySelector('[data-demo="pfe-primary-detail"]')?.shadowRoot ?? document;
   6 |
>  7 | await Promise.all(Array.from(root.querySelectorAll('pfe-primary-detail'), x => x.updateComplete));
   8 |
   9 | root.addEventListener('change', event => {
  10 |   if (event instanceof PrimaryDetailChangeEvent) {

Commenting out line 7 and the demo seems to load correctly and the events seem to fire ok, not sure that line is needed.

Update: This also seems to be happening on the main branch so can fix it outside this PR.

zeroedin avatar Aug 18 '22 18:08 zeroedin

lightdom.css also doesn't appear to be loading for the components that have it linked in their demos:

GET http://localhost:8000/elements/pfe-primary-detail/pfe-primary-detail--lightdom.min.css net::ERR_ABORTED 404 (Not Found)
GET http://localhost:8000/elements/pfe-card/pfe-card--lightdom.min.css net::ERR_ABORTED 404 (Not Found)
GET http://localhost:8000/elements/pfe-cta/pfe-cta--lightdom.min.css net::ERR_ABORTED 404 (Not Found)

Update: This also seems to be happening on the main branch so can fix it outside this PR.

Update number 2: Fix for this seems to be:

  1. fix the build:lightdom npm script for each component, removing extra - before lightdom suffix and also remove the .min in the extension for the generated file. This throws off the dev-server router.
  2. fix the <link> in the demo .html files to the correct output name eg pfe-primary-detail-lightdom.css
  3. run npm build:lightdom
  4. profit

zeroedin avatar Aug 18 '22 18:08 zeroedin

Ran the tests locally and everything looked good from my end, all the components built and looked correct on their docs pages. @zeroedin - Can you confirm whether or not clearing node_modules & running npm run clean:nuke and then reinstalling helps clear some of those issues you were seeing? That's what I ran on mine and it built afterwards

brianferry avatar Aug 19 '22 17:08 brianferry

Ran the tests locally and everything looked good from my end, all the components built and looked correct on their docs pages. @zeroedin - Can you confirm whether or not clearing node_modules & running npm run clean:nuke and then reinstalling helps clear some of those issues you were seeing? That's what I ran on mine and it built afterwards

Yes ran it several times yesterday and just for brevity again after you asked:

Here is what pfe-label demo looks like:

Screen Shot 2022-08-19 at 3 14 40 PM

Here is the error:

image

This was after:

git fetch
git checkout chore/dependencies/august-2022
git reset --hard origin/chore/dependencies/august-2022
git clean -fdx
nvm use
npm ci
npm start

zeroedin avatar Aug 19 '22 19:08 zeroedin

@zeroedin please check again

bennypowers avatar Aug 22 '22 13:08 bennypowers

@bennypowers pfe-autocomplete also has a dependency on pfe-button, we should add it to it's package.json as well. Otherwise this looks good to go.

zeroedin avatar Aug 22 '22 15:08 zeroedin

@zeroedin let's do that in a new PR

bennypowers avatar Aug 22 '22 16:08 bennypowers