Skip to content
Merged
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
12 changes: 1 addition & 11 deletions .github/shared/src/spec-model.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @ts-check

import { readdir } from "fs/promises";
import { resolve } from "path";
import { flatMapAsync, mapAsync } from "./array.js";
import { readme } from "./changed-files.js";
import { Readme } from "./readme.js";

/** @type {Map<string, SpecModel>} */
Expand Down Expand Up @@ -226,14 +227,3 @@
return `SpecModel(${this.#folder}, {logger: ${this.#logger}}})`;
}
}

// TODO: Remove duplication with changed-files.js (which currently requires paths relative to repo root)

/**
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy in changed-files was identical:

/**
* @param {string} [file]
* @returns {boolean}
*/
export function readme(file) {
// Filename "readme.md" with any case is a valid README file
return typeof file === "string" && file.toLowerCase().endsWith("readme.md");
}

* @param {string} [file]
* @returns {boolean}
*/
function readme(file) {
// Filename "readme.md" with any case is a valid README file
return typeof file === "string" && file.toLowerCase().endsWith("readme.md");
}
Loading