JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app
π Bug: package.json `""` author.name not changed by set Git user
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 89
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
### Bug Report Checklist
- [x] I have tried restarting my IDE and the issue persists.
- [x] I have pulled in the newest version of the project.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue) and found none that matched my issue.
### Expected
I intentionally have my global gitconfig include the following:
```gitconfig
[user]
name =
email =
useConfigOnly = true
```
And I have an alias to easily set up a per-repository user configuration. It is part of my workflow where I use this to help separate my work repositories from my personal repositories.
The expected behaviour is that the command should create the repository successfully and pass the initial `pnpm lint --fix`
### Actual
When initializing a new repository with `create-typescript-app --preset everything`
```
β Tip: to run again with the same input values, use: npx create-typescript-app --description "grab bag of random projects" --email "[object Object]" --preset everything
β
β The pnpm lint --fix script failed. You should re-run it and fix its complaints.
β ExecaError: Command failed with exit code 1: pnpm lint --fix
β
β
β > disordered@0.0.0 lint /Users/emily.klassen/code/public/disordered
β > eslint . --max-warnings 0 --fix
β
β
β /Users/emily.klassen/code/public/disordered/package.json
β 1:193 error Invalid author: name should not be empty package-json/valid-author
β
β β 1 problem (1 error, 0 warnings)
β
β \u2009ELIFECYCLE\u2009 Command failed with exit code 1.
β at getFinalError (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/execa/lib/return/final-error.js:6:9)
β at makeError (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/execa/lib/return/result.js:108:16)
β at getAsyncResult (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/execa/lib/methods/main-async.js:168:4)
β at handlePromise (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/execa/lib/methods/main-async.js:151:17)
β at async runCommand (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/bingo/lib/runners/applyScriptsToSystem.js:10:24)
β at async file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/bingo/lib/runners/applyScriptsToSystem.js:22:17
β at async Promise.all (index 0)
β at async applyScriptsToSystem (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/bingo/lib/runners/applyScriptsToSystem.js:20:9)
β at async Promise.all (index 0)
β at async runCreation (file:///Users/emily.klassen/Library/pnpm/store/v3/tmp/dlx-99388/node_modules/bingo/lib/runners/runCreation.js:8:5)
β
β Thanks for using create-typescript-app! π
Be sure to:
- enable the GitHub apps on https://github.com/forivall/disordered/settings/installations:
- Codecov (https://github.com/apps/codecov)
- Renovate (https://github.com/apps/renovate)
- populate the secret on https://github.com/forivall/disordered/settings/secrets/actions:
- ACCESS_TOKEN (a GitHub PAT with repo and workflow permissions)
- add forivall/disordered and `release.yaml` as a Trusted Publisher on:
https://www.npmjs.com/package/disordered/access
```
After which, I set up my user name with
```
# ~repos/disordered main
Β» git config-user -h
'config-user' is aliased to '!git config --local user.name "$1" && git config --local user.email "$2" && :'
# ~repos/disordered main
Β» git config-user 'Emily M Klassen' 'hello@forivall.com'
# ~repos/disordered main
Β» pnpx create-typescript-app --remote
(node:12512) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
βWARNβ 1 deprecated subdependencies found: @types/parse-path@7.1.0
βWARNβ Issues with peer dependencies found
.
βββ¬ create-typescript-app 2.60.0
βββ¬ input-from-script 0.5.5
β βββ β unmet peer bingo@^0.8.1: found 0.9.2
βββ¬ input-from-file-json 0.5.5
βββ β unmet peer bingo@^0.8.1: found 0.9.2
βββ¬ input-from-file 0.5.5
βββ β unmet peer bingo@^0.8.1: found 0.9.2
Packages: +350
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 349, reused 171, downloaded 178, added 350, done
β β¨ create-typescript-app@2.60.0 β¨
β
β Learn more on:
β https://github.com/JoshuaKGoldberg/create-typescript-app
β
β Running with mode --transition
β
β Detected --preset everything from existing files on disk
β
β Inferred options from existing repository
β
β Created repository on GitHub
β
β You've got a new repository ready to use in:
β https://github.com/forivall/disordered
β
β Ran create-typescript-app
β
β Created initial commit
β
β The pnpm lint --fix script failed. You should re-run it and fix its complaints.
β ExecaError: Command failed with exit code 1: pnpm lint --fix
β
β
β > disordered@0.0.0 lint /Users/emily.klassen/code/public/disordered
β > eslint . --max-warnings 0 --fix
β
β
β /Users/emily.klassen/code/public/disordered/package.json
β 11:3 error Invalid author: name should not be empty package-json/valid-author
β
β β 1 problem (1 error, 0 warnings)
β
β \u2009ELIFECYCLE\u2009 Command failed with exit code 1.
β at getFinalError (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/execa/lib/return/final-error.js:6:9)
β at makeError (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/execa/lib/return/result.js:108:16)
β at getAsyncResult (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/execa/lib/methods/main-async.js:168:4)
β at handlePromise (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/execa/lib/methods/main-async.js:151:17)
β at async runCommand (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/bingo/lib/runners/applyScriptsToSystem.js:10:24)
β at async file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/bingo/lib/runners/applyScriptsToSystem.js:22:17
β at async Promise.all (index 0)
β at async applyScriptsToSystem (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/bingo/lib/runners/applyScriptsToSystem.js:20:9)
β at async Promise.all (index 0)
β at async runCreation (file:///Users/emily.klassen/Library/Caches/pnpm/dlx/ab78f57cc4a118999bcf7ba2468e04a59ea0e59f42f176a6e02b6be32b365345/19c53ae28c5-30e0/node_modules/bingo/lib/runners/runCreation.js:8:5)
β
β Done. Enjoy your updated repository! π
```
As the resulting package.json includes the following:
```json
"author": {
"name": "",
"email": "hello@forivall.com"
},
```
### Additional Info
(see _expected_)
Contributor guide
Assessment
This issue has not been assessed yet.