Skip to content

Commit

Permalink
feat: ktlint 0.48.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Feb 16, 2023
1 parent e52392e commit da0b8e2
Show file tree
Hide file tree
Showing 8 changed files with 946 additions and 678 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
steps:
- { uses: actions/checkout@v3, with: { persist-credentials: true } }
- { uses: actions/setup-node@v3, with: { node-version: 16, cache: 'yarn' } }
- { uses: actions/setup-node@v3, with: { node-version: 18, cache: 'yarn' } }

# Cache for npm/npx in ~/.npm
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: npm-v1-${{ runner.os }}
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)

Current ktlint version: `0.47.1`
Current ktlint version: `0.48.2`

# Quick start

Expand Down
Binary file modified resources/ktlint
Binary file not shown.
8 changes: 4 additions & 4 deletions scripts/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ yarn tsn install
*/

import * as fs from 'fs'
import { pipeline } from 'stream'
import { promisify } from 'util'
import * as fs from 'node:fs'
import { pipeline } from 'node:stream'
import { promisify } from 'node:util'
import got from 'got'
import { ktlintPath } from '../src/paths'

Expand All @@ -25,7 +25,7 @@ void (async () => {
// https://github.com/pinterest/ktlint/issues/1195
// Hence, reverting to 0.40.0
// const ktlintVersion = '0.43.2'
const ktlintVersion = '0.47.1'
const ktlintVersion = '0.48.2'
console.log(`downloading ktlint ${ktlintVersion} from github, may take some time...`)

const url = `https://github.com/pinterest/ktlint/releases/download/${ktlintVersion}/ktlint`
Expand Down
2 changes: 1 addition & 1 deletion src/exec.util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { spawn, SpawnOptions } from 'child_process'
import { spawn, SpawnOptions } from 'node:child_process'

export function runCommand(command: string, args: string[] = [], opt: SpawnOptions = {}): void {
console.log([command, ...args].join(' '))
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpawnOptions } from 'child_process'
import { SpawnOptions } from 'node:child_process'
import { runCommandSafe } from './exec.util'
import { ktlintPath } from './paths'

Expand Down
2 changes: 1 addition & 1 deletion src/paths.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from 'path'
import * as path from 'node:path'

export const projectDir = path.join(__dirname, '..')
export const resourcesDir = `${projectDir}/resources`
Expand Down
1,604 changes: 936 additions & 668 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit da0b8e2

Please sign in to comment.