core icon indicating copy to clipboard operation
core copied to clipboard

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

Open n0099 opened this issue 2 years ago • 2 comments

To fix phantom/ghost dependency that breaks yarn pnp when overriding RefUnwrapBailTypes from @vue/reactivity https://github.com/vuejs/core/blob/fef2acb2049fce3407dff17fe8af1836b97dfd73/packages/reactivity/src/ref.ts#L483-L496 in @vue/runtime-dom https://github.com/vuejs/core/blob/fef2acb2049fce3407dff17fe8af1836b97dfd73/packages/runtime-dom/src/index.ts#L29-L33 as described in https://github.com/vuejs/core/issues/951 https://github.com/vuejs/core/issues/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'.

n0099 avatar Mar 06 '24 16:03 n0099

Deploy Preview for vue-sfc-playground failed.

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

netlify[bot] avatar Mar 06 '24 16:03 netlify[bot]

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

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

netlify[bot] avatar Mar 06 '24 16:03 netlify[bot]

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

yyx990803 avatar Apr 15 '24 14:04 yyx990803