Skip to content

Commit

Permalink
remove downlevel-dts
Browse files Browse the repository at this point in the history
  • Loading branch information
HBobertz committed Nov 12, 2024
1 parent abaa4b6 commit 6ada22d
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 477 deletions.
4 changes: 0 additions & 4 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ project.addDeps(
'@jsii/spec',
'case',
'chalk@^4',
'downlevel-dts',
'fast-deep-equal',
'log4js',
'semver',
Expand Down
1 change: 0 additions & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions src/ambient/downlevel-dts.d.ts

This file was deleted.

12 changes: 1 addition & 11 deletions src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import * as ts from 'typescript';

import { Assembler } from './assembler';
import { findDependencyDirectory } from './common/find-utils';
import { emitDownleveledDeclarations, TYPES_COMPAT } from './downlevel-dts';
import { Emitter } from './emitter';
import { normalizeConfigPath } from './helpers';
import { JsiiDiagnostic } from './jsii-diagnostic';
import { ProjectInfo } from './project-info';
import { WARNINGSCODE_FILE_NAME } from './transforms/deprecation-warnings';
Expand All @@ -21,6 +19,7 @@ import * as utils from './utils';
const LOG = log4js.getLogger('jsii/compiler');
export const DIAGNOSTICS = 'diagnostics';
export const JSII_DIAGNOSTICS_CODE = 9999;
export const TYPES_COMPAT = '.types-compat';

export interface CompilerOptions {
/** The information about the project to be built */
Expand Down Expand Up @@ -314,15 +313,6 @@ export class Compiler implements Emitter {
LOG.error('Compilation errors prevented the JSII assembly from being created');
}

if (!hasErrors) {
emitDownleveledDeclarations(
this.projectRoot,
this.options.projectInfo.packageJson,
// outDir might be absolute. Need to normalize it.
normalizeConfigPath(this.projectRoot, this.tsconfig.compilerOptions.outDir),
);
}

// Some extra validation on the config.
// Make sure that { "./.warnings.jsii.js": "./.warnings.jsii.js" } is in the set of
// exports, if they are specified.
Expand Down
221 changes: 0 additions & 221 deletions src/downlevel-dts.ts

This file was deleted.

3 changes: 1 addition & 2 deletions test/compiler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { tmpdir } from 'node:os';
import { dirname, join } from 'node:path';
import { loadAssemblyFromPath, SPEC_FILE_NAME, SPEC_FILE_NAME_COMPRESSED } from '@jsii/spec';
import { compile, Lock } from './fixtures';
import { Compiler } from '../src/compiler';
import { TYPES_COMPAT } from '../src/downlevel-dts';
import { Compiler, TYPES_COMPAT } from '../src/compiler';
import { ProjectInfo } from '../src/project-info';
import { TypeScriptConfigValidationRuleSet } from '../src/tsconfig';
import { TypeScriptConfigValidator } from '../src/tsconfig/tsconfig-validator';
Expand Down
Loading

0 comments on commit 6ada22d

Please sign in to comment.