typescript 5.6.0-dev.20240704 → 5.6.0-dev.20240706

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/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.6";
21
- var version = `${versionMajorMinor}.0-dev.20240704`;
21
+ var version = `${versionMajorMinor}.0-dev.20240706`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -114395,7 +114395,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114395
114395
  );
114396
114396
  }
114397
114397
  function emitLiteral(node, jsxAttributeEscape) {
114398
- const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape);
114398
+ const text = getLiteralTextOfNode(
114399
+ node,
114400
+ /*sourceFile*/
114401
+ void 0,
114402
+ printerOptions.neverAsciiEscape,
114403
+ jsxAttributeEscape
114404
+ );
114399
114405
  if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) {
114400
114406
  writeLiteral(text);
114401
114407
  } else {
@@ -114876,6 +114882,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114876
114882
  if (isNumericLiteral(expression)) {
114877
114883
  const text = getLiteralTextOfNode(
114878
114884
  expression,
114885
+ /*sourceFile*/
114886
+ void 0,
114879
114887
  /*neverAsciiEscape*/
114880
114888
  true,
114881
114889
  /*jsxAttributeEscape*/
@@ -117017,18 +117025,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
117017
117025
  }
117018
117026
  return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
117019
117027
  }
117020
- function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) {
117028
+ function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) {
117021
117029
  if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) {
117022
117030
  const textSourceNode = node.textSourceNode;
117023
117031
  if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) {
117024
117032
  const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode);
117025
117033
  return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`;
117026
117034
  } else {
117027
- return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
117035
+ return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape);
117028
117036
  }
117029
117037
  }
117030
117038
  const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0);
117031
- return getLiteralText(node, currentSourceFile, flags);
117039
+ return getLiteralText(node, sourceFile, flags);
117032
117040
  }
117033
117041
  function pushNameGenerationScope(node) {
117034
117042
  privateNameTempFlagsStack.push(privateNameTempFlags);
package/lib/typescript.js CHANGED
@@ -2250,7 +2250,7 @@ module.exports = __toCommonJS(typescript_exports);
2250
2250
 
2251
2251
  // src/compiler/corePublic.ts
2252
2252
  var versionMajorMinor = "5.6";
2253
- var version = `${versionMajorMinor}.0-dev.20240704`;
2253
+ var version = `${versionMajorMinor}.0-dev.20240706`;
2254
2254
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2255
2255
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2256
2256
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -119176,7 +119176,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119176
119176
  );
119177
119177
  }
119178
119178
  function emitLiteral(node, jsxAttributeEscape) {
119179
- const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape);
119179
+ const text = getLiteralTextOfNode(
119180
+ node,
119181
+ /*sourceFile*/
119182
+ void 0,
119183
+ printerOptions.neverAsciiEscape,
119184
+ jsxAttributeEscape
119185
+ );
119180
119186
  if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) {
119181
119187
  writeLiteral(text);
119182
119188
  } else {
@@ -119657,6 +119663,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119657
119663
  if (isNumericLiteral(expression)) {
119658
119664
  const text = getLiteralTextOfNode(
119659
119665
  expression,
119666
+ /*sourceFile*/
119667
+ void 0,
119660
119668
  /*neverAsciiEscape*/
119661
119669
  true,
119662
119670
  /*jsxAttributeEscape*/
@@ -121798,18 +121806,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121798
121806
  }
121799
121807
  return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
121800
121808
  }
121801
- function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) {
121809
+ function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) {
121802
121810
  if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) {
121803
121811
  const textSourceNode = node.textSourceNode;
121804
121812
  if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) {
121805
121813
  const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode);
121806
121814
  return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`;
121807
121815
  } else {
121808
- return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
121816
+ return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape);
121809
121817
  }
121810
121818
  }
121811
121819
  const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0);
121812
- return getLiteralText(node, currentSourceFile, flags);
121820
+ return getLiteralText(node, sourceFile, flags);
121813
121821
  }
121814
121822
  function pushNameGenerationScope(node) {
121815
121823
  privateNameTempFlagsStack.push(privateNameTempFlags);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.6.0-dev.20240704",
5
+ "version": "5.6.0-dev.20240706",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "c3efeb9d1b7414319d006cb6a6aa770051c70fad"
116
+ "gitHead": "3163fe7e3898c1f48cd9bc097b96e3426cd2a453"
117
117
  }