@poveste/vendors 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +16 -4
  2. package/package.json +1 -1
  3. package/vue.js +11 -3
package/README.md CHANGED
@@ -10,10 +10,22 @@ dependency of `poveste` and there is nothing to install or configure directly. I
10
10
  ## One copy, or two
11
11
 
12
12
  The chrome imports Vue from here rather than by name so that it runs Poveste's copy
13
- and not the reader's. That is version-dependent, and it was not always: the entries
14
- re-export the real packages now, so when a consumer's Vue satisfies our range both
15
- resolve to the **same** copy, and only a consumer on a range we cannot satisfy gets a
16
- separate nested one.
13
+ and not the reader's. Whether that is the reader's copy too is version-dependent, and
14
+ it was not always.
15
+
16
+ **The re-export is not what makes it one copy.** Each entry's name is an npm alias —
17
+ `poveste-vue` is `npm:vue` — and an alias is a distinct package name, so a package
18
+ manager installs a second physical copy of Vue whatever the consumer already has. A
19
+ satisfied range does not collapse them and `resolve.dedupe` cannot, because it matches
20
+ on the name. This file used to claim the opposite; two copies then meant two reactivity
21
+ systems, and a consumer's `poveste dev` rendered no story at all (#1060).
22
+
23
+ What makes it one copy is an alias `poveste` adds to a consumer's Vite config:
24
+ `collapseVendoredVue` points `poveste-vue` at the consumer's `vue` when both are
25
+ present and their majors agree. So when a consumer's Vue satisfies our range both do
26
+ resolve to the **same** copy, and only a consumer on a range we cannot satisfy keeps
27
+ the separate nested one — but by that alias, not by the shape of these entries.
28
+ Deleting it as redundant to this paragraph reopens the defect.
17
29
 
18
30
  The two-app design is unaffected — `global-components.ts` still creates its own app and
19
31
  hands off through the DOM. What is no longer structurally true is that Poveste's chrome
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@poveste/vendors",
3
3
  "type": "module",
4
- "version": "0.16.0",
4
+ "version": "0.16.2",
5
5
  "description": "Poveste-owned copies of the libraries its chrome runs on",
6
6
  "author": {
7
7
  "name": "Sorin Gitlan",
package/vue.js CHANGED
@@ -3,7 +3,15 @@
3
3
  // entry comes out empty — `isRef is not a function` at the first call. The npm
4
4
  // alias in this package's manifest is a name nothing remaps.
5
5
  //
6
- // This resolves to the *consumer's* Vue whenever theirs satisfies our range, and to a
7
- // nested copy only when it does not. The chrome running Poveste's own Vue is therefore
8
- // version-dependent rather than structural. See the README.
6
+ // **This re-export does not by itself give the chrome the consumer's Vue, and the
7
+ // comment that said it did is what #1060 was.** `poveste-vue` is an npm alias, so
8
+ // it is a distinct package name and a package manager installs a second physical
9
+ // copy whatever the consumer has — a satisfied range does not collapse them, and
10
+ // Vite's `resolve.dedupe` cannot, because it matches on the name. Two copies is two
11
+ // reactivity systems, and a consumer's `poveste dev` rendered no story at all.
12
+ //
13
+ // What collapses them is `collapseVendoredVue` in `poveste`, which aliases
14
+ // `poveste-vue` to the consumer's `vue` on the consumer path when both are present
15
+ // and their majors agree. So the property holds by that alias, not by the shape of
16
+ // this file: removing it as redundant to this comment reopens #1060. See the README.
9
17
  export * from 'poveste-vue'