Skip to content

Commit 764e0ae

Browse files
fix: bump to create-typescript-app@2 with transitions action (#13)
## PR Checklist - [x] Addresses an existing open issue: fixes #12 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/without-undefined-properties/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/without-undefined-properties/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Runs `npx create-typescript-app --add-cta-transitions` and adds a `create-typescript-app.config.js` to keep template customizations through automated transitions over time. Marking as a `fix:` because this template update removes sourcemaps from built packages. 🫥
1 parent 0649947 commit 764e0ae

24 files changed

+3166
-1510
lines changed

.all-contributorsrc

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
{
2-
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
3-
"commit": false,
4-
"commitConvention": "angular",
5-
"commitType": "docs",
6-
"contributors": [
7-
{
8-
"login": "JoshuaKGoldberg",
9-
"name": "Josh Goldberg ✨",
10-
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
11-
"profile": "http://www.joshuakgoldberg.com/",
12-
"contributions": [
13-
"code",
14-
"content",
15-
"doc",
16-
"ideas",
17-
"infra",
18-
"maintenance",
19-
"projectManagement",
20-
"tool"
21-
]
22-
}
23-
],
24-
"contributorsPerLine": 7,
25-
"contributorsSortAlphabetically": true,
26-
"files": [
27-
"README.md"
28-
],
29-
"imageSize": 100,
30-
"projectName": "without-undefined-properties",
31-
"projectOwner": "JoshuaKGoldberg",
32-
"repoHost": "https://github.com",
33-
"repoType": "github"
2+
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
3+
"contributors": [
4+
{
5+
"login": "JoshuaKGoldberg",
6+
"name": "Josh Goldberg ✨",
7+
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
8+
"profile": "http://www.joshuakgoldberg.com/",
9+
"contributions": [
10+
"code",
11+
"content",
12+
"doc",
13+
"ideas",
14+
"infra",
15+
"maintenance",
16+
"projectManagement",
17+
"tool"
18+
]
19+
}
20+
],
21+
"contributorsSortAlphabetically": true,
22+
"projectName": "without-undefined-properties",
23+
"projectOwner": "JoshuaKGoldberg",
24+
"repoType": "github",
25+
"commitConvention": "angular"
3426
}
27+

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Thanks for your interest in contributing to `without-undefined-properties`! 💖
3+
Thanks for your interest in contributing to `without-undefined-properties`! 🫥
44

55
> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.
66
@@ -93,5 +93,5 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2
9393
## Emojis & Appreciation
9494

9595
If you made it all the way to the end, bravo dear user, we love you.
96-
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.
97-
💖 is a good starter if you're not sure which to use.
96+
Please include an 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.
97+
🫥 is a good starter if you're not sure which to use.

.github/DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):
44

55
```shell
6-
git clone https://github.com/ < your-name-here > /without-undefined-properties
6+
git clone https://github.com/(your-name-here)/without-undefined-properties
77
cd without-undefined-properties
88
pnpm install
99
```

.github/ISSUE_TEMPLATE/02-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
body:
22
- attributes:
33
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
4-
label: Bug Report Checklist
4+
label: Documentation Report Checklist
55
options:
66
- label: I have pulled the latest `main` branch of the repository.
77
required: true

.github/ISSUE_TEMPLATE/03-feature.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
body:
22
- attributes:
33
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
4-
label: Bug Report Checklist
4+
label: Feature Request Checklist
55
options:
66
- label: I have pulled the latest `main` branch of the repository.
77
required: true

.github/ISSUE_TEMPLATE/04-tooling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
body:
22
- attributes:
33
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
4-
label: Bug Report Checklist
4+
label: Tooling Report Checklist
55
options:
66
- label: I have tried restarting my IDE and the issue persists.
77
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- 👋 Hi, thanks for sending a PR to without-undefined-properties! 💖.
1+
<!-- 👋 Hi, thanks for sending a PR to without-undefined-properties! 🫥
22
Please fill out all fields below and make sure each item is true and [x] checked.
33
Otherwise we may not be able to review your PR. -->
44

.github/actions/prepare/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ name: Prepare
55
runs:
66
steps:
77
- uses: pnpm/action-setup@v4
8-
with:
9-
version: 9
108
- uses: actions/setup-node@v4
119
with:
1210
cache: pnpm

