typescript 6.0.1-rc → 6.0.3

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 = "6.0";
21
- var version = "6.0.1-rc";
21
+ var version = "6.0.3";
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -45186,6 +45186,8 @@ function getContainerFlags(node) {
45186
45186
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
45187
45187
  case 269 /* ModuleBlock */:
45188
45188
  return 4 /* IsControlFlowContainer */;
45189
+ case 173 /* PropertyDeclaration */:
45190
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0 /* None */;
45189
45191
  case 300 /* CatchClause */:
45190
45192
  case 249 /* ForStatement */:
45191
45193
  case 250 /* ForInStatement */:
@@ -123444,6 +123446,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123444
123446
  Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);
123445
123447
  for (const newSourceFile of newSourceFiles) {
123446
123448
  filesByName.set(newSourceFile.path, newSourceFile);
123449
+ if (oldProgram.isSourceFileDefaultLibrary(newSourceFile)) {
123450
+ libFiles.add(newSourceFile.path);
123451
+ }
123447
123452
  }
123448
123453
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
123449
123454
  oldFilesByNameMap.forEach((oldFile, path) => {
package/lib/typescript.js CHANGED
@@ -2289,7 +2289,7 @@ module.exports = __toCommonJS(typescript_exports);
2289
2289
 
2290
2290
  // src/compiler/corePublic.ts
2291
2291
  var versionMajorMinor = "6.0";
2292
- var version = "6.0.1-rc";
2292
+ var version = "6.0.3";
2293
2293
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2294
2294
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2295
2295
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -49721,6 +49721,8 @@ function getContainerFlags(node) {
49721
49721
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
49722
49722
  case 269 /* ModuleBlock */:
49723
49723
  return 4 /* IsControlFlowContainer */;
49724
+ case 173 /* PropertyDeclaration */:
49725
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0 /* None */;
49724
49726
  case 300 /* CatchClause */:
49725
49727
  case 249 /* ForStatement */:
49726
49728
  case 250 /* ForInStatement */:
@@ -128318,6 +128320,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128318
128320
  Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);
128319
128321
  for (const newSourceFile of newSourceFiles) {
128320
128322
  filesByName.set(newSourceFile.path, newSourceFile);
128323
+ if (oldProgram.isSourceFileDefaultLibrary(newSourceFile)) {
128324
+ libFiles.add(newSourceFile.path);
128325
+ }
128321
128326
  }
128322
128327
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
128323
128328
  oldFilesByNameMap.forEach((oldFile, path) => {
@@ -139648,7 +139653,8 @@ var NameValidationResult = /* @__PURE__ */ ((NameValidationResult2) => {
139648
139653
  NameValidationResult2[NameValidationResult2["NameTooLong"] = 2] = "NameTooLong";
139649
139654
  NameValidationResult2[NameValidationResult2["NameStartsWithDot"] = 3] = "NameStartsWithDot";
139650
139655
  NameValidationResult2[NameValidationResult2["NameStartsWithUnderscore"] = 4] = "NameStartsWithUnderscore";
139651
- NameValidationResult2[NameValidationResult2["NameContainsNonURISafeCharacters"] = 5] = "NameContainsNonURISafeCharacters";
139656
+ NameValidationResult2[NameValidationResult2["NameContainsInvalidCharacters"] = 5] = "NameContainsInvalidCharacters";
139657
+ NameValidationResult2[NameValidationResult2["NameContainsNonURISafeCharacters"] = 5 /* NameContainsInvalidCharacters */] = "NameContainsNonURISafeCharacters";
139652
139658
  return NameValidationResult2;
139653
139659
  })(NameValidationResult || {});
139654
139660
  var maxPackageNameLength = 214;
@@ -139694,8 +139700,8 @@ function validatePackageNameWorker(packageName, supportScopedPackage) {
139694
139700
  return 0 /* Ok */;
139695
139701
  }
139696
139702
  }
139697
- if (encodeURIComponent(packageName) !== packageName) {
139698
- return 5 /* NameContainsNonURISafeCharacters */;
139703
+ if (!/^[\w.-]+$/.test(packageName)) {
139704
+ return 5 /* NameContainsInvalidCharacters */;
139699
139705
  }
139700
139706
  return 0 /* Ok */;
139701
139707
  }
@@ -139719,8 +139725,8 @@ function renderPackageNameValidationFailureWorker(typing, result, name, isScopeN
139719
139725
  return `'${typing}':: ${kind} name '${name}' cannot start with '.'`;
139720
139726
  case 4 /* NameStartsWithUnderscore */:
139721
139727
  return `'${typing}':: ${kind} name '${name}' cannot start with '_'`;
139722
- case 5 /* NameContainsNonURISafeCharacters */:
139723
- return `'${typing}':: ${kind} name '${name}' contains non URI safe characters`;
139728
+ case 5 /* NameContainsInvalidCharacters */:
139729
+ return `'${typing}':: ${kind} name '${name}' contains invalid characters`;
139724
139730
  case 0 /* Ok */:
139725
139731
  return Debug.fail();
139726
139732
  // Shouldn't have called this.
@@ -186593,6 +186599,22 @@ var TypingsInstaller = class {
186593
186599
  /** @internal */
186594
186600
  installPackage(req) {
186595
186601
  const { fileName, packageName, projectName, projectRootPath, id } = req;
186602
+ const validationResult = ts_JsTyping_exports.validatePackageName(packageName);
186603
+ if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {
186604
+ const message = ts_JsTyping_exports.renderPackageNameValidationFailure(validationResult, packageName);
186605
+ if (this.log.isEnabled()) {
186606
+ this.log.writeLine(message);
186607
+ }
186608
+ const response = {
186609
+ kind: ActionPackageInstalled,
186610
+ projectName,
186611
+ id,
186612
+ success: false,
186613
+ message
186614
+ };
186615
+ this.sendResponse(response);
186616
+ return;
186617
+ }
186596
186618
  const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
186597
186619
  if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
186598
186620
  return directory;
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": "6.0.1-rc",
5
+ "version": "6.0.3",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "22.22.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "35ff23d4b0cc715691323ebe54f523c16fe6e3a5"
117
+ "gitHead": "050880ce59e30b356b686bd3144efe24f875ebc8"
118
118
  }