wxt 0.12.2-alpha2 → 0.12.3
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.
- package/dist/{chunk-LDULNXMK.js → chunk-FODSBGUV.js} +10 -25
- package/dist/cli.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.cjs +9 -24
- package/dist/testing.js +3 -5
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.12.
|
|
2
|
+
var version = "0.12.3";
|
|
3
3
|
|
|
4
4
|
// src/core/utils/arrays.ts
|
|
5
5
|
function every(array, predicate) {
|
|
@@ -926,39 +926,25 @@ function globals(config) {
|
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
928
|
|
|
929
|
-
// src/core/builders/vite/plugins/
|
|
929
|
+
// src/core/builders/vite/plugins/webextensionPolyfillMock.ts
|
|
930
930
|
import path3 from "node:path";
|
|
931
|
-
function
|
|
931
|
+
function webextensionPolyfillMock(config) {
|
|
932
932
|
return {
|
|
933
|
-
name: "wxt:
|
|
933
|
+
name: "wxt:testing-inline-deps",
|
|
934
934
|
config() {
|
|
935
935
|
return {
|
|
936
936
|
resolve: {
|
|
937
937
|
alias: {
|
|
938
|
+
// Alias to use a mocked version of the polyfill
|
|
938
939
|
"webextension-polyfill": path3.resolve(
|
|
939
940
|
config.root,
|
|
940
941
|
"node_modules/wxt/dist/virtual/mock-browser"
|
|
941
942
|
)
|
|
942
943
|
}
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
// src/core/builders/vite/plugins/webextensionPolyfillInlineDeps.ts
|
|
950
|
-
function webextensionPolyfillInlineDeps() {
|
|
951
|
-
return {
|
|
952
|
-
name: "wxt:testing-inline-deps",
|
|
953
|
-
config() {
|
|
954
|
-
const wxtModules = ["wxt/browser"];
|
|
955
|
-
return {
|
|
956
|
-
test: {
|
|
957
|
-
server: {
|
|
958
|
-
deps: {
|
|
959
|
-
inline: [...wxtModules]
|
|
960
|
-
}
|
|
961
|
-
}
|
|
944
|
+
},
|
|
945
|
+
ssr: {
|
|
946
|
+
// Inline all WXT modules
|
|
947
|
+
noExternal: ["wxt"]
|
|
962
948
|
}
|
|
963
949
|
};
|
|
964
950
|
}
|
|
@@ -2544,8 +2530,7 @@ export {
|
|
|
2544
2530
|
unimport,
|
|
2545
2531
|
tsconfigPaths,
|
|
2546
2532
|
globals,
|
|
2547
|
-
|
|
2548
|
-
webextensionPolyfillInlineDeps,
|
|
2533
|
+
webextensionPolyfillMock,
|
|
2549
2534
|
getInternalConfig,
|
|
2550
2535
|
kebabCaseAlphanumeric,
|
|
2551
2536
|
printFileList,
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3665,7 +3665,7 @@ function globals(config) {
|
|
|
3665
3665
|
};
|
|
3666
3666
|
}
|
|
3667
3667
|
|
|
3668
|
-
// src/core/builders/vite/plugins/
|
|
3668
|
+
// src/core/builders/vite/plugins/webextensionPolyfillMock.ts
|
|
3669
3669
|
var import_node_path6 = __toESM(require("path"), 1);
|
|
3670
3670
|
|
|
3671
3671
|
// src/core/builders/vite/plugins/excludeBrowserPolyfill.ts
|
|
@@ -4334,7 +4334,7 @@ function getChunkSortWeight(filename) {
|
|
|
4334
4334
|
var import_picocolors3 = __toESM(require("picocolors"), 1);
|
|
4335
4335
|
|
|
4336
4336
|
// package.json
|
|
4337
|
-
var version = "0.12.
|
|
4337
|
+
var version = "0.12.3";
|
|
4338
4338
|
|
|
4339
4339
|
// src/core/utils/log/printHeader.ts
|
|
4340
4340
|
var import_consola2 = require("consola");
|
package/dist/index.d.cts
CHANGED
|
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
62
62
|
*/
|
|
63
63
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
64
64
|
|
|
65
|
-
var version = "0.12.
|
|
65
|
+
var version = "0.12.3";
|
|
66
66
|
|
|
67
67
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
62
62
|
*/
|
|
63
63
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
64
64
|
|
|
65
|
-
var version = "0.12.
|
|
65
|
+
var version = "0.12.3";
|
|
66
66
|
|
|
67
67
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/testing.cjs
CHANGED
|
@@ -557,39 +557,25 @@ function globals(config) {
|
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
// src/core/builders/vite/plugins/
|
|
560
|
+
// src/core/builders/vite/plugins/webextensionPolyfillMock.ts
|
|
561
561
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
562
|
-
function
|
|
562
|
+
function webextensionPolyfillMock(config) {
|
|
563
563
|
return {
|
|
564
|
-
name: "wxt:
|
|
564
|
+
name: "wxt:testing-inline-deps",
|
|
565
565
|
config() {
|
|
566
566
|
return {
|
|
567
567
|
resolve: {
|
|
568
568
|
alias: {
|
|
569
|
+
// Alias to use a mocked version of the polyfill
|
|
569
570
|
"webextension-polyfill": import_node_path5.default.resolve(
|
|
570
571
|
config.root,
|
|
571
572
|
"node_modules/wxt/dist/virtual/mock-browser"
|
|
572
573
|
)
|
|
573
574
|
}
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
// src/core/builders/vite/plugins/webextensionPolyfillInlineDeps.ts
|
|
581
|
-
function webextensionPolyfillInlineDeps() {
|
|
582
|
-
return {
|
|
583
|
-
name: "wxt:testing-inline-deps",
|
|
584
|
-
config() {
|
|
585
|
-
const wxtModules = ["wxt/browser"];
|
|
586
|
-
return {
|
|
587
|
-
test: {
|
|
588
|
-
server: {
|
|
589
|
-
deps: {
|
|
590
|
-
inline: [...wxtModules]
|
|
591
|
-
}
|
|
592
|
-
}
|
|
575
|
+
},
|
|
576
|
+
ssr: {
|
|
577
|
+
// Inline all WXT modules
|
|
578
|
+
noExternal: ["wxt"]
|
|
593
579
|
}
|
|
594
580
|
};
|
|
595
581
|
}
|
|
@@ -1163,8 +1149,7 @@ var import_defu3 = __toESM(require("defu"), 1);
|
|
|
1163
1149
|
// src/testing/wxt-vitest-plugin.ts
|
|
1164
1150
|
function WxtVitest(inlineConfig) {
|
|
1165
1151
|
return getInternalConfig(inlineConfig ?? {}, "serve").then((config) => [
|
|
1166
|
-
|
|
1167
|
-
webextensionPolyfillInlineDeps(),
|
|
1152
|
+
webextensionPolyfillMock(config),
|
|
1168
1153
|
unimport(config),
|
|
1169
1154
|
globals(config),
|
|
1170
1155
|
download(config),
|
package/dist/testing.js
CHANGED
|
@@ -4,9 +4,8 @@ import {
|
|
|
4
4
|
globals,
|
|
5
5
|
tsconfigPaths,
|
|
6
6
|
unimport,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./chunk-LDULNXMK.js";
|
|
7
|
+
webextensionPolyfillMock
|
|
8
|
+
} from "./chunk-FODSBGUV.js";
|
|
10
9
|
import "./chunk-VBXJIVYU.js";
|
|
11
10
|
|
|
12
11
|
// src/testing/fake-browser.ts
|
|
@@ -15,8 +14,7 @@ import { fakeBrowser } from "@webext-core/fake-browser";
|
|
|
15
14
|
// src/testing/wxt-vitest-plugin.ts
|
|
16
15
|
function WxtVitest(inlineConfig) {
|
|
17
16
|
return getInternalConfig(inlineConfig ?? {}, "serve").then((config) => [
|
|
18
|
-
|
|
19
|
-
webextensionPolyfillInlineDeps(),
|
|
17
|
+
webextensionPolyfillMock(config),
|
|
20
18
|
unimport(config),
|
|
21
19
|
globals(config),
|
|
22
20
|
download(config),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.3",
|
|
5
5
|
"description": "Next gen framework for developing web extensions",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"typedoc-vitepress-theme": "1.0.0-next.3",
|
|
138
138
|
"typescript": "^5.3.2",
|
|
139
139
|
"vitepress": "1.0.0-rc.31",
|
|
140
|
-
"vitest": "^1.
|
|
140
|
+
"vitest": "^1.1.0",
|
|
141
141
|
"vitest-mock-extended": "^1.3.1",
|
|
142
142
|
"vue": "^3.3.10"
|
|
143
143
|
},
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"lint:package": "publint",
|
|
164
164
|
"compile": "run-s -c compile:*",
|
|
165
165
|
"compile:wxt": "tsc --noEmit",
|
|
166
|
-
"compile:virtual": "tsc --noEmit",
|
|
166
|
+
"compile:virtual": "tsc --noEmit -p src/virtual",
|
|
167
167
|
"test": "vitest",
|
|
168
168
|
"test:coverage": "vitest run --coverage",
|
|
169
169
|
"prepublish": "pnpm -s build",
|