wxt 0.19.4 → 0.19.5
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/core/runners/web-ext.mjs +4 -1
- package/dist/core/utils/building/resolve-config.mjs +1 -0
- package/dist/core/utils/testing/fake-objects.d.ts +8 -0
- package/dist/core/utils/testing/fake-objects.mjs +1 -0
- package/dist/core/zip.mjs +4 -4
- package/dist/types.d.ts +11 -0
- package/dist/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -72,7 +72,10 @@ const DEFAULT_CHROMIUM_PREFS = {
|
|
|
72
72
|
// Remove content scripts from sourcemap debugger ignore list so stack traces
|
|
73
73
|
// and log locations show up properly, see:
|
|
74
74
|
// https://github.com/wxt-dev/wxt/issues/236#issuecomment-1915364520
|
|
75
|
-
skipContentScripts: false
|
|
75
|
+
skipContentScripts: false,
|
|
76
|
+
// Was renamed at some point, see:
|
|
77
|
+
// https://github.com/wxt-dev/wxt/issues/912#issuecomment-2284288171
|
|
78
|
+
"skip-content-scripts": false
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
};
|
|
@@ -453,6 +453,7 @@ export declare const fakeResolvedConfig: (overrides?: {
|
|
|
453
453
|
downloadedPackagesDir?: string | undefined;
|
|
454
454
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
455
455
|
compressionLevel?: 0 | 1 | 9 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined;
|
|
456
|
+
exclude?: (string | undefined)[] | undefined;
|
|
456
457
|
} | undefined;
|
|
457
458
|
transformManifest?: {} | undefined;
|
|
458
459
|
analysis?: {
|
|
@@ -647,6 +648,7 @@ export declare const fakeResolvedConfig: (overrides?: {
|
|
|
647
648
|
sourcesRoot?: string | undefined;
|
|
648
649
|
includeSources?: (string | undefined)[] | undefined;
|
|
649
650
|
excludeSources?: (string | undefined)[] | undefined;
|
|
651
|
+
exclude?: (string | undefined)[] | undefined;
|
|
650
652
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
651
653
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
652
654
|
} | undefined;
|
|
@@ -969,6 +971,7 @@ export declare const fakeResolvedConfig: (overrides?: {
|
|
|
969
971
|
sourcesRoot?: string | undefined;
|
|
970
972
|
includeSources?: (string | undefined)[] | undefined;
|
|
971
973
|
excludeSources?: (string | undefined)[] | undefined;
|
|
974
|
+
exclude?: (string | undefined)[] | undefined;
|
|
972
975
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
973
976
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
974
977
|
} | undefined;
|
|
@@ -1317,6 +1320,7 @@ export declare const fakeResolvedConfig: (overrides?: {
|
|
|
1317
1320
|
sourcesRoot?: string | undefined;
|
|
1318
1321
|
includeSources?: (string | undefined)[] | undefined;
|
|
1319
1322
|
excludeSources?: (string | undefined)[] | undefined;
|
|
1323
|
+
exclude?: (string | undefined)[] | undefined;
|
|
1320
1324
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
1321
1325
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
1322
1326
|
} | undefined;
|
|
@@ -2008,6 +2012,7 @@ export declare const fakeWxt: (overrides?: {
|
|
|
2008
2012
|
downloadedPackagesDir?: string | undefined;
|
|
2009
2013
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
2010
2014
|
compressionLevel?: 0 | 1 | 9 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined;
|
|
2015
|
+
exclude?: (string | undefined)[] | undefined;
|
|
2011
2016
|
} | undefined;
|
|
2012
2017
|
transformManifest?: {} | undefined;
|
|
2013
2018
|
analysis?: {
|
|
@@ -2202,6 +2207,7 @@ export declare const fakeWxt: (overrides?: {
|
|
|
2202
2207
|
sourcesRoot?: string | undefined;
|
|
2203
2208
|
includeSources?: (string | undefined)[] | undefined;
|
|
2204
2209
|
excludeSources?: (string | undefined)[] | undefined;
|
|
2210
|
+
exclude?: (string | undefined)[] | undefined;
|
|
2205
2211
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
2206
2212
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
2207
2213
|
} | undefined;
|
|
@@ -2524,6 +2530,7 @@ export declare const fakeWxt: (overrides?: {
|
|
|
2524
2530
|
sourcesRoot?: string | undefined;
|
|
2525
2531
|
includeSources?: (string | undefined)[] | undefined;
|
|
2526
2532
|
excludeSources?: (string | undefined)[] | undefined;
|
|
2533
|
+
exclude?: (string | undefined)[] | undefined;
|
|
2527
2534
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
2528
2535
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
2529
2536
|
} | undefined;
|
|
@@ -2872,6 +2879,7 @@ export declare const fakeWxt: (overrides?: {
|
|
|
2872
2879
|
sourcesRoot?: string | undefined;
|
|
2873
2880
|
includeSources?: (string | undefined)[] | undefined;
|
|
2874
2881
|
excludeSources?: (string | undefined)[] | undefined;
|
|
2882
|
+
exclude?: (string | undefined)[] | undefined;
|
|
2875
2883
|
downloadPackages?: (string | undefined)[] | undefined;
|
|
2876
2884
|
compressionLevel?: (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9) | undefined;
|
|
2877
2885
|
} | undefined;
|
|
@@ -235,6 +235,7 @@ export const fakeResolvedConfig = fakeObjectCreator(() => {
|
|
|
235
235
|
artifactTemplate: "{{name}}-{{version}}.zip",
|
|
236
236
|
includeSources: [],
|
|
237
237
|
excludeSources: [],
|
|
238
|
+
exclude: [],
|
|
238
239
|
sourcesRoot: fakeDir(),
|
|
239
240
|
sourcesTemplate: "{{name}}-sources.zip",
|
|
240
241
|
name: faker.person.firstName().toLowerCase(),
|
package/dist/core/zip.mjs
CHANGED
|
@@ -26,7 +26,9 @@ export async function zip(config) {
|
|
|
26
26
|
await fs.ensureDir(wxt.config.outBaseDir);
|
|
27
27
|
const outZipFilename = applyTemplate(wxt.config.zip.artifactTemplate);
|
|
28
28
|
const outZipPath = path.resolve(wxt.config.outBaseDir, outZipFilename);
|
|
29
|
-
await zipDir(wxt.config.outDir, outZipPath
|
|
29
|
+
await zipDir(wxt.config.outDir, outZipPath, {
|
|
30
|
+
exclude: wxt.config.zip.exclude
|
|
31
|
+
});
|
|
30
32
|
zipFiles.push(outZipPath);
|
|
31
33
|
if (wxt.config.browser === "firefox") {
|
|
32
34
|
const { overrides, files: downloadedPackages } = await downloadPrivatePackages();
|
|
@@ -57,13 +59,11 @@ export async function zip(config) {
|
|
|
57
59
|
}
|
|
58
60
|
async function zipDir(directory, outputPath, options) {
|
|
59
61
|
const archive = new JSZip();
|
|
60
|
-
const files = (await glob("**/*", {
|
|
62
|
+
const files = (await glob(["**/*", ...options?.include || []], {
|
|
61
63
|
cwd: directory,
|
|
62
64
|
// Ignore node_modules, otherwise this glob step takes forever
|
|
63
65
|
ignore: ["**/node_modules"],
|
|
64
66
|
onlyFiles: true
|
|
65
|
-
// TODO: Fix #738
|
|
66
|
-
// dot: true,
|
|
67
67
|
})).filter((relativePath) => {
|
|
68
68
|
return options?.include?.some((pattern) => minimatch(relativePath, pattern)) || !options?.exclude?.some((pattern) => minimatch(relativePath, pattern));
|
|
69
69
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -180,6 +180,16 @@ export interface InlineConfig {
|
|
|
180
180
|
* ]
|
|
181
181
|
*/
|
|
182
182
|
excludeSources?: string[];
|
|
183
|
+
/**
|
|
184
|
+
* [Minimatch](https://www.npmjs.com/package/minimatch) patterns of files to exclude when
|
|
185
|
+
* zipping the extension.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* [
|
|
189
|
+
* "**\/*.map", // Exclude all sourcemaps
|
|
190
|
+
* ]
|
|
191
|
+
*/
|
|
192
|
+
exclude?: string[];
|
|
183
193
|
/**
|
|
184
194
|
* The Firefox review process requires the extension be buildable from source to make reviewing
|
|
185
195
|
* easier. This field allows you to use private packages without exposing your auth tokens.
|
|
@@ -1078,6 +1088,7 @@ export interface ResolvedConfig {
|
|
|
1078
1088
|
downloadedPackagesDir: string;
|
|
1079
1089
|
downloadPackages: string[];
|
|
1080
1090
|
compressionLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
1091
|
+
exclude: string[];
|
|
1081
1092
|
};
|
|
1082
1093
|
/**
|
|
1083
1094
|
* @deprecated Use `build:manifestGenerated` hook instead.
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "0.19.
|
|
1
|
+
export const version = "0.19.5";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.5",
|
|
5
5
|
"description": "Next gen framework for developing web extensions",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"defu": "^6.1.4",
|
|
85
85
|
"dequal": "^2.0.3",
|
|
86
86
|
"esbuild": "^0.23.0",
|
|
87
|
+
"execa": "^9.3.0",
|
|
87
88
|
"fast-glob": "^3.3.2",
|
|
88
89
|
"filesize": "^10.1.4",
|
|
89
90
|
"fs-extra": "^11.2.0",
|
|
@@ -122,7 +123,6 @@
|
|
|
122
123
|
"@types/node": "^20.14.12",
|
|
123
124
|
"@types/normalize-path": "^3.0.2",
|
|
124
125
|
"@types/prompts": "^2.4.9",
|
|
125
|
-
"execa": "^9.3.0",
|
|
126
126
|
"extract-zip": "^2.0.1",
|
|
127
127
|
"happy-dom": "^14.12.3",
|
|
128
128
|
"lodash.merge": "^4.6.2",
|