Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Support parallel minor versions #282

Merged
merged 2 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async function testTypesVersion(

function assertPathIsInDefinitelyTyped(dirPath: string): void {
const parent = dirname(dirPath);
const types = /^v\d+$/.test(basename(dirPath)) ? dirname(parent) : parent;
const types = /^v\d+(\.\d+)?$/.test(basename(dirPath)) ? dirname(parent) : parent;
// TODO: It's not clear whether this assertion makes sense, and it's broken on Azure Pipelines
// Re-enable it later if it makes sense.
// const dt = dirname(types);
Expand Down
3 changes: 1 addition & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export function assertDefined<T>(a: T | undefined): T {
}

export async function mapDefinedAsync<T, U>(
arr: Iterable<T>, mapper: (t: T) => Promise<U | undefined>):
Promise<Array<awaited U>> {
arr: Iterable<T>, mapper: (t: T) => Promise<U | undefined>): Promise<U[]> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running npm install gave me the latest next, rather than the one recorded in the lockfile, and it seems like awaited was recently reverted.

const out = [];
for (const a of arr) {
const res = await mapper(a);
Expand Down