Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversion to PropFnInterface #5363

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

maiieul
Copy link
Collaborator

@maiieul maiieul commented Oct 27, 2023

…on to PropFnInterface

fix #4946

Overview

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

Added a condition to PropFunctionProps to prevent it from transforming standalone undefined, null, never, into PropFnInterface<unknown[], unknown>.

This mostly fixes ts issues with tags and similar self-closing tags which have a children: undefined attribute mismatching the component$ children prop as explained in #4946, but it could also prevent issues with other props that are of the form prop: null or prop: never.

Examples and manual tests:

Let's define a sample object

type SampleObject = {
  numProp: number | undefined;
  strProp: string | null;
  boolProp: boolean | never;
  nullProp: null;
  undefinedProp: undefined;
  neverProp: never;
  anyProp: any;
  unknownProp: unknown;
  funcProp: (x: number, y: string) => boolean;
};

And apply the PropFunctionProps transforms to it

type TransformedSampleObject = PropFunctionProps<SampleObject>;

With the current version of PropFunctionProps

export type PropFunctionProps<PROPS extends {}> = {
  [K in keyof PROPS]: NonNullable<PROPS[K]> extends (...args: infer ARGS) => infer RET
    ? PropFnInterface<ARGS, Awaited<RET>>
    : PROPS[K];
};

TransformedSampleObject will become

type TransformedSampleObject = {
    numProp: number | undefined;
    strProp: string | null;
    boolProp: boolean | never;
    nullProp: PropFnInterface<unknown[], unknown>;
    undefinedProp: PropFnInterface<unknown[], unknown>;
    neverProp: PropFnInterface<unknown[], unknown>;
    anyProp: any;
    unknownProp: unknown;
    funcProp: PropFnInterface<[x: number, y: string], boolean>;
}

But with my proposed changes,

/** @public */
export type PropFunctionProps<PROPS extends {}> = {
  [K in keyof PROPS]: PROPS[K] extends null | undefined | never
    ? PROPS[K]
    : NonNullable<PROPS[K]> extends (...args: infer ARGS) => infer RET
    ? PropFnInterface<ARGS, Awaited<RET>>
    : PROPS[K];
};

it will be

type TransformedSampleObject = {
    numProp: number | undefined;
    strProp: string | null;
    boolProp: boolean | never;
    nullProp: null;
    undefinedProp: undefined;
    neverProp: never;
    anyProp: any;
    unknownProp: unknown;
    funcProp: PropFnInterface<[x: number, y: string], boolean>;
}

I have tested this with more complex types and only standalone undefined, null, never seem to be affected by this change. They will stay what they are instead of becoming PropFnInterface<unknown[], unknown>

Explanation

If my understanding is correct, @manucorporat added PropFunctionProps in #4088 to remove the need to use PropFunction for creating custom async events.

To do that, NonNullable seems to be required to attach PropFnInterface<ARGS, RET> to custom events, which I guess is required for the optimizer to turn the event into a lazy-loadable and importable symbol.

The problem is that NonNullable will also convert standalone undefined and null to never which is a subtype of all types and therefore passes the NonNullable<PROPS[K]> extends (...args: infer ARGS) => infer RET condition, thus transforming undefined, null, and never to PropFnInterface<unknown[], unknown>.

Use cases and why

    1. One use case
    1. Another use case

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@netlify
Copy link

netlify bot commented Oct 27, 2023

👷 Deploy request for qwik-insights pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ff47022

@maiieul maiieul marked this pull request as draft October 28, 2023 04:54
@maiieul
Copy link
Collaborator Author

maiieul commented Oct 28, 2023

Actually changed the type def to

export type PropFunctionProps<PROPS extends {}> = {
  [K in keyof PROPS]: PROPS[K] extends undefined
    ? PROPS[K]
    : PROPS[K] extends ((...args: infer ARGS) => infer RET) | undefined
    ? PropFnInterface<ARGS, Awaited<RET>>
    : PROPS[K];
};

