@stencil/core 4.23.0 → 4.23.1
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +125 -133
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +611 -460
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +575 -457
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +31 -23
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +60 -4
- package/internal/testing/index.js +573 -455
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +7 -2
- package/mock-doc/index.js +7 -2
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +2 -1
- package/testing/package.json +1 -1
package/compiler/stencil.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Compiler v4.23.
|
|
2
|
+
Stencil Compiler v4.23.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -2338,7 +2338,7 @@ var require_typescript_5_5_4_bundle_cache_min = __commonJS({
|
|
|
2338
2338
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2339
2339
|
and limitations under the License.
|
|
2340
2340
|
***************************************************************************** */
|
|
2341
|
-
var
|
|
2341
|
+
var ts71 = {};
|
|
2342
2342
|
((module3) => {
|
|
2343
2343
|
"use strict";
|
|
2344
2344
|
var _a;
|
|
@@ -207859,9 +207859,9 @@ ${e.message}`;
|
|
|
207859
207859
|
};
|
|
207860
207860
|
}
|
|
207861
207861
|
})({ get exports() {
|
|
207862
|
-
return
|
|
207862
|
+
return ts71;
|
|
207863
207863
|
}, set exports(v) {
|
|
207864
|
-
|
|
207864
|
+
ts71 = v;
|
|
207865
207865
|
if (typeof module2 !== "undefined" && module2.exports) {
|
|
207866
207866
|
module2.exports = v;
|
|
207867
207867
|
}
|
|
@@ -238144,17 +238144,17 @@ __export(compiler_exports, {
|
|
|
238144
238144
|
optimizeJs: () => optimizeJs,
|
|
238145
238145
|
transpile: () => transpile,
|
|
238146
238146
|
transpileSync: () => transpileSync,
|
|
238147
|
-
ts: () =>
|
|
238147
|
+
ts: () => import_typescript70.default,
|
|
238148
238148
|
validateConfig: () => validateConfig,
|
|
238149
238149
|
vermoji: () => vermoji,
|
|
238150
238150
|
version: () => version,
|
|
238151
238151
|
versions: () => versions
|
|
238152
238152
|
});
|
|
238153
238153
|
module.exports = __toCommonJS(compiler_exports);
|
|
238154
|
-
var
|
|
238154
|
+
var import_typescript70 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
238155
238155
|
|
|
238156
238156
|
// src/version.ts
|
|
238157
|
-
var buildId = "
|
|
238157
|
+
var buildId = "1736187268";
|
|
238158
238158
|
var minfyJsId = "terser5.31.1_7";
|
|
238159
238159
|
var optimizeCssId = "autoprefixer10.4.19_postcss8.4.38_7";
|
|
238160
238160
|
var parse5Version = "7.1.2";
|
|
@@ -238162,8 +238162,8 @@ var rollupVersion = "2.56.3";
|
|
|
238162
238162
|
var jqueryVersion = "4.0.0-pre";
|
|
238163
238163
|
var terserVersion = "5.31.1";
|
|
238164
238164
|
var typescriptVersion = "5.5.4";
|
|
238165
|
-
var vermoji = "\u{
|
|
238166
|
-
var version = "4.23.
|
|
238165
|
+
var vermoji = "\u{1F32F}";
|
|
238166
|
+
var version = "4.23.1";
|
|
238167
238167
|
var versions = {
|
|
238168
238168
|
stencil: version,
|
|
238169
238169
|
parse5: parse5Version,
|
|
@@ -239407,7 +239407,7 @@ var validateComponentTag = (tag) => {
|
|
|
239407
239407
|
};
|
|
239408
239408
|
|
|
239409
239409
|
// src/compiler/compiler.ts
|
|
239410
|
-
var
|
|
239410
|
+
var import_typescript66 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
239411
239411
|
|
|
239412
239412
|
// src/compiler/build/compiler-ctx.ts
|
|
239413
239413
|
var import_path4 = require("path");
|
|
@@ -241444,7 +241444,10 @@ var createStaticGetter = (propName, returnExpression) => {
|
|
|
241444
241444
|
};
|
|
241445
241445
|
var getStaticValue = (staticMembers, staticName) => {
|
|
241446
241446
|
const staticMember = staticMembers.find(
|
|
241447
|
-
(member2) =>
|
|
241447
|
+
(member2) => {
|
|
241448
|
+
var _a;
|
|
241449
|
+
return ((_a = member2.name) == null ? void 0 : _a.escapedText) === staticName;
|
|
241450
|
+
}
|
|
241448
241451
|
);
|
|
241449
241452
|
if (!staticMember || !staticMember.body || !staticMember.body.statements) {
|
|
241450
241453
|
return null;
|
|
@@ -241856,6 +241859,7 @@ var updateConstructor = (classNode, classMembers, statements, parameters) => {
|
|
|
241856
241859
|
var _a, _b, _c;
|
|
241857
241860
|
const constructorIndex = classMembers.findIndex((m) => m.kind === import_typescript4.default.SyntaxKind.Constructor);
|
|
241858
241861
|
const constructorMethod = classMembers[constructorIndex];
|
|
241862
|
+
if (constructorIndex < 0 && !(statements == null ? void 0 : statements.length) && !needsSuper(classNode)) return classMembers;
|
|
241859
241863
|
if (constructorIndex >= 0 && import_typescript4.default.isConstructorDeclaration(constructorMethod)) {
|
|
241860
241864
|
const constructorBodyStatements = (_b = (_a = constructorMethod.body) == null ? void 0 : _a.statements) != null ? _b : import_typescript4.default.factory.createNodeArray();
|
|
241861
241865
|
const hasSuper = constructorBodyStatements.some((s) => s.kind === import_typescript4.default.SyntaxKind.SuperKeyword);
|
|
@@ -241892,16 +241896,18 @@ var createConstructorBodyWithSuper = () => {
|
|
|
241892
241896
|
import_typescript4.default.factory.createCallExpression(import_typescript4.default.factory.createIdentifier("super"), void 0, void 0)
|
|
241893
241897
|
);
|
|
241894
241898
|
};
|
|
241895
|
-
var
|
|
241899
|
+
var tsPropDeclName = (node, typeChecker) => {
|
|
241896
241900
|
const declarationName = import_typescript4.default.getNameOfDeclaration(node);
|
|
241897
|
-
let
|
|
241901
|
+
let staticName = declarationName.getText();
|
|
241902
|
+
let dynamicName;
|
|
241898
241903
|
if (import_typescript4.default.isComputedPropertyName(declarationName)) {
|
|
241904
|
+
dynamicName = declarationName.expression.getText();
|
|
241899
241905
|
const type = typeChecker.getTypeAtLocation(declarationName.expression);
|
|
241900
241906
|
if (type != null && type.isLiteral()) {
|
|
241901
|
-
|
|
241907
|
+
staticName = type.value.toString();
|
|
241902
241908
|
}
|
|
241903
241909
|
}
|
|
241904
|
-
return
|
|
241910
|
+
return { staticName, dynamicName };
|
|
241905
241911
|
};
|
|
241906
241912
|
function getExternalStyles(style) {
|
|
241907
241913
|
return style.externalStyles.map((s) => s.absolutePath).reverse().reduce((extStyles, styleUrl) => {
|
|
@@ -256900,6 +256906,7 @@ var getBuildFeatures = (cmps) => {
|
|
|
256900
256906
|
member: cmps.some((c) => c.hasMember),
|
|
256901
256907
|
method: cmps.some((c) => c.hasMethod),
|
|
256902
256908
|
mode: cmps.some((c) => c.hasMode),
|
|
256909
|
+
modernPropertyDecls: cmps.some((c) => c.hasModernPropertyDecls),
|
|
256903
256910
|
observeAttribute: cmps.some((c) => c.hasAttribute || c.hasWatchCallback),
|
|
256904
256911
|
prop: cmps.some((c) => c.hasProp),
|
|
256905
256912
|
propBoolean: cmps.some((c) => c.hasPropBoolean),
|
|
@@ -258742,6 +258749,7 @@ var getLazyBuildConditionals = (config, cmps) => {
|
|
|
258742
258749
|
build2.initializeNextTick = config.extras.initializeNextTick;
|
|
258743
258750
|
const hasHydrateOutputTargets = config.outputTargets.some(isOutputTargetHydrate);
|
|
258744
258751
|
build2.hydrateClientSide = hasHydrateOutputTargets;
|
|
258752
|
+
build2.modernPropertyDecls = cmps.some((c) => c.hasModernPropertyDecls);
|
|
258745
258753
|
updateBuildConditionals(config, build2);
|
|
258746
258754
|
return build2;
|
|
258747
258755
|
};
|
|
@@ -263061,7 +263069,7 @@ var attachInternalsDecoratorsToStatic = (diagnostics, decoratedMembers, newMembe
|
|
|
263061
263069
|
return;
|
|
263062
263070
|
}
|
|
263063
263071
|
const [decoratedProp] = attachInternalsMembers;
|
|
263064
|
-
const name =
|
|
263072
|
+
const { staticName: name } = tsPropDeclName(decoratedProp, typeChecker);
|
|
263065
263073
|
newMembers.push(createStaticGetter("attachInternalsMemberName", convertValueToLiteral(name)));
|
|
263066
263074
|
};
|
|
263067
263075
|
|
|
@@ -263275,7 +263283,6 @@ var MEMBER_DECORATORS_TO_REMOVE = [
|
|
|
263275
263283
|
"State",
|
|
263276
263284
|
"Watch"
|
|
263277
263285
|
];
|
|
263278
|
-
var CONSTRUCTOR_DEFINED_MEMBER_DECORATORS = ["State", "Prop"];
|
|
263279
263286
|
|
|
263280
263287
|
// src/compiler/transformers/decorators-to-static/element-decorator.ts
|
|
263281
263288
|
var import_typescript46 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264134,7 +264141,7 @@ var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName
|
|
|
264134
264141
|
}
|
|
264135
264142
|
const decoratorParams = getDecoratorParameters(propDecorator, typeChecker);
|
|
264136
264143
|
const propOptions = decoratorParams[0] || {};
|
|
264137
|
-
const propName =
|
|
264144
|
+
const { staticName: propName, dynamicName: ogPropName } = tsPropDeclName(prop, typeChecker);
|
|
264138
264145
|
if (isMemberPrivate(prop)) {
|
|
264139
264146
|
const err2 = buildError(diagnostics);
|
|
264140
264147
|
err2.messageText = 'Properties decorated with the @Prop() decorator cannot be "private" nor "protected". More info: https://stenciljs.com/docs/properties';
|
|
@@ -264161,6 +264168,7 @@ var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName
|
|
|
264161
264168
|
getter: import_typescript51.default.isGetAccessor(prop),
|
|
264162
264169
|
setter: !!foundSetter
|
|
264163
264170
|
};
|
|
264171
|
+
if (ogPropName && ogPropName !== propName) propMeta.ogPropName = ogPropName;
|
|
264164
264172
|
if (typeStr !== "unknown") {
|
|
264165
264173
|
propMeta.attribute = getAttributeName(propName, propOptions);
|
|
264166
264174
|
propMeta.reflect = getReflect(diagnostics, propDecorator, propOptions);
|
|
@@ -264311,11 +264319,10 @@ var stateDecoratorToStatic = (prop, typeChecker, decoratorName) => {
|
|
|
264311
264319
|
if (stateDecorator == null) {
|
|
264312
264320
|
return null;
|
|
264313
264321
|
}
|
|
264314
|
-
const stateName =
|
|
264315
|
-
|
|
264316
|
-
|
|
264317
|
-
|
|
264318
|
-
);
|
|
264322
|
+
const { staticName: stateName, dynamicName: ogPropName } = tsPropDeclName(prop, typeChecker);
|
|
264323
|
+
const meta = {};
|
|
264324
|
+
if (ogPropName && ogPropName !== stateName) meta.ogPropName = ogPropName;
|
|
264325
|
+
return import_typescript52.default.factory.createPropertyAssignment(import_typescript52.default.factory.createStringLiteral(stateName), convertValueToLiteral(meta));
|
|
264319
264326
|
};
|
|
264320
264327
|
|
|
264321
264328
|
// src/compiler/transformers/decorators-to-static/watch-decorator.ts
|
|
@@ -264415,9 +264422,9 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod
|
|
|
264415
264422
|
importAliasMap.get("AttachInternals")
|
|
264416
264423
|
);
|
|
264417
264424
|
}
|
|
264418
|
-
const updatedClassFields = handleClassFields(classNode, filteredMethodsAndFields, typeChecker, importAliasMap);
|
|
264419
264425
|
validateMethods(diagnostics, classMembers);
|
|
264420
264426
|
const currentDecorators = retrieveTsDecorators(classNode);
|
|
264427
|
+
const updatedClassFields = updateConstructor(classNode, filteredMethodsAndFields, []);
|
|
264421
264428
|
return import_typescript54.default.factory.updateClassDeclaration(
|
|
264422
264429
|
classNode,
|
|
264423
264430
|
[
|
|
@@ -264435,7 +264442,7 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod
|
|
|
264435
264442
|
};
|
|
264436
264443
|
var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap) => {
|
|
264437
264444
|
return classMembers.map((member2) => {
|
|
264438
|
-
var _a;
|
|
264445
|
+
var _a, _b;
|
|
264439
264446
|
const currentDecorators = retrieveTsDecorators(member2);
|
|
264440
264447
|
const newDecorators = filterDecorators(
|
|
264441
264448
|
currentDecorators,
|
|
@@ -264457,7 +264464,7 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap)
|
|
|
264457
264464
|
} else if (import_typescript54.default.isGetAccessor(member2)) {
|
|
264458
264465
|
return import_typescript54.default.factory.updateGetAccessorDeclaration(
|
|
264459
264466
|
member2,
|
|
264460
|
-
|
|
264467
|
+
[...newDecorators != null ? newDecorators : [], ...(_b = retrieveTsModifiers(member2)) != null ? _b : []],
|
|
264461
264468
|
member2.name,
|
|
264462
264469
|
member2.parameters,
|
|
264463
264470
|
member2.type,
|
|
@@ -264468,19 +264475,15 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap)
|
|
|
264468
264475
|
err2.messageText = "A get accessor should be decorated before a set accessor";
|
|
264469
264476
|
augmentDiagnosticWithNode(err2, member2);
|
|
264470
264477
|
} else if (import_typescript54.default.isPropertyDeclaration(member2)) {
|
|
264471
|
-
|
|
264472
|
-
|
|
264473
|
-
|
|
264474
|
-
|
|
264475
|
-
|
|
264476
|
-
|
|
264477
|
-
|
|
264478
|
-
|
|
264479
|
-
|
|
264480
|
-
member2.type,
|
|
264481
|
-
member2.initializer
|
|
264482
|
-
);
|
|
264483
|
-
}
|
|
264478
|
+
const modifiers = retrieveTsModifiers(member2);
|
|
264479
|
+
return import_typescript54.default.factory.updatePropertyDeclaration(
|
|
264480
|
+
member2,
|
|
264481
|
+
[...newDecorators != null ? newDecorators : [], ...modifiers != null ? modifiers : []],
|
|
264482
|
+
member2.name,
|
|
264483
|
+
member2.questionToken,
|
|
264484
|
+
member2.type,
|
|
264485
|
+
member2.initializer
|
|
264486
|
+
);
|
|
264484
264487
|
} else {
|
|
264485
264488
|
const err2 = buildError(diagnostics);
|
|
264486
264489
|
err2.messageText = "Unknown class member encountered!";
|
|
@@ -264504,49 +264507,10 @@ var filterDecorators = (decorators, excludeList) => {
|
|
|
264504
264507
|
}
|
|
264505
264508
|
return decorators;
|
|
264506
264509
|
};
|
|
264507
|
-
function handleClassFields(classNode, classMembers, typeChecker, importAliasMap) {
|
|
264508
|
-
var _a;
|
|
264509
|
-
const statements = [];
|
|
264510
|
-
const updatedClassMembers = [];
|
|
264511
|
-
for (const member2 of classMembers) {
|
|
264512
|
-
if (shouldInitializeInConstructor(member2, importAliasMap) && import_typescript54.default.isPropertyDeclaration(member2)) {
|
|
264513
|
-
const memberName = tsPropDeclNameAsString(member2, typeChecker);
|
|
264514
|
-
statements.push(
|
|
264515
|
-
import_typescript54.default.factory.createExpressionStatement(
|
|
264516
|
-
import_typescript54.default.factory.createBinaryExpression(
|
|
264517
|
-
import_typescript54.default.factory.createPropertyAccessExpression(import_typescript54.default.factory.createThis(), import_typescript54.default.factory.createIdentifier(memberName)),
|
|
264518
|
-
import_typescript54.default.factory.createToken(import_typescript54.default.SyntaxKind.EqualsToken),
|
|
264519
|
-
// if the member has no initializer we should default to setting it to
|
|
264520
|
-
// just 'undefined'
|
|
264521
|
-
(_a = member2.initializer) != null ? _a : import_typescript54.default.factory.createIdentifier("undefined")
|
|
264522
|
-
)
|
|
264523
|
-
)
|
|
264524
|
-
);
|
|
264525
|
-
} else {
|
|
264526
|
-
updatedClassMembers.push(member2);
|
|
264527
|
-
}
|
|
264528
|
-
}
|
|
264529
|
-
if (statements.length === 0) {
|
|
264530
|
-
return updatedClassMembers;
|
|
264531
|
-
} else {
|
|
264532
|
-
return updateConstructor(classNode, updatedClassMembers, statements);
|
|
264533
|
-
}
|
|
264534
|
-
}
|
|
264535
|
-
var shouldInitializeInConstructor = (member2, importAliasMap) => {
|
|
264536
|
-
const currentDecorators = retrieveTsDecorators(member2);
|
|
264537
|
-
if (currentDecorators === void 0) {
|
|
264538
|
-
return false;
|
|
264539
|
-
}
|
|
264540
|
-
const filteredDecorators = filterDecorators(
|
|
264541
|
-
currentDecorators,
|
|
264542
|
-
CONSTRUCTOR_DEFINED_MEMBER_DECORATORS.map((decorator) => importAliasMap.get(decorator))
|
|
264543
|
-
);
|
|
264544
|
-
return currentDecorators !== filteredDecorators;
|
|
264545
|
-
};
|
|
264546
264510
|
|
|
264547
264511
|
// src/compiler/transformers/static-to-meta/parse-static.ts
|
|
264548
264512
|
var import_path51 = require("path");
|
|
264549
|
-
var
|
|
264513
|
+
var import_typescript63 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264550
264514
|
|
|
264551
264515
|
// src/compiler/transformers/static-to-meta/call-expression.ts
|
|
264552
264516
|
var import_typescript56 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264667,7 +264631,7 @@ var visitCallExpressionArg = (m, arg) => {
|
|
|
264667
264631
|
|
|
264668
264632
|
// src/compiler/transformers/static-to-meta/component.ts
|
|
264669
264633
|
var import_path47 = require("path");
|
|
264670
|
-
var
|
|
264634
|
+
var import_typescript60 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264671
264635
|
|
|
264672
264636
|
// src/compiler/transformers/add-component-meta-static.ts
|
|
264673
264637
|
var import_typescript57 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264739,6 +264703,27 @@ var setComponentBuildConditionals = (cmpMeta) => {
|
|
|
264739
264703
|
cmpMeta.isPlain = !cmpMeta.hasMember && !cmpMeta.hasStyle && !cmpMeta.hasLifecycle && !cmpMeta.hasListener && !cmpMeta.hasVdomRender;
|
|
264740
264704
|
};
|
|
264741
264705
|
|
|
264706
|
+
// src/compiler/transformers/detect-modern-prop-decls.ts
|
|
264707
|
+
var import_typescript58 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264708
|
+
var detectModernPropDeclarations = (classNode, cmp) => {
|
|
264709
|
+
const parsedProps = getStaticValue(classNode.members, "properties");
|
|
264710
|
+
const parsedStates = getStaticValue(classNode.members, "states");
|
|
264711
|
+
if (!parsedProps && !parsedStates) {
|
|
264712
|
+
cmp.hasModernPropertyDecls = false;
|
|
264713
|
+
return;
|
|
264714
|
+
}
|
|
264715
|
+
const members = [...Object.entries(parsedProps || {}), ...Object.entries(parsedStates || {})];
|
|
264716
|
+
for (const [propName, meta] of members) {
|
|
264717
|
+
const dynamicPropName = meta.ogPropName || "";
|
|
264718
|
+
const prop = classNode.members.find((m) => {
|
|
264719
|
+
return import_typescript58.default.isPropertyDeclaration(m) && (import_typescript58.default.isComputedPropertyName(m.name) && m.name.expression.getText() === dynamicPropName || m.name.getText() === propName);
|
|
264720
|
+
});
|
|
264721
|
+
if (!prop) continue;
|
|
264722
|
+
cmp.hasModernPropertyDecls = true;
|
|
264723
|
+
break;
|
|
264724
|
+
}
|
|
264725
|
+
};
|
|
264726
|
+
|
|
264742
264727
|
// src/compiler/transformers/static-to-meta/attach-internals.ts
|
|
264743
264728
|
var parseAttachInternals = (staticMembers) => {
|
|
264744
264729
|
const parsedAttachInternalsMemberName = getStaticValue(staticMembers, "attachInternalsMemberName");
|
|
@@ -264750,13 +264735,13 @@ var parseAttachInternals = (staticMembers) => {
|
|
|
264750
264735
|
};
|
|
264751
264736
|
|
|
264752
264737
|
// src/compiler/transformers/static-to-meta/class-methods.ts
|
|
264753
|
-
var
|
|
264738
|
+
var import_typescript59 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264754
264739
|
var parseClassMethods = (cmpNode, cmpMeta) => {
|
|
264755
264740
|
const classMembers = cmpNode.members;
|
|
264756
264741
|
if (!classMembers || classMembers.length === 0) {
|
|
264757
264742
|
return;
|
|
264758
264743
|
}
|
|
264759
|
-
const classMethods = classMembers.filter((m) =>
|
|
264744
|
+
const classMethods = classMembers.filter((m) => import_typescript59.default.isMethodDeclaration(m));
|
|
264760
264745
|
if (classMethods.length === 0) {
|
|
264761
264746
|
return;
|
|
264762
264747
|
}
|
|
@@ -265120,6 +265105,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265120
265105
|
hasMember: false,
|
|
265121
265106
|
hasMethod: false,
|
|
265122
265107
|
hasMode: false,
|
|
265108
|
+
hasModernPropertyDecls: false,
|
|
265123
265109
|
hasAttribute: false,
|
|
265124
265110
|
hasProp: false,
|
|
265125
265111
|
hasPropNumber: false,
|
|
@@ -265155,15 +265141,16 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265155
265141
|
};
|
|
265156
265142
|
const visitComponentChildNode = (node) => {
|
|
265157
265143
|
validateComponentMembers(node);
|
|
265158
|
-
if (
|
|
265144
|
+
if (import_typescript60.default.isCallExpression(node)) {
|
|
265159
265145
|
parseCallExpression(cmp, node);
|
|
265160
|
-
} else if (
|
|
265146
|
+
} else if (import_typescript60.default.isStringLiteral(node)) {
|
|
265161
265147
|
parseStringLiteral(cmp, node);
|
|
265162
265148
|
}
|
|
265163
265149
|
node.forEachChild(visitComponentChildNode);
|
|
265164
265150
|
};
|
|
265165
265151
|
visitComponentChildNode(cmpNode);
|
|
265166
265152
|
parseClassMethods(cmpNode, cmp);
|
|
265153
|
+
detectModernPropDeclarations(cmpNode, cmp);
|
|
265167
265154
|
cmp.htmlAttrNames = unique(cmp.htmlAttrNames);
|
|
265168
265155
|
cmp.htmlTagNames = unique(cmp.htmlTagNames);
|
|
265169
265156
|
cmp.potentialCmpRefs = unique(cmp.potentialCmpRefs);
|
|
@@ -265171,7 +265158,11 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265171
265158
|
if (transformOpts && transformOpts.componentMetadata === "compilerstatic") {
|
|
265172
265159
|
cmpNode = addComponentMetaStatic(cmpNode, cmp);
|
|
265173
265160
|
}
|
|
265174
|
-
moduleFile.cmps.
|
|
265161
|
+
const foundIndex = moduleFile.cmps.findIndex(
|
|
265162
|
+
(c) => c.tagName === cmp.tagName && c.sourceFilePath === cmp.sourceFilePath
|
|
265163
|
+
);
|
|
265164
|
+
if (foundIndex > -1) moduleFile.cmps[foundIndex] = cmp;
|
|
265165
|
+
else moduleFile.cmps.push(cmp);
|
|
265175
265166
|
compilerCtx.nodeMap.set(cmpNode, cmp);
|
|
265176
265167
|
return cmpNode;
|
|
265177
265168
|
};
|
|
@@ -265180,15 +265171,15 @@ var validateComponentMembers = (node) => {
|
|
|
265180
265171
|
/**
|
|
265181
265172
|
* the component has a getter called "shadowRoot"
|
|
265182
265173
|
*/
|
|
265183
|
-
|
|
265174
|
+
import_typescript60.default.isGetAccessorDeclaration(node) && import_typescript60.default.isIdentifier(node.name) && typeof node.name.escapedText === "string" && BLACKLISTED_COMPONENT_METHODS.includes(node.name.escapedText) && /**
|
|
265184
265175
|
* the parent node is a class declaration
|
|
265185
265176
|
*/
|
|
265186
|
-
node.parent &&
|
|
265177
|
+
node.parent && import_typescript60.default.isClassDeclaration(node.parent)
|
|
265187
265178
|
) {
|
|
265188
265179
|
const propName = node.name.escapedText;
|
|
265189
|
-
const decorator =
|
|
265190
|
-
if (
|
|
265191
|
-
(prop) =>
|
|
265180
|
+
const decorator = import_typescript60.default.getDecorators(node.parent)[0];
|
|
265181
|
+
if (import_typescript60.default.isCallExpression(decorator.expression) && decorator.expression.arguments.length === 1 && import_typescript60.default.isObjectLiteralExpression(decorator.expression.arguments[0]) && decorator.expression.arguments[0].properties.some(
|
|
265182
|
+
(prop) => import_typescript60.default.isPropertyAssignment(prop) && prop.name.getText() === "tag"
|
|
265192
265183
|
)) {
|
|
265193
265184
|
const componentName = node.parent.name.getText();
|
|
265194
265185
|
throw new Error(
|
|
@@ -265234,7 +265225,7 @@ var parseAssetsDirs = (staticMembers, componentFilePath) => {
|
|
|
265234
265225
|
|
|
265235
265226
|
// src/compiler/transformers/static-to-meta/import.ts
|
|
265236
265227
|
var import_path50 = require("path");
|
|
265237
|
-
var
|
|
265228
|
+
var import_typescript62 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
265238
265229
|
|
|
265239
265230
|
// src/compiler/transformers/collections/add-external-import.ts
|
|
265240
265231
|
var import_path49 = require("path");
|
|
@@ -265243,7 +265234,7 @@ var import_path49 = require("path");
|
|
|
265243
265234
|
var import_path48 = require("path");
|
|
265244
265235
|
|
|
265245
265236
|
// src/compiler/transformers/collections/parse-collection-components.ts
|
|
265246
|
-
var
|
|
265237
|
+
var import_typescript61 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
265247
265238
|
var parseCollectionComponents = (config, compilerCtx, buildCtx, collectionDir, collectionManifest, collection) => {
|
|
265248
265239
|
if (collectionManifest.entries) {
|
|
265249
265240
|
collectionManifest.entries.forEach((entryPath) => {
|
|
@@ -265254,7 +265245,7 @@ var parseCollectionComponents = (config, compilerCtx, buildCtx, collectionDir, c
|
|
|
265254
265245
|
};
|
|
265255
265246
|
var transpileCollectionModule = (config, compilerCtx, buildCtx, collection, inputFileName) => {
|
|
265256
265247
|
const sourceText = compilerCtx.fs.readFileSync(inputFileName);
|
|
265257
|
-
const sourceFile =
|
|
265248
|
+
const sourceFile = import_typescript61.default.createSourceFile(inputFileName, sourceText, import_typescript61.default.ScriptTarget.ES2017, true, import_typescript61.default.ScriptKind.JS);
|
|
265258
265249
|
return updateModule(config, compilerCtx, buildCtx, sourceFile, sourceText, inputFileName, void 0, collection);
|
|
265259
265250
|
};
|
|
265260
265251
|
|
|
@@ -265402,7 +265393,7 @@ var addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containingFi
|
|
|
265402
265393
|
|
|
265403
265394
|
// src/compiler/transformers/static-to-meta/import.ts
|
|
265404
265395
|
var parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, importNode, resolveCollections) => {
|
|
265405
|
-
if (importNode.moduleSpecifier &&
|
|
265396
|
+
if (importNode.moduleSpecifier && import_typescript62.default.isStringLiteral(importNode.moduleSpecifier)) {
|
|
265406
265397
|
let importPath = importNode.moduleSpecifier.text;
|
|
265407
265398
|
if (!moduleFile.originalImports.includes(importPath)) {
|
|
265408
265399
|
moduleFile.originalImports.push(importPath);
|
|
@@ -265438,6 +265429,7 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265438
265429
|
const emitFileName = (0, import_path51.basename)(emitFilePath);
|
|
265439
265430
|
emitFilePath = normalizePath(join(srcDirPath, emitFileName));
|
|
265440
265431
|
const moduleFile = createModule(tsSourceFile, sourceFileText, emitFilePath);
|
|
265432
|
+
if (prevModuleFile == null ? void 0 : prevModuleFile.cmps) moduleFile.cmps = prevModuleFile.cmps;
|
|
265441
265433
|
if (emitFilePath.endsWith(".js.map")) {
|
|
265442
265434
|
moduleFile.sourceMapPath = emitFilePath;
|
|
265443
265435
|
moduleFile.sourceMapFileText = sourceFileText;
|
|
@@ -265449,15 +265441,15 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265449
265441
|
compilerCtx.moduleMap.set(moduleFileKey, moduleFile);
|
|
265450
265442
|
compilerCtx.changedModules.add(moduleFile.sourceFilePath);
|
|
265451
265443
|
const visitNode = (node) => {
|
|
265452
|
-
if (
|
|
265444
|
+
if (import_typescript63.default.isClassDeclaration(node)) {
|
|
265453
265445
|
parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile);
|
|
265454
265446
|
return;
|
|
265455
|
-
} else if (
|
|
265447
|
+
} else if (import_typescript63.default.isImportDeclaration(node)) {
|
|
265456
265448
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
|
|
265457
265449
|
return;
|
|
265458
|
-
} else if (
|
|
265450
|
+
} else if (import_typescript63.default.isCallExpression(node)) {
|
|
265459
265451
|
parseCallExpression(moduleFile, node);
|
|
265460
|
-
} else if (
|
|
265452
|
+
} else if (import_typescript63.default.isStringLiteral(node)) {
|
|
265461
265453
|
parseStringLiteral(moduleFile, node);
|
|
265462
265454
|
}
|
|
265463
265455
|
node.forEachChild(visitNode);
|
|
@@ -265469,12 +265461,12 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265469
265461
|
}
|
|
265470
265462
|
visitNode(tsSourceFile);
|
|
265471
265463
|
if (moduleFile.cmps.length > 0) {
|
|
265472
|
-
moduleFile.staticSourceFile =
|
|
265464
|
+
moduleFile.staticSourceFile = import_typescript63.default.createSourceFile(
|
|
265473
265465
|
sourceFilePath,
|
|
265474
265466
|
sourceFileText,
|
|
265475
265467
|
tsSourceFile.languageVersion,
|
|
265476
265468
|
true,
|
|
265477
|
-
|
|
265469
|
+
import_typescript63.default.ScriptKind.JS
|
|
265478
265470
|
);
|
|
265479
265471
|
}
|
|
265480
265472
|
return moduleFile;
|
|
@@ -266717,7 +266709,7 @@ var isWatchIgnorePath = (config, path6) => {
|
|
|
266717
266709
|
};
|
|
266718
266710
|
|
|
266719
266711
|
// src/compiler/transpile/create-watch-program.ts
|
|
266720
|
-
var
|
|
266712
|
+
var import_typescript64 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
266721
266713
|
var createTsWatchProgram = async (config, buildCallback) => {
|
|
266722
266714
|
let isRunning = false;
|
|
266723
266715
|
let lastTsBuilder;
|
|
@@ -266725,7 +266717,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266725
266717
|
let rebuildTimer;
|
|
266726
266718
|
const optionsToExtend = getTsOptionsToExtend(config);
|
|
266727
266719
|
const tsWatchSys = {
|
|
266728
|
-
...
|
|
266720
|
+
...import_typescript64.default.sys,
|
|
266729
266721
|
/**
|
|
266730
266722
|
* Override the default `setTimeout` implementation in the {@link ts.System}. The reasoning
|
|
266731
266723
|
* behind this change is not explicitly clear, but this appears to be related to debouncing
|
|
@@ -266753,7 +266745,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266753
266745
|
}
|
|
266754
266746
|
};
|
|
266755
266747
|
config.sys.addDestroy(() => tsWatchSys.clearTimeout(timeoutId));
|
|
266756
|
-
const tsWatchHost =
|
|
266748
|
+
const tsWatchHost = import_typescript64.default.createWatchCompilerHost(
|
|
266757
266749
|
// Use the TS config from the Stencil project
|
|
266758
266750
|
config.tsconfig,
|
|
266759
266751
|
optionsToExtend,
|
|
@@ -266761,7 +266753,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266761
266753
|
// We use the `createEmitAndSemanticDiagnosticsBuilderProgram` as opposed to the
|
|
266762
266754
|
// `createSemanticDiagnosticsBuilderProgram` because we need our program to emit
|
|
266763
266755
|
// output files in addition to checking for errors
|
|
266764
|
-
|
|
266756
|
+
import_typescript64.default.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
266765
266757
|
// Add a callback to log out diagnostics as the program runs
|
|
266766
266758
|
(reportDiagnostic) => {
|
|
266767
266759
|
config.logger.debug("watch reportDiagnostic:" + reportDiagnostic.messageText);
|
|
@@ -266788,7 +266780,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266788
266780
|
// Create the watch builder program instance and make it available on the
|
|
266789
266781
|
// returned object. This provides us an easy way to teardown the program
|
|
266790
266782
|
// down-the-road.
|
|
266791
|
-
program:
|
|
266783
|
+
program: import_typescript64.default.createWatchProgram(tsWatchHost),
|
|
266792
266784
|
// This will be called via a callback on the watch build whenever a file
|
|
266793
266785
|
// change is detected
|
|
266794
266786
|
rebuild: () => {
|
|
@@ -268832,7 +268824,7 @@ var extname8 = (str) => {
|
|
|
268832
268824
|
var SKIP_EXT = /* @__PURE__ */ new Set(["zip", "rar", "tar", "gz", "bz2", "png", "jpeg", "jpg", "gif", "pdf", "tiff", "psd"]);
|
|
268833
268825
|
|
|
268834
268826
|
// src/compiler/sys/node-require.ts
|
|
268835
|
-
var
|
|
268827
|
+
var import_typescript65 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
268836
268828
|
var nodeRequire = (id) => {
|
|
268837
268829
|
const results = {
|
|
268838
268830
|
module: void 0,
|
|
@@ -268847,13 +268839,13 @@ var nodeRequire = (id) => {
|
|
|
268847
268839
|
require.extensions[".ts"] = (module2, fileName) => {
|
|
268848
268840
|
let sourceText = fs3.readFileSync(fileName, "utf8");
|
|
268849
268841
|
if (fileName.endsWith(".ts")) {
|
|
268850
|
-
const tsResults =
|
|
268842
|
+
const tsResults = import_typescript65.default.transpileModule(sourceText, {
|
|
268851
268843
|
fileName,
|
|
268852
268844
|
compilerOptions: {
|
|
268853
|
-
module:
|
|
268854
|
-
moduleResolution:
|
|
268845
|
+
module: import_typescript65.default.ModuleKind.CommonJS,
|
|
268846
|
+
moduleResolution: import_typescript65.default.ModuleResolutionKind.NodeJs,
|
|
268855
268847
|
esModuleInterop: true,
|
|
268856
|
-
target:
|
|
268848
|
+
target: import_typescript65.default.ScriptTarget.ES2017,
|
|
268857
268849
|
allowJs: true
|
|
268858
268850
|
}
|
|
268859
268851
|
});
|
|
@@ -269655,7 +269647,7 @@ var createCompiler = async (userConfig) => {
|
|
|
269655
269647
|
const sys = config.sys;
|
|
269656
269648
|
const compilerCtx = new CompilerContext();
|
|
269657
269649
|
if (isFunction(config.sys.setupCompiler)) {
|
|
269658
|
-
config.sys.setupCompiler({ ts:
|
|
269650
|
+
config.sys.setupCompiler({ ts: import_typescript66.default });
|
|
269659
269651
|
}
|
|
269660
269652
|
compilerCtx.fs = createInMemoryFs(sys);
|
|
269661
269653
|
compilerCtx.cache = new Cache(config, createInMemoryFs(sys));
|
|
@@ -269689,7 +269681,7 @@ var import_path63 = require("path");
|
|
|
269689
269681
|
|
|
269690
269682
|
// src/compiler/sys/typescript/typescript-config.ts
|
|
269691
269683
|
var import_path62 = require("path");
|
|
269692
|
-
var
|
|
269684
|
+
var import_typescript67 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
269693
269685
|
var validateTsConfig = async (config, sys, init) => {
|
|
269694
269686
|
var _a;
|
|
269695
269687
|
const tsconfig = {
|
|
@@ -269711,7 +269703,7 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269711
269703
|
} else {
|
|
269712
269704
|
tsconfig.path = readTsConfig.path;
|
|
269713
269705
|
const host = {
|
|
269714
|
-
...
|
|
269706
|
+
...import_typescript67.default.sys,
|
|
269715
269707
|
readFile: (p) => {
|
|
269716
269708
|
if (p === tsconfig.path) {
|
|
269717
269709
|
return readTsConfig.content;
|
|
@@ -269722,7 +269714,7 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269722
269714
|
fileExists: (p) => sys.accessSync(p),
|
|
269723
269715
|
onUnRecoverableConfigFileDiagnostic: (e) => console.error(e)
|
|
269724
269716
|
};
|
|
269725
|
-
const results =
|
|
269717
|
+
const results = import_typescript67.default.getParsedCommandLineOfConfigFile(tsconfig.path, {}, host);
|
|
269726
269718
|
if (results === void 0) {
|
|
269727
269719
|
throw "Encountered an error reading tsconfig!";
|
|
269728
269720
|
}
|
|
@@ -269766,12 +269758,12 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269766
269758
|
}
|
|
269767
269759
|
if (results.options) {
|
|
269768
269760
|
tsconfig.compilerOptions = results.options;
|
|
269769
|
-
const target = (_a = tsconfig.compilerOptions.target) != null ? _a :
|
|
269770
|
-
if ([
|
|
269761
|
+
const target = (_a = tsconfig.compilerOptions.target) != null ? _a : import_typescript67.default.ScriptTarget.ES5;
|
|
269762
|
+
if ([import_typescript67.default.ScriptTarget.ES3, import_typescript67.default.ScriptTarget.ES5, import_typescript67.default.ScriptTarget.ES2015, import_typescript67.default.ScriptTarget.ES2016].includes(target)) {
|
|
269771
269763
|
const warn = buildWarn(tsconfig.diagnostics);
|
|
269772
269764
|
warn.messageText = `To improve bundling, it is always recommended to set the tsconfig.json \u201Ctarget\u201D setting to "es2017". Note that the compiler will automatically handle transpilation for ES5-only browsers.`;
|
|
269773
269765
|
}
|
|
269774
|
-
if (tsconfig.compilerOptions.module !==
|
|
269766
|
+
if (tsconfig.compilerOptions.module !== import_typescript67.default.ModuleKind.ESNext && !config._isTesting) {
|
|
269775
269767
|
const warn = buildWarn(tsconfig.diagnostics);
|
|
269776
269768
|
warn.messageText = `To improve bundling, it is always recommended to set the tsconfig.json \u201Cmodule\u201D setting to \u201Cesnext\u201D. Note that the compiler will automatically handle bundling both modern and legacy builds.`;
|
|
269777
269769
|
}
|
|
@@ -271168,26 +271160,26 @@ var VALID_TARGET = /* @__PURE__ */ new Set(["latest", "esnext", "es2020", "es201
|
|
|
271168
271160
|
|
|
271169
271161
|
// src/compiler/transpile/transpile-module.ts
|
|
271170
271162
|
var import_sys_api_node5 = require("../sys/node/index.js");
|
|
271171
|
-
var
|
|
271163
|
+
var import_typescript69 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
271172
271164
|
|
|
271173
271165
|
// src/compiler/transformers/static-to-meta/visitor.ts
|
|
271174
271166
|
var import_path67 = require("path");
|
|
271175
|
-
var
|
|
271167
|
+
var import_typescript68 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
271176
271168
|
var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
|
|
271177
271169
|
return (transformCtx) => {
|
|
271178
271170
|
let dirPath;
|
|
271179
271171
|
let moduleFile;
|
|
271180
271172
|
const visitNode = (node) => {
|
|
271181
|
-
if (
|
|
271173
|
+
if (import_typescript68.default.isClassDeclaration(node)) {
|
|
271182
271174
|
return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, transformOpts);
|
|
271183
|
-
} else if (
|
|
271175
|
+
} else if (import_typescript68.default.isImportDeclaration(node)) {
|
|
271184
271176
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, dirPath, node, !transformOpts.isolatedModules);
|
|
271185
|
-
} else if (
|
|
271177
|
+
} else if (import_typescript68.default.isCallExpression(node)) {
|
|
271186
271178
|
parseCallExpression(moduleFile, node);
|
|
271187
|
-
} else if (
|
|
271179
|
+
} else if (import_typescript68.default.isStringLiteral(node)) {
|
|
271188
271180
|
parseStringLiteral(moduleFile, node);
|
|
271189
271181
|
}
|
|
271190
|
-
return
|
|
271182
|
+
return import_typescript68.default.visitEachChild(node, visitNode, transformCtx);
|
|
271191
271183
|
};
|
|
271192
271184
|
return (tsSourceFile) => {
|
|
271193
271185
|
dirPath = (0, import_path67.dirname)(tsSourceFile.fileName);
|
|
@@ -271233,13 +271225,13 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271233
271225
|
moduleFile: null
|
|
271234
271226
|
};
|
|
271235
271227
|
if (transformOpts.module === "cjs") {
|
|
271236
|
-
tsCompilerOptions.module =
|
|
271228
|
+
tsCompilerOptions.module = import_typescript69.default.ModuleKind.CommonJS;
|
|
271237
271229
|
} else {
|
|
271238
|
-
tsCompilerOptions.module =
|
|
271230
|
+
tsCompilerOptions.module = import_typescript69.default.ModuleKind.ESNext;
|
|
271239
271231
|
}
|
|
271240
271232
|
tsCompilerOptions.target = getScriptTargetKind(transformOpts);
|
|
271241
271233
|
if ((sourceFilePath.endsWith(".tsx") || sourceFilePath.endsWith(".jsx")) && tsCompilerOptions.jsx == null) {
|
|
271242
|
-
tsCompilerOptions.jsx =
|
|
271234
|
+
tsCompilerOptions.jsx = import_typescript69.default.JsxEmit.React;
|
|
271243
271235
|
}
|
|
271244
271236
|
if (tsCompilerOptions.jsx != null && !isString(tsCompilerOptions.jsxFactory)) {
|
|
271245
271237
|
tsCompilerOptions.jsxFactory = "h";
|
|
@@ -271250,7 +271242,7 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271250
271242
|
if (tsCompilerOptions.paths && !isString(tsCompilerOptions.baseUrl)) {
|
|
271251
271243
|
tsCompilerOptions.baseUrl = ".";
|
|
271252
271244
|
}
|
|
271253
|
-
const sourceFile =
|
|
271245
|
+
const sourceFile = import_typescript69.default.createSourceFile(sourceFilePath, input, tsCompilerOptions.target);
|
|
271254
271246
|
const compilerHost = {
|
|
271255
271247
|
getSourceFile: (fileName) => {
|
|
271256
271248
|
return normalizePath(fileName) === normalizePath(sourceFilePath) ? sourceFile : void 0;
|
|
@@ -271266,13 +271258,13 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271266
271258
|
useCaseSensitiveFileNames: () => false,
|
|
271267
271259
|
getCanonicalFileName: (fileName) => fileName,
|
|
271268
271260
|
getCurrentDirectory: () => transformOpts.currentDirectory || process.cwd(),
|
|
271269
|
-
getNewLine: () =>
|
|
271261
|
+
getNewLine: () => import_typescript69.default.sys.newLine || "\n",
|
|
271270
271262
|
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath),
|
|
271271
271263
|
readFile: () => "",
|
|
271272
271264
|
directoryExists: () => true,
|
|
271273
271265
|
getDirectories: () => []
|
|
271274
271266
|
};
|
|
271275
|
-
const program =
|
|
271267
|
+
const program = import_typescript69.default.createProgram([sourceFilePath], tsCompilerOptions, compilerHost);
|
|
271276
271268
|
const typeChecker = program.getTypeChecker();
|
|
271277
271269
|
const transformers = {
|
|
271278
271270
|
before: [
|
|
@@ -271304,10 +271296,10 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271304
271296
|
};
|
|
271305
271297
|
var getScriptTargetKind = (transformOpts) => {
|
|
271306
271298
|
const target = transformOpts.target && transformOpts.target.toUpperCase();
|
|
271307
|
-
if (isNumber(
|
|
271308
|
-
return
|
|
271299
|
+
if (isNumber(import_typescript69.default.ScriptTarget[target])) {
|
|
271300
|
+
return import_typescript69.default.ScriptTarget[target];
|
|
271309
271301
|
}
|
|
271310
|
-
return
|
|
271302
|
+
return import_typescript69.default.ScriptTarget.Latest;
|
|
271311
271303
|
};
|
|
271312
271304
|
|
|
271313
271305
|
// src/compiler/transpile.ts
|