extension-develop 4.1.22 → 4.1.23
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/832~0.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
|
|
|
19
19
|
import * as __rspack_external_node_os_4f3c9d58 from "node:os";
|
|
20
20
|
import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
21
21
|
import * as __rspack_external_node_vm_ef240610 from "node:vm";
|
|
22
|
-
var package_namespaceObject = /*#__PURE__*/ JSON.parse('{"rE":"4.1.
|
|
22
|
+
var package_namespaceObject = /*#__PURE__*/ JSON.parse('{"rE":"4.1.23","El":{"@prefresh/core":"1.5.9","@prefresh/utils":"1.2.1","@rspack/core":"^2.2.3","@rspack/dev-server":"2.1.0","@rspack/plugin-preact-refresh":"2.0.1","@rspack/plugin-react-refresh":"2.0.2","@vue/compiler-sfc":"3.5.26","acorn":"^8.16.0","browser-extension-manifest-fields":"^3.0.1","case-sensitive-paths-webpack-plugin":"^2.4.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","es-module-lexer":"^3.0.2","extension-from-store":"^0.2.5","fflate":"^0.8.3","go-git-it":"^5.1.5","ignore":"^7.0.5","less":"4.9.1","less-loader":"13.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","postcss":"8.5.23","postcss-loader":"8.2.1","postcss-preset-env":"11.1.1","postcss-scss":"4.0.9","preact":"10.27.3","prefers-yarn":"2.0.1","react-refresh":"0.18.0","sass-loader":"17.0.0","schema-utils":"^4.3.3","svelte-loader":"3.2.4","tiny-glob":"^0.2.9","vue":"3.5.26","vue-loader":"17.4.2","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.20.1"}}');
|
|
23
23
|
const preloadedEnvKeys = new Set();
|
|
24
24
|
function getPreloadedEnvKeys() {
|
|
25
25
|
return preloadedEnvKeys;
|
package/dist/840~0.mjs
CHANGED
|
@@ -1900,6 +1900,9 @@ function solidIsNotSupported() {
|
|
|
1900
1900
|
function creatingTSConfig() {
|
|
1901
1901
|
return `${messaging_prefix('info')} Creating a default tsconfig.json…`;
|
|
1902
1902
|
}
|
|
1903
|
+
function svelteCompilerRuntimeMismatch(compilerVersion, projectVersion) {
|
|
1904
|
+
return `${messaging_prefix('warn')} Svelte ${pintor.blue(compilerVersion)} compiles this project, which pins svelte ${pintor.blue(projectVersion)}.\nThe build uses ${pintor.blue(compilerVersion)} for both, so the output links. Add ${pintor.blue('svelte-loader')} to the project to compile with ${pintor.blue(projectVersion)} instead.`;
|
|
1905
|
+
}
|
|
1903
1906
|
function isUsingCustomLoader(loaderPath) {
|
|
1904
1907
|
return `${messaging_prefix('debug')} loader custom=${loaderPath}`;
|
|
1905
1908
|
}
|
|
@@ -3305,4 +3308,4 @@ async function extensionDev(pathOrRemoteUrl, devOptions) {
|
|
|
3305
3308
|
process.exit(1);
|
|
3306
3309
|
}
|
|
3307
3310
|
}
|
|
3308
|
-
export { BuildEmitter, applySplitChunksGuard, attachLifecycleStream, buildSourceFeatureIndex, classifyEntrySurface, classifyReloadFromSources, createChangedSourcesTracker, createLifecycleStream, defaultSplitChunks, dispatchReload, ensureOptionalContractPackageResolved, ensureTypeScriptConfig, extensionBuild, extensionDev, getJsxImportSource, getUserTypeScriptConfigFile, hasDependency, humanLine, isUsingIntegration, isUsingJsxFramework, isUsingReact, isUsingTypeScript, isUsingVue, jsFrameworksConfigsDetected, jsFrameworksHmrSummary, jsFrameworksIntegrationsEnabled, loadLoaderOptions, maybeUsePreact, maybeUseReact, maybeUseSolid, maybeUseVue, readContentScriptCount, recordZipArtifact, resolveDevelopDistFile, resolveDevelopInstallRoot, swcParserForFile };
|
|
3311
|
+
export { BuildEmitter, applySplitChunksGuard, attachLifecycleStream, buildSourceFeatureIndex, classifyEntrySurface, classifyReloadFromSources, createChangedSourcesTracker, createLifecycleStream, defaultSplitChunks, dispatchReload, ensureOptionalContractPackageResolved, ensureTypeScriptConfig, extensionBuild, extensionDev, getJsxImportSource, getUserTypeScriptConfigFile, hasDependency, humanLine, isUsingIntegration, isUsingJsxFramework, isUsingReact, isUsingTypeScript, isUsingVue, jsFrameworksConfigsDetected, jsFrameworksHmrSummary, jsFrameworksIntegrationsEnabled, loadLoaderOptions, maybeUsePreact, maybeUseReact, maybeUseSolid, maybeUseVue, readContentScriptCount, recordZipArtifact, resolveDevelopDistFile, resolveDevelopInstallRoot, svelteCompilerRuntimeMismatch, swcParserForFile };
|
package/dist/852~0.mjs
CHANGED
|
@@ -55,7 +55,8 @@ const fmt = {
|
|
|
55
55
|
truncate (input, max = 800) {
|
|
56
56
|
const s = (()=>{
|
|
57
57
|
try {
|
|
58
|
-
|
|
58
|
+
if ('string' == typeof input) return input;
|
|
59
|
+
return JSON.stringify(input) ?? String(input);
|
|
59
60
|
} catch {
|
|
60
61
|
return String(input);
|
|
61
62
|
}
|
|
@@ -5,6 +5,7 @@ export declare function solidIsNotSupported(): string;
|
|
|
5
5
|
export declare function youAreAllSet(name: string): string;
|
|
6
6
|
export declare function creatingTSConfig(): string;
|
|
7
7
|
export declare function failedToInstallIntegration(integration: string, error: unknown): string;
|
|
8
|
+
export declare function svelteCompilerRuntimeMismatch(compilerVersion: string, projectVersion: string): string;
|
|
8
9
|
export declare function isUsingCustomLoader(loaderPath: string): string;
|
|
9
10
|
export declare function jsFrameworksIntegrationsEnabled(integrations: string[]): string;
|
|
10
11
|
export declare function jsFrameworksConfigsDetected(tsConfigPath?: string, tsRoot?: string, targets?: string[]): string;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
import type { DevOptions, JsFramework } from '../../types.js';
|
|
2
|
+
export declare function resolveCompilerSvelte(loaderPath: string): {
|
|
3
|
+
root?: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface SvelteRootChoice {
|
|
7
|
+
root?: string;
|
|
8
|
+
mismatch: boolean;
|
|
9
|
+
compilerVersion?: string;
|
|
10
|
+
projectVersion?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function isOlderThan(left: string, right: string): boolean;
|
|
13
|
+
export declare function chooseSvelteRoot(input: {
|
|
14
|
+
projectRoot?: string;
|
|
15
|
+
projectVersion?: string;
|
|
16
|
+
compilerRoot?: string;
|
|
17
|
+
compilerVersion?: string;
|
|
18
|
+
}): SvelteRootChoice;
|
|
2
19
|
export declare function isUsingSvelte(projectPath: string): boolean;
|
|
3
20
|
export declare function maybeUseSvelte(projectPath: string, mode: DevOptions['mode']): Promise<JsFramework | undefined>;
|
package/dist/rspack-config~0.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import node_path from "node:path";
|
|
|
14
14
|
import { utils_isUrl, getBaseNode, parseHtml, manifestJsonOutputTarget, getExtname, getBaseHref, isResourceUnderDirs, getAssetsFromHtml, normalizeManifestOutputPath, manifestPageOutputTarget, canonicalizeDir, iconOutputPath, isFromIncludeList, htmlStaticAssetOutputName, isSpecialScheme, resolveStaticAttributeName, getHtmlPageDeclaredAssetPath, themeImageOutputPath, themeIconOutputPath, applyRewrittenStaticUrl, toResourceKey, cleanLeading, getFilePath, resolveAbsoluteFsPath, cleanAssetUrl, isHttpLike, resolveHtmlRefPath } from "./938~0.mjs";
|
|
15
15
|
import { prefix as messaging_prefix, isDebug } from "./852~0.mjs";
|
|
16
16
|
import { isChromiumBasedBrowser, CHROMIUM_FAMILY_ALIASES, GECKO_FAMILY_ALIASES, isWebkitBasedBrowser, isGeckoBasedBrowser } from "./331~0.mjs";
|
|
17
|
-
import { maybeUsePreact, isUsingTypeScript, jsFrameworksIntegrationsEnabled, maybeUseReact, isUsingVue, classifyEntrySurface, ensureTypeScriptConfig, resolveDevelopInstallRoot, loadLoaderOptions, getUserTypeScriptConfigFile, isUsingIntegration as messages_isUsingIntegration, maybeUseVue, maybeUseSolid, jsFrameworksHmrSummary, humanLine, ensureOptionalContractPackageResolved, jsFrameworksConfigsDetected, recordZipArtifact, hasDependency, resolveDevelopDistFile, isUsingJsxFramework, getJsxImportSource, swcParserForFile, isUsingReact, defaultSplitChunks } from "./840~0.mjs";
|
|
17
|
+
import { maybeUsePreact, isUsingTypeScript, jsFrameworksIntegrationsEnabled, maybeUseReact, isUsingVue, classifyEntrySurface, ensureTypeScriptConfig, resolveDevelopInstallRoot, loadLoaderOptions, getUserTypeScriptConfigFile, svelteCompilerRuntimeMismatch, isUsingIntegration as messages_isUsingIntegration, maybeUseVue, maybeUseSolid, jsFrameworksHmrSummary, humanLine, ensureOptionalContractPackageResolved, jsFrameworksConfigsDetected, recordZipArtifact, hasDependency, resolveDevelopDistFile, isUsingJsxFramework, getJsxImportSource, swcParserForFile, isUsingReact, defaultSplitChunks } from "./840~0.mjs";
|
|
18
18
|
import { bundlerFatalError, bundlerRecompiling, browserRunnerDisabled, PlaywrightPlugin, publicFolderShadowed, resolveCompanionExtensionDirs, specialFoldersSetupSummary, noEntrypointsDetected, serverRestartRequiredFromSpecialFolderMessageOnly, specialFolderChangeDetected, spacerLine, messages_ready, getPreloadedEnvKeys, publicMustBeAtProjectRoot, computeExtensionsToLoad, getSpecialFoldersDataForCompiler } from "./832~0.mjs";
|
|
19
19
|
import { renderStatsBlocks, makeSanitizedConsole } from "./stats-handler~0.mjs";
|
|
20
20
|
import { stripBom, findNearestProjectManifestSync, PROJECT_MANIFEST_FILENAMES, parseJsonSafe, readProjectDependencies } from "./731~0.mjs";
|
|
@@ -2932,6 +2932,7 @@ function getResolvedManifestFieldsData(options) {
|
|
|
2932
2932
|
}
|
|
2933
2933
|
}
|
|
2934
2934
|
let svelte_userMessageDelivered = false;
|
|
2935
|
+
let svelteMismatchDelivered = false;
|
|
2935
2936
|
function resolveFromProject(id, projectPath) {
|
|
2936
2937
|
for (const base of [
|
|
2937
2938
|
projectPath,
|
|
@@ -2941,6 +2942,47 @@ function resolveFromProject(id, projectPath) {
|
|
|
2941
2942
|
return req.resolve(id);
|
|
2942
2943
|
} catch {}
|
|
2943
2944
|
}
|
|
2945
|
+
function readPackageVersion(packageJsonPath) {
|
|
2946
|
+
try {
|
|
2947
|
+
const parsed = JSON.parse(__rspack_external_node_fs_1b05aee1.readFileSync(packageJsonPath, 'utf-8'));
|
|
2948
|
+
return 'string' == typeof parsed.version ? parsed.version : void 0;
|
|
2949
|
+
} catch {
|
|
2950
|
+
return;
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
function resolveCompilerSvelte(loaderPath) {
|
|
2954
|
+
try {
|
|
2955
|
+
const req = createRequire(loaderPath);
|
|
2956
|
+
const packageJsonPath = req.resolve('svelte/package.json');
|
|
2957
|
+
return {
|
|
2958
|
+
root: __rspack_external_node_path_806ed179.dirname(packageJsonPath),
|
|
2959
|
+
version: readPackageVersion(packageJsonPath)
|
|
2960
|
+
};
|
|
2961
|
+
} catch {
|
|
2962
|
+
return {};
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
function isOlderThan(left, right) {
|
|
2966
|
+
const parts = (value)=>value.split('-')[0].split('.').map((piece)=>Number.parseInt(piece, 10));
|
|
2967
|
+
const a = parts(left);
|
|
2968
|
+
const b = parts(right);
|
|
2969
|
+
for(let i = 0; i < Math.max(a.length, b.length); i++){
|
|
2970
|
+
const x = Number.isFinite(a[i]) ? a[i] : 0;
|
|
2971
|
+
const y = Number.isFinite(b[i]) ? b[i] : 0;
|
|
2972
|
+
if (x !== y) return x < y;
|
|
2973
|
+
}
|
|
2974
|
+
return false;
|
|
2975
|
+
}
|
|
2976
|
+
function chooseSvelteRoot(input) {
|
|
2977
|
+
const { projectRoot, projectVersion, compilerRoot, compilerVersion } = input;
|
|
2978
|
+
const mismatch = Boolean(projectRoot && compilerRoot && projectVersion && compilerVersion && isOlderThan(projectVersion, compilerVersion));
|
|
2979
|
+
return {
|
|
2980
|
+
root: mismatch ? compilerRoot : projectRoot || compilerRoot,
|
|
2981
|
+
mismatch,
|
|
2982
|
+
compilerVersion,
|
|
2983
|
+
projectVersion
|
|
2984
|
+
};
|
|
2985
|
+
}
|
|
2944
2986
|
function isUsingSvelte(projectPath) {
|
|
2945
2987
|
const using = hasDependency(projectPath, 'svelte');
|
|
2946
2988
|
if (using && !svelte_userMessageDelivered) {
|
|
@@ -2990,10 +3032,24 @@ async function maybeUseSvelte(projectPath, mode) {
|
|
|
2990
3032
|
}
|
|
2991
3033
|
];
|
|
2992
3034
|
const sveltePackageJson = resolveFromProject('svelte/package.json', projectPath);
|
|
2993
|
-
const
|
|
3035
|
+
const projectRoot = sveltePackageJson ? __rspack_external_node_path_806ed179.dirname(sveltePackageJson) : void 0;
|
|
3036
|
+
const compilerSvelte = resolveCompilerSvelte(svelteLoaderPath);
|
|
3037
|
+
const chosen = chooseSvelteRoot({
|
|
3038
|
+
projectRoot,
|
|
3039
|
+
projectVersion: sveltePackageJson ? readPackageVersion(sveltePackageJson) : void 0,
|
|
3040
|
+
compilerRoot: compilerSvelte.root,
|
|
3041
|
+
compilerVersion: compilerSvelte.version
|
|
3042
|
+
});
|
|
3043
|
+
const sveltePackageRoot = chosen.root;
|
|
3044
|
+
if (chosen.mismatch && !svelteMismatchDelivered) {
|
|
3045
|
+
console.warn(svelteCompilerRuntimeMismatch(String(chosen.compilerVersion), String(chosen.projectVersion)));
|
|
3046
|
+
svelteMismatchDelivered = true;
|
|
3047
|
+
}
|
|
2994
3048
|
const resolveClientSubpath = (relative)=>{
|
|
2995
|
-
|
|
2996
|
-
|
|
3049
|
+
if (!chosen.mismatch) {
|
|
3050
|
+
const direct = resolveFromProject(`svelte/${relative}`, projectPath);
|
|
3051
|
+
if (direct) return direct;
|
|
3052
|
+
}
|
|
2997
3053
|
if (!sveltePackageRoot) return;
|
|
2998
3054
|
const fromRoot = __rspack_external_node_path_806ed179.join(sveltePackageRoot, relative);
|
|
2999
3055
|
return __rspack_external_node_fs_1b05aee1.existsSync(fromRoot) ? fromRoot : void 0;
|
|
@@ -3007,6 +3063,8 @@ async function maybeUseSvelte(projectPath, mode) {
|
|
|
3007
3063
|
if (svelteStoreClient) alias['svelte/store'] = svelteStoreClient;
|
|
3008
3064
|
if (svelteReactivityClient) alias['svelte/reactivity'] = svelteReactivityClient;
|
|
3009
3065
|
if (svelteLegacyClient) alias['svelte/legacy'] = svelteLegacyClient;
|
|
3066
|
+
const svelteInternal = sveltePackageRoot ? __rspack_external_node_path_806ed179.join(sveltePackageRoot, 'src', 'internal') : void 0;
|
|
3067
|
+
if (svelteInternal && __rspack_external_node_fs_1b05aee1.existsSync(svelteInternal)) alias['svelte/internal'] = svelteInternal;
|
|
3010
3068
|
const resolverPlugin = {
|
|
3011
3069
|
apply (compiler) {
|
|
3012
3070
|
const existingMainFields = compiler.options.resolve?.mainFields || [];
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"runtime"
|
|
44
44
|
],
|
|
45
45
|
"name": "extension-develop",
|
|
46
|
-
"version": "4.1.
|
|
46
|
+
"version": "4.1.23",
|
|
47
47
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
48
48
|
"author": {
|
|
49
49
|
"name": "Cezar Augusto",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"fflate": "^0.8.3",
|
|
110
110
|
"go-git-it": "^5.1.5",
|
|
111
111
|
"ignore": "^7.0.5",
|
|
112
|
-
"less": "4.
|
|
112
|
+
"less": "4.9.1",
|
|
113
113
|
"less-loader": "13.0.0",
|
|
114
114
|
"parse5-utilities": "^1.0.0",
|
|
115
115
|
"pintor": "0.3.0",
|