.github/actions/transition/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
description: Runs create-typescript-app in transition mode
2+
3+
name: Transition
4+
5+
runs:
6+
steps:
7+
- uses: ./.github/actions/prepare
8+
- run: npx create-typescript-app
9+
shell: bash
10+
- id: auto-commit-action
11+
uses: stefanzweifel/git-auto-commit-action@v5
12+
with:
13+
commit_author: The Friendly Bingo Bot <[email protected]>
14+
commit_message: Check in changes from re-running npx create-typescript-app
15+
commit_user_email: [email protected]
16+
commit_user_name: The Friendly Bingo Bot
17+
- if: steps.auto-commit-action.outputs.changes_detected == 'true'
18+
uses: mshick/add-pr-comment@v2
19+
with:
20+
issue: ${{ github.event.pull_request.number }}
21+
message: >-
22+
🤖 Beep boop! I ran `npx create-typescript-app` and it updated some
23+
files.
24+
25+
I went ahead and checked those changes into this PR for you. Please
26+
review the latest commit to see if you want to merge it.
27+
28+
Cheers!
29+
— _The Friendly Bingo Bot_ 💝
30+
31+
> ℹ️ These automatic commits keep your repository up-to-date with new
32+
versions of
33+
[create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
34+
If you want to opt out, delete your
35+
`.github/workflows/cta-transitions.yml` file.
36+
using: composite

.github/renovate.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"automerge": true,
4-
"extends": ["config:best-practices", "replacements:all"],
4+
"extends": [
5+
":preserveSemverRanges",
6+
"config:best-practices",
7+
"replacements:all"
8+
],
59
"ignoreDeps": ["codecov/codecov-action"],
610
"labels": ["dependencies"],
711
"minimumReleaseAge": "7 days",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
- uses: actions/checkout@v4
77
- uses: ./.github/actions/prepare
88
- run: pnpm build
9-
- run: node ./lib/index.js
9+
- run: node lib/index.js
1010
lint:
1111
name: Lint
1212
runs-on: ubuntu-latest

.github/workflows/cta.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
jobs:
2+
transition:
3+
name: Transition
4+
runs-on: ubuntu-latest
5+
steps:
6+
- uses: actions/checkout@v4
7+
with:
8+
fetch-depth: 0
9+
ref: ${{github.event.pull_request.head.ref}}
10+
repository: ${{github.event.pull_request.head.repo.full_name}}
11+
token: ${{ secrets.ACCESS_TOKEN }}
12+
- id: check
13+
if: (github.actor == 'JoshuaKGoldberg' || github.actor == 'renovate[bot]') && startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'create-typescript-app')
14+
uses: ./.github/actions/transition
15+
- if: steps.check.outcome == 'skipped'
16+
run: echo 'Skipping transition mode because the PR does not appear to be an automated or owner-created update to create-typescript-app.'
17+
18+
name: CTA
19+
20+
on:
21+
pull_request:
22+
branches:
23+
- main
24+
25+
permissions:
26+
pull-requests: write

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
with:
1010
fetch-depth: 0
1111
ref: main
12+
token: ${{ secrets.ACCESS_TOKEN }}
1213
- uses: ./.github/actions/prepare
1314
- run: pnpm build
1415
- env:

.husky/pre-commit

100644100755
File mode changed.

.release-it.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@
33
"commitMessage": "chore: release v${version}",
44
"requireCommits": true
55
},
6-
"github": {
7-
"autoGenerate": true,
8-
"release": true,
9-
"releaseName": "v${version}"
10-
},
6+
"github": { "release": true, "releaseName": "v${version}" },
117
"npm": { "publishArgs": ["--access public", "--provenance"] },
128
"plugins": {
139
"@release-it/conventional-changelog": {
1410
"infile": "CHANGELOG.md",
15-
"preset": "angular"
11+
"preset": "angular",
12+
"types": [
13+
{ "section": "Features", "type": "feat" },
14+
{ "section": "Bug Fixes", "type": "fix" },
15+
{ "section": "Performance Improvements", "type": "perf" },
16+
{ "hidden": true, "type": "build" },
17+
{ "hidden": true, "type": "chore" },
18+
{ "hidden": true, "type": "ci" },
19+
{ "hidden": true, "type": "docs" },
20+
{ "hidden": true, "type": "refactor" },
21+
{ "hidden": true, "type": "style" },
22+
{ "hidden": true, "type": "test" }
23+
]
1624
}
1725
}
1826
}

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h1 align="center">Without Undefined Properties</h1>
22

3-
<p align="center">Copies an object without its <code>undefined</code> properties. 🫥</p>
3+
<p align="center">
4+
Copies an object without its <code>undefined</code> properties.
5+
🫥
6+
</p>
47

58
<p align="center">
69
<!-- prettier-ignore-start -->
@@ -10,8 +13,8 @@
1013
<!-- prettier-ignore-end -->
1114
<a href="https://github.com/JoshuaKGoldberg/without-undefined-properties/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>
1215
<a href="https://codecov.io/gh/JoshuaKGoldberg/without-undefined-properties" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/without-undefined-properties?label=%F0%9F%A7%AA%20coverage" /></a>
13-
<a href="https://github.com/JoshuaKGoldberg/without-undefined-properties/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>
14-
<a href="http://npmjs.com/package/without-undefined-properties"><img alt="📦 npm version" src="https://img.shields.io/npm/v/without-undefined-properties?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
16+
<a href="https://github.com/JoshuaKGoldberg/without-undefined-properties/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>
17+
<a href="http://npmjs.com/package/without-undefined-properties" target="_blank"><img alt="📦 npm version" src="https://img.shields.io/npm/v/without-undefined-properties?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
1518
<img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
1619
</p>
1720

