@qwik.dev/core 2.0.0-beta.13 → 2.0.0-beta.15

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 (53) hide show
  1. package/dist/backpatch/package.json +1 -1
  2. package/dist/build/package.json +1 -1
  3. package/dist/cli.mjs +5633 -0
  4. package/dist/core-internal.d.ts +123 -65
  5. package/dist/core.min.mjs +1 -1
  6. package/dist/core.mjs +548 -246
  7. package/dist/core.mjs.map +1 -1
  8. package/dist/core.prod.mjs +349 -198
  9. package/dist/loader/index.mjs +2 -2
  10. package/dist/loader/package.json +1 -1
  11. package/dist/optimizer.mjs +1290 -1294
  12. package/dist/qwikloader.debug.js +43 -10
  13. package/dist/qwikloader.js +1 -1
  14. package/dist/server.mjs +5 -5
  15. package/dist/starters/adapters/aws-lambda/package.json +2 -1
  16. package/dist/starters/adapters/azure-swa/package.json +2 -1
  17. package/dist/starters/adapters/bun/package.json +2 -1
  18. package/dist/starters/adapters/cloud-run/package.json +2 -1
  19. package/dist/starters/adapters/cloudflare-pages/package.json +2 -1
  20. package/dist/starters/adapters/deno/package.json +2 -1
  21. package/dist/starters/adapters/express/package.json +2 -1
  22. package/dist/starters/adapters/fastify/package.json +2 -1
  23. package/dist/starters/adapters/firebase/package.json +2 -1
  24. package/dist/starters/adapters/netlify-edge/package.json +2 -1
  25. package/dist/starters/adapters/node-server/package.json +2 -1
  26. package/dist/starters/adapters/ssg/package.json +2 -1
  27. package/dist/starters/adapters/vercel-edge/package.json +2 -1
  28. package/dist/starters/features/csr/package.json +1 -1
  29. package/dist/starters/features/storybook/.storybook/tsconfig.json +0 -1
  30. package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
  31. package/dist/testing/index.d.ts +8 -9
  32. package/dist/testing/index.mjs +483 -222
  33. package/dist/testing/package.json +1 -1
  34. package/package.json +14 -48
  35. package/{qwik-cli.cjs → qwik-cli.mjs} +1 -1
  36. package/dist/backpatch/index.cjs +0 -6
  37. package/dist/build/index.cjs +0 -35
  38. package/dist/build/index.cjs.map +0 -7
  39. package/dist/build/index.dev.cjs +0 -37
  40. package/dist/build/index.dev.cjs.map +0 -7
  41. package/dist/build/index.prod.cjs +0 -37
  42. package/dist/build/index.prod.cjs.map +0 -7
  43. package/dist/cli.cjs +0 -12956
  44. package/dist/core.cjs +0 -13036
  45. package/dist/core.cjs.map +0 -1
  46. package/dist/core.prod.cjs +0 -6377
  47. package/dist/insights/index.qwik.cjs +0 -1
  48. package/dist/insights/vite/index.cjs +0 -1
  49. package/dist/loader/index.cjs +0 -4
  50. package/dist/optimizer.cjs +0 -217
  51. package/dist/preloader.cjs +0 -266
  52. package/dist/server.cjs +0 -3294
  53. package/dist/testing/index.cjs +0 -36225
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/testing",
3
- "version": "2.0.0-beta.13-dev+cb19ff7",
3
+ "version": "2.0.0-beta.15-dev+920f1a4",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@qwik.dev/core",
3
3
  "description": "An open source framework for building instant loading web apps at any scale, without the extra effort.",
4
- "version": "2.0.0-beta.13",
4
+ "version": "2.0.0-beta.15",
5
5
  "author": "Qwik Team",
6
6
  "bin": {
7
- "qwik": "./qwik-cli.cjs"
7
+ "qwik": "./qwik-cli.mjs"
8
8
  },
9
9
  "bugs": "https://github.com/QwikDev/qwik/issues",
10
10
  "dependencies": {
11
11
  "csstype": "^3.1.3",
12
12
  "launch-editor": "^2.11.1",
13
- "rollup": "^4.52.4"
13
+ "rollup": "^4.52.4",
14
+ "ts-morph": "23.0.0"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@croct/json5-parser": "0.2.1",
@@ -19,9 +20,8 @@
19
20
  "image-size": "1.2.1",
20
21
  "kleur": "4.1.5",
21
22
  "prettier": "3.6.2",
22
- "ts-morph": "23.0.0",
23
23
  "vitest": "4.0.1",
24
- "@qwik.dev/core": "2.0.0-beta.13",
24
+ "@qwik.dev/core": "2.0.0-beta.15",
25
25
  "@qwik.dev/dom": "2.1.19"
26
26
  },
