Skip to content

Commit

Permalink
chore(release): 1.44.1 (#3175)
Browse files Browse the repository at this point in the history
---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
mergify[bot] authored Nov 16, 2021
2 parents 5cf3021 + 85f438f commit 8a27521
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 141 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.44.1](https://github.com/aws/jsii/compare/v1.44.0...v1.44.1) (2021-11-16)

* revert "fix: dependency submodules may not be discovered" ([#3170](https://github.com/aws/jsii/pull/3170)) ([0449dd9](https://github.com/aws/jsii/commit/0449dd92ce3297b065c171efafc28d1f877432cc))

## [1.44.0](https://github.com/aws/jsii/compare/v1.43.0...v1.44.0) (2021-11-15)


Expand Down
5 changes: 2 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"packages/*",
"regression-tests/@*/*"
"packages/*"
],
"command": {
"bootstrap": {
"rejectCycles": true
}
},
"version": "1.44.0"
"version": "1.44.1"
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"packages/*",
"packages/@jsii/*",
"packages/@scope/*",
"regression-tests/@*/*",
"tools/*"
],
"nohoist": [
Expand Down
8 changes: 1 addition & 7 deletions packages/jsii/lib/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3213,13 +3213,7 @@ function inferRootDir(program: ts.Program): string | undefined {
.map((fileName) =>
path.relative(program.getCurrentDirectory(), path.dirname(fileName)),
)
.map(segmentPath)
// Dependency entry points are in this path, and they MAY resolve from the
// same mono-repo, in which case they won't appear to be external libraries,
// as there may not be a `/node_modules/` segment in their canonical path.
// They well however come from a parent directory, so their path segments
// will start with "..".
.filter(([head]) => head !== '..');
.map(segmentPath);

const maxPrefix = Math.min(
...directories.map((segments) => segments.length - 1),
Expand Down
41 changes: 6 additions & 35 deletions packages/jsii/lib/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,11 @@ export class Compiler implements Emitter {
const pi = this.options.projectInfo;
const projectRoot = pi.projectRoot;
const host = ts.createWatchCompilerHost(
this.rootFiles,
this.configPath,
{
...pi.tsc,
...BASE_COMPILER_OPTIONS,
noEmitOnError: false,
tsBuildInfoFile: path.join(
pi.tsc?.outDir ?? pi.tsc?.rootDir ?? pi.projectRoot,
'tsconfig.tsbuildinfo',
),
},
{
...ts.sys,
Expand All @@ -152,7 +148,6 @@ export class Compiler implements Emitter {
ts.createEmitAndSemanticDiagnosticsBuilderProgram,
opts?.reportDiagnostics,
opts?.reportWatchStatus,
this.typescriptConfig?.references,
);
if (!host.getDefaultLibLocation) {
throw new Error(
Expand Down Expand Up @@ -500,47 +495,23 @@ export class Compiler implements Emitter {
* This makes it so that running 'tsc' and running 'jsii' has the same behavior.
*/
private determineSources(files: string[]): string[] {
const ret = new Set<string>();
const ret = new Array<string>();

if (files.length > 0) {
for (const file of files) {
ret.add(path.resolve(this.options.projectInfo.projectRoot, file));
}
ret.push(...files);
} else {
const parseConfigHost = parseConfigHostFromCompilerHost(
this.compilerHost,
);
// Note: the fileNames here are resolved by the parseConfigHost.
const { fileNames } = ts.parseJsonConfigFileContent(
const parsed = ts.parseJsonConfigFileContent(
this.typescriptConfig,
parseConfigHost,
this.options.projectInfo.projectRoot,
);
for (const file of fileNames) {
ret.add(file);
}
ret.push(...parsed.fileNames);
}

// Bonus: ensure all dependencies' entry points are included in the compiler
// input path. This guarantees we have symbols for all types, from the
// module root, which is necessary in order to properly detect submodules.
for (const assm of this.options.projectInfo.dependencyClosure) {
const { resolvedModule } = ts.resolveModuleName(
assm.name,
path.join(
this.options.projectInfo.projectRoot,
this.options.projectInfo.types,
),
this.typescriptConfig?.compilerOptions ?? {},
ts.sys,
);
if (!resolvedModule) {
continue;
}
ret.add(resolvedModule.resolvedFileName);
}

return Array.from(ret);
return ret;
}

/**
Expand Down
4 changes: 0 additions & 4 deletions regression-tests/@barrelimports/consumer/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions regression-tests/@barrelimports/consumer/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions regression-tests/@barrelimports/consumer/lib/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions regression-tests/@barrelimports/consumer/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions regression-tests/@barrelimports/provider/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions regression-tests/@barrelimports/provider/README.md

This file was deleted.

1 change: 0 additions & 1 deletion regression-tests/@barrelimports/provider/lib/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions regression-tests/@barrelimports/provider/lib/namespaced.ts

This file was deleted.

26 changes: 0 additions & 26 deletions regression-tests/@barrelimports/provider/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions regression-tests/README.md

This file was deleted.

0 comments on commit 8a27521

Please sign in to comment.