Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/heavy-rabbits-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pretty-quick": major
---

refactor!: bump `@pkgr/core` and `tinyexec`, drop `tslib`
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
strategy:
matrix:
node:
- 14
- 16
- 18
- 20
- 22
Expand All @@ -41,15 +39,13 @@ jobs:
run: yarn --immutable

- name: Build
if: matrix.node != 14
run: yarn build

- name: Test
run: yarn test

- name: Lint
run: yarn lint
if: matrix.node != 14 && matrix.node != 16
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true
Expand Down
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

948 changes: 948 additions & 0 deletions .yarn/releases/yarn-4.9.1.cjs

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ nodeLinker: node-modules
plugins:
- path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: 'https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js'
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

yarnPath: .yarn/releases/yarn-3.6.4.cjs
yarnPath: .yarn/releases/yarn-4.9.1.cjs
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
],
"funding": "https://opencollective.com/pretty-quick",
"license": "MIT",
"packageManager": "yarn@3.6.4",
"packageManager": "yarn@4.9.1",
"engines": {
"node": ">=14"
"node": "^14.18.0 || >=16.0.0"
},
"bin": "lib/cli.mjs",
"main": "lib/index.js",
Expand Down Expand Up @@ -54,13 +54,11 @@
"precommit"
],
"scripts": {
"build": "run-s 'build:*'",
"build:tsc": "tsc -b",
"build:tsdown": "tsdown --no-clean -d lib",
"build": "tsdown",
"format": "prettier --write .",
"lint": "run-p 'lint:*'",
"lint:es": "eslint . --cache",
"lint:tsc": "tsc --noEmit",
"lint:tsc": "tsc -p tsconfig.base.json",
"prepare": "patch-package && simple-git-hooks",
"release": "yarn build && clean-pkg-json && changeset publish",
"test": "jest"
Expand All @@ -69,13 +67,12 @@
"prettier": "^3.0.0"
},
"dependencies": {
"@pkgr/core": "^0.2.7",
"@pkgr/core": "^0.3.3",
"ignore": "^7.0.5",
"mri": "^1.2.0",
"picocolors": "^1.1.1",
"picomatch": "^4.0.2",
"tinyexec": "^0.3.2",
"tslib": "^2.8.1"
"tinyexec": "^1.0.1"
},
"devDependencies": {
"@1stg/common-config": "^14.1.0",
Expand Down
16 changes: 0 additions & 16 deletions patches/ts-jest+29.3.4.patch

This file was deleted.

6 changes: 5 additions & 1 deletion src/scms/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { Output, exec } from 'tinyexec'
export const name = 'git'

export const detect = (directory: string) => {
const found = findUp(path.resolve(directory), '.git', true)
const found = findUp({
entry: path.resolve(directory),
search: '.git',
type: ['file', 'directory'],
})
return found ? path.dirname(found) : null
}

Expand Down
11 changes: 6 additions & 5 deletions src/scms/hg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import fs from 'fs'
import path from 'path'

import { findUp } from '@pkgr/core'
Expand All @@ -7,10 +6,12 @@ import { Output, exec } from 'tinyexec'
export const name = 'hg'

export const detect = (directory: string) => {
const found = findUp(path.resolve(directory), '.hg', true)
if (found && fs.statSync(found).isDirectory()) {
return path.dirname(found)
}
const found = findUp({
entry: path.resolve(directory),
search: '.hg',
type: 'directory',
})
return found ? path.dirname(found) : null
}

const runHg = (directory: string, args: string[]) =>
Expand Down
8 changes: 0 additions & 8 deletions src/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion test/pretty-quick.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import mock from 'mock-fs'

import prettyQuick from 'pretty-quick'

jest.mock('execa')
jest.mock('tinyexec')

afterEach(() => mock.restore())

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// used by @pkgr/rollup and ESLint
// used by ESLint
"extends": "./tsconfig.lib",
"compilerOptions": {
"paths": {
Expand Down
10 changes: 1 addition & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@
"extends": "./tsconfig.base",
"compilerOptions": {
"noEmit": true
},
"ts-node": {
"transpileOnly": true
},
"references": [
{
"path": "./src"
}
]
}
}
25 changes: 25 additions & 0 deletions tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig, type UserConfig } from 'tsdown/config'

const sharedConfig: UserConfig = {
outDir: 'lib',
}

export default defineConfig([
{
...sharedConfig,
format: 'esm',
unbundle: true,
},
{
...sharedConfig,
entry: 'src/cli.mts',
format: 'esm',
unbundle: true,
},
{
...sharedConfig,
format: 'cjs',
// ESM only
noExternal: 'tinyexec',
},
])
Loading
Loading