@@ -47,7 +50,7 @@ withoutUndefinedPropertiesDeep({ a: true, b: { c: false, d: undefined } });
4750
## Development
4851

4952
See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
50-
Thanks! 💖
53+
Thanks! 🫥
5154

5255
## Contributors
5356

@@ -69,6 +72,4 @@ Thanks! 💖
6972
<!-- ALL-CONTRIBUTORS-LIST:END -->
7073
<!-- spellchecker: enable -->
7174

72-
<!-- You can remove this notice if you don't want it 🙂 no worries! -->
73-
74-
> 💝 This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [`create` engine](https://github.com/JoshuaKGoldberg/create).
75+
> 💝 This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [Bingo engine](https://create.bingo).

create-typescript-app.config.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// 👋 Hi! This is an optional config file for create-typescript-app (CTA).
2+
// Repos created with CTA or its underlying framework Bingo don't use one by default.
3+
// A CTA config file allows automatic updates to the repo that preserve customizations.
4+
// For more information, see Bingo's docs:
5+
// https://www.create.bingo/execution#transition-mode
6+
// Eventually these values should be inferable, making this config file unnecessary:
7+
// https://github.com/JoshuaKGoldberg/bingo/issues/128
8+
import {
9+
blockCodecov,
10+
blockCTATransitions,
11+
blockESLint,
12+
blockVitest,
13+
createConfig,
14+
} from "create-typescript-app";
15+
16+
export default createConfig({
17+
refinements: {
18+
addons: [
19+
blockCodecov({
20+
env: {
21+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}",
22+
},
23+
}),
24+
blockESLint({
25+
rules: [
26+
{
27+
entries: {
28+
"@typescript-eslint/no-dynamic-delete": "off",
29+
"@typescript-eslint/no-empty-object-type": "off",
30+
},
31+
},
32+
],
33+
}),
34+
blockVitest({
35+
coverage: {
36+
exclude: ["**/*.test-d.ts", "src/index.ts"],
37+
},
38+
flags: ["--typecheck"],
39+
}),
40+
],
41+
blocks: {
42+
add: [blockCTATransitions],
43+
},
44+
},
45+
});

eslint.config.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import jsdoc from "eslint-plugin-jsdoc";
55
import jsonc from "eslint-plugin-jsonc";
66
import markdown from "eslint-plugin-markdown";
77
import n from "eslint-plugin-n";
8-
import packageJson from "eslint-plugin-package-json/configs/recommended";
8+
import packageJson from "eslint-plugin-package-json";
99
import perfectionist from "eslint-plugin-perfectionist";
1010
import * as regexp from "eslint-plugin-regexp";
1111
import yml from "eslint-plugin-yml";
@@ -24,7 +24,7 @@ export default tseslint.config(
2424
jsonc.configs["flat/recommended-with-json"],
2525
markdown.configs.recommended,
2626
n.configs["flat/recommended"],
27-
packageJson,
27+
packageJson.configs.recommended,
2828
perfectionist.configs["recommended-natural"],
2929
regexp.configs["flat/recommended"],
3030
{
@@ -53,17 +53,15 @@ export default tseslint.config(
5353
"object-shorthand": "error",
5454
"operator-assignment": "error",
5555
},
56-
settings: { perfectionist: { partitionByComment: true, type: "natural" } },
56+
settings: {
57+
perfectionist: { partitionByComment: true, type: "natural" },
58+
vitest: { typecheck: true },
59+
},
5760
},
5861
{
5962
extends: [tseslint.configs.disableTypeChecked],
6063
files: ["**/*.md/*.ts"],
61-
rules: {
62-
"n/no-missing-import": [
63-
"error",
64-
{ allowModules: ["without-undefined-properties"] },
65-
],
66-
},
64+
rules: { "n/no-missing-import": "off" },
6765
},
6866
{
6967
extends: [vitest.configs.recommended],

knip.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://unpkg.com/knip@latest/schema.json",
3-
"entry": ["src/index.ts!"],
2+
"$schema": "https://unpkg.com/knip@5.46.0/schema.json",
3+
"entry": ["src/index.ts", "src/**/*.test.*"],
44
"ignoreExportsUsedInFile": { "interface": true, "type": true },
5-
"project": ["src/**/*.ts!"]
5+
"project": ["src/**/*.ts"]
66
}

0 commit comments

Comments
 (0)