I now think NonNullable was used to apply the transformation even on optional props for custom events.

This new type definition will achieve the same purpose with a bit less code and potentially prevent bugs for some edge cases.

Examples

type SampleObject = {
  func?: (x: number, y: string) => boolean;
  nestedFunc?: (arg: { a: number; b: number }) => { result: boolean };
  null: null;
  undefined: undefined;
  never: never;
  str: string | null | undefined | never;
};

will be converted to

type TransformedSampleObject = {
    func?: PropFnInterface<[x: number, y: string], boolean> | undefined;
    nestedFunc?: PropFnInterface<[arg: {
        a: number;
        b: number;
    }], {
        result: boolean;
    }> | undefined;
    null: null;
    undefined: undefined;
    never: never;
    str: string | null | undefined | never;
 }

Which is what we want.

While with the current NonNullable version it would have produced

type TransformedSampleObject = {
    func?: PropFnInterface<[x: number, y: string], boolean> | undefined;
    nestedFunc?: PropFnInterface<[arg: {
       a: number;
       b: number;
   }], {
       result: boolean;
   }> | undefined;
   null: PropFnInterface<unknown[], unknown>;
   undefined: PropFnInterface<...>;
   never: PropFnInterface<...>;
   str: string | null | undefined | never;
}

How it works

If the type is standalone undefined, it remains undefined.

Otherwise, if the type is a function (even optional), it will transform the function to PropFnInterface<ARGS, Awaited>.


Would be great to get @manucorporat confirmation on this, since he is the one who wrote the code in the first place 😜

@maiieul maiieul marked this pull request as ready for review October 28, 2023 07:39
@mhevery mhevery changed the title fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversi… fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversion to PropFnInterface Oct 31, 2023
@mhevery
Copy link
Contributor

mhevery commented Oct 31, 2023

I have added types tests, and they in 6a64b05, and they seem to be failing. Could you have a look?

@maiieul
Copy link
Collaborator Author

maiieul commented Nov 1, 2023

Hi Misko 👋,

Had a look at your tests.

They would have been failing as well with the previous version of PropFunctionProps.

