@7365admin1/layer-common 3.2.8-staging.206 → 3.2.8-staging.208

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.
@@ -112,7 +112,6 @@
112
112
  :mode="selectedReader ? 'edit' : 'add'"
113
113
  :reader="selectedReader"
114
114
  :loading="saving"
115
- :site="site"
116
115
  @submit="saveReader"
117
116
  />
118
117
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.2.8-staging.206",
5
+ "version": "3.2.8-staging.208",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -96,7 +96,20 @@ test("the reader form takes site as a prop and puts it in the discover call", ()
96
96
  assert.match(source, /discoverReader\(\{[\s\S]*?site:\s*props\.site[\s\S]*?\}\)/);
97
97
  });
98
98
 
99
- test("reader management passes its site prop down to the form", () => {
99
+ test("reader management passes its site prop down to the form, ONCE", () => {
100
100
  const source = readFileSync(join(root, "components", "HidReaderManagement.vue"), "utf8");
101
- assert.match(source, /<HidReaderForm[\s\S]*?:site="site"[\s\S]*?\/>/);
101
+ const tag = source.match(/<HidReaderForm[\s\S]*?\/>/)?.[0] ?? "";
102
+
103
+ // Bound to `props.site`, which is the only name for it that exists in this
104
+ // component - a bare `site` resolves to nothing.
105
+ assert.match(tag, /:site="props\.site"/);
106
+
107
+ /*
108
+ * And exactly once. It was written twice - `props.site` and then a bare
109
+ * `site` - and Vite's Vue plugin treats a duplicate attribute as a COMPILE
110
+ * ERROR, so every consuming application's `nuxt build` failed on this file.
111
+ * The layer's own playground build does not import this component, so
112
+ * nothing here caught it; the first sign was a consumer failing to build.
113
+ */
114
+ assert.equal((tag.match(/:site=/g) ?? []).length, 1, tag);
102
115
  });