27
27
  "engines": {
@@ -35,15 +35,10 @@
35
35
  "production": "./dist/core.prod.mjs",
36
36
  "min": "./dist/core.min.mjs",
37
37
  "default": "./dist/core.prod.mjs"
38
- },
39
- "require": {
40
- "development": "./dist/core.cjs",
41
- "production": "./dist/core.prod.cjs",
42
- "default": "./dist/core.prod.cjs"
43
38
  }
44
39
  },
45
40
  "./cli": {
46
- "require": "./dist/cli.cjs"
41
+ "require": "./dist/cli.mjs"
47
42
  },
48
43
  "./handlers.mjs": "./handlers.mjs",
49
44
  "./internal": {
@@ -53,11 +48,6 @@
53
48
  "production": "./dist/core.prod.mjs",
54
49
  "min": "./dist/core.min.mjs",
55
50
  "default": "./dist/core.prod.mjs"
56
- },
57
- "require": {
58
- "development": "./dist/core.cjs",
59
- "production": "./dist/core.prod.cjs",
60
- "default": "./dist/core.prod.cjs"
61
51
  }
62
52
  },
63
53
  "./jsx-runtime": {
@@ -67,11 +57,6 @@
67
57
  "production": "./dist/core.prod.mjs",
68
58
  "min": "./dist/core.min.mjs",
69
59
  "default": "./dist/core.prod.mjs"
70
- },
71
- "require": {
72
- "development": "./dist/core.cjs",
73
- "production": "./dist/core.prod.cjs",
74
- "default": "./dist/core.prod.cjs"
75
60
  }
76
61
  },
77
62
  "./jsx-dev-runtime": {
@@ -81,11 +66,6 @@
81
66
  "production": "./dist/core.prod.mjs",
82
67
  "min": "./dist/core.min.mjs",
83
68
  "default": "./dist/core.mjs"
84
- },
85
- "require": {
86
- "development": "./dist/core.cjs",
87
- "production": "./dist/core.prod.cjs",
88
- "default": "./dist/core.cjs"
89
69
  }
90
70
  },
91
71
  "./build": {
@@ -94,50 +74,36 @@
94
74
  "development": "./dist/build/index.dev.mjs",
95
75
  "production": "./dist/build/index.prod.mjs",
96
76
  "default": "./dist/build/index.mjs"
97
- },
98
- "require": {
99
- "development": "./dist/build/index.dev.cjs",
100
- "production": "./dist/build/index.prod.cjs",
101
- "default": "./dist/build/index.cjs"
102
77
  }
103
78
  },
104
79
  "./loader": {
105
80
  "types": "./dist/loader/index.d.ts",
106
- "import": "./dist/loader/index.mjs",
107
- "require": "./dist/loader/index.cjs"
81
+ "import": "./dist/loader/index.mjs"
108
82
  },
109
83
  "./insights": {
110
84
  "types": "./dist/insights.d.ts",
111
- "import": "./dist/insights/index.qwik.mjs",
112
- "require": "./dist/insights/index.qwik.cjs"
85
+ "import": "./dist/insights/index.qwik.mjs"
113
86
  },
114
87
  "./insights/vite": {
115
88
  "types": "./dist/insights/vite.d.ts",
116
- "import": "./dist/insights/vite/index.mjs",
117
- "require": "./dist/insights/vite/index.cjs"
89
+ "import": "./dist/insights/vite/index.mjs"
118
90
  },
119
- "./optimizer.cjs": "./dist/optimizer.cjs",
120
91
  "./optimizer.mjs": "./dist/optimizer.mjs",
121
92
  "./optimizer": {
122
93
  "types": "./dist/optimizer.d.ts",
123
- "import": "./dist/optimizer.mjs",
124
- "require": "./dist/optimizer.cjs"
94
+ "import": "./dist/optimizer.mjs"
125
95
  },
126
96
  "./preloader": {
127
- "import": "./dist/preloader.mjs",
128
- "require": "./dist/preloader.cjs"
97
+ "import": "./dist/preloader.mjs"
129
98
  },
130
- "./server.cjs": "./dist/server.cjs",
131
99
  "./server.mjs": "./dist/server.mjs",
132
100
  "./server": {
133
101
  "types": "./server.d.ts",
134
- "import": "./dist/server.mjs",
135
- "require": "./dist/server.cjs"
102
+ "import": "./dist/server.mjs"
136
103
  },