So I refined your tests in the following way:

  • I had to replace HTMLAttributes<HTMLInputElement> by InputHTMLAttributes<HTMLInputElement> to make them work. I believe this is the correct way to type input elements with the generated JSX.
  • Removed Input0 test, as a component needs to be typed in order to prevent typescript from yelling when reusing the component with props as in <Input0 value="0" /> (here the value prop wasn't defined in the component definition).
  • Added Input6 with QwikIntrinsicElements['input'].

The tests with this version pass but they would have failed with the previous version.

@zanettin zanettin added STATUS-2: PR waiting for review This PR is waiting for review and approval before merge COMP: typing labels Nov 5, 2023
@mhevery mhevery merged commit 665b800 into QwikDev:main Nov 10, 2023
20 checks passed
kodiakhq bot pushed a commit to ascorbic/unpic-img that referenced this pull request Nov 19, 2023
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@builder.io/qwik](https://qwik.builder.io/) ([source](https://togithub.com/BuilderIO/qwik)) | [`1.2.17` -> `1.2.18`](https://renovatebot.com/diffs/npm/@builder.io%2fqwik/1.2.17/1.2.18) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@builder.io%2fqwik/1.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@builder.io%2fqwik/1.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@builder.io%2fqwik/1.2.17/1.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@builder.io%2fqwik/1.2.17/1.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>BuilderIO/qwik (@&#8203;builder.io/qwik)</summary>

### [`v1.2.18`](https://togithub.com/BuilderIO/qwik/releases/tag/v1.2.18)

[Compare Source](https://togithub.com/BuilderIO/qwik/compare/v1.2.17...v1.2.18)

#### What's Changed

-   fix(insight): use relative path by [@&#8203;intellix](https://togithub.com/intellix) in [QwikDev/qwik#5399
-   docs: Update media page with new YouTube video links by [@&#8203;hamatoyogi](https://togithub.com/hamatoyogi) in [QwikDev/qwik#5401
-   chore(starters): add VSCode debug setting by [@&#8203;gioboa](https://togithub.com/gioboa) in [QwikDev/qwik#5408
-   docs(integrations): astro integration docs by [@&#8203;thejackshelton](https://togithub.com/thejackshelton) in [QwikDev/qwik#5409
-   docs(menu): Add Astro integration to menu by [@&#8203;hamatoyogi](https://togithub.com/hamatoyogi) in [QwikDev/qwik#5410
-   chore(docs): update node integration page by [@&#8203;ptz0n](https://togithub.com/ptz0n) in [QwikDev/qwik#5413
-   fix(qwik-city): vercel adapter default to `webworker` target by [@&#8203;mpeg](https://togithub.com/mpeg) in [QwikDev/qwik#5414
-   docs: correct broken image by [@&#8203;mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#5415
-   docs(astro): Qwik + Astro doc improvements by [@&#8203;steve8708](https://togithub.com/steve8708) in [QwikDev/qwik#5416
-   fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversion to PropFnInterface by [@&#8203;maiieul](https://togithub.com/maiieul) in [QwikDev/qwik#5363
-   fix(qwik-city): better type for svg?jsx imports by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5420
-   fix(qwik-city): fix rendered svg?jsx component closing tag by [@&#8203;riccardoperra](https://togithub.com/riccardoperra) in [QwikDev/qwik#5423
-   fix: cache max-age vite.config for dev mode by [@&#8203;VarPDev](https://togithub.com/VarPDev) in [QwikDev/qwik#5427
-   fix(cli): casing for component and mdx route creation by [@&#8203;sidmohanty11](https://togithub.com/sidmohanty11) in [QwikDev/qwik#5430
-   docs: fix broken image by [@&#8203;mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#5432
-   docs: fixed small typo by [@&#8203;daniela-bonvini](https://togithub.com/daniela-bonvini) in [QwikDev/qwik#5434
-   docs: add missing contributors by [@&#8203;gioboa](https://togithub.com/gioboa) in [QwikDev/qwik#5435
-   fix: 3rd party imports of libs during build by [@&#8203;shairez](https://togithub.com/shairez) in [QwikDev/qwik#5431
-   fix(docs): improve SEO by [@&#8203;Stahlwalker](https://togithub.com/Stahlwalker) in [QwikDev/qwik#5439
-   feat(core): auto px addition to css properties for unitless numbers by [@&#8203;sidmohanty11](https://togithub.com/sidmohanty11) in [QwikDev/qwik#5426
-   docs: Add link to create new Qwik Insights app as self-serve by [@&#8203;mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#5443
-   fix: Pass the missing props for Spinner component by [@&#8203;JohnPremKumar](https://togithub.com/JohnPremKumar) in [QwikDev/qwik#5437
-   fix: Wrap function in cleanup function instead of returning it by [@&#8203;thasmo](https://togithub.com/thasmo) in [QwikDev/qwik#5440
-   fix(docs): typo in qwikcity -> Validator docs by [@&#8203;harishkrishnan24](https://togithub.com/harishkrishnan24) in [QwikDev/qwik#5444
-   fix(docs): typo in qwik city -> middleware page by [@&#8203;harishkrishnan24](https://togithub.com/harishkrishnan24) in [QwikDev/qwik#5446
-   fix(docs): update links for Edit this page button by [@&#8203;harishkrishnan24](https://togithub.com/harishkrishnan24) in [QwikDev/qwik#5445
-   chore: 1.2.18 by [@&#8203;mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#5449

#### New Contributors

-   [@&#8203;ptz0n](https://togithub.com/ptz0n) made their first contribution in [QwikDev/qwik#5413
-   [@&#8203;riccardoperra](https://togithub.com/riccardoperra) made their first contribution in [QwikDev/qwik#5423
-   [@&#8203;VarPDev](https://togithub.com/VarPDev) made their first contribution in [QwikDev/qwik#5427
-   [@&#8203;sidmohanty11](https://togithub.com/sidmohanty11) made their first contribution in [QwikDev/qwik#5430
-   [@&#8203;daniela-bonvini](https://togithub.com/daniela-bonvini) made their first contribution in [QwikDev/qwik#5434
-   [@&#8203;Stahlwalker](https://togithub.com/Stahlwalker) made their first contribution in [QwikDev/qwik#5439
-   [@&#8203;JohnPremKumar](https://togithub.com/JohnPremKumar) made their first contribution in [QwikDev/qwik#5437
-   [@&#8203;thasmo](https://togithub.com/thasmo) made their first contribution in [QwikDev/qwik#5440

**Full Changelog**: QwikDev/qwik@v1.2.17...v1.2.18

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9pm on sunday" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ascorbic/unpic-img).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
mhevery added a commit that referenced this pull request Dec 7, 2023
* add created/updated date to docs frontmatter

* read the frontmatter (#1)

* feat: show updated docs

showing the updated docs with a circle next to the title, in this commit I added the circles.

* chore(docs): remove warnings (#5345)

* style(eslint): convey a stricter restriction from `just` to `only` (examples) (#5340)

* feat(vite): allow disabling dev SSR server in vite (#5347)

* chore(docs): Small fix of file to edit (#5348)

* docs: Update index.mdx (#5351)

* Update index.mdx

Correct mistake. The original was:

Both pages are created by adding ...

Changed to:

 Pages are created by adding ...

* trigger GH checks

---------

Co-authored-by: gioboa <giorgiob.boa@gmail.com>

* fix: action redirect accidentally stripped searchparams (#5349)

Fix #5342

* fix: remove cf pages stream polyfill (#5352)

* chore: updated twitter logo to X (#5357)

* docs: update React cheat sheet title (#5358)

* 1.2.15 (#5359)

* docs: improve SEO with descriptions (#5360)

* fix(cli): parseTemplatePath doesn't work in windows (#5339)

* fix(cli) parseTemplatePath doesn't work in windows

* refactor use path.sep

---------

Co-authored-by: Yale <yale.yu@kuka.com>

* docs: fix typo (#5361)

* chore(qwik-insights): use clientOutDir if provided (#5366)

* docs: remove soundy.cloud (#5374)

* chore: clean up release script (#5376)

* fix(qwik): Incorrect module reference in inlinedQrl (#5375)

* fix(qwik): Incorrect module reference in inlinedQrl

Fix #5368

* fixup! fix(qwik): Incorrect module reference in inlinedQrl

* docs: Alex Russell Approved javascript framework (#5364)

* docs: Alex Russell Approved

Alex Russell Approved JavaScript framework

* docs(faq): wording

* chore: improved README.md for build artifacts (#5377)

* fix(qwik-city): parseBody should not clone Request (#5353)

fix(qwik-city): parseBody should not clone requests

* docs(eslint-rules): refactor use-method-usage to reflect current qwik… (#5344)

* docs(eslint-rules): refactor use-method-usage to reflect current qwik API

* refactored unit tests

* re-add TSAsExpression

* word change: just -> only, to reflect latest PR

---------

Co-authored-by: Miško Hevery <misko@hevery.com>

* fix: Yarn 3/4 PnP compatibility (#5042)

* CI

* revert

---------

Co-authored-by: Roman Zanettin <roman.zanettin@gmail.com>

* Revert "refactor(optimizer): remove using resolvePackageData API from Vite" (#5379)

Revert "refactor(optimizer): remove using resolvePackageData API from Vite (#5312)"

This reverts commit ec53ef7.

* docs: update Alex Russell (#5381)

* chore: 1.2.16 (#5382)

* fix(labs): Better handling and visibility of q-insights.json (#5384)

* feat(insights): Add new route visibility (#5385)

* fix(vite): resolution of nested dependencies

Co-authored-by: Manu MA <manucorporat@users.noreply.github.com>

* docs: fix incorrect escaping in URL (#5387)

* fix(insights): improve files per cluster (#5388)

Increase clustering distance which should result in creation of fewer clusters.
Fewer clusters means that less files should be downloaded to the client
(each file will have more symbols.) This should improve performance.

* fix(qwik): Improve logging of vite plugin (#5389)

fix(qwik): Improve logging of vite plugin

The log now includes file location and code snippet.

* fix(core): parent component lookup during pause

the parentCtx attribute was optimized to point directly to parents with
$contexts$ defined, but that broke pausing which needs the immediate parent.

Co-authored-by: Jesse Zhang <jesse.zhang@orchard.com>

* chore: clean up docs site build warnings (#5391)

* docs: explain custom event props and detail when PropFunction is needed (#5386)

* docs: don't index demos; don't duplicate meta descriptions (#5392)

* docs: add custom 404 page (#5393)

* chore(docs): small improvements to routing/index.mdx

* refactor(package.json): add docs.dev & docs.preview

Add pnpm docs.dev & pnpm docs.preview commands to improve the DX for contributors.

* chore: 1.2.17 (#5397)

* fix(insight): use relative path (#5399)

* docs: Update media page with new YouTube video links (#5401)

Update media page with new YouTube video links

* chore(starters): add VSCode debug setting (#5408)

* docs(integrations): astro integration docs (#5409)

* docs(integrations): astro integration docs

* docs(integration): typo

* docs(docs): updated docs changes

* docs(menu): Add Astro integration to menu (#5410)

* Add Astro integration to menu

* Add description and keywords to Astro integration
page, and update contributor list.

* chore(docs): update node integration page (#5413)

Bold statement regarding `ORIGIN` env var.

* fix(qwik-city): vercel adapter default to `webworker` target (#5414)

* docs: correct broken image (#5415)

* docs(astro): Qwik + Astro doc improvements (#5416)

* Qwik astro doc improvements

* typo fix

* fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversion to PropFnInterface (#5363)

* fix(propfunctionprops): prevent 'undefined', 'null', 'never' conversion to PropFnInterface

fix #4946

* improve PropFunctionProps readability and edge-cases

* fix never becoming undefined

* fixup! fix never becoming undefined

* refine tests

---------

Co-authored-by: Miško Hevery <misko@hevery.com>

* fix(qwik-city): better type for svg?jsx imports (#5420)

* fix(qwik-city): fix rendered svg?jsx component closing tag (#5423)

* fix: fix optimized svg closing tag

* test: add svg optimizer test

* fix: cache max-age vite.config for dev mode (#5427)

* fix(cli): casing for component and mdx route creation (#5430)

* docs: fix broken image (#5432)

* docs: fixed small typo (#5434)

* docs: add missing contributors (#5435)

* fix: 3rd party imports of libs during build (#5431)

Co-authored-by: Miško Hevery <misko@hevery.com>

* fix(docs): improve SEO  (#5439)

* feat(core): auto px addition to css properties for unitless numbers (#5426)

* feat(core): auto px addition to css properties for unitless numbers

This adds support for auto-addition of 'px' to css properties

* add tests to check styles in both ssr and csr

* docs: Add link to create new Qwik Insights app as self-serve (#5443)

* fix: Pass the missing props for Spinner component (#5437)

Pass the missing props for Spinner component

As the `growing` props is missing in the bootstrap starter template `Spinner` component it is causing the issue in production build while testing after adding the bootstrap.

* fix(docs): Wrap function in cleanup function instead of returning it (#5440)

Wrap function in cleanup function instead of returning it

* fix(docs): typo in qwikcity -> Validator docs (#5444)

---------

Co-authored-by: gioboa <giorgiob.boa@gmail.com>

* fix(docs): typo in qwik city -> middleware page (#5446)

---------

Co-authored-by: gioboa <giorgiob.boa@gmail.com>

* fix(docs): update links for Edit this page button (#5445)

---------

Co-authored-by: gioboa <giorgiob.boa@gmail.com>

* chore: 1.2.18 (#5449)

* docs: Add Component library `ionic-qwik` to community projects on docs. (#5429)

Add Component library `ionic-qwik`.

* chore(docs): advanced usage of Slot, visibleTask (#5424)

chore(docs): advanced Slot, visibleTask, Context

* chore(core): update `QwikKeyboardEvent` type (#5433)

chore(core): update keyboardevent to have code attr and update deprecated attrs

* fix(docs): remove `inline-code` and `link` in tag `<a />` (#5450)

---------

Co-authored-by: wangyipeng <ffwangyipeng@chinatelecom.cn>
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>

* docs(ssg): fix shell command (#5459)

* docs(auth.js): add credentials example (#5462)

* chore: 1.2.19 (#5466)

* chore(all): Vite 5 upgrade

* chore(core): remove resolvePackageData (#5312)

* chore: pnpm api.update

* feat(playground): remove broken versions

* feat: add qwik/no-use-visible-task eslint rule (#5455)

* feat: add qwik/no-use-visible-task eslint rule
----
Co-authored-by: Matteo Pietro Dazzi <ilteoood@users.noreply.github.com>
Co-authored-by: Pasquale De Lucia <pasquale.delucia96@gmail.com>
Co-authored-by: Gloria Giannascoli <gloriag-dev@users.noreply.github.com>
Co-authored-by: pietrodev07 <pietrodev07@users.noreply.github.com>

* linter 🧽

* feat: add extra tips

* fix: change message

* docs: add missing eslint recap

* chore(insights): remove unnecessary log (#5461)

* fix: add example context to docs (#5467)

* feat(qwik-city): allow customizing SVGO options of image plugin (#5407)

* docs: fix typo

* docs: fix typo (#5481)

* fix(core): Support JSX in signals (#5442)

Fix #4966
Fix #3530

* docs(FAQ): - lazy-loading on user interaction & speculative module fetching (#5488)

docs: FAQ - lazy-loading on user interaction & speculative module fetching

* docs(faq): add link to typescript (#5487)

* fix: disable Vite modulepreload (#5493)

* fix: disable Vite modulePreload

Fixed: #5478

* chore: use cleaner option

* docs(faq): fix typos and improve the wording of some sentences (#5490)

* docs: make the distinction between module-prefetching and <Link prefetch> (#5485)

docs(module-prefetching): make the distinction between module-prefetching and <Link prefetch>

* docs(showcase): add `index.app` and `wiza.co` (#5484)

Update pages.json

* fix(docs): mdx interpreting title as component (#5499)

* docs: cleanup the vdom section (#5500)

* fix: revert "fix: remove cf pages stream polyfill" (#5502)

* fix(qwik-city): prefix ids of SVGs based on their path when loaded as qwik nodes (#5497)

Enable the prefixIds SVGO plugin by default, while still allowing customization. This is a follow up
on #5407. Here's a discussion on why it makes sense when
optimizing SVG files for the web: svg/svgo#674.

* fix: cf pages polyfill only if needed (#5507)

fix: polyfill only if needed

* refactor: extract group type

* docs: add QwikCityMockProvider explanation (#5505)

* Extend index.mdx to include QwikCityMockProvider

* docs: add links between vitest integration page and qwikcity api page

* docs(glob-import): add documentation for import.meta.glob (#5504)

* docs(glob-import): add documentation for import.meta.glob

* docs(glob-imports): add Glob Import link to /cookbook/index.mdx

* docs(glob-import): refactor type any to Record<string, any>

* docs: add Record<string, any> to mdx as well

* fix: CF pages polyfill also when shimmed (#5512)

* fix: polyfill also when shimmed

* chore: add comment to explain polyfill

* chore: Giorgio's feedback

* refactor: made the renderUpdate as a const

put the mardown update in a const which made the code cleaner and better to understand

* fix: fixed build

* docs: api update

* refactor: build

* chore: fix pnpm-locke file

* chore: build

* chore: pnpm fmt

* refactor: removed style-system

---------

Co-authored-by: Marcos Perona <mperona@gmail.com>
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
Co-authored-by: Alex Tocar <commit@ueuie.dev>
Co-authored-by: Miško Hevery <misko@hevery.com>
Co-authored-by: Nelson Sousa <nelsonprsousa@gmail.com>
Co-authored-by: Runar Jordahl <runar.jordahl@gmail.com>
Co-authored-by: gioboa <giorgiob.boa@gmail.com>
Co-authored-by: Kaushik080 <120493528+Kaushik080@users.noreply.github.com>
Co-authored-by: Yoav Ganbar <hamatoyogi@users.noreply.github.com>
Co-authored-by: yale.yu <35560398+yuyidegit@users.noreply.github.com>
Co-authored-by: Yale <yale.yu@kuka.com>
Co-authored-by: Bonny87 <36232591+mBonny87@users.noreply.github.com>
Co-authored-by: D <intellix@users.noreply.github.com>
Co-authored-by: PatrickJS <github@patrickjs.com>
Co-authored-by: Maïeul <45822175+maiieul@users.noreply.github.com>
Co-authored-by: Ian Létourneau <letourneau.ian@gmail.com>
Co-authored-by: Roman Zanettin <roman.zanettin@gmail.com>
Co-authored-by: Wout Mertens <Wout.Mertens@gmail.com>
Co-authored-by: Manu MA <manucorporat@users.noreply.github.com>
Co-authored-by: Jesse Zhang <jesse.zhang@orchard.com>
Co-authored-by: maieulchevalier <maieul.chevalier@gmail.com>
Co-authored-by: Jack Shelton <104264123+thejackshelton@users.noreply.github.com>
Co-authored-by: Erik Eng <e.ptz0n@gmail.com>
Co-authored-by: Steve Sewell <steve@builder.io>
Co-authored-by: Riccardo Perra <perrariccardo0@gmail.com>
Co-authored-by: Pasquale De Lucia <pasquale.delucia96@gmail.com>
Co-authored-by: Sidharth Mohanty <sidmohanty11@gmail.com>
Co-authored-by: Daniela Bonvini <danbonvini@gmail.com>
Co-authored-by: Shai Reznik <shairez@users.noreply.github.com>
Co-authored-by: Lucas Stahl <30933416+Stahlwalker@users.noreply.github.com>
Co-authored-by: John Prem Kumar S <36818969+JohnPremKumar@users.noreply.github.com>
Co-authored-by: Thomas Deinhamer <184284+thasmo@users.noreply.github.com>
Co-authored-by: Harish Krishnan <harishkrishnan1993@gmail.com>
Co-authored-by: Juer Genie Whang <2695996944@qq.com>
Co-authored-by: Juer Genie Whang <juergenie@qq.com>
Co-authored-by: wangyipeng <ffwangyipeng@chinatelecom.cn>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Arjun <arjunsingh8112@gmail.com>
Co-authored-by: Bendegúz Hajnal <hajnalbendeguz@gmail.com>
Co-authored-by: ulic75 <ulic75@gmail.com>
Co-authored-by: Youssef Adbib <mradbib@gmail.com>
Co-authored-by: Necati <necatifk07@gmail.com>
Co-authored-by: Leo <wtlin1228@gmail.com>
Co-authored-by: mulztob <49060581+mulztob@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-2: PR waiting for review This PR is waiting for review and approval before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐞] Props spreading (e.g. <input {...props} />) Typescript incompatibility
3 participants