@stencil/core 5.0.0-beta.17 → 5.0.0-beta.19
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/compiler/browser.js
CHANGED
|
@@ -1844,7 +1844,7 @@ const validateComponentTag = (tag) => {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
//#endregion
|
|
1846
1846
|
//#region src/version.ts
|
|
1847
|
-
const version = "5.0.0-beta.
|
|
1847
|
+
const version = "5.0.0-beta.19";
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/compiler/events.ts
|
|
1850
1850
|
const buildEvents = () => {
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-
|
|
1
|
+
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-CsCXc_9d.mjs";
|
|
2
2
|
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-DGo5Qu7U.mjs";
|
|
3
3
|
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
@@ -461,9 +461,9 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
461
461
|
};
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/version.ts
|
|
464
|
-
const version = "5.0.0-beta.
|
|
465
|
-
const buildId = "
|
|
466
|
-
const vermoji = "
|
|
464
|
+
const version = "5.0.0-beta.19";
|
|
465
|
+
const buildId = "1791586317";
|
|
466
|
+
const vermoji = "🏵";
|
|
467
467
|
/**
|
|
468
468
|
* Get the installed version of a tool/dependency.
|
|
469
469
|
* Handles packages with exports maps that point to subdirectories.
|
|
@@ -19556,9 +19556,12 @@ const getPackageJsonRecommendations = (config, compilerCtx) => {
|
|
|
19556
19556
|
const srcIndexPath = join$2(config.srcDir, "index.ts");
|
|
19557
19557
|
const hasSrcIndex = compilerCtx.fs.accessSync(srcIndexPath);
|
|
19558
19558
|
const moduleOptions = [];
|
|
19559
|
+
let emptyLoaderIndex = null;
|
|
19559
19560
|
if (loaderBundle?.dir) {
|
|
19560
|
-
const
|
|
19561
|
+
const loaderIndex = join$2(loaderBundle.dir, "index.js");
|
|
19562
|
+
const loaderEntry = hasSrcIndex ? loaderIndex : join$2(loaderBundle.dir, "esm", "loader.js");
|
|
19561
19563
|
moduleOptions.push(normalizePath(relative$1(config.rootDir, loaderEntry)));
|
|
19564
|
+
if (!hasSrcIndex) emptyLoaderIndex = loaderIndex;
|
|
19562
19565
|
}
|
|
19563
19566
|
if (standalone?.dir) moduleOptions.push(normalizePath(relative$1(config.rootDir, join$2(standalone.dir, "index.js"))));
|
|
19564
19567
|
const typesOptions = [];
|
|
@@ -19572,9 +19575,13 @@ const getPackageJsonRecommendations = (config, compilerCtx) => {
|
|
|
19572
19575
|
}
|
|
19573
19576
|
let main = null;
|
|
19574
19577
|
const hasCjsOutput = !!loaderBundle?.cjs;
|
|
19575
|
-
if (loaderBundle?.dir && loaderBundle.cjs)
|
|
19578
|
+
if (loaderBundle?.dir && loaderBundle.cjs) {
|
|
19579
|
+
const cjsEntry = hasSrcIndex ? join$2(loaderBundle.dir, "index.cjs") : join$2(loaderBundle.dir, "cjs", "loader.cjs");
|
|
19580
|
+
main = normalizePath(relative$1(config.rootDir, cjsEntry));
|
|
19581
|
+
}
|
|
19576
19582
|
return {
|
|
19577
19583
|
moduleOptions,
|
|
19584
|
+
emptyLoaderIndex,
|
|
19578
19585
|
typesOptions,
|
|
19579
19586
|
main,
|
|
19580
19587
|
hasCjsOutput
|
|
@@ -19637,7 +19644,7 @@ const validateBuildPackageJson = async (config, compilerCtx, buildCtx) => {
|
|
|
19637
19644
|
const validatePackageJson = (config, compilerCtx, buildCtx) => {
|
|
19638
19645
|
const recommendations = getPackageJsonRecommendations(config, compilerCtx);
|
|
19639
19646
|
if (recommendations.moduleOptions.length === 0 && recommendations.typesOptions.length === 0) return;
|
|
19640
|
-
if (recommendations.moduleOptions.length > 0) validateModuleField(config, compilerCtx, buildCtx, recommendations.moduleOptions);
|
|
19647
|
+
if (recommendations.moduleOptions.length > 0) validateModuleField(config, compilerCtx, buildCtx, recommendations.moduleOptions, recommendations.emptyLoaderIndex);
|
|
19641
19648
|
if (recommendations.typesOptions.length > 0) validateTypesField(config, compilerCtx, buildCtx, recommendations.typesOptions);
|
|
19642
19649
|
if (recommendations.main) validateMainField(config, compilerCtx, buildCtx, recommendations.main);
|
|
19643
19650
|
else validateMainFieldExists(config, compilerCtx, buildCtx);
|
|
@@ -19661,8 +19668,9 @@ const formatModuleOptions = (options) => {
|
|
|
19661
19668
|
* @param compilerCtx the current compiler context
|
|
19662
19669
|
* @param buildCtx the context associated with the current build
|
|
19663
19670
|
* @param moduleOptions the recommended module paths based on configured output targets
|
|
19671
|
+
* @param emptyLoaderIndex the loader-bundle's `index.js`, when it has no exports
|
|
19664
19672
|
*/
|
|
19665
|
-
const validateModuleField = (config, compilerCtx, buildCtx, moduleOptions) => {
|
|
19673
|
+
const validateModuleField = (config, compilerCtx, buildCtx, moduleOptions, emptyLoaderIndex) => {
|
|
19666
19674
|
const currentModulePath = buildCtx.packageJson.module;
|
|
19667
19675
|
const suggestion = formatModuleOptions(moduleOptions);
|
|
19668
19676
|
if (!isString$1(currentModulePath) || currentModulePath === "") {
|
|
@@ -19670,6 +19678,10 @@ const validateModuleField = (config, compilerCtx, buildCtx, moduleOptions) => {
|
|
|
19670
19678
|
return;
|
|
19671
19679
|
}
|
|
19672
19680
|
const moduleFile = join$2(config.rootDir, currentModulePath);
|
|
19681
|
+
if (moduleFile === emptyLoaderIndex) {
|
|
19682
|
+
packageJsonWarn(config, compilerCtx, buildCtx, `package.json "module" property is set to "${currentModulePath}" which has no exports without a "src/index.ts". Consider setting it to: ${suggestion}`, "\"module\"");
|
|
19683
|
+
return;
|
|
19684
|
+
}
|
|
19673
19685
|
if (!compilerCtx.fs.accessSync(moduleFile)) packageJsonWarn(config, compilerCtx, buildCtx, `package.json "module" property is set to "${currentModulePath}" which doesn't exist. Consider setting it to: ${suggestion}`, "\"module\"");
|
|
19674
19686
|
};
|
|
19675
19687
|
/**
|
|
@@ -19990,11 +20002,16 @@ const mergeConditions = (current, owned) => {
|
|
|
19990
20002
|
* @returns The root entry to write
|
|
19991
20003
|
*/
|
|
19992
20004
|
const getRootExport = (config, compilerCtx, current, loaderBundle, standalone, types) => {
|
|
19993
|
-
const
|
|
20005
|
+
const hasSrcIndex = compilerCtx.fs.accessSync(join$2(config.srcDir, "index.ts"));
|
|
20006
|
+
const emptyLoaderIndex = loaderBundle && !hasSrcIndex ? join$2(loaderBundle.dir, "index.js") : null;
|
|
20007
|
+
const rootUsesEmptyLoaderIndex = emptyLoaderIndex != null;
|
|
20008
|
+
const isUsable = (target) => {
|
|
20009
|
+
if (!isString$1(target)) return target != null;
|
|
20010
|
+
const path = join$2(config.rootDir, target);
|
|
20011
|
+
return path !== emptyLoaderIndex && compilerCtx.fs.accessSync(path);
|
|
20012
|
+
};
|
|
19994
20013
|
if (isString$1(current) && isUsable(current)) return current;
|
|
19995
20014
|
const existing = isJsonObject(current) ? current : {};
|
|
19996
|
-
const hasSrcIndex = compilerCtx.fs.accessSync(join$2(config.srcDir, "index.ts"));
|
|
19997
|
-
const rootUsesEmptyLoaderIndex = !!loaderBundle && !hasSrcIndex;
|
|
19998
20015
|
const conditions = {
|
|
19999
20016
|
types: existing.types,
|
|
20000
20017
|
import: existing.import,
|
|
@@ -20046,6 +20063,7 @@ const getGeneratedExports = (config, buildCtx, loaderBundle, standalone, ssr, ty
|
|
|
20046
20063
|
import: `${outDir}/${cmp.tagName}.js`
|
|
20047
20064
|
};
|
|
20048
20065
|
}
|
|
20066
|
+
if (types?.dir && (loaderBundle || standalone)) generated["./components"] = { types: toRelativePath(config, join$2(types.dir, "components.d.ts")) };
|
|
20049
20067
|
if (ssr?.dir) {
|
|
20050
20068
|
const outDir = toRelativePath(config, ssr.dir);
|
|
20051
20069
|
generated["./ssr"] = {
|
package/dist/sys/node/worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createWorkerMessageHandler } from "../../compiler-
|
|
1
|
+
import { l as createWorkerMessageHandler } from "../../compiler-CsCXc_9d.mjs";
|
|
2
2
|
import { t as createNodeSys } from "../../node-DGo5Qu7U.mjs";
|
|
3
3
|
//#region src/sys/node/node-worker-thread.ts
|
|
4
4
|
/**
|
package/dist/testing/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import "@rollup/pluginutils";
|
|
|
33
33
|
import { createHash } from "crypto";
|
|
34
34
|
import { afterAll, vi } from "vitest";
|
|
35
35
|
//#region src/version.ts
|
|
36
|
-
const version = "5.0.0-beta.
|
|
36
|
+
const version = "5.0.0-beta.19";
|
|
37
37
|
const MEMBER_FLAGS = {
|
|
38
38
|
String: 1,
|
|
39
39
|
Number: 2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.19",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"terser": "^5.50.0",
|
|
127
127
|
"tinyglobby": "^0.2.17",
|
|
128
128
|
"typescript": ">5.0.0 <7.0.0",
|
|
129
|
-
"@stencil/dev-server": "5.0.0-beta.
|
|
130
|
-
"@stencil/
|
|
131
|
-
"@stencil/
|
|
129
|
+
"@stencil/dev-server": "5.0.0-beta.19",
|
|
130
|
+
"@stencil/mock-doc": "5.0.0-beta.19",
|
|
131
|
+
"@stencil/cli": "5.0.0-beta.19"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|