typescript 4.9.0-dev.20220927 → 4.9.0-dev.20220928

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
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.9";
72
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -101579,7 +101579,7 @@ var ts;
101579
101579
  var canCopyEmitSignatures = compilerOptions.composite &&
101580
101580
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
101581
101581
  !outFilePath &&
101582
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
101582
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
101583
101583
  if (useOldState) {
101584
101584
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
101585
101585
  if (!outFilePath && oldState.affectedFilesPendingEmit) {
@@ -106393,7 +106393,9 @@ var ts;
106393
106393
  }
106394
106394
  if (buildInfo.program) {
106395
106395
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
106396
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
106396
+ (!project.options.noEmit ?
106397
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
106398
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
106397
106399
  return {
106398
106400
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
106399
106401
  buildInfoFile: buildInfoPath
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -122557,10 +122557,16 @@ var ts;
122557
122557
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
122558
122558
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
122559
122559
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
122560
+ // We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
122561
+ // which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
122562
+ // We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
122563
+ // oldCompilerOptions can be undefined if there was change in say module from None to some other option
122564
+ // which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
122565
+ // but that option change does not affect d.ts file name so emitSignatures should still be reused.
122560
122566
  var canCopyEmitSignatures = compilerOptions.composite &&
122561
122567
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
122562
122568
  !outFilePath &&
122563
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
122569
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
122564
122570
  if (useOldState) {
122565
122571
  // Copy old state's changed files set
122566
122572
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
@@ -127995,8 +128001,15 @@ var ts;
127995
128001
  }
127996
128002
  if (buildInfo.program) {
127997
128003
  // If there are pending changes that are not emitted, project is out of date
128004
+ // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
128005
+ // But in case of semantic error we need special treatment.
128006
+ // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
128007
+ // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
128008
+ // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
127998
128009
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
127999
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
128010
+ (!project.options.noEmit ?
128011
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
128012
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
128000
128013
  return {
128001
128014
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
128002
128015
  buildInfoFile: buildInfoPath
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -122556,10 +122556,16 @@ var ts;
122556
122556
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
122557
122557
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
122558
122558
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
122559
+ // We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
122560
+ // which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
122561
+ // We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
122562
+ // oldCompilerOptions can be undefined if there was change in say module from None to some other option
122563
+ // which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
122564
+ // but that option change does not affect d.ts file name so emitSignatures should still be reused.
122559
122565
  var canCopyEmitSignatures = compilerOptions.composite &&
122560
122566
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
122561
122567
  !outFilePath &&
122562
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
122568
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
122563
122569
  if (useOldState) {
122564
122570
  // Copy old state's changed files set
122565
122571
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
@@ -127994,8 +128000,15 @@ var ts;
127994
128000
  }
127995
128001
  if (buildInfo.program) {
127996
128002
  // If there are pending changes that are not emitted, project is out of date
128003
+ // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
128004
+ // But in case of semantic error we need special treatment.
128005
+ // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
128006
+ // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
128007
+ // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
127997
128008
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
127998
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
128009
+ (!project.options.noEmit ?
128010
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
128011
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
127999
128012
  return {
128000
128013
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
128001
128014
  buildInfoFile: buildInfoPath
package/lib/typescript.js CHANGED
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -122547,10 +122547,16 @@ var ts;
122547
122547
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
122548
122548
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
122549
122549
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
122550
+ // We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
122551
+ // which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
122552
+ // We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
122553
+ // oldCompilerOptions can be undefined if there was change in say module from None to some other option
122554
+ // which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
122555
+ // but that option change does not affect d.ts file name so emitSignatures should still be reused.
122550
122556
  var canCopyEmitSignatures = compilerOptions.composite &&
122551
122557
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
122552
122558
  !outFilePath &&
122553
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
122559
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
122554
122560
  if (useOldState) {
122555
122561
  // Copy old state's changed files set
122556
122562
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
@@ -127985,8 +127991,15 @@ var ts;
127985
127991
  }
127986
127992
  if (buildInfo.program) {
127987
127993
  // If there are pending changes that are not emitted, project is out of date
127994
+ // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
127995
+ // But in case of semantic error we need special treatment.
127996
+ // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
127997
+ // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
127998
+ // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
127988
127999
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
127989
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
128000
+ (!project.options.noEmit ?
128001
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
128002
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
127990
128003
  return {
127991
128004
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
127992
128005
  buildInfoFile: buildInfoPath
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -122547,10 +122547,16 @@ var ts;
122547
122547
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
122548
122548
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
122549
122549
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
122550
+ // We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
122551
+ // which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
122552
+ // We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
122553
+ // oldCompilerOptions can be undefined if there was change in say module from None to some other option
122554
+ // which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
122555
+ // but that option change does not affect d.ts file name so emitSignatures should still be reused.
122550
122556
  var canCopyEmitSignatures = compilerOptions.composite &&
122551
122557
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
122552
122558
  !outFilePath &&
122553
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
122559
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
122554
122560
  if (useOldState) {
122555
122561
  // Copy old state's changed files set
122556
122562
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
@@ -127985,8 +127991,15 @@ var ts;
127985
127991
  }
127986
127992
  if (buildInfo.program) {
127987
127993
  // If there are pending changes that are not emitted, project is out of date
127994
+ // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
127995
+ // But in case of semantic error we need special treatment.
127996
+ // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
127997
+ // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
127998
+ // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
127988
127999
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
127989
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
128000
+ (!project.options.noEmit ?
128001
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
128002
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
127990
128003
  return {
127991
128004
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
127992
128005
  buildInfoFile: buildInfoPath
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220927");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220928");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -122537,10 +122537,16 @@ var ts;
122537
122537
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
122538
122538
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
122539
122539
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
122540
+ // We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
122541
+ // which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
122542
+ // We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
122543
+ // oldCompilerOptions can be undefined if there was change in say module from None to some other option
122544
+ // which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
122545
+ // but that option change does not affect d.ts file name so emitSignatures should still be reused.
122540
122546
  var canCopyEmitSignatures = compilerOptions.composite &&
122541
122547
  (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
122542
122548
  !outFilePath &&
122543
- !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
122549
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
122544
122550
  if (useOldState) {
122545
122551
  // Copy old state's changed files set
122546
122552
  (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
@@ -127975,8 +127981,15 @@ var ts;
127975
127981
  }
127976
127982
  if (buildInfo.program) {
127977
127983
  // If there are pending changes that are not emitted, project is out of date
127984
+ // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
127985
+ // But in case of semantic error we need special treatment.
127986
+ // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
127987
+ // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
127988
+ // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
127978
127989
  if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
127979
- (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
127990
+ (!project.options.noEmit ?
127991
+ (_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
127992
+ ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
127980
127993
  return {
127981
127994
  type: ts.UpToDateStatusType.OutOfDateBuildInfo,
127982
127995
  buildInfoFile: buildInfoPath
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": "4.9.0-dev.20220927",
5
+ "version": "4.9.0-dev.20220928",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [