Skip to content

chore: bump to create-typescript-app@2 with transitions action #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2025
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
1 change: 1 addition & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
"repoType": "github",
"commitConvention": "angular"
}

4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for your interest in contributing to `debug-for-file`! 💖
Thanks for your interest in contributing to `debug-for-file`! 🧶

> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.

Expand Down Expand Up @@ -94,4 +94,4 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2

If you made it all the way to the end, bravo dear user, we love you.
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
💖 is a good starter if you're not sure which to use.
🧶 is a good starter if you're not sure which to use.
2 changes: 1 addition & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):

```shell
git clone https://github.com/ < your-name-here > /debug-for-file
git clone https://github.com/(your-name-here)/debug-for-file
cd debug-for-file
pnpm install
```
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Documentation Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Feature Request Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/04-tooling.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Tooling Report Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- 👋 Hi, thanks for sending a PR to debug-for-file! 💖.
<!-- 👋 Hi, thanks for sending a PR to debug-for-file! 🧶
Please fill out all fields below and make sure each item is true and [x] checked.
Otherwise we may not be able to review your PR. -->

Expand Down
2 changes: 0 additions & 2 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ name: Prepare
runs:
steps:
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
cache: pnpm
Expand Down
36 changes: 36 additions & 0 deletions .github/actions/transition/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
description: Runs create-typescript-app in transition mode

name: Transition

runs:
steps:
- uses: ./.github/actions/prepare
- run: npx create-typescript-app
shell: bash
- id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: The Friendly Bingo Bot <bot@create.bingo>
commit_message: Check in changes from re-running npx create-typescript-app
commit_user_email: bot@create.bingo
commit_user_name: The Friendly Bingo Bot
- if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: mshick/add-pr-comment@v2
with:
issue: ${{ github.event.pull_request.number }}
message: >-
🤖 Beep boop! I ran `npx create-typescript-app` and it updated some
files.

I went ahead and checked those changes into this PR for you. Please
review the latest commit to see if you want to merge it.

Cheers!
— _The Friendly Bingo Bot_ 💝

> ℹ️ These automatic commits keep your repository up-to-date with new
versions of
[create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
If you want to opt out, delete your
`.github/workflows/cta-transitions.yml` file.
using: composite
13 changes: 6 additions & 7 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"extends": ["config:best-practices", "replacements:all"],
"extends": [
":preserveSemverRanges",
"config:best-practices",
"replacements:all"
],
"ignoreDeps": ["codecov/codecov-action"],
"labels": ["dependencies"],
"minimumReleaseAge": "7 days",
"packageRules": [
{
"enabled": false,
"matchDepNames": ["debug"]
}
],
Copy link
Owner Author

Choose a reason for hiding this comment

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

🤔 I think I'm good to remove this. debug is listed in dependencies, so I'd hope Renovate doesn't change what end-users see.

"patch": { "enabled": false },
"pinDigests": false,
"postUpdateOptions": ["pnpmDedupe"]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: node ./lib/index.js
- run: node lib/index.js
lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jobs:
transition:
name: Transition
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{ secrets.ACCESS_TOKEN }}
- id: check
if: (github.actor == 'JoshuaKGoldberg' || github.actor == 'renovate[bot]') && startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'create-typescript-app')
uses: ./.github/actions/transition
- if: steps.check.outcome == 'skipped'
run: echo 'Skipping transition mode because the PR does not appear to be an automated or owner-created update to create-typescript-app.'

name: CTA

on:
pull_request:
branches:
- main

permissions:
pull-requests: write
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
with:
fetch-depth: 0
ref: main
token: ${{ secrets.ACCESS_TOKEN }}
- uses: ./.github/actions/prepare
- run: pnpm build
- env:
Expand Down
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.all-contributorsrc
/.husky
/coverage
/lib
Expand Down
6 changes: 1 addition & 5 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
"commitMessage": "chore: release v${version}",
"requireCommits": true
},
"github": {
"autoGenerate": true,
"release": true,
"releaseName": "v${version}"
},
"github": { "release": true, "releaseName": "v${version}" },
"npm": { "publishArgs": ["--access public", "--provenance"] },
"plugins": {
"@release-it/conventional-changelog": {
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<h1 align="center">debug-for-file</h1>

<p align="center"><a href="https://npmjs.com/package/debug"><code>debug</code></a> wrapper that creates a string based on your file's path within the package. 🧶</p>
<p align="center">
debug() wrapper that creates a string based on your file's path within the package.
🧶
</p>

<p align="center">
<!-- prettier-ignore-start -->
Expand All @@ -10,8 +13,8 @@
<!-- prettier-ignore-end -->
<a href="https://github.com/JoshuaKGoldberg/debug-for-file/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
<a href="https://codecov.io/gh/JoshuaKGoldberg/debug-for-file" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/debug-for-file?label=%F0%9F%A7%AA%20coverage" /></a>
<a href="https://github.com/JoshuaKGoldberg/debug-for-file/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
<a href="http://npmjs.com/package/debug-for-file"><img alt="📦 npm version" src="https://img.shields.io/npm/v/debug-for-file?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
<a href="https://github.com/JoshuaKGoldberg/debug-for-file/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg" /></a>
<a href="http://npmjs.com/package/debug-for-file" target="_blank"><img alt="📦 npm version" src="https://img.shields.io/npm/v/debug-for-file?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
<img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
</p>

Expand Down Expand Up @@ -68,7 +71,7 @@ Plus, it establishes a predictable format for the namespaces.
## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
Thanks! 💖
Thanks! 🧶

## Contributors

Expand All @@ -90,6 +93,4 @@ Thanks! 💖
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- spellchecker: enable -->

<!-- You can remove this notice if you don't want it 🙂 no worries! -->

> 💝 This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [`create` engine](https://github.com/JoshuaKGoldberg/create).
> 💝 This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [Bingo engine](https://create.bingo).
26 changes: 26 additions & 0 deletions create-typescript-app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
blockCodecov,
blockCTATransitions,
blockVitest,
createConfig,
} from "create-typescript-app";

export default createConfig({
refinements: {
addons: [
blockCodecov({
env: {
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}",
},
}),
blockVitest({
coverage: {
exclude: ["src/index.ts"],
},
}),
],
blocks: {
add: [blockCTATransitions],
},
},
});
13 changes: 7 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import jsdoc from "eslint-plugin-jsdoc";
import jsonc from "eslint-plugin-jsonc";
import markdown from "eslint-plugin-markdown";
import n from "eslint-plugin-n";
import packageJson from "eslint-plugin-package-json/configs/recommended";
import packageJson from "eslint-plugin-package-json";
import perfectionist from "eslint-plugin-perfectionist";
import * as regexp from "eslint-plugin-regexp";
import yml from "eslint-plugin-yml";
Expand All @@ -24,7 +24,7 @@ export default tseslint.config(
jsonc.configs["flat/recommended-with-json"],
markdown.configs.recommended,
n.configs["flat/recommended"],
packageJson,
packageJson.configs.recommended,
perfectionist.configs["recommended-natural"],
regexp.configs["flat/recommended"],
{
Expand All @@ -50,14 +50,15 @@ export default tseslint.config(
"object-shorthand": "error",
"operator-assignment": "error",
},
settings: { perfectionist: { partitionByComment: true, type: "natural" } },
settings: {
perfectionist: { partitionByComment: true, type: "natural" },
vitest: { typecheck: true },
},
},
{
extends: [tseslint.configs.disableTypeChecked],
files: ["**/*.md/*.ts"],
rules: {
"n/no-missing-import": ["error", { allowModules: ["debug-for-file"] }],
},
rules: { "n/no-missing-import": "off" },
},
{
extends: [vitest.configs.recommended],
Expand Down
6 changes: 3 additions & 3 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/knip@5.41.1/schema.json",
"entry": ["src/index.ts!"],
"$schema": "https://unpkg.com/knip@5.46.0/schema.json",
"entry": ["src/index.ts", "src/**/*.test.*"],
"ignoreExportsUsedInFile": { "interface": true, "type": true },
"project": ["src/**/*.ts!"]
"project": ["src/**/*.ts"]
}
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "debug-for-file",
"version": "0.1.0",
"description": "debug() wrapper that creates a string based on your file's path within the\npackage. 🧶",
"description": "debug() wrapper that creates a string based on your file's path within the package. 🧶",
"repository": {
"type": "git",
"url": "git+https://github.com/JoshuaKGoldberg/debug-for-file.git"
Expand All @@ -12,7 +12,7 @@
"email": "npm@joshuakgoldberg.com"
},
"type": "module",
"main": "./lib/index.js",
"main": "lib/index.js",
"files": [
"LICENSE.md",
"README.md",
Expand Down Expand Up @@ -44,36 +44,38 @@
"@release-it/conventional-changelog": "10.0.0",
"@types/debug": "4.1.12",
"@types/eslint-plugin-markdown": "2.0.2",
"@types/node": "22.13.0",
"@vitest/coverage-v8": "3.0.0",
"@vitest/eslint-plugin": "1.1.20",
"@types/node": "22.13.10",
"@vitest/coverage-v8": "3.0.9",
"@vitest/eslint-plugin": "1.1.38",
"console-fail-test": "0.5.0",
"cspell": "8.17.1",
"create-typescript-app": "2.15.7",
"cspell": "8.17.5",
"eslint": "9.22.0",
"eslint-plugin-jsdoc": "50.6.1",
"eslint-plugin-jsonc": "2.19.0",
"eslint-plugin-jsdoc": "50.6.8",
"eslint-plugin-jsonc": "2.19.1",
"eslint-plugin-markdown": "5.1.0",
"eslint-plugin-n": "17.16.1",
"eslint-plugin-n": "17.16.2",
"eslint-plugin-package-json": "0.29.0",
"eslint-plugin-perfectionist": "4.10.0",
"eslint-plugin-perfectionist": "4.10.1",
"eslint-plugin-regexp": "2.7.0",
"eslint-plugin-yml": "1.17.0",
"husky": "9.1.7",
"knip": "5.46.0",
"lint-staged": "15.5.0",
"markdownlint": "0.37.2",
"markdownlint": "0.37.4",
"markdownlint-cli": "0.44.0",
"prettier": "3.5.0",
"prettier": "3.5.3",
"prettier-plugin-curly": "0.3.1",
"prettier-plugin-packagejson": "2.5.6",
"prettier-plugin-packagejson": "2.5.10",
"prettier-plugin-sh": "0.15.0",
"release-it": "18.1.0",
"release-it": "18.1.2",
"sentences-per-line": "0.3.0",
"tsup": "8.4.0",
"typescript": "5.8.2",
"typescript-eslint": "8.26.0",
"vitest": "3.0.0"
"typescript-eslint": "8.26.1",
"vitest": "3.0.9"
},
"packageManager": "pnpm@10.4.0",
"engines": {
"node": ">=18.3.0"
},
Expand Down
Loading