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

explicitly add @vue/reactivity as dependency of @vue/runtime-dom #10468

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

n0099
Copy link

@n0099 n0099 commented Mar 6, 2024

To fix phantom/ghost dependency that breaks yarn pnp when overriding RefUnwrapBailTypes from @vue/reactivity

/**
* This is a special exported interface for other packages to declare
* additional types that should bail out for ref unwrapping. For example
* \@vue/runtime-dom can declare it like so in its d.ts:
*
* ``` ts
* declare module '@vue/reactivity' {
* export interface RefUnwrapBailTypes {
* runtimeDOMBailTypes: Node | Window
* }
* }
* ```
*/
export interface RefUnwrapBailTypes {}
in @vue/runtime-dom
declare module '@vue/reactivity' {
export interface RefUnwrapBailTypes {
runtimeDOMBailTypes: Node | Window
}
}
as described in #951 #6550

type IsWorking = RefUnwrapBailTypes['runtimeDOMBailTypes'] extends Node | Window ? true : false;
const r = ref<HTMLElement[]>([]);
const f = (el: HTMLElement) => {};
f(r.value[0]);
  ^^^^^^^^^^
Argument of type '{ accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; inert: boolean; innerText: string; lang: string; readonly offsetHeight: number; ... 288 more ...; focus: (options?: FocusOptions | undefined) => void; }[]' is not assignable to parameter of type 'HTMLElement[]'.
  Type '{ accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; inert: boolean; innerText: string; lang: string; readonly offsetHeight: number; ... 288 more ...; focus: (options?: FocusOptions | undefined) => void; }' is not assignable to type 'HTMLElement'.
    Types of property 'offsetParent' are incompatible.
      Type '{ readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: ...; readonly length: number; item: (nameOrIndex?: string | undefined) => Element | ... 1 m...' is not assignable to type 'Element | null'.
        Type '{ readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: ...; readonly length: number; item: (nameOrIndex?: string | undefined) => Element | ... 1 m...' is not assignable to type 'Element'.
          Types of property 'attributes' are incompatible.
            Type '{ [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: { readonly attributes: ...; ... 166 more ...; readonly assignedSlot: { ...; } | null; }; readonly length: number; ...' is not assignable to type 'NamedNodeMap'.
              'number' index signatures are incompatible.
                Type '{ readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: { readonly attributes: { [x: number]: ...; ... 8 more ...; [Symbol.iterator]: () => IterableIterator<...>; }; ... 166 more ...; r...' is not assignable to type 'Attr'.
                  The types of 'ownerDocument.anchors' are incompatible between these types.
                    Type '{ [x: number]: { charset: string; coords: string; download: string; hreflang: string; name: string; ping: string; referrerPolicy: string; rel: string; readonly relList: { [x: number]: string; readonly length: number; ... 13 more ...; [Symbol.iterator]: () => IterableIterator<...>; }; ... 315 more ...; username: stri...' is not assignable to type 'HTMLCollectionOf<HTMLAnchorElement>'.
                      'number' index signatures are incompatible.
                        Type '{ charset: string; coords: string; download: string; hreflang: string; name: string; ping: string; referrerPolicy: string; rel: string; readonly relList: { [x: number]: string; readonly length: number; value: string; ... 12 more ...; [Symbol.iterator]: () => IterableIterator<...>; }; ... 315 more ...; username: stri...' is not assignable to type 'HTMLAnchorElement'.
                          Types of property 'shadowRoot' are incompatible.
                            Type '{ readonly delegatesFocus: boolean; readonly host: { readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; ... 257 more ...; evaluate: (expression: string, contextNode: Node, resolver?: XPathNSRes...' is not assignable to type 'ShadowRoot | null'.
                              Type '{ readonly delegatesFocus: boolean; readonly host: { readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; ... 257 more ...; evaluate: (expression: string, contextNode: Node, resolver?: XPathNSRes...' is not assignable to type 'ShadowRoot'.
                                Types of property 'adoptedStyleSheets' are incompatible.
                                  Type '{ readonly cssRules: { [x: number]: { cssText: string; readonly parentRule: ... | null; readonly parentStyleSheet: ... | null; readonly type: number; readonly STYLE_RULE: 1; readonly CHARSET_RULE: 2; ... 7 more ...; readonly SUPPORTS_RULE: 12; }; readonly length: number; item: (index: number) => CSSRule | null; [Sym...' is not assignable to type 'CSSStyleSheet[]'.
                                    Type '{ readonly cssRules: { [x: number]: { cssText: string; readonly parentRule: ... | null; readonly parentStyleSheet: ... | null; readonly type: number; readonly STYLE_RULE: 1; readonly CHARSET_RULE: 2; ... 7 more ...; readonly SUPPORTS_RULE: 12; }; readonly length: number; item: (index: number) => CSSRule | null; [Sym...' is not assignable to type 'CSSStyleSheet'.
                                      Types of property 'ownerNode' are incompatible.
                                        Type '{ readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: ...; readonly length: number; item: (nameOrIndex?: string | undefined) => Element | ... 1 m...' is not assignable to type 'Element | ProcessingInstruction | null'.
                                          Type '{ readonly attributes: { [x: number]: { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerDocument: { readonly URL: string; alinkColor: string; readonly all: { [x: number]: ...; readonly length: number; item: (nameOrIndex?: string | undefined) => Element | ... 1 m...' is not assignable to type 'Element | ProcessingInstruction | null'.

Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit 332293c
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/661d39fa8b07560008c3955a

Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit 332293c
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/661d39fa6199730009ab62da

@n0099 n0099 changed the title explicitly add @vue/reactivity as dependency and peerDep for @vue/runtime-dom explicitly add @vue/reactivity as dependency of @vue/runtime-dom Mar 6, 2024
n0099 added a commit to n0099/open-tbm that referenced this pull request Mar 6, 2024
…r named routes `post` and `user` and all their children

* fix named route `404` passing the wrong type of props for `<PlaceholderError>` since 25d8550
@ router/index.ts

* add workspace settings for vue @ .vscode/settings.json
* fix vuejs/core#10468 @ .yarnrc.yml
$ yarn eslint --fix src
@ fe
@yyx990803
Copy link
Member

Looks like you need to update the lockfile to get CI passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants