File tree Expand file tree Collapse file tree 13 files changed +42
-40
lines changed
Expand file tree Collapse file tree 13 files changed +42
-40
lines changed Original file line number Diff line number Diff line change 55 "license" : " MIT" ,
66 "author" :
" sosukesuzuki <[email protected] >" ,
77 "main" : " index.js" ,
8+ "type" : " module" ,
89 "scripts" : {
910 "fix" : " prettier . -w" ,
1011 "lint" : " run-p \" lint:*\" " ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as artifact from "@actions/artifact";
22import * as github from "@actions/github" ;
33import * as path from "path" ;
44import * as fs from "fs" ;
5- import { getOctokit } from "./octokit" ;
5+ import { getOctokit } from "./octokit.ts " ;
66
77export async function uploadToArtifact (
88 texts : string [ ] ,
Original file line number Diff line number Diff line change 1- import * as git from "../tools/git" ;
1+ import * as git from "../tools/git.ts " ;
22
33/**
44 * Returns head commit hash and repository name like "sosukesuzuki/prettier@foo"
Original file line number Diff line number Diff line change 11import { existsSync } from "fs" ;
2- import { Command } from "../parse" ;
3- import { getPrettyHeadCommitHash } from "./get-pretty-head-commit-hash" ;
4- import { preparePrettierIgnoreFile } from "./prepare-prettier-ignore-file" ;
5- import { runPrettier } from "./run-prettier" ;
6- import { setupPrettierRepository } from "./setup-repository" ;
7- import * as configuration from "../configuration" ;
8- import * as git from "../tools/git" ;
9- import * as logger from "../logger" ;
10- import { getProjects , getTargetRepositoryPath } from "../projects" ;
2+ import { Command } from "../parse.ts " ;
3+ import { getPrettyHeadCommitHash } from "./get-pretty-head-commit-hash.ts " ;
4+ import { preparePrettierIgnoreFile } from "./prepare-prettier-ignore-file.ts " ;
5+ import { runPrettier } from "./run-prettier.ts " ;
6+ import { setupPrettierRepository } from "./setup-repository.ts " ;
7+ import * as configuration from "../configuration.ts " ;
8+ import * as git from "../tools/git.ts " ;
9+ import * as logger from "../logger.ts " ;
10+ import { getProjects , getTargetRepositoryPath } from "../projects.ts " ;
1111
1212export interface ExecuteResultEntry {
1313 commitHash : string ;
Original file line number Diff line number Diff line change 44 getProjectName ,
55 type Project ,
66 getTargetRepositoryPath ,
7- } from "../projects" ;
7+ } from "../projects.ts " ;
88
99export async function preparePrettierIgnoreFile (
1010 project : Project ,
Original file line number Diff line number Diff line change 11import path from "path" ;
22import spawn from "nano-spawn" ;
3- import { type Project , getTargetRepositoryPath } from "../projects" ;
4- import * as yarn from "../tools/yarn" ;
3+ import { type Project , getTargetRepositoryPath } from "../projects.ts " ;
4+ import * as yarn from "../tools/yarn.ts " ;
55
66export async function runPrettier (
77 prettierRepositoryPath : string ,
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import {
33 PrettierRepositorySourcePrNumber ,
44 PrettierRepositorySourceRepositoryAndRef ,
55 PrettierRepositorySource ,
6- } from "../parse" ;
7- import * as configuration from "../configuration" ;
8- import * as brew from "../tools/brew" ;
9- import * as gh from "../tools/gh" ;
10- import * as git from "../tools/git" ;
11- import * as yarn from "../tools/yarn" ;
12- import * as unix from "../tools/unix" ;
6+ } from "../parse.ts " ;
7+ import * as configuration from "../configuration.ts " ;
8+ import * as brew from "../tools/brew.ts " ;
9+ import * as gh from "../tools/gh.ts " ;
10+ import * as git from "../tools/git.ts " ;
11+ import * as yarn from "../tools/yarn.ts " ;
12+ import * as unix from "../tools/unix.ts " ;
1313
1414export async function setupPrettierRepository (
1515 prettierRepositorySource : PrettierRepositorySource ,
Original file line number Diff line number Diff line change 11import fs from "fs/promises" ;
22import { inspect } from 'node:util'
33import * as core from "@actions/core" ;
4- import * as configuration from "./configuration" ;
5- import * as logger from "./logger" ;
6- import { execute } from "./execute" ;
7- import { getLogText } from "./log-text" ;
8- import { parse } from "./parse" ;
9- import { getIssueComment } from "./get-issue-comment" ;
10- import { cloneProjects } from "./projects" ;
11- import { uploadToArtifact } from "./artifact" ;
4+ import * as configuration from "./configuration.ts " ;
5+ import * as logger from "./logger.ts " ;
6+ import { execute } from "./execute/index.ts " ;
7+ import { getLogText } from "./log-text.ts " ;
8+ import { parse } from "./parse.ts " ;
9+ import { getIssueComment } from "./get-issue-comment.ts " ;
10+ import { cloneProjects } from "./projects.ts " ;
11+ import { uploadToArtifact } from "./artifact.ts " ;
1212import { outdent } from "outdent" ;
1313
1414async function exit ( error : Error | string ) {
Original file line number Diff line number Diff line change 1- import * as configuration from "./configuration" ;
2- import { ExecuteResultEntry } from "./execute" ;
3- import { Command , PrettierRepositorySource } from "./parse" ;
1+ import * as configuration from "./configuration.ts " ;
2+ import { ExecuteResultEntry } from "./execute/index.ts " ;
3+ import { Command , PrettierRepositorySource } from "./parse.ts " ;
44
55function getPrettierRepositorySourceText (
66 prettierRepositorySource : PrettierRepositorySource ,
Original file line number Diff line number Diff line change 11import fs from "fs/promises" ;
22import * as github from "@actions/github" ;
3- import * as configuration from "./configuration" ;
4- import { getOctokit } from "./octokit" ;
3+ import * as configuration from "./configuration.ts " ;
4+ import { getOctokit } from "./octokit.ts " ;
55
66let commentId : number | undefined ;
77async function logToIssueComment ( logText : string , separateComment = false ) {
You can’t perform that action at this time.
0 commit comments