typescript 5.5.0-dev.20240417 → 5.5.0-dev.20240418

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.5";
21
- var version = `${versionMajorMinor}.0-dev.20240417`;
21
+ var version = `${versionMajorMinor}.0-dev.20240418`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -9175,11 +9175,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9175
9175
  }
9176
9176
  const ch = codePointAt(text, pos);
9177
9177
  if (pos === 0) {
9178
- if (text.slice(0, 256).includes("\uFFFD")) {
9179
- error(Diagnostics.File_appears_to_be_binary);
9180
- pos = end;
9181
- return token = 8 /* NonTextFileMarkerTrivia */;
9182
- }
9183
9178
  if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) {
9184
9179
  pos = scanShebangTrivia(text, pos);
9185
9180
  if (skipTrivia2) {
@@ -9603,6 +9598,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9603
9598
  error(Diagnostics.Invalid_character, pos++, charSize(ch));
9604
9599
  }
9605
9600
  return token = 81 /* PrivateIdentifier */;
9601
+ case 65533 /* replacementCharacter */:
9602
+ error(Diagnostics.File_appears_to_be_binary, 0, 0);
9603
+ pos = end;
9604
+ return token = 8 /* NonTextFileMarkerTrivia */;
9606
9605
  default:
9607
9606
  const identifierKind = scanIdentifier(ch, languageVersion);
9608
9607
  if (identifierKind) {
@@ -4378,12 +4378,6 @@ declare namespace ts {
4378
4378
  interface Identifier {
4379
4379
  readonly text: string;
4380
4380
  }
4381
- interface Identifier {
4382
- /** @deprecated Use `idKeyword(identifier)` instead. */
4383
- readonly originalKeywordKind?: SyntaxKind;
4384
- /** @deprecated Use `.parent` or the surrounding context to determine this instead. */
4385
- readonly isInJSDocNamespace?: boolean;
4386
- }
4387
4381
  interface TransientIdentifier extends Identifier {
4388
4382
  resolvedSymbol: Symbol;
4389
4383
  }
package/lib/typescript.js CHANGED
@@ -2350,7 +2350,7 @@ module.exports = __toCommonJS(typescript_exports);
2350
2350
 
2351
2351
  // src/compiler/corePublic.ts
2352
2352
  var versionMajorMinor = "5.5";
2353
- var version = `${versionMajorMinor}.0-dev.20240417`;
2353
+ var version = `${versionMajorMinor}.0-dev.20240418`;
2354
2354
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2355
2355
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2356
2356
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7012,6 +7012,7 @@ var CharacterCodes = /* @__PURE__ */ ((CharacterCodes2) => {
7012
7012
  CharacterCodes2[CharacterCodes2["ideographicSpace"] = 12288] = "ideographicSpace";
7013
7013
  CharacterCodes2[CharacterCodes2["mathematicalSpace"] = 8287] = "mathematicalSpace";
7014
7014
  CharacterCodes2[CharacterCodes2["ogham"] = 5760] = "ogham";
7015
+ CharacterCodes2[CharacterCodes2["replacementCharacter"] = 65533] = "replacementCharacter";
7015
7016
  CharacterCodes2[CharacterCodes2["_"] = 95] = "_";
7016
7017
  CharacterCodes2[CharacterCodes2["$"] = 36] = "$";
7017
7018
  CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0";
@@ -12776,11 +12777,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12776
12777
  }
12777
12778
  const ch = codePointAt(text, pos);
12778
12779
  if (pos === 0) {
12779
- if (text.slice(0, 256).includes("\uFFFD")) {
12780
- error2(Diagnostics.File_appears_to_be_binary);
12781
- pos = end;
12782
- return token = 8 /* NonTextFileMarkerTrivia */;
12783
- }
12784
12780
  if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) {
12785
12781
  pos = scanShebangTrivia(text, pos);
12786
12782
  if (skipTrivia2) {
@@ -13204,6 +13200,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13204
13200
  error2(Diagnostics.Invalid_character, pos++, charSize(ch));
13205
13201
  }
13206
13202
  return token = 81 /* PrivateIdentifier */;
13203
+ case 65533 /* replacementCharacter */:
13204
+ error2(Diagnostics.File_appears_to_be_binary, 0, 0);
13205
+ pos = end;
13206
+ return token = 8 /* NonTextFileMarkerTrivia */;
13207
13207
  default:
13208
13208
  const identifierKind = scanIdentifier(ch, languageVersion);
13209
13209
  if (identifierKind) {
@@ -178289,37 +178289,6 @@ function buildOverload(name) {
178289
178289
  };
178290
178290
  }
178291
178291
 
178292
- // src/deprecatedCompat/5.0/identifierProperties.ts
178293
- addObjectAllocatorPatcher((objectAllocator2) => {
178294
- const Identifier78 = objectAllocator2.getIdentifierConstructor();
178295
- if (!hasProperty(Identifier78.prototype, "originalKeywordKind")) {
178296
- Object.defineProperty(Identifier78.prototype, "originalKeywordKind", {
178297
- get: deprecate(function() {
178298
- return identifierToKeywordKind(this);
178299
- }, {
178300
- name: "originalKeywordKind",
178301
- since: "5.0",
178302
- warnAfter: "5.1",
178303
- errorAfter: "5.2",
178304
- message: "Use 'identifierToKeywordKind(identifier)' instead."
178305
- })
178306
- });
178307
- }
178308
- if (!hasProperty(Identifier78.prototype, "isInJSDocNamespace")) {
178309
- Object.defineProperty(Identifier78.prototype, "isInJSDocNamespace", {
178310
- get: deprecate(function() {
178311
- return this.flags & 4096 /* IdentifierIsInJSDocNamespace */ ? true : void 0;
178312
- }, {
178313
- name: "isInJSDocNamespace",
178314
- since: "5.0",
178315
- warnAfter: "5.1",
178316
- errorAfter: "5.2",
178317
- message: "Use '.parent' or the surrounding context to determine this instead."
178318
- })
178319
- });
178320
- }
178321
- });
178322
-
178323
178292
  // src/server/_namespaces/ts.server.ts
178324
178293
  var ts_server_exports3 = {};
178325
178294
  __export(ts_server_exports3, {
@@ -185100,7 +185069,12 @@ Dynamic files must always be opened with service's current directory or service
185100
185069
  return result;
185101
185070
  }
185102
185071
  removeOrphanConfiguredProjects(toRetainConfiguredProjects) {
185103
- const toRemoveConfiguredProjects = new Map(this.configuredProjects);
185072
+ const orphanConfiguredProjects = this.getOrphanConfiguredProjects(toRetainConfiguredProjects);
185073
+ orphanConfiguredProjects.forEach((project) => this.removeProject(project));
185074
+ }
185075
+ /** @internal */
185076
+ getOrphanConfiguredProjects(toRetainConfiguredProjects) {
185077
+ const toRemoveConfiguredProjects = new Set(this.configuredProjects.values());
185104
185078
  const markOriginalProjectsAsUsed = (project) => {
185105
185079
  if (project.originalConfiguredProjects && (isConfiguredProject(project) || !project.isOrphan())) {
185106
185080
  project.originalConfiguredProjects.forEach(
@@ -185121,7 +185095,7 @@ Dynamic files must always be opened with service's current directory or service
185121
185095
  this.inferredProjects.forEach(markOriginalProjectsAsUsed);
185122
185096
  this.externalProjects.forEach(markOriginalProjectsAsUsed);
185123
185097
  this.configuredProjects.forEach((project) => {
185124
- if (!toRemoveConfiguredProjects.has(project.canonicalConfigFilePath))
185098
+ if (!toRemoveConfiguredProjects.has(project))
185125
185099
  return;
185126
185100
  if (project.hasOpenRef()) {
185127
185101
  retainConfiguredProject(project);
@@ -185129,12 +185103,12 @@ Dynamic files must always be opened with service's current directory or service
185129
185103
  retainConfiguredProject(project);
185130
185104
  }
185131
185105
  });
185132
- toRemoveConfiguredProjects.forEach((project) => this.removeProject(project));
185106
+ return toRemoveConfiguredProjects;
185133
185107
  function isRetained(project) {
185134
- return !toRemoveConfiguredProjects.has(project.canonicalConfigFilePath) || project.hasOpenRef();
185108
+ return !toRemoveConfiguredProjects.has(project) || project.hasOpenRef();
185135
185109
  }
185136
185110
  function retainConfiguredProject(project) {
185137
- if (toRemoveConfiguredProjects.delete(project.canonicalConfigFilePath)) {
185111
+ if (toRemoveConfiguredProjects.delete(project)) {
185138
185112
  markOriginalProjectsAsUsed(project);
185139
185113
  forEachReferencedProject(project, retainConfiguredProject);
185140
185114
  }
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.5.0-dev.20240417",
5
+ "version": "5.5.0-dev.20240418",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -111,5 +111,5 @@
111
111
  "node": "20.1.0",
112
112
  "npm": "8.19.4"
113
113
  },
114
- "gitHead": "cbae6cf9f4f98cb97dd2eedfc3d0faa5c523759a"
114
+ "gitHead": "72f413cea0fa8b98948f9608bb7a113070c7733f"
115
115
  }