137
104
  "./testing": {
138
105
  "types": "./dist/testing/index.d.ts",
139
- "import": "./dist/testing/index.mjs",
140
- "require": "./dist/testing/index.cjs"
106
+ "import": "./dist/testing/index.mjs"
141
107
  },
142
108
  "./qwikloader.js": "./dist/qwikloader.js",
143
109
  "./qwikloader.debug.js": "./dist/qwikloader.debug.js",
@@ -161,7 +127,7 @@
161
127
  "public.d.ts",
162
128
  "server.d.ts",
163
129
  "testing.d.ts",
164
- "qwik-cli.cjs"
130
+ "qwik-cli.mjs"
165
131
  ],
166
132
  "homepage": "https://qwik.dev/",
167
133
  "keywords": [
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  // This requires the build to be run first.
3
- const qwik = require('./dist/cli.cjs');
3
+ import * as qwik from './dist/cli.mjs';
4
4
  qwik.runCli();
@@ -1,6 +0,0 @@
1
- const QWIK_BACKPATCH_EXECUTOR_MINIFIED = "const t='script[type=\"qwik/backpatch\"]',e=document.currentScript;if(e){const o=e.closest(\"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||\"[]\"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=r.hasAttribute(\":\")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let s=t[e+2];for(;c<o&&(r=n.nextNode(),r);)r.hasAttribute(\":\")&&c++;const l=r;null==s||!1===s?l.removeAttribute(i):(\"boolean\"==typeof s&&(s=\"\"),l.setAttribute(i,s))}}}}";
2
- const QWIK_BACKPATCH_EXECUTOR_DEBUG = "const BACKPATCH_DATA_SELECTOR = 'script[type=\"qwik/backpatch\"]';\nconst executorScript = document.currentScript;\nif (executorScript) {\n const container = executorScript.closest(\n \"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\"\n );\n if (container) {\n const script = container.querySelector(BACKPATCH_DATA_SELECTOR);\n if (script) {\n const data = JSON.parse(script.textContent || \"[]\");\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n let currentNode = walker.currentNode;\n let currentNodeIdx = currentNode.hasAttribute(\":\") ? 0 : -1;\n for (let i = 0; i < data.length; i += 3) {\n const elementIdx = data[i];\n const attrName = data[i + 1];\n let value = data[i + 2];\n while (currentNodeIdx < elementIdx) {\n currentNode = walker.nextNode();\n if (!currentNode) {\n break;\n }\n if (currentNode.hasAttribute(\":\")) {\n currentNodeIdx++;\n }\n }\n const element = currentNode;\n if (value == null || value === false) {\n element.removeAttribute(attrName);\n } else {\n if (typeof value === \"boolean\") {\n value = \"\";\n }\n element.setAttribute(attrName, value);\n }\n }\n }\n }\n}";
3
- globalThis.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
4
- globalThis.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
5
- exports.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
6
- exports.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
@@ -1,35 +0,0 @@
1
- globalThis.qwikBuild = (function (module) {
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // packages/qwik/src/build/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- isBrowser: () => isBrowser,
25
- isDev: () => isDev,
26
- isServer: () => isServer
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
- var isBrowser = /* @__PURE__ */ (() => typeof window !== "undefined" && typeof HTMLElement !== "undefined" && !!window.document && String(HTMLElement).includes("[native code]"))();
30
- var isServer = !isBrowser;
31
- var isDev = /* @__PURE__ */ (() => {
32
- return globalThis.qDev === true;
33
- })();
34
- return module.exports; })(typeof module === 'object' && module.exports ? module : { exports: {} });
35
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/build/index.ts"],
4
- "sourcesContent": ["/**\n * True when build is made for browser, client-side execution.\n *\n * @public\n */\nexport const isBrowser: boolean = /*#__PURE__*/ (() =>\n typeof window !== 'undefined' &&\n typeof HTMLElement !== 'undefined' &&\n !!window.document &&\n String(HTMLElement).includes('[native code]'))();\n\n/**\n * True when build is made for SSR purposes.\n *\n * @public\n */\nexport const isServer: boolean = !isBrowser;\n\n/**\n * True when build is in dev mode.\n *\n * @public\n */\nexport const isDev: boolean = /*#__PURE__*/ (() => {\n return (globalThis as any).qDev === true;\n})();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,YAAoC,uBAC/C,OAAO,WAAW,eAClB,OAAO,gBAAgB,eACvB,CAAC,CAAC,OAAO,YACT,OAAO,WAAW,EAAE,SAAS,eAAe,GAAG;AAO1C,IAAM,WAAoB,CAAC;AAO3B,IAAM,QAAgC,uBAAM;AACjD,SAAQ,WAAmB,SAAS;AACtC,GAAG;",
6
- "names": []
7
- }
@@ -1,37 +0,0 @@
1
- globalThis.qwikBuild = (function (module) {
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // packages/qwik/src/build/index.dev.ts
22
- var index_dev_exports = {};
23
- __export(index_dev_exports, {
24
- isBrowser: () => isBrowser,
25
- isDev: () => isDev,
26
- isServer: () => isServer
27
- });
28
- module.exports = __toCommonJS(index_dev_exports);
29
-
30
- // packages/qwik/src/build/index.ts
31
- var isBrowser = /* @__PURE__ */ (() => typeof window !== "undefined" && typeof HTMLElement !== "undefined" && !!window.document && String(HTMLElement).includes("[native code]"))();
32
- var isServer = !isBrowser;
33
-
34
- // packages/qwik/src/build/index.dev.ts
35
- var isDev = true;
36
- return module.exports; })(typeof module === 'object' && module.exports ? module : { exports: {} });
37
- //# sourceMappingURL=index.dev.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/build/index.dev.ts", "../../src/build/index.ts"],
4
- "sourcesContent": ["export { isBrowser, isServer } from './index';\n\n/**\n * True when build is in dev mode.\n *\n * @public\n */\nexport const isDev: boolean = true;\n", "/**\n * True when build is made for browser, client-side execution.\n *\n * @public\n */\nexport const isBrowser: boolean = /*#__PURE__*/ (() =>\n typeof window !== 'undefined' &&\n typeof HTMLElement !== 'undefined' &&\n !!window.document &&\n String(HTMLElement).includes('[native code]'))();\n\n/**\n * True when build is made for SSR purposes.\n *\n * @public\n */\nexport const isServer: boolean = !isBrowser;\n\n/**\n * True when build is in dev mode.\n *\n * @public\n */\nexport const isDev: boolean = /*#__PURE__*/ (() => {\n return (globalThis as any).qDev === true;\n})();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,YAAoC,uBAC/C,OAAO,WAAW,eAClB,OAAO,gBAAgB,eACvB,CAAC,CAAC,OAAO,YACT,OAAO,WAAW,EAAE,SAAS,eAAe,GAAG;AAO1C,IAAM,WAAoB,CAAC;;;ADT3B,IAAM,QAAiB;",
6
- "names": []
7
- }
@@ -1,37 +0,0 @@
1
- globalThis.qwikBuild = (function (module) {
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // packages/qwik/src/build/index.prod.ts
22
- var index_prod_exports = {};
23
- __export(index_prod_exports, {
24
- isBrowser: () => isBrowser,
25
- isDev: () => isDev,
26
- isServer: () => isServer
27
- });
28
- module.exports = __toCommonJS(index_prod_exports);
29
-
30
- // packages/qwik/src/build/index.ts
31
- var isBrowser = /* @__PURE__ */ (() => typeof window !== "undefined" && typeof HTMLElement !== "undefined" && !!window.document && String(HTMLElement).includes("[native code]"))();
32
- var isServer = !isBrowser;
33
-
34
- // packages/qwik/src/build/index.prod.ts
35
- var isDev = false;
36
- return module.exports; })(typeof module === 'object' && module.exports ? module : { exports: {} });
37
- //# sourceMappingURL=index.prod.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/build/index.prod.ts", "../../src/build/index.ts"],
4
- "sourcesContent": ["export { isBrowser, isServer } from './index';\n\n/**\n * True when build is in dev mode.\n *\n * @public\n */\nexport const isDev: boolean = false;\n", "/**\n * True when build is made for browser, client-side execution.\n *\n * @public\n */\nexport const isBrowser: boolean = /*#__PURE__*/ (() =>\n typeof window !== 'undefined' &&\n typeof HTMLElement !== 'undefined' &&\n !!window.document &&\n String(HTMLElement).includes('[native code]'))();\n\n/**\n * True when build is made for SSR purposes.\n *\n * @public\n */\nexport const isServer: boolean = !isBrowser;\n\n/**\n * True when build is in dev mode.\n *\n * @public\n */\nexport const isDev: boolean = /*#__PURE__*/ (() => {\n return (globalThis as any).qDev === true;\n})();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,YAAoC,uBAC/C,OAAO,WAAW,eAClB,OAAO,gBAAgB,eACvB,CAAC,CAAC,OAAO,YACT,OAAO,WAAW,EAAE,SAAS,eAAe,GAAG;AAO1C,IAAM,WAAoB,CAAC;;;ADT3B,IAAM,QAAiB;",
6
- "names": []
7
- }