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

Commit

Permalink
Update all import paths to include file extensions
Browse files Browse the repository at this point in the history
I'm not crazy about this change, as I liked it when it inferred the extension automatically.

Also, it feels weird to provide a .js file extension when I'm writing TypeScript files.

However, this seems to be necessary for pure-ESModule packages, and after installing `markdown-table` I need to make these changes.

[1]:https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#faq
[2]:microsoft/TypeScript#42813
[3]:https://www.typescriptlang.org/docs/handbook/module-resolution.html#classic
[4]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
  • Loading branch information
ryanjwessel committed Sep 6, 2021
1 parent 1f6085a commit 550067f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commands/init.ts
Expand Up @@ -2,7 +2,7 @@ import inquirer from "inquirer";
import chalk from "chalk";
import fs from "fs";
import path from "path";
import { writeContributors } from "../contributors";
import { writeContributors } from "../contributors.js";

const { prompt } = inquirer;

Expand Down
2 changes: 1 addition & 1 deletion src/commands/matrix.ts
Expand Up @@ -2,7 +2,7 @@ import gitlog, { CommitField } from "gitlog";
import { isEqual, parseISO } from "date-fns";
import fs from "fs";
import { markdownTable } from "markdown-table";
import { getContributors } from "../contributors";
import { getContributors } from "../contributors.js";

const outputMarkdownTable = (table: Record<string, Record<string, number>>) => {
const matrix = [["", ...Object.keys(table)]];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/remove.ts
@@ -1,4 +1,4 @@
import { getContributors, writeContributors } from "../contributors";
import { getContributors, writeContributors } from "../contributors.js";

export const remove = (removal: string) => {
const contributors = getContributors().filter(
Expand Down
6 changes: 4 additions & 2 deletions src/commands/start.ts
@@ -1,7 +1,9 @@
import { writeFileSync } from "fs";
import { prompt } from "inquirer";
import inquirer from "inquirer";
import chalk from "chalk";
import { getContributors } from "../contributors";
import { getContributors } from "../contributors.js";

const { prompt } = inquirer;

const createSessionFile = (pairs: string[]) => {
console.info(chalk.yellowBright("Creating pairing session file now"));
Expand Down

0 comments on commit 550067f

Please sign in to comment.