@intentic/extension-manifest 1.344.0 → 1.345.0

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/bundle.test.ts +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/extension-manifest",
3
- "version": "1.344.0",
3
+ "version": "1.345.0",
4
4
  "description": "What an intentic extension DECLARES, the intentic-extension.json schema and the sandbox-route allowlist rule",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@intentic/base": "1.344.0",
46
+ "@intentic/base": "1.345.0",
47
47
  "tslib": "2.8.1",
48
48
  "zod": "4.6.5"
49
49
  },
@@ -126,6 +126,22 @@ describe("bundleImportedNames", () => {
126
126
  expect(Object.fromEntries(bundleImportedNames(source, { leading: true }))).toEqual({ x: ["a"], y: ["b"] });
127
127
  expect(Object.fromEntries(bundleImportedNames(source))).toEqual({ x: ["a"], y: ["b"], z: ["c"] });
128
128
  });
129
+
130
+ // The head of a bundle built with whitespace minified (rolldown `output.minify: true`): every import and the code
131
+ // after them on one line, with no break for leading to stop at, and an `import(` later in the code.
132
+ test("leading reads a whitespace-minified bundle's imports off its one line and stops at its code", () => {
133
+ const source =
134
+ `import{hostSlot as e}from"@intentic/extension-api";import{computed as n,ref as d}from"vue";` +
135
+ `import{Notice as ee,ui as E}from"@intentic/extension-ui";import{useQuery as O}from"@tanstack/vue-query";` +
136
+ `var k=Object.defineProperty,A=(e,t,n)=>()=>{if(n)throw n[0];return t};import{late}from"vue";const m=import("x");`;
137
+ expect(Object.fromEntries(bundleImportedNames(source, { leading: true }))).toEqual({
138
+ "@intentic/extension-api": ["hostSlot"],
139
+ vue: ["computed", "ref"],
140
+ "@intentic/extension-ui": ["Notice", "ui"],
141
+ "@tanstack/vue-query": ["useQuery"],
142
+ });
143
+ expect(missingImports(source, { "@intentic/extension-ui": ["ui"] }, { leading: true })).toEqual([{ specifier: "@intentic/extension-ui", names: ["Notice"] }]);
144
+ });
129
145
  });
130
146
 
131
147
  describe("missingImports", () => {