@rindo/core 4.23.0 → 4.23.2
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/rindo.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 +637 -462
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +602 -460
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +31 -23
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +60 -4
- package/internal/testing/index.js +601 -458
- 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/rindo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Compiler v4.23.
|
|
2
|
+
Rindo Compiler v4.23.2 | MIT Licensed | https://rindojs.web.app
|
|
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 = "1757063755";
|
|
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{1F579}";
|
|
238166
|
+
var version = "4.23.2";
|
|
238167
238167
|
var versions = {
|
|
238168
238168
|
rindo: 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
|
};
|
|
@@ -263057,7 +263065,7 @@ var attachInternalsDecoratorsToStatic = (diagnostics, decoratedMembers, newMembe
|
|
|
263057
263065
|
return;
|
|
263058
263066
|
}
|
|
263059
263067
|
const [decoratedProp] = attachInternalsMembers;
|
|
263060
|
-
const name =
|
|
263068
|
+
const { staticName: name } = tsPropDeclName(decoratedProp, typeChecker);
|
|
263061
263069
|
newMembers.push(createStaticGetter("attachInternalsMemberName", convertValueToLiteral(name)));
|
|
263062
263070
|
};
|
|
263063
263071
|
|
|
@@ -263271,7 +263279,6 @@ var MEMBER_DECORATORS_TO_REMOVE = [
|
|
|
263271
263279
|
"State",
|
|
263272
263280
|
"Watch"
|
|
263273
263281
|
];
|
|
263274
|
-
var CONSTRUCTOR_DEFINED_MEMBER_DECORATORS = ["State", "Prop"];
|
|
263275
263282
|
|
|
263276
263283
|
// src/compiler/transformers/decorators-to-static/element-decorator.ts
|
|
263277
263284
|
var import_typescript46 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264130,7 +264137,7 @@ var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName
|
|
|
264130
264137
|
}
|
|
264131
264138
|
const decoratorParams = getDecoratorParameters(propDecorator, typeChecker);
|
|
264132
264139
|
const propOptions = decoratorParams[0] || {};
|
|
264133
|
-
const propName =
|
|
264140
|
+
const { staticName: propName, dynamicName: ogPropName } = tsPropDeclName(prop, typeChecker);
|
|
264134
264141
|
if (isMemberPrivate(prop)) {
|
|
264135
264142
|
const err2 = buildError(diagnostics);
|
|
264136
264143
|
err2.messageText = 'Properties decorated with the @Prop() decorator cannot be "private" nor "protected". More info: https://rindojs.web.app/docs/properties';
|
|
@@ -264157,6 +264164,7 @@ var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName
|
|
|
264157
264164
|
getter: import_typescript51.default.isGetAccessor(prop),
|
|
264158
264165
|
setter: !!foundSetter
|
|
264159
264166
|
};
|
|
264167
|
+
if (ogPropName && ogPropName !== propName) propMeta.ogPropName = ogPropName;
|
|
264160
264168
|
if (typeStr !== "unknown") {
|
|
264161
264169
|
propMeta.attribute = getAttributeName(propName, propOptions);
|
|
264162
264170
|
propMeta.reflect = getReflect(diagnostics, propDecorator, propOptions);
|
|
@@ -264307,11 +264315,10 @@ var stateDecoratorToStatic = (prop, typeChecker, decoratorName) => {
|
|
|
264307
264315
|
if (stateDecorator == null) {
|
|
264308
264316
|
return null;
|
|
264309
264317
|
}
|
|
264310
|
-
const stateName =
|
|
264311
|
-
|
|
264312
|
-
|
|
264313
|
-
|
|
264314
|
-
);
|
|
264318
|
+
const { staticName: stateName, dynamicName: ogPropName } = tsPropDeclName(prop, typeChecker);
|
|
264319
|
+
const meta = {};
|
|
264320
|
+
if (ogPropName && ogPropName !== stateName) meta.ogPropName = ogPropName;
|
|
264321
|
+
return import_typescript52.default.factory.createPropertyAssignment(import_typescript52.default.factory.createStringLiteral(stateName), convertValueToLiteral(meta));
|
|
264315
264322
|
};
|
|
264316
264323
|
|
|
264317
264324
|
// src/compiler/transformers/decorators-to-static/watch-decorator.ts
|
|
@@ -264411,9 +264418,9 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod
|
|
|
264411
264418
|
importAliasMap.get("AttachInternals")
|
|
264412
264419
|
);
|
|
264413
264420
|
}
|
|
264414
|
-
const updatedClassFields = handleClassFields(classNode, filteredMethodsAndFields, typeChecker, importAliasMap);
|
|
264415
264421
|
validateMethods(diagnostics, classMembers);
|
|
264416
264422
|
const currentDecorators = retrieveTsDecorators(classNode);
|
|
264423
|
+
const updatedClassFields = updateConstructor(classNode, filteredMethodsAndFields, []);
|
|
264417
264424
|
return import_typescript54.default.factory.updateClassDeclaration(
|
|
264418
264425
|
classNode,
|
|
264419
264426
|
[
|
|
@@ -264431,7 +264438,7 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod
|
|
|
264431
264438
|
};
|
|
264432
264439
|
var removeRindoMethodDecorators = (classMembers, diagnostics, importAliasMap) => {
|
|
264433
264440
|
return classMembers.map((member2) => {
|
|
264434
|
-
var _a;
|
|
264441
|
+
var _a, _b;
|
|
264435
264442
|
const currentDecorators = retrieveTsDecorators(member2);
|
|
264436
264443
|
const newDecorators = filterDecorators(
|
|
264437
264444
|
currentDecorators,
|
|
@@ -264453,7 +264460,7 @@ var removeRindoMethodDecorators = (classMembers, diagnostics, importAliasMap) =>
|
|
|
264453
264460
|
} else if (import_typescript54.default.isGetAccessor(member2)) {
|
|
264454
264461
|
return import_typescript54.default.factory.updateGetAccessorDeclaration(
|
|
264455
264462
|
member2,
|
|
264456
|
-
|
|
264463
|
+
[...newDecorators != null ? newDecorators : [], ...(_b = retrieveTsModifiers(member2)) != null ? _b : []],
|
|
264457
264464
|
member2.name,
|
|
264458
264465
|
member2.parameters,
|
|
264459
264466
|
member2.type,
|
|
@@ -264464,19 +264471,15 @@ var removeRindoMethodDecorators = (classMembers, diagnostics, importAliasMap) =>
|
|
|
264464
264471
|
err2.messageText = "A get accessor should be decorated before a set accessor";
|
|
264465
264472
|
augmentDiagnosticWithNode(err2, member2);
|
|
264466
264473
|
} else if (import_typescript54.default.isPropertyDeclaration(member2)) {
|
|
264467
|
-
|
|
264468
|
-
|
|
264469
|
-
|
|
264470
|
-
|
|
264471
|
-
|
|
264472
|
-
|
|
264473
|
-
|
|
264474
|
-
|
|
264475
|
-
|
|
264476
|
-
member2.type,
|
|
264477
|
-
member2.initializer
|
|
264478
|
-
);
|
|
264479
|
-
}
|
|
264474
|
+
const modifiers = retrieveTsModifiers(member2);
|
|
264475
|
+
return import_typescript54.default.factory.updatePropertyDeclaration(
|
|
264476
|
+
member2,
|
|
264477
|
+
[...newDecorators != null ? newDecorators : [], ...modifiers != null ? modifiers : []],
|
|
264478
|
+
member2.name,
|
|
264479
|
+
member2.questionToken,
|
|
264480
|
+
member2.type,
|
|
264481
|
+
member2.initializer
|
|
264482
|
+
);
|
|
264480
264483
|
} else {
|
|
264481
264484
|
const err2 = buildError(diagnostics);
|
|
264482
264485
|
err2.messageText = "Unknown class member encountered!";
|
|
@@ -264500,49 +264503,10 @@ var filterDecorators = (decorators, excludeList) => {
|
|
|
264500
264503
|
}
|
|
264501
264504
|
return decorators;
|
|
264502
264505
|
};
|
|
264503
|
-
function handleClassFields(classNode, classMembers, typeChecker, importAliasMap) {
|
|
264504
|
-
var _a;
|
|
264505
|
-
const statements = [];
|
|
264506
|
-
const updatedClassMembers = [];
|
|
264507
|
-
for (const member2 of classMembers) {
|
|
264508
|
-
if (shouldInitializeInConstructor(member2, importAliasMap) && import_typescript54.default.isPropertyDeclaration(member2)) {
|
|
264509
|
-
const memberName = tsPropDeclNameAsString(member2, typeChecker);
|
|
264510
|
-
statements.push(
|
|
264511
|
-
import_typescript54.default.factory.createExpressionStatement(
|
|
264512
|
-
import_typescript54.default.factory.createBinaryExpression(
|
|
264513
|
-
import_typescript54.default.factory.createPropertyAccessExpression(import_typescript54.default.factory.createThis(), import_typescript54.default.factory.createIdentifier(memberName)),
|
|
264514
|
-
import_typescript54.default.factory.createToken(import_typescript54.default.SyntaxKind.EqualsToken),
|
|
264515
|
-
// if the member has no initializer we should default to setting it to
|
|
264516
|
-
// just 'undefined'
|
|
264517
|
-
(_a = member2.initializer) != null ? _a : import_typescript54.default.factory.createIdentifier("undefined")
|
|
264518
|
-
)
|
|
264519
|
-
)
|
|
264520
|
-
);
|
|
264521
|
-
} else {
|
|
264522
|
-
updatedClassMembers.push(member2);
|
|
264523
|
-
}
|
|
264524
|
-
}
|
|
264525
|
-
if (statements.length === 0) {
|
|
264526
|
-
return updatedClassMembers;
|
|
264527
|
-
} else {
|
|
264528
|
-
return updateConstructor(classNode, updatedClassMembers, statements);
|
|
264529
|
-
}
|
|
264530
|
-
}
|
|
264531
|
-
var shouldInitializeInConstructor = (member2, importAliasMap) => {
|
|
264532
|
-
const currentDecorators = retrieveTsDecorators(member2);
|
|
264533
|
-
if (currentDecorators === void 0) {
|
|
264534
|
-
return false;
|
|
264535
|
-
}
|
|
264536
|
-
const filteredDecorators = filterDecorators(
|
|
264537
|
-
currentDecorators,
|
|
264538
|
-
CONSTRUCTOR_DEFINED_MEMBER_DECORATORS.map((decorator) => importAliasMap.get(decorator))
|
|
264539
|
-
);
|
|
264540
|
-
return currentDecorators !== filteredDecorators;
|
|
264541
|
-
};
|
|
264542
264506
|
|
|
264543
264507
|
// src/compiler/transformers/static-to-meta/parse-static.ts
|
|
264544
264508
|
var import_path51 = require("path");
|
|
264545
|
-
var
|
|
264509
|
+
var import_typescript63 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264546
264510
|
|
|
264547
264511
|
// src/compiler/transformers/static-to-meta/call-expression.ts
|
|
264548
264512
|
var import_typescript56 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264663,7 +264627,7 @@ var visitCallExpressionArg = (m, arg) => {
|
|
|
264663
264627
|
|
|
264664
264628
|
// src/compiler/transformers/static-to-meta/component.ts
|
|
264665
264629
|
var import_path47 = require("path");
|
|
264666
|
-
var
|
|
264630
|
+
var import_typescript60 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264667
264631
|
|
|
264668
264632
|
// src/compiler/transformers/add-component-meta-static.ts
|
|
264669
264633
|
var import_typescript57 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -264735,6 +264699,27 @@ var setComponentBuildConditionals = (cmpMeta) => {
|
|
|
264735
264699
|
cmpMeta.isPlain = !cmpMeta.hasMember && !cmpMeta.hasStyle && !cmpMeta.hasLifecycle && !cmpMeta.hasListener && !cmpMeta.hasVdomRender;
|
|
264736
264700
|
};
|
|
264737
264701
|
|
|
264702
|
+
// src/compiler/transformers/detect-modern-prop-decls.ts
|
|
264703
|
+
var import_typescript58 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264704
|
+
var detectModernPropDeclarations = (classNode, cmp) => {
|
|
264705
|
+
const parsedProps = getStaticValue(classNode.members, "properties");
|
|
264706
|
+
const parsedStates = getStaticValue(classNode.members, "states");
|
|
264707
|
+
if (!parsedProps && !parsedStates) {
|
|
264708
|
+
cmp.hasModernPropertyDecls = false;
|
|
264709
|
+
return;
|
|
264710
|
+
}
|
|
264711
|
+
const members = [...Object.entries(parsedProps || {}), ...Object.entries(parsedStates || {})];
|
|
264712
|
+
for (const [propName, meta] of members) {
|
|
264713
|
+
const dynamicPropName = meta.ogPropName || "";
|
|
264714
|
+
const prop = classNode.members.find((m) => {
|
|
264715
|
+
return import_typescript58.default.isPropertyDeclaration(m) && (import_typescript58.default.isComputedPropertyName(m.name) && m.name.expression.getText() === dynamicPropName || m.name.getText() === propName);
|
|
264716
|
+
});
|
|
264717
|
+
if (!prop) continue;
|
|
264718
|
+
cmp.hasModernPropertyDecls = true;
|
|
264719
|
+
break;
|
|
264720
|
+
}
|
|
264721
|
+
};
|
|
264722
|
+
|
|
264738
264723
|
// src/compiler/transformers/static-to-meta/attach-internals.ts
|
|
264739
264724
|
var parseAttachInternals = (staticMembers) => {
|
|
264740
264725
|
const parsedAttachInternalsMemberName = getStaticValue(staticMembers, "attachInternalsMemberName");
|
|
@@ -264746,13 +264731,13 @@ var parseAttachInternals = (staticMembers) => {
|
|
|
264746
264731
|
};
|
|
264747
264732
|
|
|
264748
264733
|
// src/compiler/transformers/static-to-meta/class-methods.ts
|
|
264749
|
-
var
|
|
264734
|
+
var import_typescript59 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
264750
264735
|
var parseClassMethods = (cmpNode, cmpMeta) => {
|
|
264751
264736
|
const classMembers = cmpNode.members;
|
|
264752
264737
|
if (!classMembers || classMembers.length === 0) {
|
|
264753
264738
|
return;
|
|
264754
264739
|
}
|
|
264755
|
-
const classMethods = classMembers.filter((m) =>
|
|
264740
|
+
const classMethods = classMembers.filter((m) => import_typescript59.default.isMethodDeclaration(m));
|
|
264756
264741
|
if (classMethods.length === 0) {
|
|
264757
264742
|
return;
|
|
264758
264743
|
}
|
|
@@ -265116,6 +265101,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265116
265101
|
hasMember: false,
|
|
265117
265102
|
hasMethod: false,
|
|
265118
265103
|
hasMode: false,
|
|
265104
|
+
hasModernPropertyDecls: false,
|
|
265119
265105
|
hasAttribute: false,
|
|
265120
265106
|
hasProp: false,
|
|
265121
265107
|
hasPropNumber: false,
|
|
@@ -265151,15 +265137,16 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265151
265137
|
};
|
|
265152
265138
|
const visitComponentChildNode = (node) => {
|
|
265153
265139
|
validateComponentMembers(node);
|
|
265154
|
-
if (
|
|
265140
|
+
if (import_typescript60.default.isCallExpression(node)) {
|
|
265155
265141
|
parseCallExpression(cmp, node);
|
|
265156
|
-
} else if (
|
|
265142
|
+
} else if (import_typescript60.default.isStringLiteral(node)) {
|
|
265157
265143
|
parseStringLiteral(cmp, node);
|
|
265158
265144
|
}
|
|
265159
265145
|
node.forEachChild(visitComponentChildNode);
|
|
265160
265146
|
};
|
|
265161
265147
|
visitComponentChildNode(cmpNode);
|
|
265162
265148
|
parseClassMethods(cmpNode, cmp);
|
|
265149
|
+
detectModernPropDeclarations(cmpNode, cmp);
|
|
265163
265150
|
cmp.htmlAttrNames = unique(cmp.htmlAttrNames);
|
|
265164
265151
|
cmp.htmlTagNames = unique(cmp.htmlTagNames);
|
|
265165
265152
|
cmp.potentialCmpRefs = unique(cmp.potentialCmpRefs);
|
|
@@ -265167,7 +265154,11 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
|
|
|
265167
265154
|
if (transformOpts && transformOpts.componentMetadata === "compilerstatic") {
|
|
265168
265155
|
cmpNode = addComponentMetaStatic(cmpNode, cmp);
|
|
265169
265156
|
}
|
|
265170
|
-
moduleFile.cmps.
|
|
265157
|
+
const foundIndex = moduleFile.cmps.findIndex(
|
|
265158
|
+
(c) => c.tagName === cmp.tagName && c.sourceFilePath === cmp.sourceFilePath
|
|
265159
|
+
);
|
|
265160
|
+
if (foundIndex > -1) moduleFile.cmps[foundIndex] = cmp;
|
|
265161
|
+
else moduleFile.cmps.push(cmp);
|
|
265171
265162
|
compilerCtx.nodeMap.set(cmpNode, cmp);
|
|
265172
265163
|
return cmpNode;
|
|
265173
265164
|
};
|
|
@@ -265176,15 +265167,15 @@ var validateComponentMembers = (node) => {
|
|
|
265176
265167
|
/**
|
|
265177
265168
|
* the component has a getter called "shadowRoot"
|
|
265178
265169
|
*/
|
|
265179
|
-
|
|
265170
|
+
import_typescript60.default.isGetAccessorDeclaration(node) && import_typescript60.default.isIdentifier(node.name) && typeof node.name.escapedText === "string" && BLACKLISTED_COMPONENT_METHODS.includes(node.name.escapedText) && /**
|
|
265180
265171
|
* the parent node is a class declaration
|
|
265181
265172
|
*/
|
|
265182
|
-
node.parent &&
|
|
265173
|
+
node.parent && import_typescript60.default.isClassDeclaration(node.parent)
|
|
265183
265174
|
) {
|
|
265184
265175
|
const propName = node.name.escapedText;
|
|
265185
|
-
const decorator =
|
|
265186
|
-
if (
|
|
265187
|
-
(prop) =>
|
|
265176
|
+
const decorator = import_typescript60.default.getDecorators(node.parent)[0];
|
|
265177
|
+
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(
|
|
265178
|
+
(prop) => import_typescript60.default.isPropertyAssignment(prop) && prop.name.getText() === "tag"
|
|
265188
265179
|
)) {
|
|
265189
265180
|
const componentName = node.parent.name.getText();
|
|
265190
265181
|
throw new Error(
|
|
@@ -265230,7 +265221,7 @@ var parseAssetsDirs = (staticMembers, componentFilePath) => {
|
|
|
265230
265221
|
|
|
265231
265222
|
// src/compiler/transformers/static-to-meta/import.ts
|
|
265232
265223
|
var import_path50 = require("path");
|
|
265233
|
-
var
|
|
265224
|
+
var import_typescript62 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
265234
265225
|
|
|
265235
265226
|
// src/compiler/transformers/collections/add-external-import.ts
|
|
265236
265227
|
var import_path49 = require("path");
|
|
@@ -265239,7 +265230,7 @@ var import_path49 = require("path");
|
|
|
265239
265230
|
var import_path48 = require("path");
|
|
265240
265231
|
|
|
265241
265232
|
// src/compiler/transformers/collections/parse-collection-components.ts
|
|
265242
|
-
var
|
|
265233
|
+
var import_typescript61 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
265243
265234
|
var parseCollectionComponents = (config, compilerCtx, buildCtx, collectionDir, collectionManifest, collection) => {
|
|
265244
265235
|
if (collectionManifest.entries) {
|
|
265245
265236
|
collectionManifest.entries.forEach((entryPath) => {
|
|
@@ -265250,7 +265241,7 @@ var parseCollectionComponents = (config, compilerCtx, buildCtx, collectionDir, c
|
|
|
265250
265241
|
};
|
|
265251
265242
|
var transpileCollectionModule = (config, compilerCtx, buildCtx, collection, inputFileName) => {
|
|
265252
265243
|
const sourceText = compilerCtx.fs.readFileSync(inputFileName);
|
|
265253
|
-
const sourceFile =
|
|
265244
|
+
const sourceFile = import_typescript61.default.createSourceFile(inputFileName, sourceText, import_typescript61.default.ScriptTarget.ES2017, true, import_typescript61.default.ScriptKind.JS);
|
|
265254
265245
|
return updateModule(config, compilerCtx, buildCtx, sourceFile, sourceText, inputFileName, void 0, collection);
|
|
265255
265246
|
};
|
|
265256
265247
|
|
|
@@ -265398,7 +265389,7 @@ var addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containingFi
|
|
|
265398
265389
|
|
|
265399
265390
|
// src/compiler/transformers/static-to-meta/import.ts
|
|
265400
265391
|
var parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, importNode, resolveCollections) => {
|
|
265401
|
-
if (importNode.moduleSpecifier &&
|
|
265392
|
+
if (importNode.moduleSpecifier && import_typescript62.default.isStringLiteral(importNode.moduleSpecifier)) {
|
|
265402
265393
|
let importPath = importNode.moduleSpecifier.text;
|
|
265403
265394
|
if (!moduleFile.originalImports.includes(importPath)) {
|
|
265404
265395
|
moduleFile.originalImports.push(importPath);
|
|
@@ -265434,6 +265425,7 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265434
265425
|
const emitFileName = (0, import_path51.basename)(emitFilePath);
|
|
265435
265426
|
emitFilePath = normalizePath(join(srcDirPath, emitFileName));
|
|
265436
265427
|
const moduleFile = createModule(tsSourceFile, sourceFileText, emitFilePath);
|
|
265428
|
+
if (prevModuleFile == null ? void 0 : prevModuleFile.cmps) moduleFile.cmps = prevModuleFile.cmps;
|
|
265437
265429
|
if (emitFilePath.endsWith(".js.map")) {
|
|
265438
265430
|
moduleFile.sourceMapPath = emitFilePath;
|
|
265439
265431
|
moduleFile.sourceMapFileText = sourceFileText;
|
|
@@ -265445,15 +265437,15 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265445
265437
|
compilerCtx.moduleMap.set(moduleFileKey, moduleFile);
|
|
265446
265438
|
compilerCtx.changedModules.add(moduleFile.sourceFilePath);
|
|
265447
265439
|
const visitNode = (node) => {
|
|
265448
|
-
if (
|
|
265440
|
+
if (import_typescript63.default.isClassDeclaration(node)) {
|
|
265449
265441
|
parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile);
|
|
265450
265442
|
return;
|
|
265451
|
-
} else if (
|
|
265443
|
+
} else if (import_typescript63.default.isImportDeclaration(node)) {
|
|
265452
265444
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
|
|
265453
265445
|
return;
|
|
265454
|
-
} else if (
|
|
265446
|
+
} else if (import_typescript63.default.isCallExpression(node)) {
|
|
265455
265447
|
parseCallExpression(moduleFile, node);
|
|
265456
|
-
} else if (
|
|
265448
|
+
} else if (import_typescript63.default.isStringLiteral(node)) {
|
|
265457
265449
|
parseStringLiteral(moduleFile, node);
|
|
265458
265450
|
}
|
|
265459
265451
|
node.forEachChild(visitNode);
|
|
@@ -265465,12 +265457,12 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
265465
265457
|
}
|
|
265466
265458
|
visitNode(tsSourceFile);
|
|
265467
265459
|
if (moduleFile.cmps.length > 0) {
|
|
265468
|
-
moduleFile.staticSourceFile =
|
|
265460
|
+
moduleFile.staticSourceFile = import_typescript63.default.createSourceFile(
|
|
265469
265461
|
sourceFilePath,
|
|
265470
265462
|
sourceFileText,
|
|
265471
265463
|
tsSourceFile.languageVersion,
|
|
265472
265464
|
true,
|
|
265473
|
-
|
|
265465
|
+
import_typescript63.default.ScriptKind.JS
|
|
265474
265466
|
);
|
|
265475
265467
|
}
|
|
265476
265468
|
return moduleFile;
|
|
@@ -266713,7 +266705,7 @@ var isWatchIgnorePath = (config, path6) => {
|
|
|
266713
266705
|
};
|
|
266714
266706
|
|
|
266715
266707
|
// src/compiler/transpile/create-watch-program.ts
|
|
266716
|
-
var
|
|
266708
|
+
var import_typescript64 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
266717
266709
|
var createTsWatchProgram = async (config, buildCallback) => {
|
|
266718
266710
|
let isRunning = false;
|
|
266719
266711
|
let lastTsBuilder;
|
|
@@ -266721,7 +266713,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266721
266713
|
let rebuildTimer;
|
|
266722
266714
|
const optionsToExtend = getTsOptionsToExtend(config);
|
|
266723
266715
|
const tsWatchSys = {
|
|
266724
|
-
...
|
|
266716
|
+
...import_typescript64.default.sys,
|
|
266725
266717
|
/**
|
|
266726
266718
|
* Override the default `setTimeout` implementation in the {@link ts.System}. The reasoning
|
|
266727
266719
|
* behind this change is not explicitly clear, but this appears to be related to debouncing
|
|
@@ -266749,7 +266741,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266749
266741
|
}
|
|
266750
266742
|
};
|
|
266751
266743
|
config.sys.addDestroy(() => tsWatchSys.clearTimeout(timeoutId));
|
|
266752
|
-
const tsWatchHost =
|
|
266744
|
+
const tsWatchHost = import_typescript64.default.createWatchCompilerHost(
|
|
266753
266745
|
// Use the TS config from the Rindo project
|
|
266754
266746
|
config.tsconfig,
|
|
266755
266747
|
optionsToExtend,
|
|
@@ -266757,7 +266749,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266757
266749
|
// We use the `createEmitAndSemanticDiagnosticsBuilderProgram` as opposed to the
|
|
266758
266750
|
// `createSemanticDiagnosticsBuilderProgram` because we need our program to emit
|
|
266759
266751
|
// output files in addition to checking for errors
|
|
266760
|
-
|
|
266752
|
+
import_typescript64.default.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
266761
266753
|
// Add a callback to log out diagnostics as the program runs
|
|
266762
266754
|
(reportDiagnostic) => {
|
|
266763
266755
|
config.logger.debug("watch reportDiagnostic:" + reportDiagnostic.messageText);
|
|
@@ -266784,7 +266776,7 @@ var createTsWatchProgram = async (config, buildCallback) => {
|
|
|
266784
266776
|
// Create the watch builder program instance and make it available on the
|
|
266785
266777
|
// returned object. This provides us an easy way to teardown the program
|
|
266786
266778
|
// down-the-road.
|
|
266787
|
-
program:
|
|
266779
|
+
program: import_typescript64.default.createWatchProgram(tsWatchHost),
|
|
266788
266780
|
// This will be called via a callback on the watch build whenever a file
|
|
266789
266781
|
// change is detected
|
|
266790
266782
|
rebuild: () => {
|
|
@@ -268828,7 +268820,7 @@ var extname8 = (str) => {
|
|
|
268828
268820
|
var SKIP_EXT = /* @__PURE__ */ new Set(["zip", "rar", "tar", "gz", "bz2", "png", "jpeg", "jpg", "gif", "pdf", "tiff", "psd"]);
|
|
268829
268821
|
|
|
268830
268822
|
// src/compiler/sys/node-require.ts
|
|
268831
|
-
var
|
|
268823
|
+
var import_typescript65 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
268832
268824
|
var nodeRequire = (id) => {
|
|
268833
268825
|
const results = {
|
|
268834
268826
|
module: void 0,
|
|
@@ -268843,13 +268835,13 @@ var nodeRequire = (id) => {
|
|
|
268843
268835
|
require.extensions[".ts"] = (module2, fileName) => {
|
|
268844
268836
|
let sourceText = fs3.readFileSync(fileName, "utf8");
|
|
268845
268837
|
if (fileName.endsWith(".ts")) {
|
|
268846
|
-
const tsResults =
|
|
268838
|
+
const tsResults = import_typescript65.default.transpileModule(sourceText, {
|
|
268847
268839
|
fileName,
|
|
268848
268840
|
compilerOptions: {
|
|
268849
|
-
module:
|
|
268850
|
-
moduleResolution:
|
|
268841
|
+
module: import_typescript65.default.ModuleKind.CommonJS,
|
|
268842
|
+
moduleResolution: import_typescript65.default.ModuleResolutionKind.NodeJs,
|
|
268851
268843
|
esModuleInterop: true,
|
|
268852
|
-
target:
|
|
268844
|
+
target: import_typescript65.default.ScriptTarget.ES2017,
|
|
268853
268845
|
allowJs: true
|
|
268854
268846
|
}
|
|
268855
268847
|
});
|
|
@@ -269651,7 +269643,7 @@ var createCompiler = async (userConfig) => {
|
|
|
269651
269643
|
const sys = config.sys;
|
|
269652
269644
|
const compilerCtx = new CompilerContext();
|
|
269653
269645
|
if (isFunction(config.sys.setupCompiler)) {
|
|
269654
|
-
config.sys.setupCompiler({ ts:
|
|
269646
|
+
config.sys.setupCompiler({ ts: import_typescript66.default });
|
|
269655
269647
|
}
|
|
269656
269648
|
compilerCtx.fs = createInMemoryFs(sys);
|
|
269657
269649
|
compilerCtx.cache = new Cache(config, createInMemoryFs(sys));
|
|
@@ -269685,7 +269677,7 @@ var import_path63 = require("path");
|
|
|
269685
269677
|
|
|
269686
269678
|
// src/compiler/sys/typescript/typescript-config.ts
|
|
269687
269679
|
var import_path62 = require("path");
|
|
269688
|
-
var
|
|
269680
|
+
var import_typescript67 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
269689
269681
|
var validateTsConfig = async (config, sys, init) => {
|
|
269690
269682
|
var _a;
|
|
269691
269683
|
const tsconfig = {
|
|
@@ -269707,7 +269699,7 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269707
269699
|
} else {
|
|
269708
269700
|
tsconfig.path = readTsConfig.path;
|
|
269709
269701
|
const host = {
|
|
269710
|
-
...
|
|
269702
|
+
...import_typescript67.default.sys,
|
|
269711
269703
|
readFile: (p) => {
|
|
269712
269704
|
if (p === tsconfig.path) {
|
|
269713
269705
|
return readTsConfig.content;
|
|
@@ -269718,7 +269710,7 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269718
269710
|
fileExists: (p) => sys.accessSync(p),
|
|
269719
269711
|
onUnRecoverableConfigFileDiagnostic: (e) => console.error(e)
|
|
269720
269712
|
};
|
|
269721
|
-
const results =
|
|
269713
|
+
const results = import_typescript67.default.getParsedCommandLineOfConfigFile(tsconfig.path, {}, host);
|
|
269722
269714
|
if (results === void 0) {
|
|
269723
269715
|
throw "Encountered an error reading tsconfig!";
|
|
269724
269716
|
}
|
|
@@ -269762,12 +269754,12 @@ var validateTsConfig = async (config, sys, init) => {
|
|
|
269762
269754
|
}
|
|
269763
269755
|
if (results.options) {
|
|
269764
269756
|
tsconfig.compilerOptions = results.options;
|
|
269765
|
-
const target = (_a = tsconfig.compilerOptions.target) != null ? _a :
|
|
269766
|
-
if ([
|
|
269757
|
+
const target = (_a = tsconfig.compilerOptions.target) != null ? _a : import_typescript67.default.ScriptTarget.ES5;
|
|
269758
|
+
if ([import_typescript67.default.ScriptTarget.ES3, import_typescript67.default.ScriptTarget.ES5, import_typescript67.default.ScriptTarget.ES2015, import_typescript67.default.ScriptTarget.ES2016].includes(target)) {
|
|
269767
269759
|
const warn = buildWarn(tsconfig.diagnostics);
|
|
269768
269760
|
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.`;
|
|
269769
269761
|
}
|
|
269770
|
-
if (tsconfig.compilerOptions.module !==
|
|
269762
|
+
if (tsconfig.compilerOptions.module !== import_typescript67.default.ModuleKind.ESNext && !config._isTesting) {
|
|
269771
269763
|
const warn = buildWarn(tsconfig.diagnostics);
|
|
269772
269764
|
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.`;
|
|
269773
269765
|
}
|
|
@@ -271164,26 +271156,26 @@ var VALID_TARGET = /* @__PURE__ */ new Set(["latest", "esnext", "es2020", "es201
|
|
|
271164
271156
|
|
|
271165
271157
|
// src/compiler/transpile/transpile-module.ts
|
|
271166
271158
|
var import_sys_api_node5 = require("../sys/node/index.js");
|
|
271167
|
-
var
|
|
271159
|
+
var import_typescript69 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
271168
271160
|
|
|
271169
271161
|
// src/compiler/transformers/static-to-meta/visitor.ts
|
|
271170
271162
|
var import_path67 = require("path");
|
|
271171
|
-
var
|
|
271163
|
+
var import_typescript68 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
271172
271164
|
var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
|
|
271173
271165
|
return (transformCtx) => {
|
|
271174
271166
|
let dirPath;
|
|
271175
271167
|
let moduleFile;
|
|
271176
271168
|
const visitNode = (node) => {
|
|
271177
|
-
if (
|
|
271169
|
+
if (import_typescript68.default.isClassDeclaration(node)) {
|
|
271178
271170
|
return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, transformOpts);
|
|
271179
|
-
} else if (
|
|
271171
|
+
} else if (import_typescript68.default.isImportDeclaration(node)) {
|
|
271180
271172
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, dirPath, node, !transformOpts.isolatedModules);
|
|
271181
|
-
} else if (
|
|
271173
|
+
} else if (import_typescript68.default.isCallExpression(node)) {
|
|
271182
271174
|
parseCallExpression(moduleFile, node);
|
|
271183
|
-
} else if (
|
|
271175
|
+
} else if (import_typescript68.default.isStringLiteral(node)) {
|
|
271184
271176
|
parseStringLiteral(moduleFile, node);
|
|
271185
271177
|
}
|
|
271186
|
-
return
|
|
271178
|
+
return import_typescript68.default.visitEachChild(node, visitNode, transformCtx);
|
|
271187
271179
|
};
|
|
271188
271180
|
return (tsSourceFile) => {
|
|
271189
271181
|
dirPath = (0, import_path67.dirname)(tsSourceFile.fileName);
|
|
@@ -271229,13 +271221,13 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271229
271221
|
moduleFile: null
|
|
271230
271222
|
};
|
|
271231
271223
|
if (transformOpts.module === "cjs") {
|
|
271232
|
-
tsCompilerOptions.module =
|
|
271224
|
+
tsCompilerOptions.module = import_typescript69.default.ModuleKind.CommonJS;
|
|
271233
271225
|
} else {
|
|
271234
|
-
tsCompilerOptions.module =
|
|
271226
|
+
tsCompilerOptions.module = import_typescript69.default.ModuleKind.ESNext;
|
|
271235
271227
|
}
|
|
271236
271228
|
tsCompilerOptions.target = getScriptTargetKind(transformOpts);
|
|
271237
271229
|
if ((sourceFilePath.endsWith(".tsx") || sourceFilePath.endsWith(".jsx")) && tsCompilerOptions.jsx == null) {
|
|
271238
|
-
tsCompilerOptions.jsx =
|
|
271230
|
+
tsCompilerOptions.jsx = import_typescript69.default.JsxEmit.React;
|
|
271239
271231
|
}
|
|
271240
271232
|
if (tsCompilerOptions.jsx != null && !isString(tsCompilerOptions.jsxFactory)) {
|
|
271241
271233
|
tsCompilerOptions.jsxFactory = "h";
|
|
@@ -271246,7 +271238,7 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271246
271238
|
if (tsCompilerOptions.paths && !isString(tsCompilerOptions.baseUrl)) {
|
|
271247
271239
|
tsCompilerOptions.baseUrl = ".";
|
|
271248
271240
|
}
|
|
271249
|
-
const sourceFile =
|
|
271241
|
+
const sourceFile = import_typescript69.default.createSourceFile(sourceFilePath, input, tsCompilerOptions.target);
|
|
271250
271242
|
const compilerHost = {
|
|
271251
271243
|
getSourceFile: (fileName) => {
|
|
271252
271244
|
return normalizePath(fileName) === normalizePath(sourceFilePath) ? sourceFile : void 0;
|
|
@@ -271262,13 +271254,13 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271262
271254
|
useCaseSensitiveFileNames: () => false,
|
|
271263
271255
|
getCanonicalFileName: (fileName) => fileName,
|
|
271264
271256
|
getCurrentDirectory: () => transformOpts.currentDirectory || process.cwd(),
|
|
271265
|
-
getNewLine: () =>
|
|
271257
|
+
getNewLine: () => import_typescript69.default.sys.newLine || "\n",
|
|
271266
271258
|
fileExists: (fileName) => normalizePath(fileName) === normalizePath(sourceFilePath),
|
|
271267
271259
|
readFile: () => "",
|
|
271268
271260
|
directoryExists: () => true,
|
|
271269
271261
|
getDirectories: () => []
|
|
271270
271262
|
};
|
|
271271
|
-
const program =
|
|
271263
|
+
const program = import_typescript69.default.createProgram([sourceFilePath], tsCompilerOptions, compilerHost);
|
|
271272
271264
|
const typeChecker = program.getTypeChecker();
|
|
271273
271265
|
const transformers = {
|
|
271274
271266
|
before: [
|
|
@@ -271300,10 +271292,10 @@ var transpileModule = (config, input, transformOpts) => {
|
|
|
271300
271292
|
};
|
|
271301
271293
|
var getScriptTargetKind = (transformOpts) => {
|
|
271302
271294
|
const target = transformOpts.target && transformOpts.target.toUpperCase();
|
|
271303
|
-
if (isNumber(
|
|
271304
|
-
return
|
|
271295
|
+
if (isNumber(import_typescript69.default.ScriptTarget[target])) {
|
|
271296
|
+
return import_typescript69.default.ScriptTarget[target];
|
|
271305
271297
|
}
|
|
271306
|
-
return
|
|
271298
|
+
return import_typescript69.default.ScriptTarget.Latest;
|
|
271307
271299
|
};
|
|
271308
271300
|
|
|
271309
271301
|
// src/compiler/transpile.ts
|